/* =========================================================
   Siva Chandran — Portfolio
   Dark-first theme: near-black, electric lime, violet→pink→orange gradient
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg: #08080b;
  --bg-2: #0e0e13;
  --surface: rgba(255, 255, 255, .04);
  --surface-solid: #131319;
  --surface-hover: rgba(255, 255, 255, .07);
  --ink: #f5f5f7;
  --muted: #9b9bab;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .18);
  --accent: #c6ff3d;          /* electric lime */
  --accent-ink: #0a0a0a;
  --violet: #8b5cff;
  --pink: #ff4fa3;
  --orange: #ff8a3d;
  --grad: linear-gradient(110deg, var(--violet) 0%, var(--pink) 50%, var(--orange) 100%);
  --glow: 0 0 0 1px var(--line), 0 30px 80px -30px rgba(139, 92, 255, .35);
  /* Fonts — to change, swap the names here and the Google Fonts link in index.html */
  --display: "Plus Jakarta Sans", system-ui, sans-serif;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --max: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 22px;
  --radius-sm: 14px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f5f9;
  --bg-2: #ecebf3;
  --surface: rgba(255, 255, 255, .75);
  --surface-solid: #ffffff;
  --surface-hover: #ffffff;
  --ink: #0d0c14;
  --muted: #5d5b6e;
  --line: rgba(13, 12, 20, .09);
  --line-strong: rgba(13, 12, 20, .2);
  --accent: #6a3dff;          /* lime is unreadable on white, so violet leads */
  --accent-ink: #ffffff;
  --violet: #6a3dff;
  --pink: #e8338a;
  --orange: #f26b1d;
  --glow: 0 0 0 1px var(--line), 0 30px 70px -35px rgba(106, 61, 255, .35);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .4s, color .4s;
}
/* film grain */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="light"] body::before { opacity: .045; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
p { margin: 0 0 1em; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 300;
  background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 10px; font-weight: 700;
}
.skip:focus { left: 8px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 12px; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: min(var(--max), calc(100% - 2 * var(--gutter)));
  margin: 12px auto 0; padding: 10px 10px 10px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-2) 70%, transparent);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--line);
  transition: box-shadow .3s, border-color .3s;
}
.nav.is-scrolled { box-shadow: 0 18px 50px -20px rgba(0,0,0,.5); border-color: var(--line-strong); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 16px var(--display); letter-spacing: -.01em; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--grad); color: #fff; font: 800 13px var(--display); letter-spacing: .02em;
}
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 999px; text-decoration: none;
  font-size: 14.5px; font-weight: 600; color: var(--muted); transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-hover); }
.nav-links a.is-active { color: var(--ink); background: var(--surface-hover); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.timecode {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line); font: 500 12px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums;
}
.rec { width: 7px; height: 7px; border-radius: 50%; background: #ff3b47; box-shadow: 0 0 10px #ff3b47; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .15; } }
.theme-toggle {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer;
  transition: border-color .2s, transform .3s, background .2s;
}
.theme-toggle:hover { border-color: var(--line-strong); background: var(--surface-hover); transform: rotate(20deg); }
.icon-sun { display: block; }
.icon-moon { display: none; }
:root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }

/* ---------- Mobile menu ---------- */
.menu-toggle {
  display: none; position: relative; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; cursor: pointer;
}
.menu-toggle span {
  position: absolute; left: 12px; right: 12px; height: 2px; border-radius: 2px; background: var(--ink);
  transition: transform .3s, top .3s;
}
.menu-toggle span:first-child { top: 15px; }
.menu-toggle span:last-child { top: 23px; }
.nav.is-open .menu-toggle span:first-child { top: 19px; transform: rotate(45deg); }
.nav.is-open .menu-toggle span:last-child { top: 19px; transform: rotate(-45deg); }
.menu-only { display: none; }

