/* =========================================================
   Dinuka Lakmal — Portfolio
   Plain HTML/CSS/JS version. Edit freely.
   ---------------------------------------------------------
   Quick edits:
   - Accent color: change --accent below.
   - Text/content: edit index.html directly.
   - Process step images: drop files into assets/ named
     step-01.jpg … step-08.jpg (or change the <img src> in
     index.html). Missing images fall back to a gradient.
   ========================================================= */

:root {
  --accent: #4E7CFF;      /* brand / accent color */
  --bg: #05070C;          /* page background */
  --text: #F2F4F8;        /* primary text */
  --muted: #9BA3B4;       /* secondary text */
  --text-soft: #C9CFDB;   /* softer body text */
  --card-bg: var(--wa-035);
  --card-border: var(--wa-09);
  --maxw: 1240px;

  /* theme alpha tokens (generated) */
  --wa-035: rgba(255,255,255,.035);
  --wa-09: rgba(255,255,255,.09);
  --wa-85: rgba(255,255,255,.85);
  --wa-1: rgba(255,255,255,.1);
  --wa-14: rgba(255,255,255,.14);
  --wa-05: rgba(255,255,255,.05);
  --wa-16: rgba(255,255,255,.16);
  --wa-04: rgba(255,255,255,.04);
  --wa-3: rgba(255,255,255,.3);
  --wa-12: rgba(255,255,255,.12);
  --wa-25: rgba(255,255,255,.25);
  --wa-045: rgba(255,255,255,.045);
  --wa-35: rgba(255,255,255,.35);
  --wa-18: rgba(255,255,255,.18);
  --wa-03: rgba(255,255,255,.03);
  --wa-22: rgba(255,255,255,.22);
  --wa-2: rgba(255,255,255,.2);
  --wa-02: rgba(255,255,255,.02);
  --wa-08: rgba(255,255,255,.08);
  --wa-55: rgba(255,255,255,.55);
  --wa-6: rgba(255,255,255,.6);
  --sa-72: rgba(11,13,18,.72);
  --sa-94: rgba(11,13,18,.94);
  --sa-6: rgba(11,13,18,.6);
  --sa-12: rgba(11,13,18,.12);
  --sa-88: rgba(11,13,18,.88);
  --sa-58: rgba(11,13,18,.58);
  --sa-55: rgba(11,13,18,.55);
  --sa-92: rgba(11,13,18,.92);
  --sa-7: rgba(11,13,18,.7);
  --sa-8: rgba(11,13,18,.8);
  --na-72: rgba(15,18,26,.72);
  --na-82: rgba(15,18,26,.82);
  --da-55: rgba(5,7,12,.55);
  --da-35: rgba(5,7,12,.35);
  --da-82: rgba(5,7,12,.82);
  --da-6: rgba(5,7,12,.6);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* ---------- space background ---------- */
.space-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.space-bg__nebula {
  position: absolute; inset: -4%;
  background: url('assets/nebula.png') center 40% / cover no-repeat;
  filter: blur(6px) saturate(1.15) brightness(.9);
  opacity: .5;
}
/* darken edges so content stays readable */
.space-bg__vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 30%, var(--da-55) 100%),
    linear-gradient(180deg, var(--da-35), var(--da-55));
}
#starfield { position: absolute; inset: 0; width: 100%; height: 100%; }

::selection { background: rgba(78, 124, 255, .35); }

a { color: inherit; }

h1, h2, h3, p { margin: 0; }

img { display: block; max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: 40px; padding-right: 40px; }

.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.eyebrow.muted { color: var(--muted); }

.section-title {
  font-size: clamp(32px, 3.6vw, 52px); font-weight: 700; letter-spacing: -1.2px;
  font-family: 'Poppins', system-ui, sans-serif;
}

/* ---------- mouse-follow glow + scroll dust ---------- */
#glow {
  position: fixed; left: 0; top: 0; width: 520px; height: 520px;
  margin-left: -260px; margin-top: -260px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 14%, transparent) 0%, transparent 65%);
  pointer-events: none; z-index: 1; opacity: 0;
}
#dust {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0;
  transition: opacity .7s ease, filter .7s ease;
}

/* ---------- page loader ---------- */
.loader { position: fixed; inset: 0; z-index: 200; }
.loader__half {
  position: absolute; left: 0; right: 0; height: 50.5%; background: #000;
  transition: transform .85s cubic-bezier(.76, 0, .24, 1);
}
.loader__half--top { top: 0; }
.loader__half--bottom { bottom: 0; }
/* spaceship doors: split from the middle */
.loader.is-done .loader__half--top { transform: translateY(-101%); }
.loader.is-done .loader__half--bottom { transform: translateY(101%); }

.loader__center {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  transition: opacity .3s ease;
}
.loader.is-done .loader__center { opacity: 0; }
.loader__word { font-size: 15px; font-weight: 600; letter-spacing: 4px; color: var(--wa-85); }
.loader__line { position: relative; width: 190px; height: 2px; border-radius: 2px; background: var(--wa-1); overflow: visible; }
.loader__line i {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent), 0 0 26px color-mix(in oklab, var(--accent) 60%, transparent);
  animation: lineLoad 1.15s cubic-bezier(.4, 0, .2, 1) .1s forwards;
}
@keyframes lineLoad { to { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .loader__line i { animation-duration: .01ms; } }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 10px 12px 10px 20px; border-radius: 999px;
  background: var(--na-72); border: 1px solid var(--wa-09);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.nav__brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); }
