/* ============================================================
   Gauri Menon — Portfolio
   Minimal, black & white (colorful skill pills aside).
   Light by default. Signature: a navigable vector space.
   ============================================================ */

@font-face {
  font-family: "Google Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/GoogleSans-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Google Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../assets/fonts/GoogleSans-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "Google Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../assets/fonts/GoogleSans-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Google Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../assets/fonts/GoogleSans-Bold.woff2") format("woff2");
}

:root {
  --bg: #f4f4f3;
  --surface: #ffffff;
  --fg: #111111;
  --fg-soft: #444444;
  --muted: #9a9a9a;
  --faint: #f3f3f3;
  --line: #e8e8e8;
  --line-2: #d8d8d8;
  --pdfv-bg: #e4e0d6;
  --shadow: 0 1px 2px rgba(0,0,0,.03);
  --shadow-hover: 0 1px 4px rgba(0,0,0,.05);

  --maxw: 1240px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 18px;
  --bar-round: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --sans: "Google Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --label-spacing: .14em;
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --surface: #131313;
  --fg: #f3f3f3;
  --fg-soft: #c9c9c9;
  --muted: #777777;
  --faint: #1a1a1a;
  --line: #242424;
  --line-2: #2e2e2e;
  --pdfv-bg: #101010;
  --shadow: 0 1px 2px rgba(0,0,0,.3);
  --shadow-hover: 0 2px 8px rgba(0,0,0,.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background .5s var(--ease), color .5s var(--ease);
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--fg); color: var(--bg); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 4px; }

.label {
  font-size: .72rem; text-transform: uppercase; letter-spacing: var(--label-spacing);
  color: var(--muted); font-weight: 600;
}

/* ---------- NAV (white bar, rounded at the bottom ends) ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  padding: 1rem var(--pad);
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-left-radius: var(--bar-round);
  border-bottom-right-radius: var(--bar-round);
  box-shadow: var(--shadow);
  transition: background .5s var(--ease), box-shadow .4s var(--ease);
}
.nav__name { font-size: .95rem; font-weight: 600; letter-spacing: -.01em; justify-self: start; }
.nav__name span { color: var(--muted); font-weight: 400; }
.nav__tabs { display: flex; gap: clamp(1rem, 3vw, 2.2rem); justify-self: center; }
.nav__tabs a {
  font-size: .9rem; color: var(--muted); font-weight: 500; position: relative;
  padding: .2rem 0; transition: color .25s var(--ease);
}
.nav__tabs a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px;
  background: var(--fg); transform: scaleX(0); transition: transform .3s var(--ease);
}
.nav__tabs a:hover { color: var(--fg); }
.nav__tabs a:hover::after, .nav__tabs a.is-active::after { transform: scaleX(1); }
.nav__tabs a.is-active { color: var(--fg); }
.nav__theme {
  justify-self: end; display: inline-flex; align-items: center; gap: .55rem;
  background: none; border: none; cursor: pointer; color: var(--muted);
  font-size: .9rem; font-weight: 500; padding: .2rem; transition: color .25s var(--ease);
}
.nav__theme:hover { color: var(--fg); }
.nav__theme-label { font-family: var(--sans); font-size: .9rem; font-weight: 500; }
.switch {
  position: relative; width: 42px; height: 24px; border-radius: 999px; flex: none;
  background: var(--line-2); transition: background .3s var(--ease);
}
.switch__thumb {
  position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .3s var(--ease);
}
[data-theme="dark"] .switch { background: #8338EC; }
[data-theme="dark"] .switch__thumb { transform: translateX(18px); }

/* ---------- HOME ---------- */
.home { max-width: var(--maxw); margin: 0 auto; padding: clamp(2rem, 5vw, 3.75rem) var(--pad) 0; }