/* ---------- Layout ---------- */
main, .footer { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px; font: 700 15px var(--sans);
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .25s, box-shadow .25s, background .25s, color .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 40px -10px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary:hover { box-shadow: 0 16px 50px -10px color-mix(in srgb, var(--accent) 90%, transparent); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: var(--surface-hover); border-color: var(--ink); }
.btn-small { white-space: nowrap; padding: 9px 18px; font-size: 14px; background: var(--accent); color: var(--accent-ink); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(80px, 13vw, 170px) 0 clamp(40px, 6vw, 70px); isolation: isolate; }
.hero-bg { position: absolute; inset: -140px auto 0 50%; width: 100vw; transform: translateX(-50%); z-index: -1; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; animation: float 18s ease-in-out infinite alternate; }
.blob.b1 { width: 520px; height: 520px; background: var(--violet); top: 0; right: -80px; }
.blob.b2 { width: 420px; height: 420px; background: var(--pink); top: 220px; right: 260px; animation-delay: -6s; opacity: .4; }
.blob.b3 { width: 360px; height: 360px; background: var(--orange); top: 380px; left: -120px; animation-delay: -12s; opacity: .28; }
:root[data-theme="light"] .blob { opacity: .28; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 20%, transparent 75%);
}
@keyframes float { to { transform: translate(-60px, 50px) scale(1.15); } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); backdrop-filter: blur(10px);
  font: 600 13px var(--sans); color: var(--ink); margin-bottom: 30px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2.2s infinite; }