.nav__logo {
  width: 28px; height: 28px; border-radius: 9px; background: var(--accent);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--bg);
}
.nav__name { font-size: 14px; font-weight: 700; letter-spacing: .2px; }
.nav__links { display: flex; gap: 22px; font-size: 13px; font-weight: 500; color: var(--muted); }
.nav__links a { text-decoration: none; transition: color .2s ease; }
.nav__links a:hover { color: var(--text); }
.nav__cta {
  display: inline-block; padding: 9px 18px; border-radius: 999px;
  background: var(--accent); color: var(--bg); font-size: 13px; font-weight: 700;
  text-decoration: none;
  transition: transform .35s cubic-bezier(.22, 1, .36, 1), filter .35s ease, box-shadow .35s ease;
}
.nav__cta:hover { filter: brightness(1.12); box-shadow: 0 6px 22px color-mix(in oklab, var(--accent) 45%, transparent); }

.nav__burger { display: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--wa-14); background: var(--wa-05); cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 0; }
.nav__burger span { display: block; width: 16px; height: 1.8px; border-radius: 2px; background: var(--text); transition: transform .35s cubic-bezier(.22, 1, .36, 1), opacity .25s ease; }
.nav__burger.is-open span:nth-child(1) { transform: translateY(6.8px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-6.8px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center;
  background: var(--da-82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
.mobile-menu.is-open { opacity: 1; pointer-events: auto; }
.mobile-menu__links { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mobile-menu__links a {
  font-size: 26px; font-weight: 700; letter-spacing: -.5px; color: var(--text); text-decoration: none; padding: 10px 24px;
  opacity: 0; transform: translateY(14px); transition: opacity .4s ease, transform .45s cubic-bezier(.22, 1, .36, 1);
}
.mobile-menu.is-open .mobile-menu__links a { opacity: 1; transform: translateY(0); }
.mobile-menu.is-open .mobile-menu__links a:nth-child(1) { transition-delay: .05s; }
.mobile-menu.is-open .mobile-menu__links a:nth-child(2) { transition-delay: .1s; }
.mobile-menu.is-open .mobile-menu__links a:nth-child(3) { transition-delay: .15s; }
.mobile-menu.is-open .mobile-menu__links a:nth-child(4) { transition-delay: .2s; }
.mobile-menu.is-open .mobile-menu__links a:nth-child(5) { transition-delay: .25s; }
.mobile-menu__cta { margin-top: 14px; border-radius: 999px; background: var(--accent); color: var(--bg) !important; font-size: 18px !important; padding: 14px 34px !important; }

.theme-toggle {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--wa-14); background: var(--wa-05);
  color: var(--text); cursor: pointer; padding: 0; transition: background .2s ease, border-color .2s ease;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle .tt-sun { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-family: inherit; cursor: pointer;
  transition: transform .35s cubic-bezier(.22, 1, .36, 1), filter .35s ease, box-shadow .45s cubic-bezier(.22, 1, .36, 1), background .4s ease, border-color .4s ease, color .3s ease;
}
.btn--primary {
  padding: 15px 30px; border-radius: 14px; border: none;
  background: var(--accent); color: var(--bg); font-size: 15px; font-weight: 700;
  box-shadow: 0 8px 32px color-mix(in oklab, var(--accent) 35%, transparent);
}
.btn--primary:hover { filter: brightness(1.1); box-shadow: 0 14px 44px color-mix(in oklab, var(--accent) 55%, transparent); }
.btn--ghost {
  padding: 15px 30px; border-radius: 14px; border: 1px solid var(--wa-16);
  background: var(--wa-04); color: var(--text); font-size: 15px; font-weight: 600;
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { background: var(--wa-1); border-color: var(--wa-3); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 96vh; display: grid;
  grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
  max-width: var(--maxw); margin: 0 auto; padding: 120px 40px 0; z-index: 2;
}
/* hero background image: masked so edges melt into the page and the left copy stays clear */
.hero__bg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: url('assets/hero-bg.png') right center / cover no-repeat;
  opacity: .55;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.18) 34%, rgba(0,0,0,.75) 62%, black 78%, rgba(0,0,0,.9) 92%, transparent 100%),
    linear-gradient(180deg, transparent 0%, black 14%, black 82%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.18) 34%, rgba(0,0,0,.75) 62%, black 78%, rgba(0,0,0,.9) 92%, transparent 100%),
    linear-gradient(180deg, transparent 0%, black 14%, black 82%, transparent 100%);
  mask-composite: intersect;
}
.hero__blob-a {
  position: absolute; top: -8%; left: -14%; width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, rgba(78, 124, 255, .16), transparent 70%); filter: blur(40px); pointer-events: none;
}
.hero__blob-b {
  position: absolute; bottom: -10%; right: -6%; width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(17, 59, 138, .35), transparent 70%); filter: blur(50px); pointer-events: none;
}
.particle {
  position: absolute; border-radius: 50%; background: var(--accent); opacity: .5;
  animation: rkPulse 4s ease-in-out infinite; pointer-events: none;
}
.hero__copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 26px; animation: rkUp .8s ease-out both; }
.badge {
  display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--wa-12); background: var(--wa-04);
  font-size: 12px; font-weight: 600; letter-spacing: 1.1px; text-transform: uppercase; color: var(--muted);
}
.badge__dot { width: 7px; height: 7px; border-radius: 50%; background: #3C8C3C; animation: rkPulse 2.2s ease-in-out infinite; }
.hero h1 { font-size: clamp(44px, 5.4vw, 76px); line-height: 1.04; font-weight: 700; letter-spacing: -1.8px; text-wrap: balance; font-family: 'Poppins', system-ui, sans-serif; }
.hero h1 span { color: var(--accent); }
.hero__lead { max-width: 520px; font-size: 16px; line-height: 1.65; color: var(--muted); text-wrap: pretty; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 40px; margin-top: 14px; }
.stat__num { font-size: 28px; font-weight: 700; letter-spacing: -.5px; }
.stat__label { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: .8px; text-transform: uppercase; margin-top: 2px; }

.hero__media { position: relative; min-height: 560px; display: flex; align-items: flex-end; justify-content: center; align-self: end; animation: rkUp .9s ease-out .15s both; }
.hero__media-glow {
  position: absolute; inset: 6% 4%; border-radius: 32px;
  background: radial-gradient(60% 55% at 42% 55%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 75%);
  filter: blur(30px); pointer-events: none;
}
.hero__media-grid {
  position: absolute; inset: 0; border-radius: 28px; pointer-events: none;
  background-image: linear-gradient(var(--wa-05) 1px, transparent 1px), linear-gradient(90deg, var(--wa-05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 55% 45%, black 25%, transparent 72%);
  mask-image: radial-gradient(ellipse at 55% 45%, black 25%, transparent 72%);
}
.hero__img {
  position: relative; width: 100%; max-width: 660px; height: auto; border-radius: 24px;
  display: block; margin-bottom: -2px;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .55));
  -webkit-mask-image: radial-gradient(130% 120% at 60% 45%, black 72%, transparent 100%);
  mask-image: radial-gradient(130% 120% at 60% 45%, black 72%, transparent 100%);
}
/* video loop: blend black background away against the dark page */
video.hero__img {
  mix-blend-mode: screen; filter: none; border-radius: 0;
  -webkit-mask-image: radial-gradient(120% 110% at 50% 45%, black 62%, transparent 96%);
  mask-image: radial-gradient(120% 110% at 50% 45%, black 62%, transparent 96%);
}
.hero__tag {
  position: absolute; left: 50%; bottom: 2%; transform: translateX(-50%); z-index: 2;
  display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 999px;
  background: var(--sa-72); border: 1px solid var(--wa-12);
  backdrop-filter: blur(14px); white-space: nowrap;
}
.hero__tag-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero__tag-name { font-size: 13px; font-weight: 600; }
.hero__tag-role { font-size: 12px; color: var(--muted); }
.scroll-ind { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); }
.scroll-ind__label { font-size: 10px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; }
.scroll-ind__mouse { width: 22px; height: 36px; border-radius: 12px; border: 1.5px solid var(--wa-25); display: flex; justify-content: center; padding-top: 6px; }
.scroll-ind__mouse span { width: 3px; height: 8px; border-radius: 2px; background: var(--accent); animation: rkDot 1.8s ease-in-out infinite; }

