/* ==========================================================================
   Umar Saeed Qureshi — homepage design system
   Dark, technical, and calm: one surface language, one type scale,
   one accent system. Hero-specific depot styles live in depot.css.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Surfaces */
  --bg: #05070f;
  --bg-raised: #0a0e1b;
  --bg-panel: #0d1222;
  --surface: rgba(148, 163, 255, .045);
  --surface-strong: rgba(148, 163, 255, .08);
  --line: rgba(148, 163, 255, .13);
  --line-strong: rgba(148, 163, 255, .26);

  /* Text */
  --text: #eef1fb;
  --muted: #a3abc4;
  --soft: #7d86a3;

  /* Accents */
  --lime: #c8ff4d;
  --lime-soft: rgba(200, 255, 77, .14);
  --cyan: #4de2ff;
  --violet: #8f80ff;
  --pink: #ff7ad9;
  --orange: #ff9a52;
  --danger: #ff6b7d;
  --gradient: linear-gradient(100deg, var(--cyan) 0%, var(--violet) 48%, var(--lime) 100%);
  --gradient-text: linear-gradient(95deg, #4de2ff 0%, #7c9bff 50%, #b39cff 100%);

  /* Type */
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Geometry */
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --header-h: 68px;
  --ease: cubic-bezier(.22, .8, .25, 1);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .7);
  --glow-lime: 0 0 0 1px rgba(200, 255, 77, .35), 0 10px 30px -8px rgba(200, 255, 77, .45);

  /* Component surfaces (the dark values are the original design) */
  --lime-fill: #c8ff4d;           /* neon fills with dark text: identical in both themes */
  --lime-fill-hover: #d9ff85;
  --on-lime: #05070f;
  --gradient-shimmer: linear-gradient(95deg, #4de2ff 0%, #7c9bff 28%, #b39cff 50%, #7c9bff 72%, #4de2ff 100%);
  --header-bg: rgba(5, 7, 15, .78);
  --header-bg-solid: rgba(5, 7, 15, .97);
  --menu-bg: #070a14;
  --card-bg: linear-gradient(180deg, rgba(13, 18, 34, .92), rgba(8, 11, 22, .92));
  --stage-bg: linear-gradient(160deg, #0e1428, #070a15);
  --stage-flat: #080b16;
  --stage-grid: rgba(255, 255, 255, .06);
  --stage-line: rgba(255, 255, 255, .1);
  --stage-text: rgba(238, 241, 251, .7);
  --glass-bg: rgba(8, 11, 22, .72);
  --glass-bg-strong: rgba(10, 14, 27, .88);
  --glass-line: rgba(255, 255, 255, .14);
  --input-bg: #070a14;
  --footer-bg: #04050b;
  --band-tint: rgba(13, 18, 34, .6);
  --device-shadow: rgba(0, 0, 0, .8);
  --button-dark-hover: #fff;
  --button-dark-glow: rgba(255, 255, 255, .45);
  --tint-lime: rgba(200, 255, 77, .12);
  --tint-lime-line: rgba(200, 255, 77, .3);
  --tint-lime-faint: rgba(200, 255, 77, .06);
}

/* Light theme: same layout and accents, deepened so text stays readable on white.
   The inline head script sets data-theme from the saved choice or the system setting. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fb;
  --bg-raised: #ffffff;
  --bg-panel: #eef1f8;
  --surface: rgba(15, 23, 42, .035);
  --surface-strong: rgba(15, 23, 42, .065);
  --line: rgba(15, 23, 42, .1);
  --line-strong: rgba(15, 23, 42, .2);
  --text: #0b1020;
  --muted: #4a5368;
  --soft: #626b80;
    --lime: #3f6d0b;
  --lime-soft: rgba(101, 163, 13, .16);
    --cyan: #0b6a84;
  --violet: #6d4ee0;
    --pink: #b0277f;
  --orange: #b23c0a;
  --danger: #e5484d;
  --gradient-text: linear-gradient(95deg, #0e7490 0%, #4f46e5 52%, #7c3aed 100%);
  --gradient-shimmer: linear-gradient(95deg, #0e7490 0%, #4f46e5 28%, #7c3aed 50%, #4f46e5 72%, #0e7490 100%);
  --shadow: 0 24px 50px -30px rgba(15, 23, 42, .3);
  --glow-lime: 0 0 0 1px rgba(77, 124, 15, .35), 0 10px 30px -12px rgba(101, 163, 13, .45);
  --header-bg: rgba(244, 246, 251, .84);
  --header-bg-solid: rgba(244, 246, 251, .98);
  --menu-bg: #ffffff;
  --card-bg: linear-gradient(180deg, #ffffff, #fbfcfe);
  --stage-bg: linear-gradient(160deg, #eef2fb, #e2e8f6);
  --stage-flat: #eef2fa;
  --stage-grid: rgba(15, 23, 42, .06);
  --stage-line: rgba(15, 23, 42, .1);
    --stage-text: #4a5368;
  --glass-bg: rgba(255, 255, 255, .86);
  --glass-bg-strong: rgba(255, 255, 255, .94);
  --glass-line: rgba(15, 23, 42, .12);
  --input-bg: #ffffff;
  --footer-bg: #e9edf6;
  --band-tint: rgba(226, 232, 246, .7);
  --device-shadow: rgba(15, 23, 42, .3);
  --button-dark-hover: #1e2638;
  --button-dark-glow: rgba(15, 23, 42, .35);
  --tint-lime: rgba(132, 204, 22, .12);
  --tint-lime-line: rgba(77, 124, 15, .3);
  --tint-lime-faint: rgba(132, 204, 22, .07);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  overflow-x: clip;
  color: var(--text);
  background: var(--bg);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -.03em; line-height: 1.05; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { color: var(--on-lime); background: var(--lime-fill); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 1000; top: 12px; left: 12px; padding: 10px 16px; border-radius: 10px; color: var(--on-lime); background: var(--lime-fill); font-weight: 600; transform: translateY(-160%); transition: transform .2s var(--ease); }
.skip-link:focus { transform: none; }
.page-top { position: absolute; top: 0; }
.container { width: min(var(--max), calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.mobile-only { display: none; }
.portfolio-details { position: relative; isolation: isolate; background: var(--bg); }
.portfolio-details::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(148,163,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,255,.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, #000, rgba(0,0,0,.35) 40%, #000 70%, rgba(0,0,0,.4));
}

/* ---------- Sticky header (appears after the hero) ---------- */
.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  height: var(--header-h);
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  transform: translateY(-105%);
  transition: transform .35s var(--ease);
}
.site-header.is-visible, body.menu-open .site-header { transform: none; }
.scroll-progress { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; overflow: hidden; }
.scroll-progress span { display: block; height: 100%; background: var(--gradient); transform: scaleX(0); transform-origin: left; }
body > .scroll-progress { position: fixed; z-index: 101; top: calc(var(--header-h) - 2px); bottom: auto; }
.brand small { display: none; }
.header-inner { display: flex; height: 100%; align-items: center; justify-content: space-between; gap: 24px; }
.brand, .footer-brand { display: inline-flex; align-items: baseline; color: var(--text); font: 700 24px/1 var(--display); letter-spacing: -.06em; }
.brand-spark, .footer-brand span { color: var(--lime); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { position: relative; padding: 8px 12px; border-radius: 999px; color: var(--muted); font: 500 14px/1 var(--body); transition: color .2s, background-color .2s; }
.nav-links a:hover { color: var(--text); background: var(--surface-strong); }
.nav-links a.is-active { color: var(--text); }
.nav-links a.is-active::after { content: ""; position: absolute; right: 12px; bottom: 2px; left: 12px; height: 2px; border-radius: 2px; background: var(--lime); }
.nav-links .nav-contact { margin-left: 10px; padding: 10px 16px; color: var(--on-lime); background: var(--lime-fill); font-weight: 600; }
.nav-links .nav-contact:hover { color: var(--on-lime); background: var(--lime-fill-hover); }
.nav-toggle { display: none; position: relative; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.nav-toggle span { position: absolute; left: 12px; width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .25s var(--ease), top .25s var(--ease); }
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 24px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

@media (max-width: 1023px) {
  .nav-toggle { display: inline-block; }
  .nav-links {
    position: fixed;
    top: var(--header-h);
    right: 0;
    left: 0;
    display: grid;
    gap: 2px;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    padding: 12px var(--gutter) 24px;
    border-bottom: 1px solid var(--line);
    background: var(--menu-bg);
    box-shadow: 0 30px 60px -20px rgba(0,0,0,.8);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s, transform .25s var(--ease), visibility .2s;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { padding: 14px 12px; border-radius: 12px; font-size: 16px; }
  .nav-links a.is-active::after { display: none; }
  .nav-links a.is-active { background: var(--surface-strong); }
  .nav-links .nav-contact { margin: 10px 0 0; text-align: center; }
}

/* ---------- Shared typography ---------- */
.section { position: relative; padding: clamp(80px, 11vw, 136px) 0; }
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font: 500 12px/1.4 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.kicker-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px var(--lime-soft), 0 0 14px rgba(200,255,77,.7); }
.section-heading { display: grid; gap: 20px 48px; align-items: end; margin-bottom: clamp(36px, 5vw, 60px); }
.section-heading h2, .now-section h2, .working-section h2, .about-section h2, .process-heading h2 { margin-top: 16px; font-size: clamp(2.15rem, 4.6vw, 3.6rem); }
.section-heading > p { max-width: 46ch; color: var(--muted); font-size: clamp(15px, 1.3vw, 17px); }
.accent-text, .section-heading h2 em { color: transparent; background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; -webkit-box-decoration-break: clone; box-decoration-break: clone; font-style: normal; }
.state-title-accent { color: var(--text); }
@media (min-width: 900px) {
  .section-heading { grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); }
  .section-heading > p { justify-self: end; }
}

/* ---------- Buttons ---------- */
.button {
  --mx: 0px;
  --my: 0px;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 8px 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 14px/1 var(--body);
  white-space: nowrap;
  transform: translate(var(--mx), var(--my));
  transition: background-color .2s, border-color .2s, box-shadow .25s, color .2s, transform .25s var(--ease);
}
.button-arrow { display: inline-grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; font-size: 14px; transition: transform .25s var(--ease); }
.button:hover .button-arrow { transform: rotate(45deg); }
.button-dark { color: var(--bg); background: var(--text); }
.button-dark .button-arrow { color: var(--text); background: var(--bg); }
.button-dark:hover { background: var(--button-dark-hover); box-shadow: 0 10px 30px -10px var(--button-dark-glow); }
.button-lime { color: var(--on-lime); background: var(--lime-fill); }
.button-lime .button-arrow { color: var(--lime-fill); background: #05070f; }
.button-lime:hover { box-shadow: var(--glow-lime); }
.button-ghost { border-color: var(--line-strong); color: var(--text); background: var(--surface); }
.button-ghost .button-arrow { background: var(--surface-strong); }
.button-ghost:hover { border-color: var(--lime); }

/* ---------- Ticker + highlights ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--bg-raised); }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee-set { display: flex; flex: 0 0 auto; align-items: center; gap: 28px; padding: 16px 14px; }
.marquee-set span { color: var(--muted); font: 500 13px/1 var(--mono); letter-spacing: .14em; white-space: nowrap; }
.marquee-set b { color: var(--lime); font-weight: 400; }
@keyframes marquee { to { transform: translateX(-50%); } }

.proof-strip { border-bottom: 1px solid var(--line); }
.proof-strip-inner { display: grid; grid-template-columns: repeat(2, 1fr); }
.proof-strip-inner > div { display: flex; align-items: center; gap: 14px; padding: 22px 18px; border-left: 1px solid var(--line); }
.proof-strip-inner > div:nth-child(odd) { border-left: 0; }
.proof-strip-inner > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.proof-strip strong { color: transparent; background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; -webkit-box-decoration-break: clone; box-decoration-break: clone; font: 600 clamp(24px, 3vw, 32px)/1 var(--display); }
.proof-strip span { color: var(--muted); font: 500 12px/1.35 var(--body); }
@media (min-width: 860px) {
  .proof-strip-inner { grid-template-columns: repeat(4, 1fr); }
  .proof-strip-inner > div { padding: 28px 24px; border-bottom: 0 !important; border-left: 1px solid var(--line) !important; }
  .proof-strip-inner > div:first-child { border-left: 0 !important; }
}

/* ---------- Projects ---------- */
.project-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.project-filter {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font: 500 13px/1 var(--body);
  transition: color .2s, border-color .2s, background-color .2s;
}
.project-filter:hover { border-color: var(--line-strong); color: var(--text); }
.project-filter.is-active { border-color: var(--lime-fill); color: var(--on-lime); background: var(--lime-fill); }

.projects-list { display: flex; flex-direction: column; row-gap: 24px; }
@media (min-width: 600px) { .projects-list { row-gap: 32px; } }
@media (min-width: 1101px) { .projects-list { row-gap: 40px; } }

.project-card {
  --accent: var(--cyan);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  /* A ring instead of a border keeps the copy and media panels flush with the card edge. */
  box-shadow: 0 0 0 1px var(--line), var(--shadow);
  transition: box-shadow .35s var(--ease), transform .35s var(--ease);
}
.project-card::before { content: ""; position: absolute; z-index: 2; top: 0; right: 0; left: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .7; }
.project-card:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent), var(--shadow), 0 36px 90px -46px color-mix(in srgb, var(--accent) 70%, transparent); }
.project-card--pulse { box-shadow: 0 0 0 1px rgba(77,226,255,.26), var(--shadow), 0 40px 100px -56px rgba(77,226,255,.55); }
.project-card.filter-enter { animation: filter-in .38s var(--ease); }
@keyframes filter-in { from { opacity: 0; transform: translateY(10px); } }
.project-card--pulse { --accent: var(--cyan); }
.project-card--beautify { --accent: var(--pink); }
.project-card--magnet { --accent: var(--orange); }