:root[data-theme="light"] .dot { background: #1fbf6a; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 10px transparent; } }
.hero-title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(36px, 6.4vw, 96px);
  line-height: 1; letter-spacing: -.04em;
}
.hero-title .line { display: block; }
.hero-title .outline { color: var(--muted); }
.swap {
  display: inline-block; font-style: normal; padding-right: .06em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: opacity .35s, transform .35s, filter .35s;
}
.swap.is-out { opacity: 0; transform: translateY(.25em); filter: blur(8px); }
.hero-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px;
  margin-top: clamp(36px, 5vw, 56px);
}
.hero-lede { max-width: 500px; color: var(--muted); font-size: 18.5px; margin: 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Marquee ---------- */
.marquee {
  margin-top: clamp(56px, 8vw, 96px); overflow: hidden; padding: 18px 0;
  border-block: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; align-items: center; gap: 32px; width: max-content; animation: marquee 34s linear infinite; }
.marquee-track span { font: 700 clamp(22px, 3vw, 36px) var(--display); white-space: nowrap; letter-spacing: -.02em; }
.marquee-track span:nth-child(4n+3) { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.marquee-track span:nth-child(even) { color: var(--accent); font-size: 20px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 130px) 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-num {
  font: 600 12px var(--mono); color: var(--accent); padding: 5px 10px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.section-head h2 {
  flex-basis: 100%; order: 2;
  font-family: var(--display); font-weight: 800; font-size: clamp(38px, 6vw, 76px);
  line-height: 1; letter-spacing: -.035em;
}
.section-head h2 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section-head h2 .year { font: 600 .32em var(--mono); letter-spacing: 0; color: var(--muted); -webkit-text-fill-color: var(--muted); background: none; vertical-align: super; margin-left: 8px; }
.section-head .filters, .section-sub { order: 3; }
.section-sub { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 17px; }
.mono-label { font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 20px; }

/* ---------- Showreel ---------- */
.reel {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0;
  border-radius: var(--radius); overflow: hidden; cursor: pointer; color: #fff; text-align: left;
  background: #07070a; box-shadow: var(--glow);
}
.reel-bg {
  position: absolute; inset: -15%;
  background:
    radial-gradient(circle at 22% 30%, #8b5cff 0, transparent 38%),
    radial-gradient(circle at 75% 65%, #ff4fa3 0, transparent 40%),
    radial-gradient(circle at 58% 18%, #ff8a3d 0, transparent 28%),
    radial-gradient(circle at 35% 85%, #2dd4ff 0, transparent 30%),
    #07070a;
  filter: blur(34px) saturate(1.2);
  animation: drift 14s ease-in-out infinite alternate;
}
.reel-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; opacity: .6; transition: opacity .4s; pointer-events: none; }
.reel:hover .reel-preview { opacity: .85; }
.reel::after { z-index: 1; }
.reel::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, transparent 1px 3px); }
@keyframes drift { to { transform: translate(4%, -3%) scale(1.1) rotate(4deg); } }
.reel-ui { position: absolute; inset: clamp(16px, 2.6vw, 30px); z-index: 2; pointer-events: none; }
.reel-corner { position: absolute; width: 28px; height: 28px; border: 2px solid rgba(255,255,255,.75); }
.reel-corner.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.reel-corner.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 8px; }
.reel-corner.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 8px; }
.reel-corner.br { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }
.reel-hud { position: absolute; top: 6px; left: 44px; font: 500 12px var(--mono); letter-spacing: .08em; color: rgba(255,255,255,.9); }
.reel-play {
  position: absolute; left: 50%; top: 50%; z-index: 2; translate: -50% -50%;
  display: grid; place-items: center; width: clamp(76px, 10vw, 116px); aspect-ratio: 1; border-radius: 50%;
  background: rgba(255,255,255,.12); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.35); transition: transform .35s, background .35s, color .35s;
}
.reel-play::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); animation: ring 2.4s ease-out infinite; }
@keyframes ring { from { transform: scale(.85); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.reel-play svg { margin-left: 4px; }
.reel:hover .reel-play { transform: scale(1.1); background: #c6ff3d; color: #0a0a0a; border-color: #c6ff3d; }
.reel-caption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: clamp(30px, 4.5vw, 56px); font-size: clamp(14px, 1.6vw, 17px); font-weight: 600;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
}
.reel-caption .mono { font: 500 12px var(--mono); padding: 4px 10px; border: 1px solid rgba(255,255,255,.4); border-radius: 999px; margin-right: 10px; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.chip {
  font: 600 13.5px var(--sans); padding: 8px 16px; border-radius: 999px;
  border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: all .25s;
}
.chip:hover { color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--bg); }

/* ---------- Projects ---------- */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.2vw, 26px); }
.project.is-hidden { display: none; }
.project-link {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; padding: 10px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .35s, box-shadow .35s, background .35s;
}
.project-link:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: var(--glow); background: var(--surface-hover); }
.project-thumb {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden;
  background:
    radial-gradient(circle at 20% 25%, hsl(var(--h1) 95% 64%) 0, transparent 50%),
    radial-gradient(circle at 85% 80%, hsl(var(--h2) 90% 58%) 0, transparent 55%),
    conic-gradient(from 200deg at 60% 40%, hsl(var(--h1) 70% 22%), hsl(var(--h2) 70% 30%), hsl(var(--h1) 70% 22%));
  display: grid; place-items: center;
}
.project-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.project-thumb::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px); background-size: 12px 12px; mix-blend-mode: overlay;
}
.thumb-label {
  position: relative; z-index: 1; font: 800 clamp(30px, 3.4vw, 50px) var(--display); color: #fff; letter-spacing: -.04em;
  transition: transform .6s cubic-bezier(.2,.7,.2,1); text-shadow: 0 8px 40px rgba(0,0,0,.3);
}
.project-link:hover .thumb-label { transform: scale(1.1) rotate(-3deg); }
.badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font: 600 11.5px var(--mono); color: #fff; padding: 5px 10px; border-radius: 999px;
  background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.project-meta { padding: 18px 10px 10px; display: flex; flex-direction: column; flex: 1; }