/* ---------- sections ---------- */
.section { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; padding: 110px 40px; }
.section--work { padding: 40px 40px 110px; }
.section--skills, .section--exp { padding: 0 40px 110px; }
.section--contact { padding: 0 40px 60px; }

/* ---------- about (full-bleed glass band) ---------- */
.about-band {
  position: relative; z-index: 2; width: 100%; margin: 0; padding: 90px 0 0;
  background: var(--wa-045);
  border-top: 1px solid var(--wa-09); border-bottom: 1px solid var(--wa-09);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.about-band__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 40px 72px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
}
.about__text { font-size: 16.5px; line-height: 1.8; color: var(--muted); }
.about__text strong { color: var(--text); font-weight: 600; }

/* ---------- LCD marquee ---------- */
.marquee {
  overflow: hidden; white-space: nowrap; padding: 20px 0;
  border-top: 1px solid var(--wa-09);
  background: var(--da-55);
}
.marquee__track { display: inline-flex; animation: marquee 28s linear infinite; will-change: transform; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__seg {
  font-family: 'Doto', ui-monospace, Menlo, monospace; font-weight: 900;
  font-size: 26px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 0 8px color-mix(in oklab, var(--accent) 65%, transparent), 0 0 22px color-mix(in oklab, var(--accent) 35%, transparent);
}
.marquee__seg i { font-style: normal; color: var(--wa-35); text-shadow: none; margin: 0 18px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ---------- process (How I Work) ---------- */
.process { margin-top: 90px; }
.process__steps { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0; position: relative; margin-bottom: 28px; }
.process__line { position: absolute; top: 19px; left: 6%; right: 6%; height: 1px; background: linear-gradient(90deg, transparent, var(--wa-18) 15%, var(--wa-18) 85%, transparent); }
.process__step { display: flex; flex-direction: column; align-items: center; gap: 12px; position: relative; padding: 0 4px; cursor: pointer; transition: transform .25s ease; }
.process__bubble {
  width: 38px; height: 38px; border-radius: 50%; background: var(--bg); border: 1px solid var(--wa-18);
  display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--accent);
  position: relative; z-index: 1; transition: background .25s ease, border-color .25s ease, color .25s ease, box-shadow .25s ease;
}
.process__step-label { font-size: 12.5px; font-weight: 600; text-align: center; color: var(--muted); transition: color .25s ease; }
/* active step */
.process__step.is-active { transform: translateY(-4px); }
.process__step.is-active .process__bubble {
  background: var(--accent); border-color: var(--accent); color: var(--bg);
  box-shadow: 0 0 20px color-mix(in oklab, var(--accent) 45%, transparent);
}
.process__step.is-active .process__step-label { color: var(--text); }

.process__panels { position: relative; height: 340px; border-radius: 20px; overflow: hidden; border: 1px solid var(--card-border); background: var(--wa-03); }
.process__panel { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .45s ease; }
.process__panel.is-active { opacity: 1; pointer-events: auto; }
/* per-step gradient fallback (shown when no image is present) */
.process__panel-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.process__panel[data-tint] .process__panel-fallback {
  position: absolute; inset: 0;
  background: linear-gradient(150deg, var(--tint, var(--accent)), rgba(17, 59, 138, .4));
}
.process__scrim { position: absolute; inset: 0; background: linear-gradient(90deg, var(--sa-94) 0%, var(--sa-6) 45%, var(--sa-12) 100%); pointer-events: none; }
.process__caption { position: absolute; left: 36px; bottom: 32px; max-width: 480px; pointer-events: none; display: flex; flex-direction: column; gap: 10px; }
.process__caption-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--accent); }
.process__caption-title { font-size: 26px; font-weight: 700; letter-spacing: -.6px; color: var(--text); }
.process__caption-desc { font-size: 14px; line-height: 1.7; color: var(--text-soft); text-wrap: pretty; }