/* HERO */
.hero {
  display: flex; align-items: center; justify-content: center; text-align: left;
  gap: clamp(1.25rem, 5vw, 4rem); padding-bottom: clamp(2rem, 4.5vw, 3.25rem);
}
.hero__text { max-width: 34ch; }
.hero__headline { font-size: clamp(1.8rem, 4.5vw, 3rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.02; }
.hero__sub { font-size: clamp(0.98rem, 1.9vw, 1.22rem); color: var(--fg-soft); max-width: 34ch; font-weight: 400; line-height: 1.45; margin-top: 1rem; }
.hero__desc { font-size: .95rem; color: var(--muted); margin-top: .8rem; }

/* Seamless cutout headshot: no card, fades into the page at the bottom */
.headshot {
  position: relative; flex: none; align-self: center;
  width: clamp(195px, 25vw, 295px); aspect-ratio: 1 / 1;
  -webkit-mask-image: linear-gradient(to bottom,
    #000 0%, #000 50%,
    rgba(0,0,0,.94) 60%,
    rgba(0,0,0,.75) 70%,
    rgba(0,0,0,.5) 80%,
    rgba(0,0,0,.22) 90%,
    transparent 100%);
  mask-image: linear-gradient(to bottom,
    #000 0%, #000 50%,
    rgba(0,0,0,.94) 60%,
    rgba(0,0,0,.75) 70%,
    rgba(0,0,0,.5) 80%,
    rgba(0,0,0,.22) 90%,
    transparent 100%);
}
.headshot__base {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block;
}

/* PANELS */
.panels {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.4rem);
  padding-bottom: clamp(2rem, 4.5vw, 3rem);
}
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem; min-height: 296px; display: flex; flex-direction: column; box-shadow: var(--shadow);
  transition: border-color .35s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease);
}
.panel:hover { border-color: var(--line-2); box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.panel__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.panel__label { font-size: .72rem; text-transform: uppercase; letter-spacing: var(--label-spacing); color: var(--muted); font-weight: 600; }
.panel__meta { font-size: .72rem; color: var(--muted); font-weight: 500; }

/* Skills — gravity pills */
.pillbox { position: relative; flex: 1; min-height: 224px; overflow: hidden; border-radius: 12px; touch-action: none; }
.pill {
  position: absolute; top: 0; left: 0; display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 .95rem; border-radius: 999px; font-size: .82rem; font-weight: 600;
  white-space: nowrap; cursor: grab; user-select: none; will-change: transform;
}
.pill:active { cursor: grabbing; }
.pill--big { height: 42px; padding: 0 1.2rem; font-size: 1rem; }
.pillbox.is-static { display: flex; flex-wrap: wrap; gap: .5rem; align-content: flex-start; overflow: visible; }
.pillbox.is-static .pill { position: static; transform: none !important; height: auto; padding: .45rem .9rem; }

/* Résumé — category rows */
.exp { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.exp__tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.exp__tab {
  font-family: var(--sans); font-size: .78rem; font-weight: 500; color: var(--muted); background: var(--faint);
  border: 1px solid transparent; border-radius: 999px; padding: .35rem .75rem; cursor: pointer;
  transition: all .25s var(--ease);
}
.exp__tab:hover { color: var(--fg); }
.exp__tab.is-active { color: var(--bg); background: var(--fg); }
.exp__panes { position: relative; flex: 1; overflow: auto; }
.rows { list-style: none; display: flex; flex-direction: column; }
.rows[hidden], .exp__pane[hidden] { display: none; }
.rows__group { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; margin: .1rem 0 .15rem; }
.edu .rows + .rows__group { margin-top: .8rem; }
.exp__pane.is-animating { animation: paneIn .45s var(--ease); }
@keyframes paneIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rows li {
  display: flex; flex-direction: column; gap: .1rem; padding: .6rem 0; border-bottom: 1px solid var(--line);
}
.rows li:last-child { border-bottom: none; }
.rows__t { font-size: .92rem; font-weight: 600; letter-spacing: -.01em; }
.rows__m { font-size: .78rem; color: var(--muted); }

/* Location — dotted world map */
.map { position: relative; flex: 1; min-height: 200px; }
.map canvas { display: block; width: 100%; height: 100%; }
.map__tip {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -114%);
  background: var(--tip-bg, var(--fg)); color: #fff; text-align: center; line-height: 1.25;
  padding: .55rem .6rem; border-radius: 11px; width: max-content; max-width: 132px;
  white-space: normal; pointer-events: none;
  opacity: 0; transition: opacity .2s var(--ease); z-index: 3; box-shadow: 0 3px 10px rgba(0,0,0,.1);
}
.map__tip::after {
  content: ""; position: absolute; left: 50%; bottom: -4px; width: 9px; height: 9px;
  background: var(--tip-bg, var(--fg)); transform: translateX(-50%) rotate(45deg);
}
.map__tip.show { opacity: 1; }
.map__tip-flag { display: block; font-size: 1.3rem; line-height: 1; margin-bottom: .25rem; }
.map__tip-h { display: block; font-size: .8rem; font-weight: 700; }
.map__tip-d { display: block; font-size: .72rem; font-weight: 400; opacity: .92; margin-top: .2rem; }

/* ---------- VECTOR SPACE ---------- */
.vector { padding-bottom: 0; }
.vector__head { display: flex; align-items: baseline; gap: 1.2rem; flex-wrap: wrap; margin-bottom: .8rem; }
.vector__label { font-size: .72rem; text-transform: uppercase; letter-spacing: var(--label-spacing); color: var(--muted); font-weight: 600; }
.vector__desc { font-size: .92rem; color: var(--fg-soft); max-width: 54ch; }
.vector__stage {
  position: relative; background: var(--bg); overflow: hidden;
  height: clamp(380px, 52vw, 520px);
}
.vector__stage canvas { display: block; width: 100%; height: 100%; }
.vector__hint {
  position: absolute; left: 1.5rem; bottom: 1.4rem; font-size: .72rem; color: var(--muted);
  pointer-events: none; transition: opacity .5s var(--ease);
}

/* ---------- TAB VIEWS ---------- */
.view { position: relative; max-width: 880px; margin: 0 auto; padding: clamp(2rem, 6vw, 4rem) var(--pad) 0; }

/* warp transition overlay */
.warp { position: fixed; inset: 0; z-index: 500; pointer-events: none; opacity: 0; }
.warp.show { opacity: 1; }

/* faint embedding constellation on each tab */
.view__viz {
  position: absolute; top: clamp(1.5rem, 4vw, 3rem); right: clamp(1rem, 4vw, 2.5rem);
  width: 116px; height: 116px; opacity: .45; pointer-events: none;
}
.view__viz svg { width: 100%; height: 100%; overflow: visible; }
.view__viz circle { fill: var(--muted); }
.view__viz line { stroke: var(--muted); stroke-width: .8; opacity: .55; }
@media (max-width: 760px) { .view__viz { display: none; } }
.view[hidden] { display: none; }
.view.is-entering { animation: viewIn .55s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.backbtn {
  position: fixed; left: clamp(1rem, 3vw, 2rem); top: 76px;
  z-index: 90; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--fg); display: grid; place-items: center; cursor: pointer;
  box-shadow: var(--shadow); transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.backbtn[hidden] { display: none; }
.backbtn:hover { background: var(--fg); color: var(--bg); transform: scale(1.08); }
.backbtn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.view__head { margin-bottom: clamp(2rem, 5vw, 3rem); }
.view__eyebrow { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.view__title { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; letter-spacing: -.03em; margin-top: .7rem; line-height: 1.05; }
.view__lede { color: var(--fg-soft); margin-top: .8rem; font-size: 1.05rem; max-width: 50ch; }

.cv { list-style: none; display: flex; flex-direction: column; }
.cv__item { display: grid; grid-template-columns: 130px 1fr; gap: 1.5rem; padding: 1.8rem 0; border-top: 1px solid var(--line); }
.cv__item:last-child { border-bottom: 1px solid var(--line); }
.cv__when { font-size: .82rem; color: var(--muted); padding-top: .3rem; font-weight: 500; }
.cv__body h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; margin-bottom: .8rem; }
.cv__body h3 span { color: var(--muted); font-weight: 400; }
.cv__body ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.cv__body li { position: relative; padding-left: 1.2rem; color: var(--fg-soft); font-size: .95rem; }
.cv__body li::before { content: "›"; position: absolute; left: 0; color: var(--muted); }

.list, .cases { display: flex; flex-direction: column; gap: 1.2rem; }
.work-card { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.4rem); background: var(--surface); box-shadow: var(--shadow); }
.work-card--link { display: block; text-decoration: none; color: inherit; cursor: pointer;
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease); }
.work-card--link:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.work-card__top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.work-card__top h3 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; letter-spacing: -.03em; }
.work-card__badge { font-size: .8rem; color: var(--muted); font-weight: 500; }
.work-card__desc { color: var(--fg-soft); max-width: 60ch; font-size: 1.02rem; }
.work-card__more { display: inline-block; margin-top: 1.1rem; font-size: .85rem; font-weight: 600; color: var(--fg); }
.work-card--link:hover .work-card__more { text-decoration: underline; text-underline-offset: 3px; }
.work-card--soon { border-style: dashed; }
.soon-badge { font-size: .74rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px; background: var(--faint); color: var(--muted); white-space: nowrap; }