.project-copy { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 28px; order: 1; padding: clamp(24px, 4vw, 48px); }
.project-art, .project-media { order: 2; }
.project-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.project-num { color: var(--muted); font: 500 12px/1 var(--mono); letter-spacing: .1em; }
.project-year, .pulse-status { padding: 7px 12px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 999px; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); font: 500 11px/1 var(--mono); letter-spacing: .08em; white-space: nowrap; }
.pulse-status::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: currentColor; vertical-align: 1px; animation: pulse-dot 1.8s ease-in-out infinite; }
@keyframes pulse-dot { 50% { opacity: .3; } }
.project-main { display: flex; flex-direction: column; gap: 18px; }
.project-eyebrow { color: var(--accent); font: 500 12px/1.4 var(--mono); letter-spacing: .08em; }
.project-main h3 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 700; letter-spacing: -.045em; line-height: .98; }
.project-main h3 span { margin-left: 4px; color: var(--accent); font-size: .5em; vertical-align: super; }
.project-main > p { max-width: 54ch; color: var(--muted); font-size: 16px; }
.pulse-tagline { color: var(--text) !important; font-weight: 600; }
.project-tags, .skill-pills, .service-tags, .state-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.project-tags span, .skill-pills span, .service-tags span, .state-tools span {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  font: 500 12px/1.2 var(--mono);
}
.project-impact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.project-impact strong { display: block; color: var(--text); font: 600 20px/1.1 var(--display); }
.project-impact span { display: block; margin-top: 4px; color: var(--soft); font: 500 11px/1.35 var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.project-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; }
.project-bottom > span { color: var(--soft); font: 500 11px/1.5 var(--mono); letter-spacing: .08em; }
.project-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.case-study-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line-strong); color: var(--text); font: 500 14px/1.2 var(--body); transition: border-color .2s, color .2s; }
.case-study-link:hover { border-color: var(--lime); color: var(--lime); }