/* ---------- work ---------- */
.work__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filter {
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--wa-14);
  background: var(--wa-03); color: var(--text-soft); font-size: 13px; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: all .2s ease;
}
.filter.is-active { background: var(--accent); color: var(--bg); border-color: transparent; }

.work__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

/* entrance: cards float up + fade in with stagger (--d set inline per card) */
.card-in { opacity: 0; }
.card-in.is-in { animation: cardIn .8s cubic-bezier(.22, 1, .36, 1) both; animation-delay: var(--d, 0ms); }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(34px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== project card — whole card is a link; details reveal on hover ===== */
.project {
  position: relative; display: block; aspect-ratio: 3 / 2; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--card-border); text-decoration: none; color: var(--text); background: var(--na-82);
  transition: border-color .45s ease, box-shadow .45s ease, transform .45s cubic-bezier(.22, 1, .36, 1);
}
.project:hover { border-color: transparent; transform: translateY(-4px); box-shadow: 0 24px 64px rgba(0, 0, 0, .5), 0 0 48px color-mix(in oklab, var(--accent) 12%, transparent); }
/* rotating gradient ring on hover */
@property --ring-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.project::before {
  content: ""; position: absolute; inset: 0; border-radius: 20px; padding: 2.5px; z-index: 3; pointer-events: none;
  background: conic-gradient(from var(--ring-angle), var(--accent), rgba(167, 139, 250, .9), transparent 40%, var(--accent) 62%, transparent 82%, var(--accent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  opacity: 0; transition: opacity .35s ease;
}
.project:hover::before { opacity: 1; animation: ringSpin 3.2s linear infinite; }
@keyframes ringSpin { to { --ring-angle: 360deg; } }

/* media fills the card */
.project__media { position: absolute; inset: 0; }
.project__thumb { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; transition: transform .6s cubic-bezier(.22, 1, .36, 1); }
.project:hover .project__thumb { transform: scale(1.05); }
.project__ph { position: absolute; inset: 0; }
.project__window {
  position: absolute; inset: 22px 48px -20px; border-radius: 14px 14px 0 0;
  background: var(--sa-88); border: 1px solid var(--wa-12);
  padding: 14px; display: flex; flex-direction: column; gap: 9px; transition: transform .6s cubic-bezier(.22, 1, .36, 1);
}
.project:hover .project__window { transform: scale(1.04) translateY(-4px); }
.project__dots { display: flex; gap: 5px; margin-bottom: 2px; }
.project__dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--wa-22); }
.project__bar { border-radius: 6px; background: var(--wa-2); height: 11px; }
.project__bar--sm { height: 8px; border-radius: 4px; background: var(--wa-1); }
.project__blocks { display: flex; gap: 8px; margin-top: 4px; }
.project__blocks div { flex: 1; border-radius: 10px; }

/* always-on bottom scrim for title legibility */
.project__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, var(--sa-88) 100%);
}

/* hover overlay: dark + blur */
.project__overlay {
  position: absolute; inset: 0; background: var(--sa-58);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .5s cubic-bezier(.22, 1, .36, 1);
}
.project:hover .project__overlay { opacity: 1; }

