/* Harsh Raj Shukla portfolio: shared styles for every page */
/* =========================================================
   Tokens. One accent: lime on forest ink (dark), forest green on sage paper (light).
   ========================================================= */
:root {
  --bg: #f1f3ee;
  --bg-2: #e8ebe3;
  --surface: #ffffff;
  --surface-2: #edf0e8;
  --line: #dbe0d5;
  --text: #0f1d16;
  --muted: #4f5f56;
  --accent: #1f6f43;
  --accent-soft: #e2efe6;
  --accent-glow: rgba(31, 111, 67, .10);
  --on-accent: #ffffff;
  --shadow: 0 1px 2px rgba(15, 29, 22, .05), 0 18px 40px -20px rgba(15, 29, 22, .18);
  --nav-bg: rgba(241, 243, 238, .82);
  --ease-out: cubic-bezier(.2, .7, .1, 1);
  --radius: 16px;
  --font: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --display: 'Bricolage Grotesque', 'Geist', ui-sans-serif, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b120e;
    --bg-2: #0f1712;
    --surface: #121b16;
    --surface-2: #18231d;
    --line: #243029;
    --text: #e7efe9;
    --muted: #95a59b;
    --accent: #c6f36d;
    --accent-soft: rgba(198, 243, 109, .07);
    --accent-glow: rgba(198, 243, 109, .10);
    --on-accent: #0b120e;
    --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 24px 48px -24px rgba(0, 0, 0, .65);
    --nav-bg: rgba(11, 18, 14, .74);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b120e;
  --bg-2: #0f1712;
  --surface: #121b16;
  --surface-2: #18231d;
  --line: #243029;
  --text: #e7efe9;
  --muted: #95a59b;
  --accent: #c6f36d;
  --accent-soft: rgba(198, 243, 109, .07);
  --accent-glow: rgba(198, 243, 109, .10);
  --on-accent: #0b120e;
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 24px 48px -24px rgba(0, 0, 0, .65);
  --nav-bg: rgba(11, 18, 14, .74);
  color-scheme: dark;
}

/* =========================================================
   Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
/* No CSS smooth scrolling: ScrollTrigger measures by jumping the scroll position,
   and smooth scroll-behavior turns those jumps into animations, corrupting pin offsets.
   Anchor links get smooth scrolling from JS instead. */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
main { overflow-x: clip; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding-inline: 24px; }
.section { padding-block: clamp(96px, 14vw, 176px); }
.h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.4rem, 5.2vw, 4.4rem);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1.05;
}
.h2 .dim { color: var(--muted); }
.sub { margin: 20px 0 0; max-width: 52ch; color: var(--muted); font-size: 18px; }
.mono { font-family: var(--mono); }

/* Split-word headline reveal (JS wraps words). Padding protects descenders. */
.w { display: inline-block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; vertical-align: top; }
.w > span { display: inline-block; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  font-weight: 500; white-space: nowrap; cursor: pointer; border: 0;
  transition: transform .35s var(--ease-out), background-color .2s, border-color .2s, color .2s, filter .2s;
}
.btn i { font-size: 18px; transition: transform .35s var(--ease-out); }
.btn:hover i { transform: translateX(3px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-inner { display: inline-flex; align-items: center; gap: 10px; transition: transform .15s; }
.btn-primary:active .btn-inner { transform: scale(.97); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-ghost:active { transform: translateY(1px); }
.text-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 500; border-bottom: 1px solid transparent; transition: border-color .2s, color .2s; }
.text-link:hover { color: var(--accent); }
.text-link i { transition: transform .3s var(--ease-out); }
.text-link:hover i { transform: translate(2px, -2px); }

/* =========================================================
   Nav
   ========================================================= */
.nav-shell {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background-color .35s, border-color .35s, backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.nav-shell.scrolled {
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom-color: var(--line);
}
@media (prefers-reduced-transparency: reduce) { .nav-shell.scrolled { background: var(--bg); backdrop-filter: none; } }
.nav { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; transition: height .35s var(--ease-out); }
.nav-shell.scrolled .nav { height: 60px; }
.brand { font-weight: 600; letter-spacing: -.01em; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--muted); font-size: 15px; border-radius: 999px;
  transition: color .2s, background-color .2s;
}
.nav-links a:hover, .nav-links a[aria-current] { color: var(--text); }
.nav-links a[aria-current="page"] { background: var(--surface-2); }
.nav-links a:hover { background: var(--surface-2); }
.nav-tools { display: flex; align-items: center; gap: 4px; }
.nav-cta { min-height: 40px; padding: 0 18px; font-size: 15px; margin-left: 8px; }
.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center;
  border: 0; background: transparent; border-radius: 999px; cursor: pointer;
  color: var(--muted); font-size: 20px;
  transition: color .2s, background-color .2s, transform .15s;
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn:active { transform: scale(.94); }
.theme-btn .ph-sun { display: none; }
:root[data-theme="dark"] .theme-btn .ph-sun { display: inline; }
:root[data-theme="dark"] .theme-btn .ph-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .ph-sun { display: inline; }
  :root:not([data-theme="light"]) .theme-btn .ph-moon { display: none; }
}
.menu-btn { display: none; }
.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.mobile-menu ul { list-style: none; margin: 0; padding: 8px 16px 20px; display: grid; }
.mobile-menu a { display: flex; align-items: center; justify-content: space-between; min-height: 56px; font-size: 20px; font-weight: 500; border-bottom: 1px solid var(--line); }
.nav-shell.open .mobile-menu { display: block; animation: menu-in .35s var(--ease-out); }
.nav-shell.open { background: var(--bg); border-bottom-color: var(--line); }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }

