/* Two skins share one layout. Colours are tokens; each skin defines them for dark and light. */
:root {
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 18px;
  --max: 1160px;
}
:root[data-skin="aurora"] { --display: "Instrument Serif", Georgia, serif; --display-weight: 400; --display-track: -0.01em; }
:root[data-skin="grid"] { --display: "Space Grotesk", var(--font); --display-weight: 700; --display-track: -0.035em; }

:root[data-skin="aurora"][data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0915; --surface: #151225; --surface-2: #1d1933; --line: rgba(255, 255, 255, .09);
  --text: #f4f1ff; --text-2: #bdb6d6; --muted: #8a83a6;
  --accent: #b79cff; --accent-2: #ff8ac8; --accent-3: #7ee3f2; --on-accent: #150f2b;
  --glow: rgba(160, 120, 255, .22);
}
:root[data-skin="aurora"][data-theme="light"] {
  color-scheme: light;
  --bg: #fbf9ff; --surface: #ffffff; --surface-2: #f2edfd; --line: rgba(30, 20, 70, .11);
  --text: #1b1533; --text-2: #4d4668; --muted: #7a7393;
  --accent: #6a3fe0; --accent-2: #c9267a; --accent-3: #0a7f93; --on-accent: #ffffff;
  --glow: rgba(120, 80, 240, .14);
}
:root[data-skin="grid"][data-theme="dark"] {
  color-scheme: dark;
  --bg: #060a09; --surface: #0d1412; --surface-2: #131d1a; --line: rgba(255, 255, 255, .09);
  --text: #eaf6f0; --text-2: #a9bdb4; --muted: #74897f;
  --accent: #6ff7a0; --accent-2: #45d4ff; --accent-3: #ffd166; --on-accent: #04130b;
  --glow: rgba(90, 240, 150, .16);
}
:root[data-skin="grid"][data-theme="light"] {
  color-scheme: light;
  --bg: #f4f8f6; --surface: #ffffff; --surface-2: #e9f1ed; --line: rgba(10, 40, 28, .12);
  --text: #0c1a14; --text-2: #3e5248; --muted: #6a7d74;
  --accent: #087a45; --accent-2: #0a6f97; --accent-3: #9a6500; --on-accent: #ffffff;
  --glow: rgba(8, 122, 69, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.container { width: min(var(--max), 100% - 40px); margin-inline: auto; }
kbd { font: 500 11px var(--mono); padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; color: var(--text-2); background: var(--surface-2); }

/* ---------- backdrop ---------- */
.progress { position: fixed; inset: 0 auto auto 0; height: 3px; width: 0; z-index: 60; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; contain: strict; }
/* Soft colour washes painted as gradients: no blur filter and no animation, so scrolling stays cheap. */
.blob { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; opacity: .30; }
.b1 { background: radial-gradient(closest-side, var(--accent), transparent); top: -30vmax; left: -22vmax; }
.b2 { background: radial-gradient(closest-side, var(--accent-2), transparent); top: -6vmax; right: -34vmax; }
.b3 { background: radial-gradient(closest-side, var(--accent-3), transparent); top: 60vh; left: 18vw; opacity: .14; }
[data-theme="light"] .blob { opacity: .18; }
[data-skin="grid"] .blob { opacity: .12; }
[data-skin="grid"] .backdrop::before { content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(ellipse 90% 70% at 50% 20%, transparent 30%, var(--bg) 78%), linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 100% 100%, 56px 56px, 56px 56px; }
#field { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(16px) saturate(1.4); border-bottom-color: var(--line); }
.nav-inner { width: min(var(--max), 100% - 40px); margin-inline: auto; height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { font: 700 17px var(--mono); letter-spacing: -.02em; }
.logo b { color: var(--accent); }
.nav-links { display: flex; gap: 4px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--text-2); padding: 8px 12px; border-radius: 999px; transition: color .2s, background .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn, .kbd-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; }
.kbd-btn span { font-size: 13px; color: var(--muted); padding-left: 4px; }
.icon-btn { width: 38px; justify-content: center; padding: 0; }
.icon-btn:hover, .kbd-btn:hover { border-color: var(--accent); }
[data-theme="dark"] .i-moon, [data-theme="light"] .i-sun { display: none; }
.menu-btn { display: none; }

/* ---------- hero ---------- */
.hero { padding: 56px 0 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 13px var(--mono); color: var(--text-2); padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
h1 { font: var(--display-weight) clamp(52px, 9.2vw, 124px) / .94 var(--display); letter-spacing: var(--display-track); margin: 22px 0 14px; }
h1 .grad { background: linear-gradient(100deg, var(--accent), var(--accent-2) 60%, var(--accent-3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-skin="aurora"] h1 .grad { font-style: italic; padding-right: .08em; }
.role { font: 500 clamp(17px, 2.1vw, 22px) var(--mono); color: var(--accent); min-height: 1.6em; }
.caret { display: inline-block; width: 2px; height: 1.05em; background: currentColor; margin-left: 3px; vertical-align: -3px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.tagline { color: var(--text-2); font-size: clamp(16px, 1.5vw, 19px); max-width: 56ch; margin-top: 14px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 22px; }
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; padding: 12px 22px; border-radius: 999px; border: 1px solid transparent; transition: transform .2s, box-shadow .2s, border-color .2s, background .2s; cursor: pointer; }
.btn-primary { background: linear-gradient(100deg, var(--accent), var(--accent-2)); color: var(--on-accent); box-shadow: 0 10px 30px -10px var(--accent); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px var(--accent); }
.btn-ghost { border-color: var(--line); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); transform: translateY(-2px); }
.btn-lg { padding: 16px 30px; font-size: 17px; }
.socials { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.socials.center { justify-content: center; margin-top: 26px; }
.social { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); transition: color .2s; }
.social svg { width: 17px; height: 17px; }
.social:hover { color: var(--accent); }

.hero-card { position: relative; padding: 18px; border-radius: 28px; background: linear-gradient(160deg, var(--surface), var(--surface-2)); border: 1px solid var(--line); box-shadow: 0 30px 80px -30px var(--glow), 0 0 0 1px var(--line); }
.portrait { aspect-ratio: 4 / 3.5; border-radius: 18px; overflow: hidden; background: var(--surface-2); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.float { position: absolute; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--surface) 86%, transparent); border: 1px solid var(--line); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5); animation: bob 6s ease-in-out infinite; }
.float b { display: block; font: 700 20px var(--display); letter-spacing: -.02em; color: var(--accent); line-height: 1.1; }
[data-skin="aurora"] .float b { font: 400 26px var(--display); }
.float span { font-size: 11.5px; color: var(--text-2); }
.f1 { top: 34px; left: -26px; }
.f2 { top: 42%; right: -22px; animation-delay: -3s; }
@keyframes bob { 50% { transform: translateY(-9px); } }
.term { margin-top: 14px; border-radius: 14px; background: #06080f; border: 1px solid rgba(255, 255, 255, .08); overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.term-bar span { width: 9px; height: 9px; border-radius: 50%; background: #3a4152; }
.term-bar span:first-child { background: #ff6b6b; } .term-bar span:nth-child(2) { background: #ffd166; } .term-bar span:nth-child(3) { background: #6ff7a0; }
.term-bar em { margin-left: auto; font: 11px var(--mono); color: #7f8aa3; font-style: normal; }
.term pre { margin: 0; padding: 12px 14px; font: 12.5px/1.65 var(--mono); color: #d7def0; white-space: pre-wrap; }
.term .k { color: #9db8ff; } .term .s { color: #a8f0c0; } .term .p { color: #ff8ac8; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 56px; border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 80%, transparent); }
.stat { padding: 22px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font: var(--display-weight) clamp(30px, 3.6vw, 46px) / 1.05 var(--display); letter-spacing: var(--display-track); }
.stat span { font-size: 13px; color: var(--text-2); }

.marquee { margin-top: 46px; padding: 16px 0; border-block: 1px solid var(--line); overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.track { display: flex; gap: 38px; width: max-content; animation: slide 46s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.track span { font: 500 15px var(--mono); color: var(--text-2); white-space: nowrap; }
.track span::before { content: "✦"; color: var(--accent); margin-right: 38px; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding: 104px 0 0; }
.sec-head { margin-bottom: 36px; max-width: 760px; }
.kicker { font: 500 13px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
h2 { font: var(--display-weight) clamp(34px, 5vw, 60px) / 1.02 var(--display); letter-spacing: var(--display-track); }
.sec-sub { color: var(--text-2); margin-top: 12px; font-size: 17px; }

/* featured case studies */
.features { display: grid; gap: 28px; }
.feature { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 26px; overflow: hidden; background: var(--surface); position: relative; }
.feature:nth-child(even) .shot { order: 2; }
.shot { position: relative; padding: 34px 0 0 34px; background: linear-gradient(140deg, color-mix(in srgb, var(--c1) 70%, var(--surface)), color-mix(in srgb, var(--c2) 70%, var(--surface))); overflow: hidden; min-height: 320px; display: flex; }
.feature:nth-child(even) .shot { padding: 34px 34px 0 0; }
.browser { flex: 1; border-radius: 12px 0 0 0; overflow: hidden; background: #0d1017; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .65); transition: transform .5s cubic-bezier(.2, .7, .2, 1); transform-origin: bottom right; display: flex; flex-direction: column; }
.feature:nth-child(even) .browser { border-radius: 0 12px 0 0; transform-origin: bottom left; }
.feature:hover .browser { transform: scale(1.025) translateY(-4px); }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #171b25; }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #3a4152; }
.browser-bar em { margin-left: 10px; flex: 1; font: 11px var(--mono); color: #8d97ad; font-style: normal; background: #0d1017; border-radius: 6px; padding: 3px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser img { width: 100%; flex: 1; object-fit: cover; object-position: top left; }
.feat-body { padding: 36px 38px; display: flex; flex-direction: column; gap: 14px; }
.feat-kind { font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.feat-body h3 { font: var(--display-weight) clamp(26px, 3vw, 38px) / 1.05 var(--display); letter-spacing: var(--display-track); }
.feat-sub { color: var(--text-2); }
.feat-metric { display: flex; align-items: baseline; gap: 12px; padding: 14px 0; border-block: 1px solid var(--line); }
.feat-metric b { font: var(--display-weight) clamp(34px, 4vw, 52px) / 1 var(--display); letter-spacing: var(--display-track); background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.feat-metric span { font-size: 13.5px; color: var(--text-2); }
.points li { position: relative; padding-left: 20px; color: var(--text-2); font-size: 14.5px; margin-bottom: 7px; }
.points li::before { content: ""; position: absolute; left: 2px; top: .68em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font: 500 11.5px var(--mono); padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); background: var(--surface-2); }
.links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.link { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); transition: border-color .2s, background .2s, color .2s; }
.link svg { width: 15px; height: 15px; }
.link:hover { border-color: var(--accent); color: var(--accent); }
.link.solid { background: var(--text); color: var(--bg); border-color: var(--text); }
.link.solid:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* project cards */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filter { font-size: 14px; font-weight: 500; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer; transition: all .2s; }
.filter:hover { color: var(--text); border-color: var(--accent); }
.filter.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { position: relative; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.spot::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), var(--glow), transparent 60%); }
.spot:hover::after { opacity: 1; }
.project { display: flex; flex-direction: column; transition: transform .3s cubic-bezier(.2, .7, .2, 1), border-color .3s; }
.project:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.project.hide { display: none; }
.cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.cover img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.project:hover .cover img { transform: scale(1.06); }
.cover .glyph { position: absolute; inset: 0; display: grid; place-items: center; font: 700 64px var(--mono); color: rgba(255, 255, 255, .22); }
.cover .kind { position: absolute; top: 12px; left: 12px; font: 600 10.5px var(--mono); letter-spacing: .08em; padding: 4px 9px; border-radius: 999px; background: rgba(6, 8, 15, .7); color: #fff;  }
.p-body { padding: 20px 20px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.p-body h3 { font: 600 19px / 1.25 var(--font); letter-spacing: -.01em; }
.p-sub { color: var(--text-2); font-size: 14px; }
.p-metric { font-size: 13px; color: var(--text-2); }
.p-metric b { font: 700 15px var(--mono); color: var(--accent); margin-right: 6px; }
details.more summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: "+"; font: 600 15px var(--mono); color: var(--accent); }
details.more[open] summary::after { content: "–"; }
details.more .points { margin-top: 10px; }
details.more .points li { font-size: 13.5px; }

/* experience */
.timeline { display: grid; gap: 18px; }
.job { padding: 28px 30px; }
.job-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; margin-bottom: 14px; }
.job-head h3 { font: 600 21px var(--font); letter-spacing: -.01em; }
.job-head h3 em { font-style: normal; color: var(--accent); }
.meta { font: 500 13px var(--mono); color: var(--muted); }
.job .tags { margin-top: 14px; }
.about { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 36px; margin-top: 36px; }
.about p { color: var(--text-2); margin-bottom: 14px; font-size: 16.5px; }
.about strong { color: var(--text); font-weight: 600; }
.facts { display: grid; gap: 10px; align-content: start; }
.facts li { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.facts .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); flex: none; }
.facts .ico svg { width: 18px; height: 18px; }
.facts small { display: block; font-size: 12px; color: var(--muted); }
.facts span { font-size: 14.5px; font-weight: 500; }

/* skills */
.skills { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.skill-group { grid-column: span 4; padding: 22px; }
.skill-group:nth-child(1), .skill-group:nth-child(2) { grid-column: span 6; }
.skill-group h3 { font: 500 13px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13.5px; font-weight: 500; padding: 6px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); transition: transform .2s, border-color .2s; }
.chip:hover { transform: translateY(-2px); border-color: var(--accent); }

/* credentials */
.cred-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; align-items: start; }
.edu { padding: 26px; margin-bottom: 16px; }
.edu h3 { font: 600 19px var(--font); margin-bottom: 4px; }
.deg { color: var(--text-2); font-size: 14.5px; margin: 8px 0 12px; }
.score { display: inline-block; font: 700 14px var(--mono); padding: 5px 12px; border-radius: 999px; background: linear-gradient(100deg, var(--accent), var(--accent-2)); color: var(--on-accent); }
.course { color: var(--muted); font-size: 13px; margin-top: 12px; }
.certs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.certs li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-size: 14px; font-weight: 500; line-height: 1.4; }
.certs svg { width: 18px; height: 18px; flex: none; color: var(--accent); margin-top: 1px; }
.certs li.award { grid-column: 1 / -1; background: linear-gradient(100deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), color-mix(in srgb, var(--accent-2) 14%, var(--surface))); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); font-size: 15.5px; }
.certs li.award svg { color: var(--accent-3); }

/* contact + footer */
.contact { text-align: center; padding-bottom: 96px; }
.contact .kicker { margin-bottom: 14px; }
.big { font-size: clamp(44px, 8vw, 104px); line-height: .96; }
.contact-text { color: var(--text-2); max-width: 54ch; margin: 20px auto 30px; font-size: 17px; }
.footer { border-top: 1px solid var(--line); padding: 24px 20px; text-align: center; font: 13px var(--mono); color: var(--muted); }

/* command palette */
.palette { position: fixed; inset: 0; z-index: 80; display: grid; place-items: start center; padding-top: 14vh; background: rgba(4, 5, 10, .6);  }
.palette-box { width: min(600px, 100% - 32px); border-radius: 18px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .7); overflow: hidden; }
.palette input { width: 100%; padding: 18px 20px; font: 16px var(--font); color: var(--text); background: transparent; border: 0; border-bottom: 1px solid var(--line); outline: none; }
.palette ul { max-height: 46vh; overflow: auto; padding: 8px; }
.palette li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 14.5px; }
.palette li small { font: 11.5px var(--mono); color: var(--muted); white-space: nowrap; }
.palette li[aria-selected="true"] { background: var(--surface-2); color: var(--accent); }
.palette-hint { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* motion */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.rise { opacity: 0; transform: translateY(22px); animation: rise .8s cubic-bezier(.2, .7, .2, 1) forwards; }
.rise:nth-child(2) { animation-delay: .08s; } .rise:nth-child(3) { animation-delay: .16s; } .rise:nth-child(4) { animation-delay: .24s; }
.rise:nth-child(5) { animation-delay: .32s; } .rise:nth-child(6) { animation-delay: .4s; }
.hero-card.rise { animation-delay: .25s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .rise { opacity: 1; transform: none; }
}

/* responsive */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero-card { max-width: 460px; }
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature:nth-child(even) .shot { order: 0; }
  .shot { min-height: 0; }
  .browser img { aspect-ratio: 16 / 10; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cred-grid, .about { grid-template-columns: minmax(0, 1fr); }
  .skill-group, .skill-group:nth-child(1), .skill-group:nth-child(2) { grid-column: span 6; }
}
@media (max-width: 720px) {
  .nav-links { position: absolute; top: 68px; left: 12px; right: 12px; flex-direction: column; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); display: none; }
  .nav-links.open { display: flex; }
  .menu-btn { display: inline-flex; }
  .kbd-btn { display: none; }
  .hero { padding-top: 28px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .stat { padding: 16px 18px; }
  .f1 { left: -8px; } .f2 { right: -8px; }
  .section { padding-top: 76px; }
  .cards, .certs { grid-template-columns: minmax(0, 1fr); }
  .skill-group, .skill-group:nth-child(1), .skill-group:nth-child(2) { grid-column: 1 / -1; }
  .feat-body { padding: 26px 22px; }
  .shot, .feature:nth-child(even) .shot { padding: 22px 0 0 22px; }
  .feature:nth-child(even) .browser { border-radius: 12px 0 0 0; }
  .job { padding: 22px 20px; }
}

/* The grid skin uses a round portrait (its photo is already a circular crop). */
[data-skin="grid"] .portrait { aspect-ratio: 1; width: 74%; margin: 6px auto 4px; border-radius: 50%; border: 2px solid var(--accent); }
[data-skin="grid"] .portrait img { transform: scale(1.07); object-position: center; }
[data-skin="grid"] .f1 { top: 22px; left: -18px; }
[data-skin="grid"] .f2 { top: 46%; right: -18px; }


/* Performance: the background is a static layer at the top of the page, nothing is fixed, blurred or masked. */
.backdrop { position: absolute; height: 1400px; contain: strict; }
#field { display: none; }
.nav.scrolled { background: var(--bg); backdrop-filter: none; }
.progress { width: 100%; transform: scaleX(0); transform-origin: left; will-change: transform; }
.marquee { mask-image: none; -webkit-mask-image: none; }
.track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; gap: 10px 28px; padding: 0 20px; }
.track span::before { margin-right: 28px; }
.float, .pulse { animation: none; }
.spot::after { display: none; }
.project, .cover img, .browser, .chip, .btn { transition: none; }
.project:hover, .feature:hover .browser, .project:hover .cover img { transform: none; }
.reveal { transition: opacity .4s ease; transform: none; }