/* content anchored to bottom */
.project__content { position: absolute; inset: auto 0 0 0; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.project__meta-top { display: flex; align-items: center; justify-content: flex-start; gap: 10px; margin-bottom: -2px; }
.project__cat { padding: 5px 13px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.project__tools { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 999px; background: var(--sa-55); border: 1px solid var(--wa-12); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.project__tools img, .project__tools svg { display: block; opacity: .85; }
.project__title { font-size: 22px; font-weight: 700; letter-spacing: -.4px; margin: 0; text-shadow: 0 2px 14px rgba(0, 0, 0, .5); }

/* details: hidden idle, revealed on hover */
.project__details {
  display: grid; grid-template-rows: 0fr; opacity: 0; transform: translateY(12px);
  transition: grid-template-rows .5s cubic-bezier(.22, 1, .36, 1), opacity .45s ease .05s, transform .5s cubic-bezier(.22, 1, .36, 1);
}
.project:hover .project__details { grid-template-rows: 1fr; opacity: 1; transform: translateY(0); }
.project__details-inner { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.project__desc { font-size: 13.5px; line-height: 1.6; color: var(--text-soft); text-wrap: pretty; margin: 0; overflow: hidden; }
.project__cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; font-weight: 700; color: var(--accent); overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .project__details { grid-template-rows: 1fr; opacity: 1; transform: none; }
  .project__overlay { opacity: .35; }
}

/* ---------- skills ---------- */
.skills__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.skill-card { padding: 28px; border-radius: 20px; background: var(--card-bg); border: 1px solid var(--card-border); transition: border-color .3s ease; }
.skill-card:hover { border-color: rgba(78, 124, 255, .4); }
.skill-card__title { font-size: 16px; font-weight: 700; margin-bottom: 18px; color: var(--text); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 9px; }
.skill-tag {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--wa-12);
  background: var(--wa-03); font-size: 12.5px; font-weight: 500; color: var(--text-soft); transition: all .2s ease;
}
.skill-tag:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- experience (timeline) ---------- */
.timeline { position: relative; padding-left: 8px; }
/* the spine (dim, un-traveled path) */
.timeline::before {
  content: ""; position: absolute; left: 27px; top: 8px; bottom: 8px; width: 1px;
  background: var(--wa-12);
}
/* fire trail: the traveled part of the spine, height driven by JS */
.tl-trail {
  position: absolute; left: 25.5px; top: 8px; width: 4px; height: 0; border-radius: 4px;
  background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 55%, transparent), var(--accent) 55%, #FFB36B 85%, #FFE3B3 100%);
  box-shadow: 0 0 14px color-mix(in oklab, var(--accent) 55%, transparent), 0 0 26px rgba(255, 150, 60, .35);
  pointer-events: none;
}
/* rocket: rides the tip of the trail, position driven by JS */
.tl-rocket {
  position: absolute; left: 27px; top: 8px; z-index: 2; pointer-events: none;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 10px color-mix(in oklab, var(--accent) 70%, transparent));
}
.tl-flame {
  position: absolute; left: 50%; top: -14px; transform: translateX(-50%);
  width: 8px; height: 16px; border-radius: 50% 50% 50% 50% / 65% 65% 35% 35%;
  background: linear-gradient(180deg, transparent, #FFB36B 40%, #FFE3B3);
  filter: blur(1.5px); opacity: .95; animation: tlFlame .22s ease-in-out infinite alternate;
}
@keyframes tlFlame { from { transform: translateX(-50%) scaleY(.75); opacity: .7; } to { transform: translateX(-50%) scaleY(1.15); opacity: 1; } }
.tl-item { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 24px; padding: 0 0 28px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-marker { position: relative; }
.tl-dot {
  position: absolute; left: 12px; top: 26px; width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--wa-3); box-sizing: border-box;
  transition: border-color .5s cubic-bezier(.22, 1, .36, 1), background .5s cubic-bezier(.22, 1, .36, 1), box-shadow .5s cubic-bezier(.22, 1, .36, 1), transform .5s cubic-bezier(.22, 1, .36, 1);
}
.tl-item--current .tl-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 16px color-mix(in oklab, var(--accent) 60%, transparent); }
.tl-item:hover .tl-dot, .tl-item.is-active .tl-dot { border-color: var(--accent); background: var(--accent); transform: scale(1.25); box-shadow: 0 0 20px color-mix(in oklab, var(--accent) 60%, transparent); }
.tl-card {
  padding: 24px 28px; border-radius: 18px; background: var(--na-82); border: 1px solid var(--card-border);
  transition: border-color .5s cubic-bezier(.22, 1, .36, 1), background .5s cubic-bezier(.22, 1, .36, 1), transform .5s cubic-bezier(.22, 1, .36, 1), box-shadow .5s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}
.tl-item:hover .tl-card, .tl-item.is-active .tl-card {
  border-color: rgba(78, 124, 255, .45); background: rgba(78, 124, 255, .05);
  transform: translateX(6px); box-shadow: 0 18px 48px rgba(0, 0, 0, .35);
}
.tl-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; flex-wrap: wrap; }
.tl-years { font-size: 13px; font-weight: 600; color: var(--accent); font-family: ui-monospace, Menlo, monospace; }
.tl-company { font-size: 13.5px; font-weight: 600; color: var(--text-soft); }
.tl-title { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.tl-desc { font-size: 13.5px; line-height: 1.65; color: var(--muted); max-width: 640px; text-wrap: pretty; margin: 0; }
.tl-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s cubic-bezier(.22, 1, .36, 1); }
.tl-more__inner { min-height: 0; overflow: hidden; }
.tl-more__inner .tl-desc { padding-top: 10px; }
.tl-item.is-expanded .tl-more { grid-template-rows: 1fr; }
.tl-readmore {
  margin-top: 12px; padding: 0; border: none; background: none; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--accent);
}
.tl-readmore span { transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
.tl-item.is-expanded .tl-readmore span { transform: rotate(180deg); }

/* ---------- contact ---------- */
.section--contact { padding: 0 40px 60px; }
.contact-card {
  position: relative; overflow: hidden; border-radius: 28px; border: 1px solid var(--wa-1);
  background: radial-gradient(120% 90% at 50% 0%, rgba(78, 124, 255, .1), var(--da-6) 55%);
  padding: 90px 48px 0; text-align: center;
}
/* static earth arc under the buttons */
.contact-earth {
  width: min(1000px, 100%); height: 250px; overflow: hidden; margin-top: 44px; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, black 50%, transparent 100%);
  mask-image: linear-gradient(180deg, black 50%, transparent 100%);
}
.contact-earth img {
  display: block; width: 100%; height: auto;
  filter: drop-shadow(0 0 60px rgba(78, 124, 255, .35));
}

.connect-eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: 13px; font-weight: 700; letter-spacing: 5px; color: var(--accent); margin-bottom: 26px;
}
.connect-eyebrow__line { width: 70px; height: 1px; background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--accent) 60%, transparent)); }
.connect-eyebrow__line:last-child { background: linear-gradient(270deg, transparent, color-mix(in oklab, var(--accent) 60%, transparent)); }
.connect-eyebrow__star { font-size: 11px; }

.contact-card__inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 24px; z-index: 1; }
.contact-card h2 { font-size: clamp(38px, 4.6vw, 66px); font-weight: 700; letter-spacing: -1.4px; max-width: 760px; text-wrap: balance; line-height: 1.12; font-family: 'Poppins', system-ui, sans-serif; }
.contact-card .accent-word { color: var(--accent); }
.contact-card__lead { font-size: 15.5px; color: var(--text-soft); max-width: 460px; line-height: 1.65; text-wrap: pretty; }
.contact-card__actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.btn--lg { padding: 16px 32px; }