.project-meta h3 { font: 700 19px var(--display); letter-spacing: -.01em; margin-bottom: 8px; display: flex; justify-content: space-between; gap: 12px; }
.project-meta h3::after {
  content: "↗"; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  font: 600 14px var(--sans); border: 1px solid var(--line-strong); transition: all .3s;
}
.project-link:hover .project-meta h3::after { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); transform: rotate(45deg); }
.project-meta p { color: var(--muted); font-size: 15px; margin-bottom: 14px; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.tags li { font: 500 11.5px var(--mono); color: var(--muted); background: var(--surface-hover); padding: 4px 10px; border-radius: 999px; }

/* ---------- Colour grade slider ---------- */
.grade {
  position: relative; aspect-ratio: 21 / 9; border-radius: var(--radius); overflow: hidden;
  user-select: none; touch-action: pan-y; background: #000; box-shadow: var(--glow);
}
.grade-img { position: absolute; inset: 0; background: var(--frame, none) center / cover; }
.grade-img .scene { position: absolute; inset: 0; display: block; }
.grade[style*="--frame"] .scene { display: none; }
.scene { background: linear-gradient(#f7b267 0%, #f4845f 35%, #c4547a 60%, #3d2c5c 100%); }
.sun { position: absolute; left: 58%; top: 30%; width: 14%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(#fff6d8, #ffd27a 60%, #ffb35c); box-shadow: 0 0 120px 40px #ffcf8066; }
.hill { position: absolute; left: -10%; right: -10%; border-radius: 50% 50% 0 0; }
.hill.h1 { bottom: -30%; height: 75%; background: #5b3a6e; left: -30%; right: 30%; }
.hill.h2 { bottom: -40%; height: 75%; background: #3a2a52; left: 25%; right: -30%; }
.hill.h3 { bottom: -60%; height: 85%; background: #1d1630; }
.grade-before { filter: saturate(.25) contrast(.72) brightness(1.12) sepia(.12); }
.grade-after { filter: saturate(1.25) contrast(1.12); clip-path: inset(0 0 0 var(--pos)); }
.grade-after::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,.45)); }
.grade-tag {
  position: absolute; top: 16px; z-index: 3; font: 600 12px var(--mono); letter-spacing: .08em; color: #fff;
  padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.grade-tag.before { left: 16px; }
.grade-tag.after { right: 16px; background: #c6ff3d; color: #0a0a0a; border-color: #c6ff3d; }
.grade-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); z-index: 3; width: 2px; background: #fff; translate: -1px 0; pointer-events: none; }
.grade-handle span {
  position: absolute; top: 50%; left: 50%; translate: -50% -50%;
  display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%;
  background: #fff; color: #111; font-size: 18px; box-shadow: 0 8px 30px rgba(0,0,0,.35);
}
.grade-range { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.grade-pair { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 2.4vw, 28px); max-width: 1000px; margin: 0 auto; }
.grade-fig { margin: 0; }
.grade-fig figcaption { margin-top: 12px; text-align: center; font: 500 13px var(--mono); color: var(--muted); }
.grade.is-photo { aspect-ratio: 4 / 5; }
.grade.is-photo .grade-img { filter: none; }
.grade.is-photo .grade-after::after { display: none; }
.grade.is-photo .grade-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.grade-cta { display: flex; justify-content: center; margin-top: 28px; }
@media (max-width: 640px) { .grade-pair { grid-template-columns: 1fr; } }
.grade:has(.grade-range:focus-visible) .grade-handle span { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 72px); align-items: stretch; }
.portrait {
  position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden;
  background: var(--grad); display: grid; place-items: center; box-shadow: var(--glow); object-fit: cover; width: 100%;
}
.portrait::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.35), transparent 50%); }
.brand-mark { object-fit: cover; }
.portrait-logo { background: #141a3c; }
.portrait-logo::after { display: none; }
.portrait-logo img { width: 100%; height: 100%; object-fit: cover; }
.portrait span { font: 800 clamp(80px, 13vw, 170px) var(--display); color: #fff; letter-spacing: -.05em; mix-blend-mode: overlay; }
.about-copy { display: flex; flex-direction: column; }
.about-copy .big { font: 700 clamp(24px, 2.9vw, 36px)/1.22 var(--display); letter-spacing: -.02em; margin-bottom: 1em; }
.about-copy p:not(.big) { color: var(--muted); max-width: 600px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: auto; padding-top: 28px; }
.stats > div { padding: 20px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.stats strong { display: block; white-space: nowrap; font: 800 clamp(28px, 3.2vw, 44px) var(--display); line-height: 1; letter-spacing: -.04em; margin-bottom: 6px; }
.stats strong::before { content: attr(data-prefix); }
.stats strong::after { content: attr(data-suffix); color: var(--accent); }
.about-meta { font-size: 15px; font-weight: 600; color: var(--ink) !important; margin-bottom: 0; }
.skills-sub { margin-top: 28px; }
.skill-list.soft li { background: transparent; color: var(--muted); font-weight: 500; }
.project-thumb img { object-position: center 25%; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.project-link:hover .project-thumb img { transform: scale(1.05); }

/* ---------- More work (Drive) ---------- */
.more-work {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 26px; padding: 22px 26px; border-radius: var(--radius); border: 1px dashed var(--line-strong);
}
.more-work p { margin: 0; color: var(--muted); font-weight: 600; }

/* ---------- Design gallery + client links ---------- */
.subhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin: clamp(56px, 7vw, 88px) 0 22px; }
.subhead h3 { font: 800 clamp(24px, 2.6vw, 34px) var(--display); letter-spacing: -.03em; margin: 0; }
.subhead p { margin: 0; color: var(--muted); }
.gallery { columns: 3 260px; column-gap: clamp(12px, 1.8vw, 20px); }
.tile {
  position: relative; display: block; margin-bottom: clamp(12px, 1.8vw, 20px); break-inside: avoid;
  border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: var(--surface);
}
.tile img { display: block; width: 100%; height: auto; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.tile span {
  position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 8px 12px; border-radius: 999px;
  font: 600 12.5px var(--sans); color: #fff; background: rgba(0,0,0,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; translate: 0 8px; transition: opacity .3s, translate .3s;
}
.tile:hover img { transform: scale(1.04); }
.tile-wide { margin-bottom: clamp(12px, 1.8vw, 20px); background: #fff; }
.gallery:not(.is-expanded) .is-extra { display: none; }
.gallery-more { display: flex; justify-content: center; margin-top: 8px; }
.gallery.is-expanded + .gallery-more { display: none; }

/* ---------- Latest reels strip ---------- */
.reels-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 1.8vw, 20px); }
.reel-card {
  position: relative; display: block; aspect-ratio: 9 / 16; border-radius: var(--radius); overflow: hidden;
  background: #000; border: 1px solid var(--line); color: #fff; text-decoration: none;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .35s;
}
.reel-card:hover { transform: translateY(-6px); box-shadow: var(--glow); border-color: var(--line-strong); }
.reel-card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel-card-meta {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 16px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
}
.reel-card-meta h4 { margin: 0 0 4px; font: 700 17px var(--display); letter-spacing: -.01em; }
.reel-card-meta p { margin: 0; font-size: 13.5px; color: rgba(255,255,255,.75); line-height: 1.35; }
@media (max-width: 860px) { .reels-strip { grid-template-columns: repeat(2, 1fr); } }
.tile:hover span, .tile:focus-visible span { opacity: 1; translate: 0 0; }
@media (hover: none) { .tile span { opacity: 1; translate: 0 0; } }
@media (max-width: 640px) {
  .gallery { columns: 2; column-gap: 10px; }
  .tile { margin-bottom: 10px; }
  .tile-wide span { display: none; }
  .tile span { left: 6px; right: 6px; bottom: 6px; padding: 5px 9px; font-size: 11px; border-radius: 10px; }
}
.client-links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.client-links a {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding: 16px 18px;
  border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-weight: 700; transition: background .25s, color .25s, border-color .25s;
}
.client-links small { grid-row: 2; grid-column: 1; font: 500 11.5px var(--mono); color: var(--muted); }
.client-links a::after { content: "↗"; grid-row: 1 / 3; grid-column: 2; }
.client-links a:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.client-links a:hover small { color: var(--accent-ink); }

/* ---------- Experience steps ---------- */
.steps { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 8px; }
.steps li { color: var(--muted); font-size: 15.5px; padding-left: 0; }
.steps b { display: inline-block; min-width: 70px; color: var(--ink); font: 600 13px var(--mono); }

/* ---------- Highlights ---------- */
.highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hl {
  position: relative; padding: clamp(24px, 3vw, 34px); border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); transition: transform .35s, border-color .35s;
}
.hl::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--grad); }
.hl:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.hl-when { font: 600 12px var(--mono); color: var(--accent); letter-spacing: .06em; }
.hl h3 { font: 700 21px var(--display); letter-spacing: -.01em; margin: 12px 0 10px; }
.hl p { color: var(--muted); font-size: 15px; margin: 0; }
.socials-note { padding: 16px; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.stats span { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.skills { margin-top: clamp(48px, 7vw, 80px); }
.skill-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.skill-list li {
  padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; font-weight: 600;
  background: var(--surface); transition: all .25s;
}
.skill-list li:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); transform: translateY(-2px); }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.service {
  position: relative; padding: clamp(24px, 2.6vw, 32px); border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); transition: transform .35s, border-color .35s, background .35s;
}
.service::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .4s;
  background: radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--violet) 35%, transparent), transparent 60%);
}
.service:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.service:hover::before { opacity: 1; }
.service > * { position: relative; }
.service-num {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: var(--grad); color: #fff; font: 800 18px var(--display);
}
.service h3 { font: 700 20px var(--display); letter-spacing: -.01em; margin: 22px 0 10px; }
.service p { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- Process ---------- */
.sub-label { margin-top: clamp(64px, 9vw, 104px); }
.process { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.process li { position: relative; padding: 24px 0 0; border-top: 1px solid var(--line-strong); }
.process li::before { content: ""; position: absolute; top: -1px; left: 0; width: 40px; height: 2px; background: var(--accent); }
.process span { font: 600 12px var(--mono); color: var(--accent); }
.process h4 { font: 800 28px var(--display); letter-spacing: -.02em; margin: 6px 0 8px; }
.process p { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 0; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.timeline > li {
  display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 28px clamp(20px, 3vw, 32px);
  background: var(--surface); transition: background .3s;
}
.timeline > li + li { border-top: 1px solid var(--line); }
.timeline > li:hover { background: var(--surface-hover); }
.when { font: 500 13.5px var(--mono); color: var(--muted); padding-top: 4px; }
.timeline h3 { font: 700 20px var(--display); letter-spacing: -.01em; }
.where { color: var(--accent); margin: 2px 0 8px; font-size: 15px; font-weight: 600; }
.timeline p:last-child { color: var(--muted); margin: 0; max-width: 620px; }

/* ---------- Testimonials ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.quote {
  margin: 0; padding: clamp(24px, 3vw, 34px); border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px; transition: transform .35s, border-color .35s;
}
.quote:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.quote::before { content: "“"; font: 800 64px/0.6 var(--display); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; height: 26px; }
.quote blockquote { margin: 0; font-size: clamp(17px, 1.6vw, 19px); line-height: 1.55; font-weight: 500; }
.quote figcaption { font-size: 14px; color: var(--muted); }
.quote figcaption strong { color: var(--ink); font-weight: 700; }

/* ---------- Contact ---------- */
.contact-big { font: 800 clamp(36px, 6vw, 80px)/1.02 var(--display); letter-spacing: -.035em; margin-bottom: 22px; }
.mail-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 22px; }
.quick-contact { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: clamp(48px, 7vw, 80px); }
.wa-btn { display: inline-flex; align-items: center; gap: 10px; background: #25d366; color: #062b14; border-color: #25d366; }
.wa-btn:hover { background: #3ee07a; border-color: #3ee07a; }
.contact-mail {
  font: 700 clamp(20px, 3.4vw, 42px) var(--display); letter-spacing: -.02em; text-decoration: none; word-break: break-all;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  border-bottom: 2px solid transparent; border-image: var(--grad) 1; padding: 6px 0 4px;
}
.copy-btn {
  font: 600 13px var(--mono); padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); cursor: pointer; transition: all .2s;
}
.copy-btn:hover { border-color: var(--ink); }
.copy-btn.is-done { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.contact-grid { display: grid; grid-template-columns: 7fr 4fr; gap: 16px; }
.contact-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; padding: clamp(22px, 3vw, 36px);
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
}
.contact-form label { display: grid; gap: 8px; font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.contact-form label:nth-of-type(n+3), .contact-form .btn, .form-status { grid-column: 1 / -1; }
.contact-form input, .contact-form textarea, .contact-form select {
  font: 500 16px var(--sans); color: var(--ink); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; resize: vertical;
  transition: border-color .2s, box-shadow .2s; text-transform: none; letter-spacing: 0;
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
}
.contact-form select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat;
}
.contact-form select option { color: #111; background: #fff; }
.contact-form .btn { justify-self: start; }
.form-status { min-height: 1.4em; font-size: 15px; color: var(--muted); margin: 0; }
.form-status.ok { color: #2fd27a; }
.form-status.err { color: var(--pink); }
.socials { list-style: none; padding: 8px; margin: 0; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); align-self: start; }
.socials a {
  display: flex; justify-content: space-between; align-items: center; padding: 16px 16px; border-radius: 14px;
  text-decoration: none; font: 700 17px var(--display); transition: background .25s, color .25s, padding .25s;
}
.socials a:hover { background: var(--accent); color: var(--accent-ink); padding-left: 22px; }

/* ---------- Footer ---------- */
.footer-wrap { overflow: hidden; border-top: 1px solid var(--line); margin-top: 40px; }
.footer-name {
  max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter) 0;
  font: 800 clamp(48px, 12.5vw, 180px)/.9 var(--display); letter-spacing: -.05em; white-space: nowrap;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: .9;
}
.footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding-top: 28px; padding-bottom: 40px; font: 500 13px var(--mono); color: var(--muted);
}
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* ---------- Media viewer ---------- */
.player { width: min(1100px, 92vw); padding: 0; border: 0; border-radius: var(--radius); background: #000; color: #fff; overflow: visible; }
.player::backdrop { background: rgba(5,5,8,.88); backdrop-filter: blur(6px); }
.player-frame { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; }
.player-frame iframe, .player-frame video { width: 100%; height: 100%; border: 0; display: block; }
.player-frame.is-image { aspect-ratio: auto; max-height: 85vh; display: grid; place-items: center; }
.player-frame img { max-width: 100%; max-height: 85vh; object-fit: contain; display: block; }
.player-empty { height: 100%; display: grid; place-items: center; text-align: center; padding: 24px; font-size: 16px; color: #ccc; }
.player-empty code { font-family: var(--mono); color: #c6ff3d; }
.player-close {
  position: absolute; top: -50px; right: 0; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.4); background: transparent; color: #fff; font-size: 16px; cursor: pointer;
}
.player-close:hover { background: #fff; color: #000; }
.player.is-vertical { width: min(440px, 92vw, calc(84vh * 9 / 16)); }
.player.is-vertical .player-frame { aspect-ratio: 9 / 16; }

/* ---------- Custom cursor (mouse only) ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor {
    display: grid; place-items: center; position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none;
    width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--accent);
    transition: width .3s, height .3s, margin .3s, opacity .3s; opacity: 0; mix-blend-mode: normal;
  }
  .cursor.is-on { opacity: 1; }
  .cursor.is-big { width: 88px; height: 88px; margin: -44px 0 0 -44px; }
  .cursor-label { font: 800 13px var(--display); color: var(--accent-ink); opacity: 0; transition: opacity .2s; }
  .cursor.is-big .cursor-label { opacity: 1; }
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }

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

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav-links a { padding: 8px 10px; }
  .timecode { display: none; }
  .projects { grid-template-columns: repeat(2, 1fr); }
  .services { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .menu-only { display: block; }
  .nav-links {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    flex-direction: column; gap: 2px; padding: 8px; border-radius: 22px;
    background: var(--surface-solid); border: 1px solid var(--line-strong);
    box-shadow: 0 24px 60px -20px rgba(0,0,0,.6);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav.is-open .nav-links { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { padding: 14px 16px; font-size: 17px; border-radius: 14px; }
  .about-grid, .contact-grid, .quotes, .highlights { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .portrait { aspect-ratio: 16 / 10; }
  .timeline > li { grid-template-columns: 1fr; gap: 6px; }
  .process { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
}
@media (max-width: 640px) {
  .nav { top: 8px; margin-top: 8px; }
  .brand-name { display: none; }
  .nav-right { gap: 6px; }
  .btn-small { padding: 9px 14px; }
  .projects, .services { grid-template-columns: 1fr; }
  .hero-foot { flex-direction: column; align-items: flex-start; }
  .stats { gap: 8px; }
  .stats > div { padding: 14px; }
  .stats span { font-size: 12px; }
  .grade { aspect-ratio: 4 / 3; }
  .contact-form { grid-template-columns: 1fr; }
  .blob.b1 { width: 320px; height: 320px; }
  .blob.b2 { width: 260px; height: 260px; right: 40px; }
}
@media (max-width: 480px) {
  .process { grid-template-columns: 1fr; }
}