/* colored skill pills used across experiences (match the home gravity pills) */
.skill-tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.3rem; }
.skill-tag { font-size: .76rem; font-weight: 600; border-radius: 999px; padding: .32rem .8rem; white-space: nowrap; background: var(--faint); color: var(--fg-soft); }

/* detail pages */
.detail__meta { color: var(--muted); margin-top: .7rem; font-size: .95rem; }
.detail__links { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.3rem; }
.detail__link {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 600;
  color: var(--fg); border: 1px solid var(--line-2); border-radius: 999px; padding: .45rem .95rem;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.detail__link:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.detail__gallery { margin-top: 2rem; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--faint); }
.detail__gallery img { display: block; width: 100%; height: auto; }
.detail__caption { padding: .7rem 1rem; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); }
.detail__filmstrip { display: flex; gap: 1rem; margin-top: 2rem; overflow-x: auto; padding-bottom: .4rem; scroll-snap-type: x proximity; }
.detail__filmstrip .detail__gallery--sm { margin-top: 0; flex: 0 0 auto; width: min(72vw, 320px); scroll-snap-align: start; }

.detail__body { margin-top: 2.2rem; display: flex; flex-direction: column; gap: 2.2rem; max-width: 68ch; }
.detail__overview { font-size: 1.15rem; line-height: 1.6; color: var(--fg); }
.detail__section h4 { font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; margin-bottom: .6rem; }
.detail__section p { color: var(--fg-soft); line-height: 1.65; }
.detail__section li { color: var(--fg-soft); line-height: 1.6; margin-left: 1.1rem; }