.site-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 32px 8px 12px; font-size: 12.5px; color: var(--text-soft);
}
.site-footer a { text-decoration: none; transition: color .2s ease; color: var(--text-soft); }
.site-footer a:hover { color: var(--text); }
.footer__links { display: flex; gap: 24px; }

/* =========================================================
   CASE STUDY PAGE (case-study-finora.html)
   ========================================================= */
.case-nav {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 24px; padding: 10px 20px; border-radius: 999px;
  background: var(--na-72); border: 1px solid var(--wa-09);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.case-nav__back { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 600; transition: color .2s ease; }
.case-nav__back:hover { color: var(--text); }
.case-nav__div { width: 1px; height: 16px; background: var(--wa-14); }
.case-nav__title { font-size: 13px; font-weight: 700; }

.case-hero { max-width: 920px; margin: 0 auto; padding: 160px 40px 70px; animation: rkUp .7s ease-out both; position: relative; z-index: 2; }
.case-hero__tag {
  display: inline-block; padding: 5px 14px; border-radius: 999px; background: rgba(78, 124, 255, .16);
  color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; margin-bottom: 22px;
}
.case-hero h1 { font-size: clamp(38px, 4.8vw, 64px); font-weight: 700; letter-spacing: -1.6px; line-height: 1.06; margin-bottom: 20px; text-wrap: balance; font-family: 'Poppins', system-ui, sans-serif; }
.case-hero__lead { font-size: 17px; line-height: 1.7; color: var(--muted); max-width: 640px; margin-bottom: 40px; text-wrap: pretty; }
.case-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.case-fact { padding: 18px 20px; border-radius: 16px; border: 1px solid var(--card-border); background: var(--card-bg); }
.case-fact__label { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.case-fact__val { font-size: 14px; font-weight: 600; }

.case-visual { max-width: 920px; margin: 0 auto; padding: 0 40px 80px; position: relative; z-index: 2; }
.case-visual__frame {
  border-radius: 24px; background: linear-gradient(150deg, rgba(78, 124, 255, .22), rgba(17, 59, 138, .3));
  border: 1px solid var(--wa-1); padding: 56px; display: flex; justify-content: center; gap: 28px; overflow: hidden;
}
.phone { width: 220px; border-radius: 28px; background: var(--sa-92); border: 1px solid var(--wa-14); padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 28px 60px rgba(0, 0, 0, .5); }
.phone--a { transform: rotate(-3deg) translateY(10px); }
.phone--b { transform: rotate(2.5deg) translateY(-6px); }

.case-main { max-width: 760px; margin: 0 auto; padding: 0 40px 60px; display: flex; flex-direction: column; gap: 72px; position: relative; z-index: 2; }
.case-section__num { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.case-section h2 { font-size: 30px; font-weight: 700; letter-spacing: -.7px; margin-bottom: 18px; font-family: 'Poppins', system-ui, sans-serif; }
.case-section p { font-size: 15.5px; line-height: 1.75; color: var(--muted); text-wrap: pretty; }
.case-section p + p { margin-top: 16px; }
.case-section strong { color: var(--text); font-weight: 600; }
.finding { padding: 22px 24px; border-radius: 16px; border: 1px solid var(--card-border); background: var(--card-bg); display: flex; gap: 16px; align-items: baseline; }
.finding__key { font-size: 13px; font-weight: 700; color: var(--accent); font-family: ui-monospace, Menlo, monospace; }
.finding p { font-size: 14.5px; line-height: 1.65; color: var(--text-soft); }
.findings { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.results-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 24px; }
.result-card { padding: 28px; border-radius: 18px; background: var(--card-bg); border: 1px solid var(--card-border); }
.result-card--hero { background: linear-gradient(150deg, rgba(78, 124, 255, .16), var(--wa-02)); border-color: rgba(78, 124, 255, .3); }
.result-card__num { font-size: 36px; font-weight: 700; letter-spacing: -1px; }
.result-card--hero .result-card__num { color: var(--accent); }
.result-card__label { font-size: 13px; color: var(--muted); margin-top: 6px; }
.case-footer-nav { border-top: 1px solid var(--wa-08); padding-top: 40px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .case-facts { grid-template-columns: 1fr 1fr; }
  .case-visual__frame { padding: 32px 20px; }
  .results-grid { grid-template-columns: 1fr; }
}

/* ---------- media: carousel (center mode — blurred neighbors peek on each side) ---------- */
.carousel { position: relative; margin-top: 24px; overflow: hidden; padding: 8px 0 14px; }
.carousel::before, .carousel::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 60px; z-index: 2; pointer-events: none;
}
.carousel::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.carousel::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.carousel__track { display: flex; gap: 20px; transition: transform .55s cubic-bezier(.22, 1, .36, 1); }
.carousel__slide {
  min-width: 78%; height: 420px; position: relative; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--card-border); background: var(--wa-03);
  filter: blur(5px) brightness(.55) saturate(.7); transform: scale(.92); opacity: .8;
  transition: filter .55s ease, transform .55s cubic-bezier(.22, 1, .36, 1), opacity .55s ease;
  cursor: pointer;
}
.carousel__slide.is-current {
  filter: none; transform: scale(1); opacity: 1; cursor: default;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.carousel__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel__ph { position: absolute; inset: 0; display: grid; place-items: center; }
.carousel__ph-label { font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--wa-55); }
.carousel__caption {
  position: absolute; left: 20px; bottom: 16px; right: 20px; padding: 10px 16px; border-radius: 12px;
  background: var(--sa-7); backdrop-filter: blur(8px); font-size: 13.5px; color: var(--text-soft);
  opacity: 0; transform: translateY(8px); transition: opacity .4s ease .15s, transform .4s ease .15s;
}
.carousel__slide.is-current .carousel__caption { opacity: 1; transform: translateY(0); }
.carousel__btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--wa-18); background: var(--sa-7); backdrop-filter: blur(8px);
  color: var(--text); font-size: 20px; cursor: pointer; display: grid; place-items: center; transition: background .2s ease, border-color .2s ease;
}
.carousel__btn:hover { background: var(--accent); border-color: transparent; color: var(--bg); }
.carousel__btn--prev { left: 20px; }
.carousel__btn--next { right: 20px; }
.carousel__dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.carousel__dot { width: 8px; height: 8px; border-radius: 50%; border: none; padding: 0; background: var(--wa-35); cursor: pointer; transition: background .2s ease, width .2s ease; }
.carousel__dot.is-active { background: var(--accent); width: 22px; border-radius: 4px; }