/* View-transition theme wipe */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* =========================================================
   Hero
   ========================================================= */
.hero { position: relative; min-height: 100dvh; display: grid; padding-top: 72px; overflow: hidden; }
.hero > .wrap { position: relative; z-index: 1; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
  padding-block: clamp(24px, 6vh, 72px) 56px;
}
.eyebrow { font-family: var(--mono); font-size: 14px; color: var(--muted); margin: 0 0 20px; }
.eyebrow b { color: var(--accent); font-weight: 500; }
h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.25rem, 8.4vw, 7.25rem);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1.02;
}
.line { display: block; overflow: hidden; padding-bottom: .09em; margin-bottom: -.09em; }
.line > span { display: inline-block; }
.line.dim > span { color: var(--muted); }
.lede { margin: 28px 0 0; max-width: 46ch; font-size: clamp(17px, 1.35vw, 19px); color: var(--muted); }
.lede strong { color: var(--text); font-weight: 500; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* Photo stack: real event photos, shuffled like prints on a desk */
.photo-stack { width: 100%; max-width: 560px; justify-self: end; }
.ph-frame { position: relative; aspect-ratio: 4 / 3.3; }
.shot {
  position: absolute; inset: 0; margin: 0; overflow: hidden;
  border-radius: 18px; border: 7px solid var(--surface); background: var(--surface-2);
  box-shadow: var(--shadow);
  transition: transform .8s var(--ease-out), opacity .6s var(--ease-out);
}
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot[data-depth="0"] { z-index: 4; transform: rotate(-2deg); }
.shot[data-depth="1"] { z-index: 3; transform: translate(5%, -4%) rotate(4deg) scale(.94); }
.shot[data-depth="2"] { z-index: 2; transform: translate(-5%, 3%) rotate(-7deg) scale(.9); }
/* Everything from the fourth photo back waits, hidden, behind the stack */
.shot[data-depth]:not([data-depth="0"]):not([data-depth="1"]):not([data-depth="2"]) { z-index: 1; transform: rotate(3deg) scale(.86); opacity: 0; }
.ph-frame:hover .shot[data-depth="0"] { transform: rotate(0deg) scale(1.02); }
.shot.leaving { transform: translate(110%, -8%) rotate(16deg) !important; opacity: 0; transition: transform .45s cubic-bezier(.55, 0, .75, .2), opacity .45s; }
.ph-meta { margin-top: 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ph-caption { margin: 0; min-height: 3.2em; }
.ph-caption b { display: block; font-weight: 600; }
.ph-caption span { color: var(--muted); font-size: 15px; }
.ph-controls { display: flex; gap: 8px; flex: none; }
.icon-btn.ring { border: 1px solid var(--line); }
@media (prefers-reduced-motion: reduce) { .shot, .shot.leaving { transition: none; } }

/* =========================================================
   Skills: category tabs + logo tiles
   ========================================================= */
.skills-ui {
  margin-top: clamp(40px, 5vw, 64px);
  display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden;
}
.skill-tabs { display: grid; align-content: start; gap: 4px; padding: 16px; background: var(--surface-2); border-right: 1px solid var(--line); }
.skill-tabs [role="tab"] {
  position: relative; display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 12px;
  min-height: 48px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; cursor: pointer;
  text-align: left; font-size: 15px; font-weight: 500; color: var(--muted);
  transition: background-color .25s, color .25s;
}
.skill-tabs [role="tab"] i { font-size: 20px; }
.skill-tabs [role="tab"]:hover { color: var(--text); background: var(--surface); }
.skill-tabs [role="tab"][aria-selected="true"] { color: var(--text); background: var(--surface); box-shadow: var(--shadow); }
.skill-tabs [role="tab"][aria-selected="true"] i { color: var(--accent); }
.skill-tabs [role="tab"]::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px;
  background: var(--accent); transform: scaleY(0); transition: transform .35s var(--ease-out);
}
.skill-tabs [role="tab"][aria-selected="true"]::before { transform: scaleY(1); }
.tab-count { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.skill-panels { padding: clamp(24px, 3vw, 40px); min-height: 420px; }
.skill-panel:focus-visible { outline-offset: -4px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 28px; }
.panel-head h3 { margin: 0; font-family: var(--display); font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 700; letter-spacing: -.03em; }
.panel-head p { margin: 0; color: var(--muted); max-width: 46ch; }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 14px; }
.tile {
  aspect-ratio: 1 / 1; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 12px;
  border: 1px solid var(--line); border-radius: 18px; background: var(--bg);
  font-size: 14.5px; font-weight: 500; text-align: center;
  transition: transform .4s var(--ease-out), border-color .25s, box-shadow .3s;
}
.tile img, .tile .logo, .tile > i { width: 44px; height: 44px; transition: transform .45s var(--ease-out); }
.tile .logo { background: var(--text); }
.tile > i { font-size: 44px; color: var(--accent); display: grid; place-items: center; }
.tile:hover { transform: translateY(-4px); border-color: color-mix(in oklab, var(--brand, var(--accent)) 55%, var(--line)); box-shadow: var(--shadow); }
.tile:hover img, .tile:hover .logo, .tile:hover > i { transform: scale(1.12) rotate(-6deg); }
/* Logos stay flat on the dark theme's surface, so lift the darkest brand marks slightly */
:root[data-theme="dark"] .tile img { filter: drop-shadow(0 0 1px rgba(255, 255, 255, .25)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tile img { filter: drop-shadow(0 0 1px rgba(255, 255, 255, .25)); } }
.logo {
  width: 22px; height: 22px; flex: none; background: currentColor;
  -webkit-mask: var(--src) center / contain no-repeat;
  mask: var(--src) center / contain no-repeat;
}
@media (max-width: 960px) {
  .skills-ui { grid-template-columns: minmax(0, 1fr); }
  .skill-tabs { display: flex; overflow-x: auto; scrollbar-width: none; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px; }
  .skill-tabs::-webkit-scrollbar { display: none; }
  .skill-tabs [role="tab"] { flex: none; grid-template-columns: 20px auto auto; }
  .skill-tabs [role="tab"]::before { left: 14px; right: 14px; top: auto; bottom: 4px; width: auto; height: 3px; transform: scaleX(0); }
  .skill-tabs [role="tab"][aria-selected="true"]::before { transform: scaleX(1); }
  .skill-panels { min-height: 0; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
  .tile { font-size: 12.5px; gap: 8px; padding: 8px; border-radius: 14px; }
  .skill-panels { padding: 20px 16px; }
  .tile img, .tile .logo, .tile > i { width: 34px; height: 34px; }
  .tile > i { font-size: 34px; }
}

/* =========================================================
   About
   ========================================================= */
.about-text {
  margin: 0;
  font-size: clamp(1.7rem, 3.6vw, 3.1rem);
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1.22;
  max-width: 26ch;
}
.about-text .word { transition: color .2s; }
#about .about-text { margin-top: clamp(32px, 4vw, 48px); }
.about-grid { margin-top: clamp(48px, 6vw, 80px); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.about-copy p { margin: 0 0 18px; font-size: 18px; color: var(--muted); max-width: 60ch; }
.about-copy p:first-child { color: var(--text); }
.facts { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 24px; box-shadow: var(--shadow); }
.facts div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; padding: 16px 0; }
.facts div + div { border-top: 1px solid var(--line); }
.facts dt { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.facts dt i { color: var(--accent); font-size: 18px; }
.facts dd { margin: 0; font-weight: 500; }
.about-text em { font-style: normal; color: var(--accent); }
.stats {
  margin: clamp(56px, 8vw, 96px) 0 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.stat { padding: 28px 24px 0 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat-num { display: block; font-family: var(--display); font-size: clamp(2.4rem, 4.6vw, 3.8rem); font-weight: 600; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { display: block; margin-top: 12px; color: var(--muted); font-size: 15px; max-width: 22ch; }

/* =========================================================
   Projects: index list, preview follows the pointer on desktop
   ========================================================= */
.proj-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; }
.proj-cols, .proj { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 2.2fr) minmax(0, 3fr) 112px; gap: 32px; align-items: center; }
.proj-cols { margin-top: clamp(40px, 5vw, 64px); padding: 0 12px 14px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line); }
.proj-list { list-style: none; margin: 0; padding: 0; }
.proj { padding: 30px 12px; border-bottom: 1px solid var(--line); transition: background-color .35s, padding .45s var(--ease-out); }
.proj:hover { background: var(--surface); padding-inline: 24px; }
.proj-title { margin: 0; font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.5rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; transition: color .25s; }
.proj:hover .proj-title { color: var(--accent); }
.proj-desc { margin: 10px 0 0; color: var(--muted); max-width: 58ch; }
.proj-kind { color: var(--muted); font-size: 15px; }
.proj-stack { margin: 0; }
.proj-links { display: flex; justify-content: flex-end; gap: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 4px 0 0; padding: 0; }
.tags li { font-family: var(--mono); font-size: 12.5px; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.more { margin: 28px 0 0; color: var(--muted); }
.more strong { color: var(--text); font-weight: 500; }

/* Covers: shown inline on touch and narrow screens only */
.proj-cover { display: none; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: var(--surface-2); }
.proj-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.proj-cover.type { display: none; flex-direction: column; justify-content: flex-end; padding: 26px; }
.proj-cover.type.solid { background: var(--accent); color: var(--on-accent); }
.proj-cover.type.soft { background: var(--accent-soft); color: var(--text); border: 1px solid var(--line); }
.proj-cover.type i { font-size: 34px; margin-bottom: auto; }
.cv-big { font-family: var(--display); font-size: 3rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.cv-small { margin-top: 8px; font-size: 15px; opacity: .85; }

/* Touch and narrow screens: covers sit inline at the top of each row */
@media (hover: none), (max-width: 960px) {
  .proj-cols { display: none; }
  .proj { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 28px 0; }
  .proj:hover { padding-inline: 0; background: transparent; }
  .proj-cover { display: block; }
  .proj-cover.type { display: flex; min-height: 180px; }
  .proj-links { justify-content: flex-start; }
}

/* =========================================================
   Experience
   ========================================================= */
.timeline-wrap { position: relative; margin-top: clamp(48px, 6vw, 80px); max-width: 1040px; }
.timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 36px; display: grid; gap: 56px; }
.timeline::before, .timeline-progress {
  content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--line);
}
.timeline-progress { background: var(--accent); transform-origin: top; transform: scaleY(1); }
.t-item { position: relative; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; }
.t-item::before {
  content: ""; position: absolute; left: -36px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.t-when { display: grid; gap: 4px; align-content: start; }
.t-date { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.t-type { font-size: 14px; color: var(--muted); }
.t-item h3 { margin: 0 0 2px; font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.t-org { color: var(--accent); font-weight: 500; }
.t-item p { margin: 12px 0 14px; color: var(--muted); max-width: 62ch; }

/* =========================================================
   Roles: ruled rows in one panel (logo tile, role, dates)
   ========================================================= */
.r-list { list-style: none; margin: clamp(40px, 5vw, 64px) 0 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.r-row {
  position: relative; display: grid; grid-template-columns: 72px minmax(0, 1fr) 200px; gap: 28px; align-items: start;
  padding: 32px 36px; transition: background-color .35s;
}
.r-row + .r-row { border-top: 1px solid var(--line); }
.r-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); transform: scaleY(0); transform-origin: top; transition: transform .45s var(--ease-out); }
.r-row:hover { background: var(--surface-2); }
.r-row:hover::before { transform: scaleY(1); }
.r-logo {
  width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 32px;
  transition: transform .5s var(--ease-out);
}
.r-logo .logo { width: 30px; height: 30px; }
.r-row:hover .r-logo { transform: rotate(-8deg) scale(1.06); }
.r-main h3 { margin: 0; font-family: var(--display); font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.r-org { display: block; margin-top: 4px; color: var(--accent); font-weight: 500; }
.r-main p { margin: 14px 0 14px; color: var(--muted); max-width: 62ch; }
.r-when { display: grid; justify-items: end; gap: 8px; text-align: right; }
.r-kind { font-size: 13px; font-weight: 500; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); }
@media (max-width: 760px) {
  .r-row { grid-template-columns: 56px minmax(0, 1fr); gap: 16px; padding: 24px 20px; }
  .r-logo { width: 56px; height: 56px; border-radius: 16px; font-size: 26px; }
  .r-when { grid-column: 2; grid-row: 1; justify-items: start; text-align: left; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
  .r-main { grid-column: 1 / -1; }
}

/* =========================================================
   Education
   ========================================================= */
.edu-grid { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto auto; gap: 16px; }
.edu-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 8px; align-content: start; }
.edu-card.degree { grid-row: span 2; background: var(--surface-2); gap: 12px; }
.edu-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 26px; margin-bottom: 8px; }
.edu-card h3 { margin: 0; font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
.edu-card.degree h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.edu-school { margin: 0; color: var(--muted); }
.edu-score { display: flex; align-items: baseline; gap: 10px; color: var(--muted); font-size: 15px; margin-top: 8px; }
.edu-num { font-size: clamp(2rem, 3.4vw, 2.8rem); font-weight: 600; letter-spacing: -.04em; color: var(--text); line-height: 1; }
.edu-card.degree .edu-num { color: var(--accent); }
.certs { margin-top: clamp(48px, 6vw, 72px); }
.certs h3 { margin: 0 0 20px; font-size: 1.25rem; font-weight: 600; }
.cert-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cert-grid { align-items: stretch; }
.cert { display: flex; align-items: center; height: 100%; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; transition: border-color .2s, transform .3s var(--ease-out); }
.cert:hover { border-color: var(--muted); transform: translateY(-2px); }
.cert i { font-size: 24px; color: var(--accent); flex: none; }
.cert b { display: block; font-weight: 500; }
.cert span { color: var(--muted); font-size: 14px; }

/* =========================================================
   Hackathons and awards: photo bento, captions below images
   4 columns: lead 2x2, tall 1x2, wide 2x1, stat 2x1, rest 1x1 (dense, no gaps)
   ========================================================= */
.awards {
  margin-top: clamp(40px, 5vw, 64px);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 300px; grid-auto-flow: dense; gap: 16px;
}
.aw { margin: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; }
.aw.lead { grid-column: span 2; grid-row: span 2; }
.aw.tall { grid-row: span 2; }
.aw.wide, .aw-stat { grid-column: span 2; }
.aw-img { overflow: hidden; border-radius: 18px; background: var(--surface-2); }
.aw-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out); }
.aw:hover .aw-img img { transform: scale(1.05); }
.aw figcaption { display: grid; gap: 2px; }
.aw figcaption b { font-weight: 600; line-height: 1.3; }
.aw.lead figcaption b { font-family: var(--display); font-size: 1.5rem; letter-spacing: -.02em; }
.aw-place { font-size: 13px; font-weight: 500; color: var(--accent); }
.aw-note { font-size: 14px; color: var(--muted); }
.aw-stat {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 28px;
  border-radius: 18px; background: var(--accent); color: var(--on-accent);
}
.aw-num { font-family: var(--display); font-size: clamp(3.5rem, 6vw, 5.5rem); font-weight: 800; letter-spacing: -.05em; line-height: .9; }
.aw-stat span:last-child { max-width: 30ch; font-size: 16px; }
@media (max-width: 960px) {
  .awards { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 240px; }
  .aw.wide { grid-column: span 2; }
}
@media (max-width: 560px) {
  .awards { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .aw, .aw.lead, .aw.tall, .aw.wide, .aw-stat { grid-column: auto; grid-row: auto; }
  .aw-img { aspect-ratio: 4 / 3; }
  .aw-stat { min-height: 200px; }
}

/* =========================================================
   Contact + footer
   ========================================================= */
.contact { position: relative; padding-block: clamp(120px, 16vw, 200px) 48px; border-top: 1px solid var(--line); background: var(--bg-2); overflow: hidden; }
.contact h2 {
  margin: 0; font-family: var(--display); font-size: clamp(3rem, 9vw, 8.5rem); font-weight: 600; letter-spacing: -.05em; line-height: 1;
  max-width: 15ch;
}
.contact h2 .dim { color: var(--muted); }
.contact .sub { font-size: 19px; }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 40px; }
.email-line { margin-top: clamp(64px, 8vw, 104px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 28px; border-top: 1px solid var(--line); }
.email-big { font-size: clamp(1.2rem, 2.8vw, 2rem); font-weight: 500; letter-spacing: -.02em; word-break: break-all; transition: color .2s; }
.email-big:hover { color: var(--accent); }
.socials { display: flex; gap: 4px; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; color: var(--muted); font-size: 14px; }
footer a { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
footer a:hover { color: var(--text); }

/* =========================================================
   Motion
   ========================================================= */
@keyframes pulse { 50% { opacity: .35; } }
@keyframes rise-line { from { transform: translateY(105%); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes step-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .line > span { animation: rise-line 1s var(--ease-out) both; animation-delay: calc(120ms + var(--i) * 110ms); }
  .reveal { animation: rise .9s var(--ease-out) both; animation-delay: calc(300ms + var(--i) * 90ms); }
}
@media (prefers-reduced-motion: reduce) {
  .status[data-state="running"]::before { animation: none; }
  .btn, .btn i, .aw-img img { transition: none; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1320px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-grid; }
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 56px; padding-top: 32px; }
  .photo-stack { justify-self: center; max-width: 520px; }
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .edu-grid { grid-template-columns: minmax(0, 1fr); }
  .edu-card.degree { grid-row: auto; }
  .cert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-item { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .t-when { display: flex; gap: 12px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 28px; }
}
@media (max-width: 640px) {
  .wrap { padding-inline: 16px; }
  .nav-cta, .nav-social { display: none; }
  .lede { margin-top: 20px; }
  .ctas { margin-top: 28px; }
  .ctas .btn { flex: 1 1 auto; justify-content: center; }
  .cert-grid { grid-template-columns: minmax(0, 1fr); }
  .photo-stack { justify-self: stretch; }
  .resume-link { margin-left: 0; }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .stat { padding-right: 12px; }
  .stat + .stat { padding-left: 12px; }
}

/* =========================================================
   Shared helpers
   ========================================================= */
[hidden] { display: none !important; }
.see-all { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.see-all .btn i { transition: transform .35s var(--ease-out); }
.see-all .btn:hover i { transform: translateX(4px); }
.btn.sm { min-height: 44px; padding: 0 18px; font-size: 15px; }

/* =========================================================
   Home: awards masonry gallery (natural photo shapes), opens a viewer
   ========================================================= */
.gallery { list-style: none; margin: clamp(32px, 4vw, 56px) 0 0; padding: 0; columns: 3 280px; column-gap: 20px; }
.gal { break-inside: avoid; margin: 0 0 28px; display: grid; gap: 12px; }
.gal-item { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--surface-2); border-radius: 18px; overflow: hidden; cursor: zoom-in; }
.gal-item img { display: block; width: 100%; height: auto; transition: transform 1.1s var(--ease-out), filter .4s; }
.gal-item:hover img { transform: scale(1.04); }
.gal-zoom {
  position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(11, 18, 14, .6); color: #fff; font-size: 18px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; transform: scale(.8); transition: opacity .3s, transform .4s var(--ease-out);
}
.gal-item:hover .gal-zoom, .gal-item:focus-visible .gal-zoom, .lb-cover:hover .gal-zoom, .lb-cover:focus-visible .gal-zoom { opacity: 1; transform: none; }
@media (hover: none) { .gal-zoom { opacity: 1; transform: none; } }
.gal-cap { display: grid; gap: 2px; }
.gal-cap b { font-family: var(--display); font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.gal-cap .aw-place { font-size: 13px; font-weight: 500; color: var(--accent); }
.lb-cover { padding: 0; border: 0; cursor: zoom-in; width: 100%; }
.lb-cover img { transition: transform 1.1s var(--ease-out); }

/* Awards marquee: two rows drifting in opposite directions, scroll speeds them up */
.mq { margin-top: clamp(32px, 4vw, 56px); display: grid; gap: 28px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.mq-row { overflow: hidden; }
.mq-track { display: flex; width: max-content; will-change: transform; }
.mq-set { display: flex; gap: 20px; padding-right: 20px; }
.mq-item { --h: 280px; margin: 0; flex: none; width: calc(var(--h) * var(--ar)); max-width: 460px; min-width: 190px; display: grid; gap: 12px; align-content: start; }
.mq-photo { position: relative; display: block; width: 100%; height: var(--h); padding: 0; border: 0; overflow: hidden; border-radius: 18px; background: var(--surface-2); cursor: zoom-in; }
.mq-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); -webkit-user-drag: none; }
.mq-item:hover .mq-photo img { transform: scale(1.06); }
.mq-photo:hover .gal-zoom, .mq-photo:focus-visible .gal-zoom { opacity: 1; transform: none; }
.mq-item figcaption { display: grid; gap: 2px; }
.mq-item b { font-family: var(--display); font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.mq-item .aw-place { font-size: 13px; font-weight: 500; color: var(--accent); }
@media (max-width: 640px) { .mq-item { --h: 200px; min-width: 150px; } .mq { gap: 20px; } }
/* Reduced motion: no drift, just a row you can scroll sideways */
@media (prefers-reduced-motion: reduce) {
  .mq { -webkit-mask-image: none; mask-image: none; }
  .mq-row { overflow-x: auto; scrollbar-width: thin; padding: 0 24px; }
  .mq-set[aria-hidden="true"] { display: none; }
}

/* Photo viewer */
.lb { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; align-items: center; padding: 24px; background: rgba(6, 10, 8, .9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lb[hidden] { display: none; }
.lb-figure { grid-column: 2; margin: 0; display: grid; justify-items: center; gap: 16px; }
.lb-figure img { max-width: 100%; max-height: 76vh; width: auto; height: auto; border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lb-figure figcaption { display: grid; gap: 2px; text-align: center; color: #e7efe9; max-width: 60ch; }
.lb-figure figcaption .aw-place { color: #c6f36d; font-size: 13px; font-weight: 600; }
.lb-figure figcaption b { font-family: var(--display); font-size: 1.4rem; font-weight: 700; }
.lb-figure figcaption span:last-child { color: #aebbb2; font-size: 15px; }
.lb-btn { width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); color: #fff; font-size: 22px; display: grid; place-items: center; cursor: pointer; transition: background-color .2s, transform .2s; }
.lb-btn:hover { background: rgba(255, 255, 255, .14); }
.lb-btn:active { transform: scale(.95); }
.lb-prev { grid-column: 1; justify-self: start; }
.lb-next { grid-column: 3; justify-self: end; }
.lb-close { position: absolute; top: 20px; right: 20px; }
@media (max-width: 640px) {
  .lb { grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto; padding: 72px 12px 20px; }
  .lb-figure { grid-column: 1; }
  .lb-prev, .lb-next { grid-row: 2; position: static; }
  .lb-prev { justify-self: start; } .lb-next { justify-self: end; margin-top: -52px; }
}
html.lb-open { overflow: hidden; }

/* =========================================================
   Certifications: two columns of quiet list rows
   ========================================================= */
.certs-title { margin: clamp(64px, 8vw, 104px) 0 0; font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -.03em; }
.cert-rows { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; border-top: 1px solid var(--line); }
.cert-row {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 18px 12px; border-bottom: 1px solid var(--line); border-radius: 12px 12px 0 0;
  transition: background-color .3s;
}
.cert-row:hover { background: var(--surface); }
.cert-mark { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: 24px; transition: background-color .3s, color .3s; }
.cert-mark img { width: 26px; height: 26px; filter: grayscale(1); opacity: .75; transition: filter .3s, opacity .3s; }
.cert-row:hover .cert-mark { background: var(--accent-soft); color: var(--accent); }
.cert-row:hover .cert-mark img { filter: none; opacity: 1; }
.cert-text h4 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.35; }
.cert-issuer { color: var(--muted); font-size: 14px; }
.cert-tag { font-family: var(--mono); font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
@media (max-width: 760px) {
  .cert-rows { grid-template-columns: minmax(0, 1fr); }
  .cert-tag { display: none; }
}

/* =========================================================
   Education: a journey line with three stops
   ========================================================= */
.journey { position: relative; margin-top: clamp(40px, 5vw, 64px); }
.journey-line { position: absolute; left: 28px; right: 28px; top: 27px; height: 2px; background: var(--line); }
.journey-fill { position: absolute; inset: 0; background: var(--accent); transform-origin: left center; }
.stops { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.stop { display: grid; gap: 16px; align-content: start; }
.stop-dot {
  position: relative; z-index: 1; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); border: 2px solid var(--accent); color: var(--accent); font-size: 24px;
}
.stop.now .stop-dot { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 8px var(--accent-soft); }
.stop-card { padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); display: grid; gap: 8px; align-content: start; height: 100%; }
.stop.now .stop-card { background: var(--surface-2); border-color: color-mix(in oklab, var(--accent) 40%, var(--line)); }
.stop-card h3 { margin: 0; font-family: var(--display); font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.stop-card p { margin: 0; color: var(--muted); }
.stop-score { display: flex; align-items: baseline; gap: 10px; color: var(--muted); font-size: 15px; margin-top: 6px; }
.stop-score b { font-family: var(--display); font-size: clamp(2rem, 3.4vw, 2.8rem); font-weight: 800; letter-spacing: -.04em; color: var(--text); line-height: 1; }
.stop.now .stop-score b { color: var(--accent); }
.degree-bar { margin-top: 8px; height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.degree-bar span { display: block; height: 100%; width: 80%; border-radius: 8px; background: var(--accent); transform-origin: left; }
.degree-meta { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
@media (max-width: 960px) {
  .journey-line { left: 27px; right: auto; top: 28px; bottom: 28px; width: 2px; height: auto; }
  .journey-fill { transform-origin: center top; }
  .stops { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .stop { grid-template-columns: 56px minmax(0, 1fr); gap: 16px; }
}

/* =========================================================
   Sub-pages: header, filters, case studies, experience detail, wins
   ========================================================= */
.page-hero { padding: clamp(140px, 16vw, 200px) 0 clamp(56px, 7vw, 96px); border-bottom: 1px solid var(--line); }
.crumbs { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.crumbs a { min-height: 44px; display: inline-flex; align-items: center; }
.crumbs a:hover { color: var(--accent); }
.page-title { margin: 12px 0 0; font-family: var(--display); font-size: clamp(3.2rem, 10vw, 8rem); font-weight: 800; letter-spacing: -.055em; line-height: .95; }
.page-title .dim { color: var(--muted); }
.page-lede { margin: 28px 0 0; max-width: 58ch; font-size: clamp(17px, 1.4vw, 20px); color: var(--muted); }
.page-stats { list-style: none; margin: 48px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 24px 56px; }
.page-stats b { display: block; font-family: var(--display); font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.page-stats span { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; max-width: 20ch; }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 48px 0 8px; }
.chip-f { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-weight: 500; transition: background-color .25s, color .25s, border-color .25s; }
.chip-f:hover { border-color: var(--muted); }
.chip-f[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.filter-live { margin-left: 8px; font-family: var(--mono); font-size: 13px; color: var(--muted); }

.case { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); padding: clamp(48px, 6vw, 96px) 0; border-bottom: 1px solid var(--line); }
.case-cover { position: sticky; top: 100px; align-self: start; overflow: hidden; border-radius: 20px; aspect-ratio: 4 / 3; background: var(--surface-2); }
.case-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.case-cover.type { display: flex; flex-direction: column; justify-content: flex-end; padding: 32px; }
.case-cover.type.solid { background: var(--accent); color: var(--on-accent); }
.case-cover.type.soft { background: var(--accent-soft); color: var(--text); border: 1px solid var(--line); }
.case-cover.type i { font-size: 44px; margin-bottom: auto; }
.case-cover .cv-big { font-size: clamp(3rem, 6vw, 4.6rem); }
.case-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.case h2 { margin: 12px 0 0; font-family: var(--display); font-size: clamp(2.2rem, 4.4vw, 3.6rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.case-summary { margin: 18px 0 0; font-size: clamp(17px, 1.4vw, 19px); max-width: 60ch; }
.case-label { margin: 32px 0 10px; font-size: 14px; font-weight: 600; color: var(--accent); }
.points { margin: 0; padding-left: 20px; color: var(--muted); max-width: 64ch; }
.points li + li { margin-top: 8px; }
.case-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.cm { border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: var(--surface); }
.cm b { display: block; font-family: var(--display); font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 800; letter-spacing: -.03em; color: var(--accent); line-height: 1.05; }
.cm span { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; }
.case-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.more-builds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.mb { padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); display: grid; gap: 8px; }
.mb i { font-size: 28px; color: var(--accent); }
.mb h3 { margin: 0; font-family: var(--display); font-size: 1.25rem; font-weight: 700; }
.mb p { margin: 0; color: var(--muted); font-size: 15px; }

.xp-card { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); padding: clamp(48px, 6vw, 88px) 0; border-bottom: 1px solid var(--line); }
.xp-side { position: sticky; top: 100px; align-self: start; display: grid; gap: 10px; justify-items: start; }
.xp-side h2 { margin: 12px 0 0; font-family: var(--display); font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.xp-side .r-org { margin: 0; }
.xp-body .case-summary { margin-top: 0; }
.nda { display: flex; align-items: flex-start; gap: 12px; margin-top: 24px; padding: 16px 18px; border-radius: 14px; background: var(--surface-2); color: var(--muted); font-size: 15px; max-width: 64ch; }
.nda i { color: var(--accent); font-size: 20px; flex: none; margin-top: 2px; }
.group-title { margin: clamp(72px, 9vw, 120px) 0 0; font-family: var(--display); font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; letter-spacing: -.04em; }

.feature-win { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: center; padding: clamp(48px, 6vw, 96px) 0; border-bottom: 1px solid var(--line); }
.feature-win .aw-img { aspect-ratio: 3 / 2; border-radius: 22px; }
.feature-win h2 { margin: 10px 0 0; font-family: var(--display); font-size: clamp(2.2rem, 4.4vw, 3.6rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.win-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; margin-top: 32px; }
.win-card { display: grid; gap: 12px; align-content: start; }
.win-card .aw-img { aspect-ratio: 4 / 3; border-radius: 18px; }
.win-card h3 { margin: 0; font-family: var(--display); font-size: 1.4rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.win-meta { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.win-card p, .feature-win p { margin: 0; color: var(--muted); }
.aw-img { overflow: hidden; background: var(--surface-2); }
.aw-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out); }
.win-card:hover .aw-img img, .feature-win:hover .aw-img img { transform: scale(1.05); }
.place-pill { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; }

@media (max-width: 960px) {
  .case, .xp-card, .feature-win { grid-template-columns: minmax(0, 1fr); }
  .case-cover, .xp-side { position: static; }
  .win-grid, .more-builds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .win-grid, .more-builds, .case-metrics { grid-template-columns: minmax(0, 1fr); }
}

/* =========================================================
   Case facts (achievements + education)
   ========================================================= */
.facts-grid { margin: 24px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.facts-grid div { background: var(--surface); padding: 14px 18px; }
.facts-grid dt { font-size: 13px; color: var(--muted); }
.facts-grid dd { margin: 2px 0 0; font-weight: 600; }
@media (max-width: 560px) { .facts-grid { grid-template-columns: minmax(0, 1fr); } }

/* =========================================================
   Skills page: sticky category list + cards with "used in" links
   ========================================================= */
.sk-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.sk-side { position: sticky; top: 100px; }
.sk-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sk-side a { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--muted); font-weight: 500; transition: background-color .25s, color .25s; }
.sk-side a:hover, .sk-side a[aria-current] { color: var(--text); background: var(--surface); }
.sk-side a[aria-current] i { color: var(--accent); }
.sk-groups { display: grid; gap: clamp(56px, 7vw, 96px); }
.sk-group { scroll-margin-top: 100px; }
.sk-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.sk-head h2 { margin: 0; display: flex; align-items: center; gap: 12px; font-family: var(--display); font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; }
.sk-head h2 i { color: var(--accent); }
.sk-head p { margin: 0; color: var(--muted); max-width: 46ch; }
.sk-cards { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.sk-card { display: grid; grid-template-columns: 52px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 14px; row-gap: 6px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); transition: border-color .3s, transform .4s var(--ease-out); }
.sk-card:hover { transform: translateY(-3px); border-color: color-mix(in oklab, var(--brand, var(--accent)) 50%, var(--line)); }
.sk-mark { grid-row: span 2; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--bg); }
.sk-mark img, .sk-mark .logo { width: 30px; height: 30px; }
.sk-mark .logo { background: var(--text); }
.sk-mark i { font-size: 28px; color: var(--accent); }
.sk-name { font-weight: 600; }
.sk-used { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; color: var(--muted); }
.sk-used a { color: var(--accent); font-weight: 500; }
.sk-used a:hover { text-decoration: underline; }
.muted-note { font-size: 13px; color: var(--muted); }
@media (max-width: 960px) {
  .sk-layout { grid-template-columns: minmax(0, 1fr); }
  .sk-side { position: sticky; top: 60px; z-index: 5; background: var(--bg); margin-inline: -16px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
  .sk-side ul { display: flex; overflow-x: auto; scrollbar-width: none; }
  .sk-side a { grid-template-columns: 20px auto auto; white-space: nowrap; }
}

/* =========================================================
   Contact details (footer block on every page, and the contact page)
   ========================================================= */
.contact-list { list-style: none; margin: clamp(56px, 7vw, 88px) 0 0; padding: 28px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
.contact-list li { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.cl-icon { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--accent); font-size: 22px; transition: background-color .3s, transform .4s var(--ease-out); }
.contact-list li:hover .cl-icon { background: var(--accent-soft); transform: translateY(-2px); }
.cl-text { display: grid; gap: 2px; min-width: 0; }
.cl-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cl-text a, .cl-text > span:last-child { font-weight: 500; overflow-wrap: anywhere; }
.cl-text a:hover { color: var(--accent); }
.contact-list.stacked { grid-template-columns: minmax(0, 1fr); margin-top: 16px; padding-top: 0; border-top: 0; gap: 18px; }
@media (max-width: 1100px) { .contact-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .contact-list { grid-template-columns: minmax(0, 1fr); } }

/* Nav + hero résumé */
.nav-resume { min-height: 40px; padding: 0 14px; font-size: 15px; margin-left: 4px; }
.hero-resume { align-self: center; margin-left: 4px; }
@media (max-width: 1320px) { .nav-resume span { display: none; } .nav-resume { width: 44px; padding: 0; justify-content: center; } }
@media (max-width: 640px) { .nav-resume { display: none; } }

/* =========================================================
   Contact page: form that opens Gmail, drafts, details
   ========================================================= */
:root { --danger: #b42318; }
:root[data-theme="dark"] { --danger: #ff8f84; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --danger: #ff8f84; } }
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.contact-form { display: grid; gap: 20px; padding: clamp(24px, 3vw, 40px); border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.contact-form h2, .contact-aside h2 { margin: 0; font-family: var(--display); font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 800; letter-spacing: -.03em; }
.form-note { margin: -8px 0 0; color: var(--muted); font-size: 15px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--text); font: inherit; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 150px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-help { font-size: 13px; color: var(--muted); }
.field-error { font-size: 13px; color: var(--danger); min-height: 1em; }
.field-error:empty { display: none; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.form-status { margin: 0; color: var(--accent); font-weight: 500; }
.form-status:empty { display: none; }
.drafts { display: grid; gap: 12px; margin-top: 20px; }
.draft { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); transition: border-color .3s, transform .4s var(--ease-out); }
.draft:hover { transform: translateY(-2px); border-color: color-mix(in oklab, var(--accent) 50%, var(--line)); }
.draft .cl-icon { grid-row: span 2; }
.draft-text { display: grid; gap: 2px; }
.draft-text span { color: var(--muted); font-size: 14px; }
.draft-go { grid-column: 2; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--accent); }
.contact-foot { padding-block: 32px; }
.contact-foot footer { margin-top: 0; }
@media (max-width: 960px) { .contact-grid, .field-row { grid-template-columns: minmax(0, 1fr); } }

/* =========================================================
   About: photo beside the intro (cut-out sits on a tinted card)
   ========================================================= */
.about-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 360px); gap: clamp(32px, 5vw, 72px); align-items: end; }
.about-photo { position: relative; margin: 0; justify-self: end; width: 100%; isolation: isolate; }
.about-photo::before {
  content: ""; position: absolute; inset: 24% 0 0 0; z-index: -1;
  border-radius: 28px; background: var(--accent-soft); border: 1px solid var(--line);
}
.about-photo picture, .about-photo img { display: block; width: 100%; height: auto; }
.about-photo img { border-radius: 0 0 28px 28px; }
@media (max-width: 960px) {
  .about-top { grid-template-columns: minmax(0, 1fr); }
  .about-photo { justify-self: center; max-width: 300px; }
}

/* =========================================================
   Small layout utilities (replacing one-off inline styles)
   ========================================================= */
.pt-0 { padding-top: 0; }
.pt-sub { padding-top: clamp(48px, 6vw, 80px); }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.mt-first { margin-top: clamp(48px, 6vw, 80px); }
.list-reset { list-style: none; padding: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.case-divided { border-top: 1px solid var(--line); margin-top: clamp(56px, 7vw, 96px); }
@media (max-width: 560px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
