:root {
  color-scheme: dark;
  --bg: #08111f;
  --surface: #0f1b2e;
  --surface-2: #14243a;
  --text: #eef5ff;
  --muted: #9fb0c7;
  --brand: #38bdf8;
  --brand-2: #a78bfa;
  --accent: #22c55e;
  --gold: #facc15;
  --danger: #fb7185;
  --line: rgba(255, 255, 255, 0.12);
  --glass: rgba(15, 27, 46, 0.72);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 28px;
  --container: min(1120px, calc(100% - 32px));
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f7fbff;
  --surface: #ffffff;
  --surface-2: #edf5ff;
  --text: #102033;
  --muted: #5b6b80;
  --line: rgba(15, 23, 42, 0.12);
  --glass: rgba(255, 255, 255, 0.78);
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.22), transparent 32rem),
    radial-gradient(circle at 80% 10%, rgba(167, 139, 250, 0.18), transparent 30rem),
    radial-gradient(circle at 50% 70%, rgba(34, 197, 94, 0.08), transparent 32rem),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }
button, input, textarea, select { font: inherit; }
.container { width: var(--container); margin-inline: auto; }
.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  background: var(--brand);
  color: #00111d;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  z-index: 30;
}
.skip-link:focus { left: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav { height: 76px; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 0.75rem; }
.logo-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 14px 36px rgba(56, 189, 248, 0.26);
}
.logo small { display: block; color: var(--muted); font-size: 0.76rem; margin-top: -0.2rem; }
.nav-menu { display: flex; align-items: center; gap: 1rem; }
.nav-menu a { color: var(--muted); font-weight: 800; font-size: 0.92rem; }
.nav-menu a:hover, .nav-menu a:focus-visible { color: var(--text); }
.theme-toggle, .nav-toggle {
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--text);
  cursor: pointer;
}
.theme-toggle { width: 42px; height: 42px; border-radius: 50%; }
.nav-toggle { display: none; border-radius: 12px; padding: 0.6rem; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px; transition: transform 0.25s ease, opacity 0.25s ease; }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.section { padding: 48px 0; }
.hero { position: relative; min-height: calc(100vh - 76px); display: grid; align-items: center; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, transparent, rgba(255,255,255,0.04), transparent); mask-image: radial-gradient(circle at center, black, transparent 72%); }
.hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 3rem; align-items: center; }
.split { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 4rem; align-items: center; }
.eyebrow { display: inline-flex; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brand); font-size: 0.78rem; font-weight: 950; margin: 0 0 1rem; }
.hero h1 { font-size: clamp(1.9rem, 3.2vw, 2.9rem); line-height: 1.12; letter-spacing: -0.03em; margin: 0 0 1.3rem; text-wrap: balance; }
.section-heading h2, .contact h2 { font-size: clamp(2rem, 4vw, 3.7rem); line-height: 0.96; letter-spacing: -0.07em; margin: 0 0 1.3rem; }
.hero-lead { font-size: clamp(1.18rem, 2.3vw, 1.65rem); color: var(--text); max-width: 760px; }
.hero-text, .about-copy p, .contact p { color: var(--muted); font-size: 1.05rem; }
.hero-actions, .contact-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin: 2rem 0; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 1rem 1.25rem;
  border-radius: 999px;
  font-weight: 950;
  border: 1px solid var(--line);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
}
.btn:hover, .btn:focus-visible { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border: 0; box-shadow: 0 16px 40px rgba(56, 189, 248, 0.22); }
.btn.secondary { background: var(--glass); color: var(--text); }
.btn.telegram { background: linear-gradient(135deg, #0088cc, #229ED9); color: #fff; border: 0; }
.hero-stats, .achievement-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; }
.hero-stats { grid-template-columns: repeat(3, 1fr); max-width: 700px; }
.hero-stats span, .achievement-card, .glass-card, .skill-category, .testimonial-card, .lead-form {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--glass), color-mix(in srgb, var(--surface-2) 68%, transparent));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.hero-stats span { padding: 1rem; border-radius: 18px; color: var(--muted); }
.hero-stats strong { display: block; color: var(--text); font-size: 1.5rem; }
.hero-card { position: relative; min-height: 470px; display: grid; place-items: center; }
.profile-card { position: relative; z-index: 1; padding: 2rem; border-radius: var(--radius); text-align: center; }
.profile-image{
    width:min(260px,72vw);
    aspect-ratio:1;
    margin:0 auto 1.35rem;
    border-radius:38px;
    overflow:hidden;
    border:1px solid color-mix(in srgb,var(--brand) 38%,var(--line));
    box-shadow:inset 0 0 60px rgba(255,255,255,.08),0 24px 60px rgba(0,0,0,.22);
}
.profile-image img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.card-tags, .skill-cloud { display: flex; gap: 0.7rem; flex-wrap: wrap; justify-content: center; }
.card-tags span, .skill-cloud span { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 0.55rem 0.8rem; color: var(--muted); font-weight: 850; font-size: 0.88rem; }
.profile-orbit { position: absolute; inset: 0; z-index: 0; opacity: 0.45; animation: float 5s ease-in-out infinite; }
.hero-card > *:not(.profile-orbit) { position: relative; z-index: 1; }
.profile-orbit span { position: absolute; border-radius: 50%; filter: blur(0.2px); background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.profile-orbit span:nth-child(1) { width: 90px; height: 90px; top: 18%; left: 8%; }
.profile-orbit span:nth-child(2) { width: 56px; height: 56px; right: 10%; top: 8%; background: var(--accent); }
.profile-orbit span:nth-child(3) { width: 120px; height: 120px; right: 2%; bottom: 12%; opacity: 0.65; }

.centered { text-align: center; max-width: 780px; margin: 0 auto 2rem; }
.service-grid, .portfolio-grid, .skills-grid, .testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.service-grid .service-card:last-child, .portfolio-grid .portfolio-card:last-child, .portfolio-grid a.portfolio-card:last-child { grid-column: 2; }
.expanded-grid { grid-template-columns: repeat(3, 1fr); }
.service-card, .portfolio-card, .timeline-item, .achievement-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  padding: 1.35rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.service-card:hover, .portfolio-card:hover, .achievement-card:hover, .testimonial-card:hover, .skill-category:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.service-card span, .achievement-card strong { color: var(--brand); font-weight: 1000; }
.achievement-card strong { font-size: 2.4rem; }
.service-card h3, .portfolio-card h3, .timeline h3, .achievement-card h3, .skill-category h3 { margin: 0.8rem 0 0.4rem; }
.service-card p, .portfolio-card p, .timeline p, .timeline small, .achievement-card p, .testimonial-card span { color: var(--muted); }
.portfolio { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--surface) 34%, transparent), transparent); }
.mockup { height: 190px; border-radius: 20px; margin-bottom: 1rem; position: relative; overflow: hidden; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.mockup::after { content: ""; position: absolute; inset: 18px; border: 1px solid rgba(255, 255, 255, 0.45); border-radius: 16px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.04)); }
.mockup { display: flex; align-items: center; justify-content: center; }
.mockup span { position: relative; z-index: 1; font-size: 1.9rem; font-weight: 1000; color: #fff; letter-spacing: -0.02em; text-shadow: 0 2px 14px rgba(0,0,0,0.3); }
.slideshow { height: 190px; border-radius: 20px; margin-bottom: 1rem; position: relative; overflow: hidden; background: var(--surface); }
.slideshow .slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.7s ease; pointer-events: none; }
.slideshow .slide.active { opacity: 1; pointer-events: auto; }
.slideshow .slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qr { background: linear-gradient(135deg, #22c55e, #38bdf8); }
.resume { background: linear-gradient(135deg, #facc15, #38bdf8); }
.brand { background: linear-gradient(135deg, #f97316, #a78bfa); }
.ai { background: linear-gradient(135deg, #8b5cf6, #06b6d4); }
.ads { background: linear-gradient(135deg, #ef4444, #f97316); }
.timeline { max-width: 860px; margin: 0 auto; position: relative; }
.timeline::before { content: ""; position: absolute; left: 20px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.timeline-item { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 1rem; margin-bottom: 1rem; }
.timeline-item > span { width: 18px; height: 18px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 8px color-mix(in srgb, var(--brand) 18%, transparent); margin: 7px 0 0 12px; }
.skills-grid { grid-template-columns: repeat(2, 1fr); }
.skill-category { border-radius: 24px; padding: 1.35rem; }
.skill-cloud { justify-content: flex-start; }
.testimonial-card { border-radius: 24px; padding: 1.5rem; }
.testimonial-card p { font-size: 1.02rem; }
.testimonial-card strong { display: block; margin-top: 1rem; }
.testimonial-card span { display: block; font-size: 0.92rem; }

.contact-layout { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 1rem; align-items: stretch; }
.contact-card, .lead-form { border-radius: calc(var(--radius) + 8px); padding: clamp(1.4rem, 4vw, 2.2rem); }
.contact-card { text-align: left; }
.copy-status, .form-status { min-height: 1.5rem; color: var(--accent); font-weight: 850; }
.form-status.error, .copy-status.error { color: var(--danger); }
.social-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.social-links a { color: var(--brand); font-weight: 900; border-bottom: 1px solid transparent; }
.social-links a:hover, .social-links a:focus-visible { border-color: currentColor; }
.lead-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.form-row { display: grid; gap: 0.45rem; }
.form-row.full, .form-submit, .form-status { grid-column: 1 / -1; }
label { color: var(--text); font-weight: 900; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--text);
  padding: 0.9rem 1rem;
  outline: none;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
input.invalid, textarea.invalid, select.invalid { border-color: var(--danger); }
.honeypot { display: none; }
.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 1000;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 15;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.footer { border-top: 1px solid var(--line); padding: 1.5rem 0; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; transition-delay: var(--delay, 0s); }
.reveal.visible { opacity: 1; transform: none; }

@keyframes float { 50% { transform: translateY(-18px) rotate(8deg); } }

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 84px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    box-shadow: var(--shadow);
  }
  .nav-menu.open { display: flex; }
  .nav-menu a, .theme-toggle { padding: 0.75rem; }
  .theme-toggle { width: 100%; border-radius: 14px; }
  .hero-grid, .split, .contact-layout { grid-template-columns: 1fr; gap: 2.2rem; }
  .section { padding: 40px 0; }
  .service-grid .service-card:last-child, .portfolio-grid .portfolio-card:last-child, .portfolio-grid a.portfolio-card:last-child { grid-column: auto; }
  .hero { min-height: auto; padding-top: 42px; }
  .hero-stats, .achievement-grid, .service-grid, .portfolio-grid, .expanded-grid, .testimonial-grid { grid-template-columns: 1fr; }
  .skills-grid, .lead-form { grid-template-columns: 1fr; }
  .hero-card { min-height: 380px; }
  .footer-inner { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Pricing */
.pricing-intro { color: var(--muted); max-width: 720px; margin: 0 auto; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.pricing-card { border: 1px solid var(--line); border-radius: 24px; background: color-mix(in srgb, var(--surface) 88%, transparent); padding: 1.6rem; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08); display: grid; gap: 0.6rem; align-content: start; }
.pricing-card.featured { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); box-shadow: 0 18px 50px rgba(56, 189, 248, 0.18); }
.pricing-card h3 { margin: 0; }
.pricing-card .price { font-size: 2rem; font-weight: 1000; margin: 0; }
.pricing-card .price small { font-size: 0.95rem; color: var(--muted); font-weight: 700; }
.pricing-card ul { margin: 0 0 0.6rem; padding-left: 1.2rem; color: var(--muted); }
.pricing-card li { margin: 0.35rem 0; }
.pricing-note { text-align: center; color: var(--muted); margin-top: 2rem; }
/* Portfolio links */
.portfolio-link { color: var(--brand); font-weight: 900; display: inline-block; margin-top: 0.4rem; }
.portfolio-link:hover { text-decoration: underline; }
/* Telegram QR */
.telegram-qr { margin-top: 1.4rem; display: grid; gap: 0.5rem; justify-items: start; }
.telegram-qr img { width: 160px; height: 160px; background: #fff; padding: 8px; border-radius: 16px; border: 1px solid var(--line); display: block; }
.telegram-qr p { margin: 0; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 980px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

/* About */
.about-highlights { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
.about-highlights span { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 0.55rem 0.85rem; color: var(--muted); font-weight: 850; font-size: 0.88rem; }
.about-copy h3 { margin: 1.4rem 0 0.7rem; font-size: 1.05rem; }
.about-copy p a { color: var(--brand); font-weight: 800; }
.about-what { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.about-what a { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 0.55rem 0.85rem; color: var(--text); font-weight: 850; font-size: 0.88rem; }
.about-what a:hover { border-color: var(--brand); }
.about-connect { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 1.4rem; color: var(--muted); }
.about-connect a { color: var(--brand); font-weight: 900; }

.mockup.urdu { background: linear-gradient(135deg, #0d9488, #134959); }
.mockup.en { background: linear-gradient(135deg, #2563eb, #38bdf8); }
a.portfolio-card { display: block; }

.about-highlights span a { color: var(--text); font-weight: 900; text-decoration: underline; text-underline-offset: 2px; }