/* ---------- media: video ---------- */
.case-video { margin-top: 24px; position: relative; border-radius: 20px; overflow: hidden; border: 1px solid var(--card-border); background: #000; }
.case-video video { display: block; width: 100%; height: auto; }
.case-video__ph { aspect-ratio: 16 / 9; display: grid; place-items: center; background: linear-gradient(150deg, rgba(78, 124, 255, .22), rgba(17, 59, 138, .35)); }
.case-video__play { width: 72px; height: 72px; border-radius: 50%; background: var(--sa-55); border: 1px solid var(--wa-25); display: grid; place-items: center; }
.case-video__play::after { content: ""; width: 0; height: 0; border-style: solid; border-width: 13px 0 13px 22px; border-color: transparent transparent transparent #fff; margin-left: 5px; }
.case-video__ph-label { position: absolute; bottom: 18px; left: 20px; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--wa-6); }

/* ---------- media: single image → lightbox ---------- */
.case-figure { margin-top: 24px; }
.case-figure__btn { display: block; width: 100%; padding: 0; border: 1px solid var(--card-border); border-radius: 20px; overflow: hidden; background: var(--wa-03); cursor: zoom-in; position: relative; }
.case-figure__img { display: block; width: 100%; height: auto; }
.case-figure__ph { aspect-ratio: 16 / 10; display: grid; place-items: center; background: linear-gradient(150deg, rgba(167, 139, 250, .22), rgba(17, 59, 138, .3)); }
.case-figure__ph-label { font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--wa-55); }
.case-figure__hint { position: absolute; top: 14px; right: 14px; z-index: 1; padding: 6px 12px; border-radius: 999px; background: var(--sa-7); backdrop-filter: blur(8px); font-size: 11px; font-weight: 600; letter-spacing: .5px; color: var(--text-soft); }
.case-figure__cap { margin-top: 12px; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- lightbox overlay (index cards + case-study figure) ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(6, 8, 12, .92); display: none; overflow: auto; padding: 40px 20px; }
.lightbox.is-open { display: block; }
.lightbox__inner { max-width: 1100px; margin: 0 auto; min-height: 100%; display: flex; align-items: flex-start; justify-content: center; }
.lightbox__img { width: 100%; height: auto; border-radius: 12px; display: block; }
.lightbox__close { position: fixed; top: 20px; right: 24px; z-index: 101; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--wa-2); background: var(--sa-8); color: #fff; font-size: 22px; cursor: pointer; display: grid; place-items: center; }
.lightbox__close:hover { background: var(--accent); border-color: transparent; color: var(--bg); }

/* ---------- reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- keyframes ---------- */
@keyframes rkPulse { 0%, 100% { opacity: .5; transform: scale(1); } 50% { opacity: 1; transform: scale(1.25); } }
@keyframes rkDot { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
@keyframes rkUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes rkDust { 0% { opacity: 0; transform: translate3d(0, 0, 0) scale(.6); } 18% { opacity: .75; } 100% { opacity: 0; transform: translate3d(var(--dx, 24px), -110px, 0) scale(1.1); } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .tl-rocket, .tl-trail { display: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 120px; }
  .hero__media { min-height: 420px; }
  .about-band__inner { grid-template-columns: 1fr; gap: 24px; }
  .skills__grid { grid-template-columns: 1fr; }
  .work__grid { grid-template-columns: 1fr; }
  .nav__links { display: none; }
}
@media (max-width: 560px) {
  .wrap, .section, .hero { padding-left: 20px; padding-right: 20px; }
  .section { padding-top: 72px; padding-bottom: 72px; }
  .section--work { padding-top: 24px; }

  /* nav → hamburger */
  .nav { top: 12px; left: 16px; right: 16px; transform: none; justify-content: space-between; gap: 12px; padding: 8px 10px 8px 16px; }
  .nav__cta { display: none; }
  .nav__burger { display: flex; }

  /* hero */
  .hero { padding-top: 108px; min-height: auto; padding-bottom: 56px; }
  /* darken/quiet the hero bg image so left-side copy stays readable */
  .hero__bg {
    opacity: .28;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.1) 30%, rgba(0,0,0,.5) 65%, rgba(0,0,0,.75) 85%, transparent 100%),
      linear-gradient(180deg, transparent 0%, black 14%, black 82%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.1) 30%, rgba(0,0,0,.5) 65%, rgba(0,0,0,.75) 85%, transparent 100%),
      linear-gradient(180deg, transparent 0%, black 14%, black 82%, transparent 100%);
    mask-composite: intersect;
  }
  .hero__lead { font-size: 15px; }
  .hero__stats { gap: 20px; flex-wrap: wrap; }
  .stat__num { font-size: 24px; }
  .hero__media { min-height: 320px; }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1; justify-content: center; padding: 14px 18px; }
  .scroll-ind { display: none; }

    
  .about-band { margin-top: 0; padding-top: 56px; }
  .about-band__inner { padding: 0 20px 48px; }
  .marquee__seg { font-size: 18px; letter-spacing: 2px; }

  /* how i work */
  .process__steps { grid-template-columns: repeat(4, 1fr); gap: 16px 0; }
  .process__line { display: none; }
  .process__panels { height: 300px; }
  .process__caption { left: 20px; right: 20px; bottom: 20px; }
  .process__caption-title { font-size: 21px; }
  .process__caption-desc { font-size: 13px; }

  /* work cards: image on top, static content below */
  .project { aspect-ratio: auto; min-height: 0; display: flex; flex-direction: column; background: var(--card-bg); }
  .project__media { position: relative; inset: auto; aspect-ratio: 3 / 2; }
  .project__media::after { display: none; }
  .project__overlay { display: none; }
  .project__content { position: static; padding: 16px 18px 20px; }
  .project__details { grid-template-rows: 1fr; opacity: 1; transform: none; }
  .project__title { font-size: 19px; text-shadow: none; }

  /* carousel */
  .carousel__slide { min-width: 88%; height: 300px; }
  .carousel__btn { width: 38px; height: 38px; }

  /* timeline */
  .tl-item { grid-template-columns: 32px 1fr; gap: 14px; }
  .tl-card { padding: 18px 20px; }
  .tl-head { flex-direction: column; align-items: flex-start; gap: 2px; }

  /* contact + footer */
  .contact-card { padding: 64px 20px 0; }
  .contact-earth { height: 150px; margin-top: 32px; }
  .site-footer { flex-direction: column; align-items: center; gap: 10px; }
  .contact-card__actions { width: 100%; flex-direction: column; }
  .contact-card__actions .btn { justify-content: center; }
  
  /* case study */
  .case-hero { padding: 120px 20px 48px; }
  .case-visual { padding: 0 20px 56px; }
  .case-visual__frame { flex-direction: column; align-items: center; padding: 32px 20px; gap: 20px; }
  .phone--a, .phone--b { transform: none; }
  .case-main { padding: 0 20px 48px; gap: 52px; }
  .case-nav { left: 16px; right: 16px; transform: none; justify-content: center; }
}