/* supporting research stats */
.detail__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.detail__stat { background: var(--surface); padding: 1.1rem 1.2rem; }
.detail__stat-val { font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; display: block; }
.detail__stat-label { font-size: .8rem; color: var(--fg-soft); margin-top: .3rem; display: block; line-height: 1.4; }
.detail__stat-src { font-size: .68rem; color: var(--muted); margin-top: .5rem; display: block; }

.detail__note { color: var(--muted); font-size: .92rem; margin-bottom: 1rem; }

/* inline video embeds */
.detail__video { display: block; margin-top: 2rem; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--faint); text-decoration: none; color: inherit; }
.detail__video-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.detail__video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .9; transition: opacity .25s var(--ease); }
.detail__video:hover .detail__video-thumb img { opacity: 1; }
.detail__play { position: absolute; inset: 0; margin: auto; width: 62px; height: 62px; border-radius: 50%; background: rgba(0,0,0,.62); display: grid; place-items: center; transition: transform .25s var(--ease), background .25s; }
.detail__video:hover .detail__play { transform: scale(1.08); background: rgba(0,0,0,.78); }
.detail__play::after { content: ""; margin-left: 4px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }

/* award / winner badges */
.award-badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px; background: #FFD23F; color: #1a1400; white-space: nowrap; }
.award-badge--lg { margin-top: .9rem; font-size: .82rem; padding: .4rem .85rem; }