/* Project media panels */
.project-art, .project-media {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 420px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 56px clamp(18px, 3vw, 36px) 48px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(80% 70% at 65% 30%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%),
    radial-gradient(60% 60% at 15% 100%, rgba(143,128,255,.22), transparent 70%), var(--stage-bg);
}
.project-art::before, .project-media::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(var(--stage-grid) 1px, transparent 1px), linear-gradient(90deg, var(--stage-grid) 1px, transparent 1px); background-size: 32px 32px;
  mask-image: radial-gradient(circle at 60% 45%, #000, transparent 75%);
}
.project-orbit { position: absolute; z-index: -1; border: 1px solid var(--stage-line); border-radius: 50%; pointer-events: none; }
.project-orbit-a { width: 520px; height: 520px; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.project-orbit-b { width: 340px; height: 340px; top: 50%; left: 50%; border-style: dashed; transform: translate(-50%, -50%); animation: spin 60s linear infinite; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.project-art-label, .project-art-caption { position: absolute; left: clamp(18px, 3vw, 28px); color: var(--stage-text); font: 500 11px/1.4 var(--mono); letter-spacing: .1em; }
.project-art-label { top: 20px; }
.project-art-caption { bottom: 18px; }
.project-art-chip { position: absolute; top: 18%; right: 6%; display: none; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--glass-line); border-radius: 14px; color: var(--text); background: var(--glass-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font: 500 10px/1.3 var(--mono); letter-spacing: .06em; transform: rotate(-4deg); }
.project-art-chip > span:first-child { color: var(--lime); font-size: 16px; }
.project-art-chip strong { font: 700 13px/1 var(--display); letter-spacing: 0; }

/* Pulse placeholder */
.pulse-visual-placeholder {
  display: flex;
  width: min(100%, 380px);
  min-height: 300px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 32px 24px;
  border: 1px dashed rgba(77,226,255,.4);
  border-radius: 22px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  text-align: center;
  box-shadow: inset 0 0 60px rgba(77,226,255,.06);
}
.pulse-placeholder-kicker, .pulse-visual-placeholder small { color: var(--muted); font: 500 11px/1.5 var(--mono); letter-spacing: .1em; }
/* A live heartbeat trace: on-brand for "Pulse" without imitating an app screen. */
.pulse-placeholder-mark { width: 100%; max-width: 300px; }
.pulse-ecg { display: block; width: 100%; height: auto; overflow: visible; }
.pulse-ecg path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.pulse-ecg-base { stroke: rgba(77,226,255,.2); stroke-width: 1.5; }
.pulse-ecg-glow, .pulse-ecg-trace { stroke-dasharray: 24 76; stroke-dashoffset: 100; animation: ecg-trace 2.6s linear infinite; }
.pulse-ecg-glow { stroke: rgba(77,226,255,.22); stroke-width: 9; }
.pulse-ecg-trace { stroke: var(--cyan); stroke-width: 2.6; }
@keyframes ecg-trace { to { stroke-dashoffset: 0; } }
.pulse-visual-placeholder strong { font: 600 clamp(22px, 2.4vw, 28px)/1.15 var(--display); letter-spacing: -.03em; }

/* Beautify phone */
.project-phone {
  position: relative;
  width: clamp(200px, 52vw, 250px);
  aspect-ratio: 414 / 896;
  padding: 9px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 38px;
  background: linear-gradient(145deg, #23283a, #0a0c14);
  box-shadow: 0 40px 80px -24px rgba(0,0,0,.85), 0 0 60px -10px color-mix(in srgb, var(--accent) 45%, transparent);
  transform: translateY(calc(var(--phone-shift, 24px) - 24px)) rotate(calc(-5deg + var(--phone-tilt, 3deg)));
  transition: transform .5s var(--ease);
}
.phone-screen { width: 100%; height: 100%; overflow: hidden; border-radius: 30px; background: #fff; }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone-buttons span { position: absolute; left: -3px; width: 3px; height: 34px; border-radius: 2px; background: #2b3045; }
.phone-buttons span:first-child { top: 22%; }
.phone-buttons span:last-child { top: 32%; }

/* Galleries (shared) */
.demo-switcher, .magnet-gallery {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
  padding: 5px;
  border: 1px solid var(--glass-line);
  border-radius: 999px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.demo-label { display: none; padding: 0 10px 0 12px; color: var(--soft); font: 500 10px/1 var(--mono); letter-spacing: .1em; }
.demo-control { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; font: 500 13px/1 var(--body); transition: color .2s, background-color .2s; }
.demo-control:hover { color: var(--text); }
.demo-control.is-active { color: var(--on-lime); background: var(--lime-fill); }

/* Magnet Masala browser */
.browser-preview { position: relative; width: min(100%, 560px); overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; background: #0b0d14; box-shadow: 0 40px 80px -30px rgba(0,0,0,.85), 0 0 70px -20px color-mix(in srgb, var(--accent) 50%, transparent); transition: width .35s var(--ease); }
.browser-chrome { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.08); background: #121521; }
.browser-chrome span { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.browser-chrome span:nth-child(2) { background: #febc2e; }
.browser-chrome span:nth-child(3) { background: #28c840; }
.browser-chrome b { flex: 1; max-width: 240px; margin-left: 10px; padding: 4px 10px; overflow: hidden; border-radius: 6px; color: var(--muted); background: rgba(255,255,255,.06); font: 500 11px/1.3 var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.browser-preview img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.browser-preview.is-mobile { width: min(100%, 240px); }
.browser-preview.is-mobile img { aspect-ratio: 390 / 700; }
.mobile-web-preview { display: none; }
@media (min-width: 640px) {
  .mobile-web-preview { position: absolute; z-index: 2; right: clamp(16px, 5%, 40px); bottom: 92px; display: block; width: 116px; overflow: hidden; border: 5px solid #11131c; border-radius: 20px; box-shadow: 0 24px 48px -12px rgba(0,0,0,.8); transform: rotate(4deg); transition: opacity .3s, transform .3s var(--ease); }
  .mobile-web-preview img { width: 100%; aspect-ratio: 390 / 760; object-fit: cover; object-position: top; }
  .is-mobile-preview .mobile-web-preview { opacity: 0; transform: rotate(4deg) translateY(16px); pointer-events: none; }
  .project-art-chip { display: inline-flex; }
}

/* Postscript */
.project-postscript { display: grid; gap: 14px; padding: 22px clamp(20px, 3vw, 28px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.project-postscript > span { color: var(--pink); font: 500 12px/1.4 var(--mono); letter-spacing: .08em; }
.project-postscript > span b { font-weight: 400; }
.project-postscript p { max-width: 62ch; color: var(--muted); }
.project-postscript a { justify-self: start; border-bottom: 1px solid var(--line-strong); color: var(--text); font-weight: 500; transition: color .2s, border-color .2s; }
.project-postscript a:hover { color: var(--lime); border-color: var(--lime); }
@media (min-width: 900px) { .project-postscript { grid-template-columns: 160px 1fr auto; align-items: center; gap: 28px; } }

@media (min-width: 1101px) {
  .project-card { flex-direction: row; min-height: 560px; }
  .project-copy { width: 48%; flex: 0 0 48%; }
  .project-art, .project-media { flex: 1 1 auto; min-height: auto; border-top: 0; border-left: 1px solid var(--line); }
  .project-main { margin-block: auto; }
  .project-bottom { margin-top: 0; }
  .demo-label { display: inline; }
}
@media (max-width: 1100px) {
  .project-art, .project-media { padding-bottom: 24px; }
  .project-art-caption { position: static; align-self: flex-start; }
}

/* ---------- Now + Difference ---------- */
.now-section, .working-section { padding: clamp(72px, 9vw, 112px) 0; border-top: 1px solid var(--line); }
.now-layout, .working-layout { display: grid; gap: 36px; }
.now-grid, .working-points { display: grid; gap: 14px; }
.now-grid article, .working-points article {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .25s, background-color .25s, transform .3s var(--ease);
}
.now-grid article:hover, .working-points article:hover { border-color: var(--line-strong); background: var(--surface-strong); transform: translateY(-3px); }
.now-grid span, .working-points span { color: var(--lime); font: 500 12px/1 var(--mono); }
.now-grid h3, .working-points h3 { font-size: 19px; letter-spacing: -.02em; }
.now-grid p, .working-points p { color: var(--muted); font-size: 15px; }
.now-grid a { margin-top: auto; padding-top: 6px; color: var(--text); font: 500 14px/1.3 var(--body); transition: color .2s; }
.now-grid a:hover { color: var(--lime); }
.working-section h2 > span { color: transparent; background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
@media (min-width: 720px) { .now-grid, .working-points { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .now-layout, .working-layout { grid-template-columns: minmax(0, .8fr) minmax(0, 2fr); align-items: center; gap: 56px; } }

/* ---------- About ---------- */
.about-section { border-top: 1px solid var(--line); overflow: hidden; }
.about-decoration { position: absolute; z-index: -1; top: 6%; right: -8%; width: 560px; height: 560px; border-radius: 50%; color: transparent; background: radial-gradient(circle, rgba(143,128,255,.18), transparent 65%); pointer-events: none; }
.about-layout { display: grid; gap: 40px; }
.about-section h2 em { color: transparent; background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; -webkit-box-decoration-break: clone; box-decoration-break: clone; font-style: normal; }
.about-asterisk { display: none; }
.about-right { display: flex; flex-direction: column; gap: 18px; }
.about-right > p { max-width: 64ch; color: var(--muted); }
.about-right .about-lead { color: var(--text); font: 500 clamp(20px, 2.2vw, 26px)/1.35 var(--display); letter-spacing: -.02em; }
.about-lead em { color: var(--lime); font-style: normal; }
.about-actions { margin-top: 6px; }
.about-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.about-stats > div { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.about-stats strong { display: block; color: transparent; background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; -webkit-box-decoration-break: clone; box-decoration-break: clone; font: 600 clamp(30px, 3.4vw, 40px)/1 var(--display); }
.about-stats small { display: block; margin-top: 10px; color: var(--muted); font: 500 11px/1.4 var(--mono); letter-spacing: .06em; }
@media (min-width: 640px) { .about-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .about-layout { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 72px; } .about-layout > div:first-child { position: sticky; top: calc(var(--header-h) + 40px); align-self: start; } }

/* ---------- Experience ---------- */
.experience-section { border-top: 1px solid var(--line); background: linear-gradient(180deg, transparent, var(--band-tint) 30%, transparent); }
.experience-list { display: grid; gap: 20px; }
.experience-item { display: grid; gap: 24px; padding: clamp(22px, 3.5vw, 40px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-raised); transition: border-color .3s; }
.experience-item:hover { border-color: var(--line-strong); }
.experience-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.experience-number { color: var(--lime); font: 500 13px/1 var(--mono); }
.experience-copy h3 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); letter-spacing: -.04em; }
.experience-copy p { color: var(--muted); }
.experience-tag { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font: 500 11px/1.3 var(--mono); letter-spacing: .06em; }
.experience-links { display: flex; flex-wrap: wrap; gap: 10px; }
.experience-link { display: inline-flex; min-height: 42px; align-items: center; gap: 8px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text); font: 500 14px/1 var(--body); transition: border-color .2s, color .2s, background-color .2s; }
.experience-link:hover { border-color: var(--lime); color: var(--lime); }
.experience-media { position: relative; display: flex; min-height: 280px; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 48px 20px 24px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: radial-gradient(70% 70% at 50% 40%, rgba(143,128,255,.2), transparent 70%), var(--stage-flat); }
.experience-media--zamindar { background: radial-gradient(70% 70% at 50% 40%, rgba(74,222,128,.18), transparent 70%), var(--stage-flat); }
.experience-media-label { position: absolute; top: 16px; left: 18px; color: var(--soft); font: 500 10px/1.3 var(--mono); letter-spacing: .1em; }
.experience-media--zamindar img { width: auto; max-height: 300px; border-radius: 14px; box-shadow: 0 24px 48px -16px var(--device-shadow); }
.experience-screen-pair { display: flex; justify-content: center; gap: 14px; }
.experience-screen-pair img { width: 46%; max-width: 190px; border-radius: 16px; box-shadow: 0 24px 48px -16px var(--device-shadow); }
.experience-screen-pair img:last-child { transform: translateY(18px); }
.experience-attribution-note { margin-top: 20px; color: var(--soft); font-size: 13px; text-align: center; }
@media (min-width: 900px) { .experience-item { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 40px; } }

/* ---------- Toolkit ---------- */
.expertise-section { border-top: 1px solid var(--line); }
.skills-grid { display: grid; gap: 16px; }
.skill-card {
  --rx: 0deg;
  --ry: 0deg;
  --accent: var(--cyan);
  position: relative;
  display: flex;
  min-height: 300px;
  flex-direction: column;
  gap: 20px;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: radial-gradient(100% 70% at 100% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%), var(--bg-raised);
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: border-color .3s, transform .25s ease-out;
}
.skill-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.skill-flutter { --accent: var(--cyan); }
.skill-firebase { --accent: var(--orange); }
.skill-apis { --accent: var(--violet); }
.skill-node { --accent: #4ade80; }
.skill-delivery { --accent: var(--lime); }
.skill-github { --accent: #c4b5fd; }
.skill-ai { --accent: var(--pink); }
.skill-top { display: flex; justify-content: space-between; color: var(--soft); font: 500 11px/1 var(--mono); letter-spacing: .08em; }
.skill-top span:last-child { color: var(--accent); }
.skill-body { display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
.skill-body h3 { font-size: clamp(1.45rem, 2.2vw, 1.8rem); letter-spacing: -.03em; }
.skill-body h3 span { color: var(--accent); }
.skill-body p { color: var(--muted); font-size: 15px; }
.skill-bottom { display: flex; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--line); color: var(--soft); font: 500 11px/1 var(--mono); letter-spacing: .08em; }
.skill-bottom b { color: var(--accent); font-weight: 400; }
.skill-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 18px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  box-shadow: 0 0 40px -10px color-mix(in srgb, var(--accent) 70%, transparent);
  font: 600 28px/1 var(--display);
}
.skill-node-icon { font: 600 20px/1 var(--mono); }
.skill-apis .skill-icon { font-size: 36px; }
.skill-ai-icon span { animation: spin-slow 12s linear infinite; }
@keyframes spin-slow { to { transform: rotate(360deg); } }
.flutter-graphic { position: relative; display: grid; height: 150px; place-items: center; }
.flutter-orbit { position: absolute; top: 50%; left: 50%; border: 1px solid rgba(77,226,255,.22); border-radius: 50%; transform: translate(-50%, -50%); }
.flutter-orbit-one { width: 150px; height: 150px; }
.flutter-orbit-two { width: 104px; height: 104px; border-style: dashed; animation: spin 30s linear infinite; }
.flutter-mark { position: relative; display: grid; width: 64px; height: 64px; place-items: center; border-radius: 18px; color: #05070f; background: linear-gradient(135deg, var(--cyan), #2f9bff); box-shadow: 0 0 50px -6px rgba(77,226,255,.7); font: 700 30px/1 var(--display); }
.flutter-brace { position: absolute; top: 50%; left: 50%; color: rgba(77,226,255,.3); font: 300 80px/1 var(--mono); white-space: nowrap; transform: translate(-50%, -54%); pointer-events: none; }
.release-window { --text: #eef1fb; --muted: #a3abc4; --soft: #7d86a3; --line: rgba(148,163,255,.13); --line-strong: rgba(148,163,255,.26); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 12px; background: #04060c; font: 400 13px/1.9 var(--mono); }
.release-title { padding: 8px 12px; border-bottom: 1px solid var(--line); color: var(--soft); font-size: 11px; }
.release-title span { margin-right: 8px; color: #febc2e; letter-spacing: 2px; }
.release-window p { padding: 0 14px; color: var(--muted); }
.release-window p:nth-of-type(1) { padding-top: 8px; }
.release-window p span { color: #4ade80; }
.release-window .release-success { padding-bottom: 10px; color: var(--lime-fill); }
@media (min-width: 720px) {
  .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skill-flutter { grid-column: span 2; }
}
@media (min-width: 1100px) {
  .skills-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .skill-flutter { grid-column: span 2; }
  .skill-ai { grid-column: span 2; }
  .skill-flutter { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; align-items: center; column-gap: 32px; }
  .skill-flutter .skill-top { grid-column: 1 / -1; }
  .skill-flutter .skill-graphic { order: 2; height: 200px; }
  .skill-flutter .flutter-orbit-one { width: 200px; height: 200px; }
  .skill-flutter .flutter-orbit-two { width: 140px; height: 140px; }
  .skill-ai { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; column-gap: 28px; align-items: center; }
  .skill-ai .skill-top { grid-column: 1 / -1; }
  .skill-ai .skill-body { margin-top: 0; }
}

/* ---------- State Lab ---------- */
.state-lab-section { position: relative; padding: clamp(80px, 11vw, 136px) 0; border-top: 1px solid var(--line); background: radial-gradient(60% 50% at 80% 0%, rgba(77,226,255,.08), transparent 70%); }
.state-lab-grid { display: grid; gap: 16px; }
.state-demo, .state-architecture { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-raised); }
.state-demo { --state-color: var(--cyan); }
.state-demo[data-active-state="loading"] { --state-color: #febc2e; }
.state-demo[data-active-state="success"] { --state-color: var(--lime-fill); }
.state-demo[data-active-state="error"] { --state-color: var(--danger); }
.state-demo-top, .state-architecture-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); color: var(--soft); font: 500 11px/1.3 var(--mono); letter-spacing: .08em; }
.state-live { display: inline-flex; align-items: center; gap: 8px; color: var(--lime); }
.state-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); animation: pulse-dot 1.4s infinite; }
.state-demo-body { display: flex; flex-direction: column; gap: 22px; padding: 26px 22px; }
.state-status { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 4px; align-items: center; }
.state-status-dot { grid-row: span 2; width: 14px; height: 14px; border-radius: 50%; background: var(--state-color); box-shadow: 0 0 0 5px color-mix(in srgb, var(--state-color) 18%, transparent), 0 0 20px var(--state-color); transition: background-color .3s, box-shadow .3s; }
.state-status strong { font: 600 clamp(20px, 2.2vw, 26px)/1.2 var(--display); letter-spacing: -.02em; }
.state-status small { color: var(--muted); font-size: 14px; }
.state-progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.state-progress span { position: relative; height: 4px; overflow: hidden; border-radius: 4px; background: var(--surface-strong); }
.state-progress span::after { content: ""; position: absolute; inset: 0; background: var(--state-color); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.state-demo[data-active-state="loading"] .state-progress span:first-child::after { transform: scaleX(1); }
.state-demo[data-active-state="loading"] .state-progress span:nth-child(2)::after { animation: load 1.2s ease-in-out infinite; }
.state-demo[data-active-state="success"] .state-progress span::after { transform: scaleX(1); }
.state-demo[data-active-state="error"] .state-progress span:first-child::after, .state-demo[data-active-state="error"] .state-progress span:nth-child(2)::after { transform: scaleX(1); }
@keyframes load { 0% { transform: scaleX(0); } 70%, 100% { transform: scaleX(1); } }
.state-demo.state-changing .state-status { animation: state-in .35s var(--ease); }
@keyframes state-in { from { opacity: .3; transform: translateY(4px); } }
.state-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.state-control { min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: transparent; font: 500 13px/1 var(--mono); transition: all .2s; }
.state-control:hover { border-color: var(--line-strong); color: var(--text); }
.state-control.is-selected { border-color: var(--state-color); color: #05070f; background: var(--state-color); }
.state-trigger { align-self: flex-start; }
.state-architecture { display: flex; flex-direction: column; }
.state-architecture-head .section-kicker { font-size: 11px; }
.state-flow { display: grid; gap: 10px; padding: 22px; }
.state-flow article { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.state-flow article > span { color: var(--lime); font: 500 11px/1 var(--mono); }
.state-flow h3 { font-size: 18px; }
.state-flow p { color: var(--muted); font-size: 14px; }
.state-flow code { margin-top: 4px; color: var(--cyan); font: 400 13px/1.4 var(--mono); }
.state-flow > b { justify-self: center; color: var(--soft); font-weight: 400; transform: rotate(90deg); }
.state-tools { padding: 0 22px 22px; margin-top: auto; }
.state-proof { display: grid; gap: 10px; margin-top: 24px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.state-proof span { color: var(--soft); font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.state-proof strong { padding-left: 14px; border-left: 2px solid var(--lime); font: 500 16px/1.4 var(--display); }
@media (min-width: 720px) {
  .state-flow { grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; }
  .state-flow > b { align-self: center; transform: none; }
}
@media (min-width: 1024px) {
  .state-lab-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .state-proof { grid-template-columns: auto repeat(3, 1fr); align-items: center; gap: 24px; }
}

/* ---------- Services ---------- */
.services-section { border-top: 1px solid var(--line); }
.services-grid { display: grid; gap: 16px; }
.service-card {
  --rx: 0deg;
  --ry: 0deg;
  --accent: var(--cyan);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent 55%), var(--bg-raised);
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: border-color .3s, transform .25s ease-out;
}
.service-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.service-card--backend { --accent: var(--orange); }
.service-card--web { --accent: var(--violet); }
.service-card--care { --accent: var(--lime); }
.service-top { display: flex; align-items: center; justify-content: space-between; color: var(--soft); font: 500 11px/1 var(--mono); letter-spacing: .08em; }
.service-icon { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius: 12px; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); font-size: 18px; }
.service-card h3 { margin-top: 8px; font-size: 21px; letter-spacing: -.02em; line-height: 1.2; }
.service-card p { flex: 1; color: var(--muted); font-size: 15px; }
.services-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-top: 20px; padding: 24px clamp(20px, 3vw, 32px); border: 1px solid var(--tint-lime-line); border-radius: var(--radius-lg); background: radial-gradient(80% 140% at 100% 50%, var(--tint-lime), transparent 60%), var(--bg-raised); }
.services-cta p { font: 600 clamp(20px, 2.2vw, 26px)/1.2 var(--display); letter-spacing: -.02em; }
@media (min-width: 640px) { .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .services-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Process ---------- */
.process-section { padding: clamp(80px, 11vw, 136px) 0; border-top: 1px solid var(--line); }
.process-heading { max-width: 760px; margin: 0 auto clamp(40px, 5vw, 60px); text-align: center; }
.process-heading h2 span { color: transparent; background: linear-gradient(90deg, var(--cyan), var(--violet)); -webkit-background-clip: text; background-clip: text; }
.process-heading h2 em { color: var(--lime); font-style: normal; }
.process-heading p { max-width: 50ch; margin: 18px auto 0; color: var(--muted); }
.process-grid { display: grid; gap: 14px; counter-reset: step; }
.process-step { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-raised); transition: border-color .3s, background-color .3s; }
.process-step.is-open { border-color: var(--tint-lime-line); background: linear-gradient(180deg, var(--tint-lime-faint), transparent 60%), var(--bg-raised); }
.process-trigger { display: grid; width: 100%; grid-template-columns: auto 1fr auto; column-gap: 14px; row-gap: 10px; align-items: center; padding: 24px; border: 0; color: inherit; background: transparent; text-align: left; }
.step-number { color: var(--soft); font: 500 12px/1 var(--mono); }
.step-icon { grid-row: 2; display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--lime); font-size: 18px; }
.process-trigger h3 { grid-row: 2; grid-column: 2; font-size: 21px; }
.process-trigger p { grid-column: 1 / -1; color: var(--muted); font-size: 15px; }
.step-arrow { grid-row: 1; grid-column: 3; color: var(--soft); transition: transform .3s var(--ease), color .2s; }
.process-step.is-open .step-arrow { color: var(--lime); transform: rotate(90deg); }
.process-details { display: none; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0 24px 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.process-step.is-open .process-details { display: grid; animation: state-in .3s var(--ease); }
.process-details > span { color: var(--soft); font: 500 10px/1.8 var(--mono); letter-spacing: .1em; }
.process-details ul { display: grid; gap: 4px; color: var(--text); font-size: 14px; }
.process-details li::before { content: "→ "; color: var(--lime); }
.process-details strong { color: var(--lime); font: 500 14px/1.6 var(--body); }
@media (min-width: 720px) { .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
@media (min-width: 1200px) { .process-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; } }


/* ---------- Contact ---------- */
.contact-section { position: relative; isolation: isolate; padding: clamp(88px, 12vw, 150px) 0 clamp(56px, 7vw, 88px); overflow: hidden; border-top: 1px solid var(--line); }
.contact-section::before { content: ""; position: absolute; z-index: -1; inset: -20% -10% auto; height: 120%; background: radial-gradient(40% 40% at 20% 30%, rgba(200,255,77,.13), transparent 70%), radial-gradient(40% 45% at 85% 20%, rgba(143,128,255,.2), transparent 70%), radial-gradient(35% 35% at 60% 80%, rgba(77,226,255,.1), transparent 70%); pointer-events: none; }
.contact-deco { display: none; }
.contact-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.contact-top > span:last-child { color: var(--soft); font: 500 12px/1.4 var(--mono); letter-spacing: .08em; }
.contact-section h2 { margin: 28px 0 clamp(36px, 5vw, 56px); font-size: clamp(2.6rem, 8vw, 6.4rem); font-weight: 700; letter-spacing: -.05em; line-height: .95; }
.contact-section h2 em { color: transparent; background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; -webkit-box-decoration-break: clone; box-decoration-break: clone; font-style: normal; }
.contact-bottom { display: grid; gap: 28px; padding-top: 32px; border-top: 1px solid var(--line); }
.contact-bottom > p { max-width: 42ch; color: var(--muted); font-size: clamp(16px, 1.5vw, 18px); }
.contact-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.contact-email-icon { width: 18px; height: 18px; fill: currentColor; }
.contact-email { padding: 4px 0; border: 0; border-bottom: 1px solid var(--line-strong); color: var(--muted); background: none; font: 500 14px/1.4 var(--mono); text-align: left; word-break: break-all; transition: color .2s, border-color .2s; }
.contact-email:hover { color: var(--lime); border-color: var(--lime); }
.copy-status:not(:empty) { color: var(--lime); font: 500 13px/1.3 var(--mono); }
.contact-channels { display: grid; gap: 10px; }
.contact-channels-label { color: var(--soft); font: 500 11px/1 var(--mono); letter-spacing: .1em; }
.contact-channel { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .2s, background-color .2s; }
.contact-channel:hover { border-color: rgba(37,211,102,.5); background: rgba(37,211,102,.06); }
.contact-channel-icon { width: 24px; height: 24px; flex: 0 0 auto; fill: #25d366; }
.contact-channel > span { display: flex; flex: 1; flex-direction: column; }
.contact-channel strong { font-size: 15px; font-weight: 600; }
.contact-channel small { color: var(--muted); font: 400 13px/1.4 var(--mono); }
.contact-channel b { color: var(--soft); font-weight: 400; }
@media (min-width: 1024px) { .contact-bottom { grid-template-columns: 1.1fr auto 1fr; align-items: start; gap: 48px; } }

.project-brief { display: grid; gap: 24px; margin-top: clamp(48px, 7vw, 80px); padding: clamp(22px, 4vw, 40px); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--glass-bg-strong); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: var(--shadow); }
.project-brief-heading h3 { margin-top: 14px; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.project-brief-heading p { margin-top: 10px; color: var(--muted); }
.brief-steps { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.brief-steps b { margin-right: 6px; color: var(--lime); font: 500 12px var(--mono); }
.brief-fields { display: grid; gap: 16px; }
.brief-fields label { display: flex; flex-direction: column; gap: 8px; color: var(--muted); font: 500 12px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.brief-fields select, .brief-fields textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
    background: var(--input-bg);
  font: 400 15px/1.4 var(--body);
  letter-spacing: 0;
  text-transform: none;
  transition: border-color .2s, box-shadow .2s;
}
.brief-fields select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a3abc4' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.brief-fields textarea { min-height: 120px; resize: vertical; }
.brief-fields select:focus, .brief-fields textarea:focus { border-color: var(--lime); outline: none; box-shadow: 0 0 0 3px var(--lime-soft); }
.brief-fields textarea::placeholder { color: var(--soft); }
.project-brief > .button { justify-self: start; }
.brief-status:not(:empty) { color: var(--lime); font: 500 13px var(--mono); }
.contact-bottom-note { margin-top: 40px; color: var(--soft); font: 500 12px/1.4 var(--mono); letter-spacing: .1em; text-align: center; }
@media (min-width: 640px) { .brief-fields { grid-template-columns: 1fr 1fr; } .brief-message { grid-column: 1 / -1; } }
@media (min-width: 1024px) {
  .project-brief { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); column-gap: 48px; }
  .project-brief-heading { grid-row: span 3; }
  .brief-steps, .brief-fields, .project-brief > .button, .brief-status { grid-column: 2; }
}

/* ---------- Footer ---------- */
.site-footer { padding: 48px 0 calc(32px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--footer-bg); }
.footer-inner { display: grid; gap: 28px; }
.footer-brand { font-size: 28px; }
.site-footer p { color: var(--soft); font: 500 12px/1.7 var(--mono); letter-spacing: .06em; }
.site-footer p span { color: var(--soft); }
.footer-sitemap, .footer-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.footer-sitemap a, .footer-links a, .back-to-top { color: var(--muted); font: 500 13px/1.4 var(--body); transition: color .2s; }
.footer-sitemap a:hover, .footer-links a:hover, .back-to-top:hover { color: var(--lime); }
.footer-links a { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; }
.back-to-top { justify-self: start; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; }
@media (min-width: 1024px) { .footer-inner { grid-template-columns: auto auto 1fr auto auto; align-items: center; gap: 36px; } .site-footer p { white-space: nowrap; } .footer-sitemap { justify-content: center; } }

/* ---------- Motion & interaction ---------- */
.magnetic { --mx: 0px; --my: 0px; }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: var(--reveal-delay, 0ms); }
.js .reveal.in-view { opacity: 1; transform: none; }
.js .skill-card.reveal.in-view, .js .service-card.reveal.in-view { transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)); }
.touch-press { transform: scale(.98); }
.cursor-dot, .cursor-ring { display: none; }

@media (max-width: 599px) {
  .mobile-only { display: inline; }
  .project-impact { gap: 8px; }
  .project-impact strong { font-size: 17px; }
  .project-bottom > span { display: none; }
  .project-art, .project-media { min-height: 0; padding-top: 52px; }
  .project-orbit-a { width: 360px; height: 360px; }
  .project-orbit-b { width: 240px; height: 240px; }
  .demo-control { padding: 0 12px; font-size: 12px; }
  .button { min-height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .marquee-track { animation: none; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Effects & motion layer
   effects.js adds the canvases, card spotlights and back-to-top ring.
   Everything below is decorative and degrades to a static design.
   ========================================================================== */
html { scrollbar-color: rgba(148,163,255,.3) var(--bg); }

/* Ambient canvases (hero starfield, contact particle field) */
.fx-canvas { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.contact-section .fx-canvas { opacity: .85; }

/* Soft light that follows the pointer across cards (fine pointers only) */
.fx-spot { position: relative; isolation: isolate; }
.fx-spot::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(460px circle at var(--spot-x, 50%) var(--spot-y, 50%), color-mix(in srgb, var(--accent, var(--violet)) 16%, transparent), transparent 62%);
  opacity: 0;
  transition: opacity .4s var(--ease);
}
.fx-spot:hover::after { opacity: 1; }

/* Headings wipe upward into view as their section reveals. Only headings inside an observed
   wrapper are clipped: IntersectionObserver honours a target's own clip-path, so clipping the
   observed element itself would keep it from ever being reported as visible. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal h2 { clip-path: inset(0 0 100% 0); transform: translateY(.42em); transition: clip-path 1s var(--ease) .08s, transform 1s var(--ease) .08s; }
  .js .reveal.in-view h2 { clip-path: inset(-25% -8% -30% -8%); transform: none; }
  .js h2.reveal { transform: translateY(.35em) scale(.97); transform-origin: left bottom; transition: opacity .8s var(--ease), transform 1.1s var(--ease); }
}

/* Gradient words drift slowly through the palette */
.contact-section h2 em, .about-section h2 em { background-image: var(--gradient-shimmer); background-size: 220% 100%; }
@media (prefers-reduced-motion: no-preference) {
  .contact-section h2 em { animation: fx-shimmer 8s ease-in-out 3; }
}
@keyframes fx-shimmer { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* Ticker: two rows moving in opposite directions, faded at the edges */
.marquee { -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee-track:first-child .marquee-set { gap: 32px; padding-block: 18px; }
.marquee-track:first-child .marquee-set span { color: var(--text); font: 600 clamp(15px, 1.7vw, 19px)/1 var(--display); letter-spacing: .04em; }
.marquee-track--reverse { border-top: 1px solid var(--line); animation-duration: 52s; animation-direction: reverse; }
.marquee-track--reverse .marquee-set { padding-block: 12px; }
.marquee-track--reverse .marquee-set span { color: var(--soft); font-size: 12px; }
.marquee-track--reverse .marquee-set b { color: var(--cyan); }
@media (hover: hover) { .marquee:hover .marquee-track { animation-play-state: paused; } }

/* Toolkit: live "connections" network in the APIs card */
.skill-network { width: 100%; max-width: 300px; height: auto; margin: 4px 0 -4px; overflow: visible; }
.net-link { fill: none; stroke: color-mix(in srgb, var(--accent) 55%, transparent); stroke-width: 1.4; stroke-dasharray: 3 7; animation: net-flow 1.4s linear infinite; }
.net-node { fill: var(--bg-raised); stroke: var(--accent); stroke-width: 1.6; transform-box: fill-box; transform-origin: center; animation: net-pulse 2.6s ease-in-out infinite; }
.net-node:nth-of-type(2) { animation-delay: .5s; }
.net-node:nth-of-type(3) { animation-delay: 1s; }
.net-node:nth-of-type(4) { animation-delay: 1.5s; }
.net-node--hub { fill: color-mix(in srgb, var(--accent) 30%, var(--bg-raised)); }
.skill-network text { fill: var(--soft); font: 500 9px var(--mono); letter-spacing: .08em; text-anchor: middle; }
@keyframes net-flow { to { stroke-dashoffset: -20; } }
@keyframes net-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }

/* Toolkit: illustrative request/response in the Node.js card */
.api-snippet { --accent: #4ade80; --text: #eef1fb; --muted: #a3abc4; --line: rgba(148,163,255,.13); display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: #04060c; font: 400 12.5px/1.5 var(--mono); }
.api-snippet p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.api-verb { padding: 2px 7px; border-radius: 6px; color: #05070f; background: var(--accent); font-weight: 600; font-size: 11px; }
.api-snippet b { margin-left: auto; color: var(--accent); font-weight: 500; }
.api-json { color: var(--text); }
.api-json i { display: inline-block; width: 7px; height: 14px; margin-left: -4px; background: var(--accent); vertical-align: -2px; animation: pulse-dot 1.1s steps(1) infinite; }

/* Icons and screenshots respond to hover */
.skill-icon, .service-icon, .step-icon { transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.skill-card:hover .skill-icon, .service-card:hover .service-icon, .process-step:hover .step-icon { transform: rotate(-8deg) scale(1.08); }
.experience-media img { transition: transform .6s var(--ease); }
.experience-item:hover .experience-media--zamindar img { transform: translateY(-8px) rotate(-2deg); }
.experience-item:hover .experience-screen-pair img:first-child { transform: translateY(-8px) rotate(-2.5deg); }
.experience-item:hover .experience-screen-pair img:last-child { transform: translateY(8px) rotate(2.5deg); }
.about-stats > div { transition: border-color .3s, transform .35s var(--ease); }
.about-stats > div:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.proof-strip-inner > div strong { transition: transform .35s var(--ease); }
.proof-strip-inner > div:hover strong { transform: translateY(-2px) scale(1.06); }

/* Floating back-to-top button with a scroll-progress ring */
.fx-top {
  position: fixed;
  z-index: 90;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px));
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  color: var(--text);
    background: var(--glass-bg-strong);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px -12px rgba(0,0,0,.85);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(.9);
  transition: opacity .3s ease, transform .4s var(--ease), visibility 0s linear .4s;
}
.fx-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.fx-top svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.fx-top circle { fill: none; stroke-width: 2.5; }
.fx-top-track { stroke: var(--line-strong); }
.fx-top-ring { stroke: var(--lime); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.fx-top span { font: 600 18px/1 var(--body); transition: transform .3s var(--ease); }
.fx-top:hover span, .fx-top:focus-visible span { transform: translateY(-3px); }
.fx-top:focus-visible { outline-offset: 4px; border-radius: 50%; }

/* Header resume link */
.nav-links .nav-resume::after { content: " ↗"; color: var(--lime); }
@media (min-width: 1024px) and (max-width: 1159px) { .nav-links a { padding-inline: 9px; } }

/* Off-screen sections pause their decorative animations */
.fx-paused, .fx-paused *, .fx-paused::before, .fx-paused::after, .fx-paused *::before, .fx-paused *::after { animation-play-state: paused !important; }

/* Low-power devices: keep the design, drop the expensive compositing */
.fx-lite .site-header, .fx-lite .project-brief, .fx-lite .demo-switcher, .fx-lite .magnet-gallery,
.fx-lite .project-art-chip, .fx-lite .pulse-visual-placeholder, .fx-lite .fx-top { -webkit-backdrop-filter: none; backdrop-filter: none; }
.fx-lite .site-header { background: var(--header-bg-solid); }
.fx-lite .project-orbit-b, .fx-lite .flutter-orbit-two, .fx-lite .contact-section h2 em, .fx-lite .net-link, .fx-lite .net-node, .fx-lite .api-json i { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .fx-top { transition: none; }
}

/* ---------- More motion: storytelling on scroll and small hover rewards ---------- */
/* Process: a line runs across each step in turn as the steps come into view. */
.process-step::before { content: ""; position: absolute; z-index: 2; top: 0; right: 0; left: 0; height: 2px; background: linear-gradient(90deg, var(--lime), var(--cyan)); transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ease); }
.process-step.in-view::before { transform: scaleX(1); }
.step-number { transition: color .4s ease .5s; }
.process-step.in-view .step-number { color: var(--lime); }
@media (min-width: 720px) and (max-width: 1199px) {
  .process-step:nth-child(even)::before { transition-delay: .4s; }
}
@media (min-width: 1200px) {
  .process-step:nth-child(2)::before, .process-step:nth-child(2) .step-number { transition-delay: .45s; }
  .process-step:nth-child(3)::before, .process-step:nth-child(3) .step-number { transition-delay: .9s; }
  .process-step:nth-child(4)::before, .process-step:nth-child(4) .step-number { transition-delay: 1.35s; }
}

@media (prefers-reduced-motion: no-preference) {
  /* Experience: the app screens rise into place when their card appears. */
  .js .experience-item.reveal:not(.in-view) .experience-media img { opacity: 0; }
  .js .experience-item.in-view .experience-media img { animation: fx-screen-in .9s var(--ease) .2s backwards; }
  .js .experience-item.in-view .experience-screen-pair img:last-child { animation-name: fx-screen-in-alt; animation-delay: .38s; }
  /* Toolkit and services: icons pop in after their card. */
  .js .skill-card.in-view .skill-icon, .js .service-card.in-view .service-icon { animation: fx-pop .8s var(--ease) .3s backwards; }
}
@keyframes fx-screen-in { from { opacity: 0; transform: translateY(46px) rotate(-5deg); } }
@keyframes fx-screen-in-alt { from { opacity: 0; transform: translateY(64px) rotate(6deg); } }
@keyframes fx-pop { from { opacity: 0; transform: scale(.4) rotate(-35deg); } }

/* Buttons: a quick sweep of light on hover. */
.button { position: relative; isolation: isolate; overflow: hidden; }
.button::before { content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.5) 50%, transparent 70%); transform: translateX(-110%); }
.button-dark::before { background: linear-gradient(110deg, transparent 30%, rgba(200,255,77,.6) 50%, transparent 70%); }
.button-ghost::before { background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.14) 50%, transparent 70%); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .button:hover::before { transform: translateX(110%); transition: transform .75s var(--ease); }
}

/* The logo's asterisk turns when you point at it. */
.brand-spark, .footer-brand span, .depot-brand-lockup > a span, .pulse-footer-brand span { display: inline-block; transition: transform .7s var(--ease); }
.brand:hover .brand-spark, .footer-brand:hover span, .depot-brand-lockup > a:hover span, .pulse-footer-brand:hover span { transform: rotate(180deg) scale(1.15); }
/* Fixed-width digits so the spinning stat numbers don't nudge their labels. */
.stat-number { font-variant-numeric: tabular-nums; }
/* The lime contact button keeps its dark label (and no underline) when Contact is the active section. */
.nav-links .nav-contact.is-active { color: var(--on-lime); }
.nav-links .nav-contact.is-active::after { display: none; }

/* ==========================================================================
   Theme toggle, light-theme details, and client-facing components
   ========================================================================== */
/* Sun is shown in dark mode (switches to light), moon in light mode. */
.theme-toggle { position: relative; display: inline-grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--text); background: var(--surface); cursor: pointer; transition: border-color .2s, background-color .2s, transform .2s; }
.theme-toggle:hover { border-color: var(--lime); background: var(--surface-strong); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle svg { grid-area: 1 / 1; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .55s var(--ease), opacity .3s ease; }
.theme-toggle .icon-moon { opacity: 0; transform: rotate(-90deg) scale(.4); }
:root[data-theme="light"] .theme-toggle .icon-sun { opacity: 0; transform: rotate(90deg) scale(.4); }
:root[data-theme="light"] .theme-toggle .icon-moon { opacity: 1; transform: none; }
.header-actions { display: flex; align-items: center; gap: 8px; }

/* Switching themes reveals the new one in a circle from the toggle (script.js drives it). */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* Light theme fine-tuning for pieces that use fixed colours */
:root[data-theme="light"] .portfolio-details::before { background-image: linear-gradient(rgba(15,23,42,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(15,23,42,.035) 1px, transparent 1px); }
:root[data-theme="light"] .kicker-dot { box-shadow: 0 0 0 4px var(--lime-soft); }
:root[data-theme="light"] .skill-node { --accent: #136f35; }
:root[data-theme="light"] .skill-github { --accent: #7c3aed; }
:root[data-theme="light"] .state-demo { --state-color: #1fb5d6; }
:root[data-theme="light"] .state-demo[data-active-state="success"] { --state-color: #65c81f; }
:root[data-theme="light"] .project-card--pulse { box-shadow: 0 0 0 1px rgba(14,116,144,.25), var(--shadow), 0 40px 100px -60px rgba(14,116,144,.45); }
:root[data-theme="light"] .project-phone { box-shadow: 0 40px 80px -30px rgba(15,23,42,.45), 0 0 60px -14px color-mix(in srgb, var(--accent) 35%, transparent); }
:root[data-theme="light"] .browser-preview { box-shadow: 0 40px 80px -36px rgba(15,23,42,.45), 0 0 70px -26px color-mix(in srgb, var(--accent) 40%, transparent); }
:root[data-theme="light"] .mobile-web-preview { box-shadow: 0 24px 48px -16px rgba(15,23,42,.4); }
:root[data-theme="light"] .project-art-chip, :root[data-theme="light"] .demo-switcher, :root[data-theme="light"] .magnet-gallery { box-shadow: 0 12px 28px -18px rgba(15,23,42,.4); }
:root[data-theme="light"] .pulse-visual-placeholder { border-color: rgba(14,116,144,.35); box-shadow: inset 0 0 60px rgba(14,116,144,.05); }
:root[data-theme="light"] .pulse-ecg-base { stroke: rgba(14,116,144,.2); }
:root[data-theme="light"] .pulse-ecg-glow { stroke: rgba(14,116,144,.15); }
:root[data-theme="light"] .flutter-orbit { border-color: rgba(14,116,144,.22); }
:root[data-theme="light"] .flutter-brace { color: rgba(14,116,144,.3); }
:root[data-theme="light"] .flutter-mark { color: #fff; background: linear-gradient(135deg, #0ea5c9, #2563eb); box-shadow: 0 0 40px -8px rgba(14,116,144,.5); }
:root[data-theme="light"] .contact-section::before { opacity: .65; }
:root[data-theme="light"] .brief-fields select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%234a5368' stroke-width='1.6'/%3E%3C/svg%3E"); }
:root[data-theme="light"] .fx-top { box-shadow: 0 14px 34px -14px rgba(15,23,42,.45); }
:root[data-theme="light"] .nav-links { box-shadow: 0 30px 60px -30px rgba(15,23,42,.35); }

/* Services: one tap from an offer to the brief, with the type already chosen. */
.service-quote { align-self: flex-start; margin-top: 2px; padding: 4px 0; border-bottom: 1px solid var(--line-strong); color: var(--text); font: 500 14px/1.3 var(--body); transition: color .2s, border-color .2s; }
.service-quote:hover { color: var(--lime); border-color: var(--lime); }
.project-brief.is-highlighted { animation: brief-glow 1.8s var(--ease); }
@keyframes brief-glow { 0% { box-shadow: 0 0 0 0 var(--lime-soft), var(--shadow); } 30% { box-shadow: 0 0 0 6px var(--lime-soft), var(--shadow); } 100% { box-shadow: 0 0 0 0 transparent, var(--shadow); } }

/* Brief: name field plus email or WhatsApp. */
.brief-fields input { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--text); background: var(--input-bg); font: 400 15px/1.4 var(--body); letter-spacing: 0; text-transform: none; transition: border-color .2s, box-shadow .2s; }
.brief-fields input:focus { border-color: var(--lime); outline: none; box-shadow: 0 0 0 3px var(--lime-soft); }
.brief-fields input::placeholder { color: var(--soft); }
.brief-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 640px) { .brief-name { grid-column: 1 / -1; } }
@media (min-width: 1024px) { .brief-actions { grid-column: 2; } }

/* FAQ */
.faq-section { border-top: 1px solid var(--line); }
.faq-list { display: grid; gap: 12px; max-width: 900px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-raised); transition: border-color .25s, box-shadow .25s; interpolate-size: allow-keywords; }
.faq-item:hover { border-color: var(--line-strong); }
.faq-item[open] { border-color: var(--line-strong); box-shadow: var(--shadow); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; border-radius: inherit; cursor: pointer; list-style: none; font: 600 clamp(16px, 1.6vw, 18px)/1.35 var(--display); letter-spacing: -.01em; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--lime); font: 400 20px/1 var(--body); transition: transform .4s var(--ease), background-color .25s; }
.faq-item[open] summary::after { transform: rotate(45deg); background: var(--surface-strong); }
.faq-item p { max-width: 66ch; padding: 0 22px 22px; color: var(--muted); }
.faq-item p a { border-bottom: 1px solid var(--line-strong); color: var(--text); }
.faq-item p a:hover { color: var(--lime); border-color: var(--lime); }
/* Smooth open/close where the browser supports animating details content. */
.faq-item::details-content { height: 0; overflow: clip; transition: height .4s var(--ease), content-visibility .4s allow-discrete; }
.faq-item[open]::details-content { height: auto; }

/* Phones and tablets: a "Start a project" button follows the reader (desktop has it in the header). */
.fx-cta { position: fixed; z-index: 90; left: max(16px, env(safe-area-inset-left)); bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px)); display: inline-flex; min-height: 52px; align-items: center; gap: 10px; padding: 0 20px 0 16px; border-radius: 999px; color: var(--on-lime); background: var(--lime-fill); box-shadow: 0 14px 34px -12px rgba(0,0,0,.55); font: 600 14px/1 var(--body); opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity .3s ease, transform .4s var(--ease), visibility 0s linear .4s; }
.fx-cta svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fx-cta.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
@media (min-width: 1024px) { .fx-cta { display: none; } }
@media (prefers-reduced-motion: reduce) { .fx-cta { transition: none; } }
/* Keep the theme button next to the navigation on desktop. */
@media (min-width: 1024px) { .header-inner .nav-links { margin-left: auto; } }
/* Device mock-ups stay dark in both themes, so their text keeps the dark palette. */
.browser-preview, .case-browser-frame { --muted: #a3abc4; }

/* ==========================================================================
   Motion layer (animations.js). Only active when html has the .gsap class,
   so everything stays visible and static if the motion layer doesn't load.
   ========================================================================== */
/* Thin scroll-progress bar at the very top (replaces the header bar). */
.motion-progress { position: fixed; z-index: 120; top: 0; right: 0; left: 0; height: 2px; background: var(--gradient); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
.gsap .site-header .scroll-progress, .gsap > body > .scroll-progress { display: none; }

/* Lenis smooth scroll */
html.lenis, html.lenis body { height: auto; }
html.lenis, .lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* GSAP owns reveals: the CSS heading wipe steps aside. */
.gsap .reveal h2, .gsap h2.reveal { clip-path: none; transform: none; transition: none; }

@media (prefers-reduced-motion: no-preference) {
  /* Hero: briefly held for the motion layer, then handed over to it. */
  .motion-wait .depot-intro > *, .motion-wait .depot-intro h1 .w { animation-play-state: paused; }
  .motion-hero .depot-intro > *, .motion-hero .depot-intro h1 .w { animation: none; }
  .motion-hero .depot-intro h1 em.w { animation: depot-shimmer 9s ease-in-out 1.6s 3; }
  /* Ticker is driven by the GSAP ticker instead of CSS keyframes. */
  .motion-marquee .marquee-track { animation: none; will-change: transform; }
}

/* Hover: projects lift, screenshots ease in, depot containers glow (pointer devices only). */
.phone-screen img, .browser-preview img { transition: transform .7s var(--ease); }
.depot-face-front::after { content: ""; position: absolute; z-index: 6; inset: 0; box-shadow: inset 0 0 0 2px rgba(255,255,255,.7), inset 0 0 18px rgba(77,226,255,.55); opacity: 0; transition: opacity .3s ease; pointer-events: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  .gsap .project-card.in-view { transition: box-shadow .35s var(--ease), transform .45s var(--ease); }
  .gsap .project-card.in-view:hover { transform: translateY(-4px); }
  .project-card:hover .phone-screen img, .project-card:hover .browser-preview img { transform: scale(1.03); }
  .depot-container:hover:not(.is-selected) .depot-face-front::after { opacity: 1; }
}

/* Journey: a vertical line in the gutter draws as you scroll. */
.gsap [data-journey] { position: relative; }
.journey-track, .journey-line { position: absolute; top: 0; bottom: 0; left: calc(var(--gutter) * -.55); width: 2px; border-radius: 2px; pointer-events: none; }
.journey-track { background: var(--line); }
.journey-line { background: linear-gradient(180deg, var(--lime), var(--cyan)); transform: scaleY(0); transform-origin: 50% 0; }

/* Process: one line draws through the steps (wide screens; smaller screens keep the per-step line). */
.gsap [data-process-line] { position: relative; }
.process-line { position: absolute; top: -24px; right: 0; left: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--lime), var(--cyan)); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
@media (min-width: 1200px) { .gsap .process-step::before { display: none; } }

/* State Lab: spinner, check, and the Event → State → UI highlight. */
.state-status-dot { position: relative; }
.state-icon { position: absolute; top: 50%; left: 50%; width: 28px; max-width: none; height: 28px; margin: -14px 0 0 -14px; overflow: visible; pointer-events: none; }
.state-icon circle, .state-icon path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.state-spinner { stroke: var(--state-color); stroke-width: 2; stroke-dasharray: 32 68; opacity: 0; }
.state-check { stroke: #05070f; stroke-width: 1.8; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; }
.state-flow article { position: relative; }
.state-flow article::after { content: ""; position: absolute; inset: -1px; border: 1px solid var(--lime); border-radius: inherit; box-shadow: 0 0 0 4px var(--lime-soft); opacity: 0; transition: opacity .35s var(--ease); pointer-events: none; }
.state-flow article.is-lit::after { opacity: 1; }

/* release.sh: blinking cursor once the lines have typed out. */
.term-cursor.is-blinking { animation: term-blink 1s steps(1) infinite; }
@keyframes term-blink { 50% { opacity: 0; } }