/* =========================================================
   LIGHT THEME — toggled via <html data-theme="light">
   ========================================================= */
[data-theme="light"] {
  --bg: #EEF2F9;
  --text: #171B26;
  --muted: #5A6272;
  --text-soft: #3E4654;
  --accent: #2F5FE8;
  --card-bg: rgba(16,24,44,.04);
  --card-border: rgba(16,24,44,.14);
  --wa-035: rgba(16,24,44,.035);
  --wa-09: rgba(16,24,44,.09);
  --wa-85: rgba(16,24,44,.85);
  --wa-1: rgba(16,24,44,.1);
  --wa-14: rgba(16,24,44,.14);
  --wa-05: rgba(16,24,44,.05);
  --wa-16: rgba(16,24,44,.16);
  --wa-04: rgba(16,24,44,.04);
  --wa-3: rgba(16,24,44,.3);
  --wa-12: rgba(16,24,44,.12);
  --wa-25: rgba(16,24,44,.25);
  --wa-045: rgba(16,24,44,.045);
  --wa-35: rgba(16,24,44,.35);
  --wa-18: rgba(16,24,44,.18);
  --wa-03: rgba(16,24,44,.03);
  --wa-22: rgba(16,24,44,.22);
  --wa-2: rgba(16,24,44,.2);
  --wa-02: rgba(16,24,44,.02);
  --wa-08: rgba(16,24,44,.08);
  --wa-55: rgba(16,24,44,.55);
  --wa-6: rgba(16,24,44,.6);
  --sa-72: rgba(255,255,255,.72);
  --sa-94: rgba(255,255,255,.94);
  --sa-6: rgba(255,255,255,.6);
  --sa-12: rgba(255,255,255,.12);
  --sa-88: rgba(255,255,255,.88);
  --sa-58: rgba(255,255,255,.58);
  --sa-55: rgba(255,255,255,.55);
  --sa-92: rgba(255,255,255,.92);
  --sa-7: rgba(255,255,255,.7);
  --sa-8: rgba(255,255,255,.8);
  --na-72: rgba(255,255,255,.78);
  --na-82: rgba(255,255,255,.88);
  --da-55: rgba(238,242,249,.55);
  --da-35: rgba(238,242,249,.35);
  --da-82: rgba(238,242,249,.82);
  --da-6: rgba(238,242,249,.6);
}
[data-theme="light"] ::selection { background: rgba(47,95,232,.22); }
[data-theme="light"] .space-bg__nebula { opacity: .14; }
[data-theme="light"] .space-bg__vignette {
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 30%, rgba(238,242,249,.72) 100%),
    linear-gradient(180deg, rgba(238,242,249,.5), rgba(238,242,249,.72));
}
[data-theme="light"] .hero__bg { opacity: .22; }
[data-theme="light"] .project__title { text-shadow: none; }
[data-theme="light"] .contact-card {
  background: radial-gradient(120% 90% at 50% 0%, rgba(47,95,232,.08), rgba(238,242,249,.55) 55%);
}
/* loader + lightbox stay dark in both themes */
[data-theme="light"] .loader__word { color: rgba(255,255,255,.85); }
[data-theme="light"] .loader__line { background: rgba(255,255,255,.1); }
[data-theme="light"] .lightbox__close { background: rgba(255,255,255,.9); color: #171B26; border-color: rgba(16,24,44,.2); }
/* theme toggle icon swap */
[data-theme="light"] .theme-toggle .tt-sun { display: block; }
[data-theme="light"] .theme-toggle .tt-moon { display: none; }