/* homepage section titles + learn more */
.home-title { text-align: center; font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 700; letter-spacing: -.025em; margin: 0 0 clamp(1.1rem, 2.6vw, 1.6rem); }
.home-more { display: flex; justify-content: center; padding: 0 0 clamp(2.5rem, 6vw, 4rem); margin-top: clamp(-.6rem, -1vw, -.2rem); }
.home-more__link {
  display: inline-flex; align-items: center; gap: .5rem; font-size: .95rem; font-weight: 600;
  background: var(--fg); color: var(--bg); padding: .72rem 1.5rem; border-radius: 999px;
  box-shadow: var(--shadow); transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.home-more__link:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.home-more__link span { display: inline-block; transition: transform .25s var(--ease); }
.home-more__link:hover span { transform: translateX(4px); }

/* featured case studies strip (homepage quick nav) */
.featured { padding-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.featured__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(.8rem, 2vw, 1.2rem); }
.feat { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease); }
.feat:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--shadow-hover); }
.feat__thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--faint); }
.feat__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feat__tag { position: absolute; top: .6rem; left: .6rem; font-size: .68rem; font-weight: 700; padding: .28rem .6rem; border-radius: 999px; background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
.feat__tag--win { background: #FFD23F; color: #1a1400; }
.feat__tag--dark { background: #111111; color: #ffffff; box-shadow: none; }

/* ---------- Affiliations row ---------- */
.affil { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 1.5rem; flex-wrap: wrap; margin: 1.6rem 0 3rem; }
.affil__label { font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.affil__logos { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; justify-content: center; }
.affil__logos img { height: 30px; width: auto; object-fit: contain; display: block; }

/* ---------- Brand logo on cards + detail ---------- */
.work-card__logo { height: 40px; width: auto; display: block; margin-bottom: 1rem; }
.detail__logo { height: 60px; width: auto; display: block; margin-bottom: 1.1rem; }
.feat__title { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem 1rem; font-weight: 600; font-size: .98rem; }
.feat__arrow { color: var(--muted); }
.feat:hover .feat__arrow { color: var(--fg); }
@media (max-width: 760px) { .featured__row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .featured__row { grid-template-columns: 1fr; } }

/* venn diagram (topical, not just personas) */
.detail__venn { margin-top: .4rem; }
.detail__venn svg { width: 100%; height: auto; max-width: 520px; display: block; margin: 0 auto; }
.detail__venn text { font-family: var(--sans); }
.venn-label { font-size: 13px; font-weight: 700; }
.venn-item { font-size: 11.5px; fill: var(--fg-soft); }
.venn-overlap { font-size: 11.5px; font-weight: 600; fill: var(--fg); }
.venn-circle { fill: none; stroke-width: 2; opacity: .9; animation: venn-draw .9s var(--ease) both; }
@keyframes venn-draw { from { opacity: 0; transform: scale(.85); } to { opacity: .9; transform: none; } }
.detail__venn svg > text, .detail__venn svg > .venn-item { animation: fade-in .6s var(--ease) .35s both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* flow / how-it-works diagram */
.flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: .5rem .2rem; margin-top: .4rem; }
.flow-step { flex: 1 1 130px; min-width: 120px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4rem; padding: 1rem .6rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); animation: flow-in .5s var(--ease) both; }
.flow-step:nth-child(3) { animation-delay: .08s; }
.flow-step:nth-child(5) { animation-delay: .16s; }
.flow-step:nth-child(7) { animation-delay: .24s; }
.flow-step:nth-child(9) { animation-delay: .32s; }
@keyframes flow-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.flow-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: var(--bg); background: var(--fg); }
.flow-label { font-size: .9rem; font-weight: 600; line-height: 1.25; }
.flow-desc { font-size: .76rem; color: var(--muted); line-height: 1.35; }
.flow-arrow { align-self: center; color: var(--muted); font-size: 1.1rem; padding: 0 .1rem; }
@media (max-width: 620px) { .flow-arrow { transform: rotate(90deg); } .flow-step { flex-basis: 100%; } }

/* horizontal bar breakdown */
.bars { display: flex; flex-direction: column; gap: .7rem; margin-top: .4rem; }
.bar-row { display: grid; grid-template-columns: 7.5rem 1fr 2.6rem; align-items: center; gap: .7rem; }
.bar-label { font-size: .85rem; color: var(--fg-soft); }
.bar-track { height: 10px; border-radius: 999px; background: var(--faint); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; width: 0; animation: bar-grow 1s var(--ease) .1s forwards; }
.bar-val { font-size: .82rem; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
@keyframes bar-grow { from { width: 0; } to { width: var(--pct); } }
@media (max-width: 620px) { .bar-row { grid-template-columns: 6rem 1fr 2.4rem; } }

.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.about__bio p { font-size: 1.12rem; line-height: 1.6; color: var(--fg-soft); margin-bottom: 1.2rem; }
.about__bio p:first-child { color: var(--fg); }
.about__side { display: flex; flex-direction: column; gap: 1.4rem; }
.about__block { display: flex; flex-direction: column; gap: .35rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); }
.about__block:last-child { border-bottom: none; }
.about__k { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.about__v { font-size: .95rem; }
.about__skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem 2.5rem; margin-top: clamp(2.5rem, 6vw, 4rem); }
.skillset__h { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; display: block; margin-bottom: .9rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips span { font-size: .85rem; border: 1px solid var(--line); border-radius: 8px; padding: .35rem .7rem; color: var(--fg-soft); transition: background .25s var(--ease), color .25s var(--ease); }
.chips span:hover { background: var(--fg); color: var(--bg); }

/* ---------- FOOTER (white bar, rounded at the top ends) ---------- */
.footer {
  max-width: var(--maxw); margin: clamp(1.5rem, 4vw, 2.5rem) auto 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top-left-radius: var(--bar-round); border-top-right-radius: var(--bar-round);
  box-shadow: var(--shadow);
  padding: 1.3rem var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.footer__copy { font-size: .85rem; color: var(--muted); }
.footer__links { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.footer__links a { font-size: .88rem; color: var(--fg-soft); position: relative; }
.footer__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.footer__links a:hover::after { transform: scaleX(1); }

/* ---------- Load reveal ---------- */
.home .hero, .home > .home-title, .home .featured, .home .home-more, .home .panel, .home .vector { opacity: 0; transform: translateY(16px); }
body.ready .home .hero { animation: rise .7s var(--ease) .05s forwards; }
body.ready .home > .home-title { animation: rise .7s var(--ease) .09s forwards; }
body.ready .home .home-more { animation: rise .7s var(--ease) .3s forwards; }
body.ready .home .featured { animation: rise .7s var(--ease) .1s forwards; }
body.ready .home .panel:nth-child(1) { animation: rise .7s var(--ease) .14s forwards; }
body.ready .home .panel:nth-child(2) { animation: rise .7s var(--ease) .21s forwards; }
body.ready .home .panel:nth-child(3) { animation: rise .7s var(--ease) .28s forwards; }
body.ready .home .vector { animation: rise .7s var(--ease) .36s forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .panels { grid-template-columns: 1fr; }
  .panel { min-height: auto; }
  .pillbox, .map { min-height: 280px; }
  .hero { flex-direction: column; text-align: center; align-items: center; }
  .hero__text { max-width: 100%; display: flex; flex-direction: column; align-items: center; }
  .hero__cta { justify-content: center; }
  .headshot { align-self: center; }
  .about { grid-template-columns: 1fr; }
  .nav__name span { display: none; }
}
/* Phones: drop the mouse-driven vector space and its heading */
@media (max-width: 760px) {
  .home-title--explore, .vector { display: none; }
}
@media (max-width: 620px) {
  .nav { grid-template-columns: 1fr auto; row-gap: .55rem; padding: .85rem var(--pad); }
  .nav__name { font-size: .9rem; }
  .nav__tabs { grid-column: 1 / -1; justify-self: start; gap: 1.3rem; }
  .nav__theme { grid-row: 1; grid-column: 2; }
  .cv__item { grid-template-columns: 1fr; gap: .6rem; }
  .about__skills { grid-template-columns: 1fr; }
  .footer { justify-content: center; text-align: center; padding-bottom: 4.5rem; }
  /* Back button: float bottom-left so it never hides behind the taller mobile nav */
  .backbtn {
    top: auto; left: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    width: 48px; height: 48px;
    box-shadow: 0 6px 20px rgba(0,0,0,.18);
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .home .hero, .home > .home-title, .home .featured, .home .home-more, .home .panel, .home .vector { opacity: 1; transform: none; }
}

/* ---------- Résumé button + PDF viewer ---------- */
.hero__cta { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: .7rem; }
.pdfbtn {
  display: inline-flex; align-items: center; gap: .5rem;
  font: inherit; font-size: .92rem; font-weight: 600; letter-spacing: .01em;
  color: var(--bg); background: var(--fg); border: 1px solid var(--fg);
  padding: .62rem 1.25rem; border-radius: 999px; cursor: pointer;
  transition: transform .2s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.pdfbtn:hover { transform: translateY(-2px); }
a.pdfbtn { text-decoration: none; }
.pdfbtn--ghost { background: transparent; color: var(--fg); border-color: var(--line-2); }
.pdfbtn--ghost:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pdfbtn .pdfbtn__i { font-size: 1em; line-height: 1; }
.detail__section .pdfbtn { margin-top: .3rem; }

.pdfv { position: fixed; inset: 0; z-index: 900; }
.pdfv[hidden] { display: none; }
.pdfv__scrim {
  position: absolute; inset: 0; background: rgba(0,0,0,.38);
  opacity: 0; transition: opacity .35s var(--ease);
}
.pdfv.is-open .pdfv__scrim { opacity: 1; }
.pdfv__panel {
  position: absolute; top: 0; right: 0; height: 100%;
  width: min(600px, 94vw); display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--line);
  box-shadow: -12px 0 48px rgba(0,0,0,.18);
  transform: translateX(100%); transition: transform .38s var(--ease);
}
.pdfv.is-open .pdfv__panel { transform: none; }
.pdfv__bar {
  display: flex; align-items: center; gap: .8rem;
  padding: .7rem .55rem .7rem 1.1rem; border-bottom: 1px solid var(--line);
}
.pdfv__title { font-size: .82rem; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin-right: auto; }
.pdfv__tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin-left: auto; }
.pdfv__tab {
  font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer;
  padding: .3rem .72rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--faint); color: var(--muted); transition: all .2s var(--ease);
}
.pdfv__tab:hover { color: var(--fg); border-color: var(--line-2); }
.pdfv__tab.is-active { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pdfv__close {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--faint); color: var(--fg);
  font-size: 1.3rem; line-height: 1; cursor: pointer; display: grid; place-items: center;
  transition: all .2s var(--ease);
}
.pdfv__close:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pdfv__updated { font-size: .72rem; color: var(--muted); font-weight: 500; white-space: nowrap; }
.pdfv__dl {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .78rem; font-weight: 600; text-decoration: none; white-space: nowrap;
  color: var(--bg); background: var(--fg); border: 1px solid var(--fg);
  padding: .36rem .74rem; border-radius: 999px;
  transition: transform .2s var(--ease);
}
.pdfv__dl:hover { transform: translateY(-1px); }
.pdfv__dl[hidden], .pdfv__updated[hidden] { display: none; }
@media (max-width: 460px) { .pdfv__updated { display: none; } }
.pdfv__stage { flex: 1; min-height: 0; background: var(--faint); }
.pdfv__stage iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Embedded post (LinkedIn) ---------- */
.detail__embed {
  width: 100%; max-width: 552px; margin: 1.6rem auto 0; align-self: center;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--surface);
}
.detail__embed iframe { display: block; width: 100%; border: 0; }

/* ---------- YouTube embed (responsive 16:9) ---------- */
.detail__yt-fig { margin: .4rem 0 0; }
.detail__yt {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: #000;
}
.detail__yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Clickable post card (screenshot that links out) ---------- */
.detail__postcard {
  display: block; position: relative; width: 100%; max-width: 552px;
  margin: 1.6rem auto 0; align-self: center;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.detail__postcard:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.14); }
.detail__postcard img { display: block; width: 100%; height: auto; }
.detail__postcard-tag {
  position: absolute; top: 12px; right: 12px;
  font-size: .72rem; font-weight: 600; letter-spacing: .01em;
  color: #fff; background: rgba(17,17,17,.82);
  padding: .32rem .64rem; border-radius: 999px;
  opacity: 0; transform: translateY(-3px); transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.detail__postcard:hover .detail__postcard-tag { opacity: 1; transform: none; }
