/* ======================================================================
   0. DESIGN TOKENS
   These CSS custom properties ("variables") define the whole design
   system. Change a value here and it updates everywhere it's used.
   This is the single most important habit in modern CSS.
   ====================================================================== */
:root {
  /* --------------------------------------------------------------------
     COLORS — warm cream palette (editorial / magazine paper feel)
     The page sits on a soft warm beige. Text is a deep warm brown.
     The single accent (orange) is reserved for emphasis: active nav,
     eyebrow pills, CTAs, timeline dots, and the italic headline words.
     -------------------------------------------------------------------- */
  --bg:           #f5efe6;                  /* warm cream page background */
  --bg-raised:    #fbf7f0;                  /* slightly lifted panels (softer white) */
  --bg-sunken:    #ebe3d5;                  /* slightly darker beige (nav strip, footer) */
  --fg:           #2a2520;                  /* deep warm brown main text */
  --fg-muted:     #524a41;                  /* muted warm gray-brown meta/labels (AAA contrast) */
  --fg-dim:       #7a6f60;                  /* soft dim for dividers / placeholders (AA contrast) */
  --line:         rgba(42, 37, 32, 0.12);   /* hairline dividers (dark on light) */
  --accent:       #ea580c;                  /* warm orange — used sparingly */
  --accent-soft:  rgba(234, 88, 12, 0.12);
  --accent-glow:  rgba(234, 88, 12, 0.30);

  /* typography */
  --font-sans:    'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --font-serif:   'Instrument Serif', 'Iowan Old Style', Georgia, serif;

  /* size scale — a modular scale where each step is ~1.25x the previous */
  --fs-xs:   0.75rem;     /*  12px */
  --fs-sm:   0.875rem;    /*  14px */
  --fs-base: 1rem;        /*  16px */
  --fs-lg:   1.125rem;    /*  18px */
  --fs-xl:   1.375rem;    /*  22px */
  --fs-2xl:  1.75rem;     /*  28px */
  --fs-3xl:  2.5rem;      /*  40px */
  --fs-hero: clamp(2.5rem, 6vw + 1rem, 5.5rem); /* fluid hero size */

  /* layout */
  --maxw:   1180px;
  --gutter: clamp(1.25rem, 3vw, 2.5rem);
}

/* ======================================================================
   1. RESET — flatten the browser's default styles so we start from zero
   ====================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  /* Shrink the whole site by making 1rem = 14px (instead of the browser
     default of 16px). Every rem-based size in the stylesheet scales
     with this single number — the nuclear option for a quick "make
     everything smaller". Bump back up to 100% any time. */
  font-size: 87.5%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, figure {
  margin: 0;
}

ul, ol { padding: 0; list-style: none; }

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

a { color: inherit; text-decoration: none; }

/* Browsers apply `font-style: italic` to <em>, <i>, <cite>, <address>, <dfn>
   by default (user-agent stylesheet). We don't want any italic type on
   this site, so we reset them all to upright here. Individual components
   can still opt back in per case if needed. */
em, i, cite, address, dfn, var { font-style: normal; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ======================================================================
   2. BASE — the overall look of the page
   ====================================================================== */
body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  /* the page is taller than the viewport, and the canvas+grain sit
     beneath everything. we set a dark fallback color just in case. */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

/* nice text selection color */
::selection {
  background: var(--accent);
  color: #fff;
}

/* ======================================================================
   3. BACKGROUND LAYERS
   Layers, from bottom to top:
     z-index 0  : #bg-canvas (the 3D scene — particles + solar system)
     z-index 1  : .grain     (subtle film-grain overlay)
     z-index 2  : .vignette  (dark radial gradient to push bg further back)
     z-index 3  : main content
     z-index 10 : .nav (always on top of content)
     z-index 100: .cursor--dot, .cursor--ring (always on top of everything)
   ====================================================================== */
#bg-canvas {
  position: fixed;
  inset: 0;             /* shorthand for top/right/bottom/left: 0 */
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none; /* so the canvas never blocks clicks */
  opacity: 0.85;        /* slightly dim so it reads as "background", not "foreground" */
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* The vignette is a dark radial gradient overlay. Transparent in the
   center (so the particle cloud is visible there) and fading to near-
   black at the edges. This darkens the corners, focuses the eye on
   content, and makes the background feel "further away". */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(80, 60, 40, 0)    0%,
    rgba(80, 60, 40, 0.06) 55%,
    rgba(80, 60, 40, 0.16) 100%
  );
}

/* make every real content layer sit above the background.
   The nav gets a higher z-index so sticky section labels (inside main)
   can never peek through it while scrolling. */
main, .footer { position: relative; z-index: 3; }
.nav          { position: sticky;   z-index: 10; top: 0; }

/* ======================================================================
   4. NAVIGATION
   Sticky top bar with a blurred background so the page content
   shows through slightly.
   ====================================================================== */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.1rem var(--gutter);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  /* a mostly-opaque cream wash so content underneath cannot read through */
  background: rgba(245, 239, 230, 0.82);
  border-bottom: 1px solid var(--line);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
  font-weight: 500;
}

.brand__mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
  animation: pulse 2.8s ease-in-out infinite;
}

/* Favicon-as-logo in the top-left — replaces the wordmark.
   Using object-fit:contain keeps the gif crisp at its native aspect. */
.brand__favicon {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
  transition: transform 0.25s ease, filter 0.25s ease;
}
.nav__brand:hover .brand__favicon {
  transform: scale(1.06);
  filter: drop-shadow(0 0 10px var(--accent-glow));
}

@keyframes pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.85); }
}

.nav__links {
  display: flex;
  gap: 1.75rem;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--fg-muted);
}

.nav__links a {
  position: relative;
  transition: color 0.25s ease;
}
.nav__links a:hover { color: var(--fg); }
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.nav__links a:hover::after { transform: scaleX(1); }

/* ---- Hamburger button: hidden on desktop, shown on phones -----------
   A simple 3-bar icon that uses the data-nav-toggle JS hook. Tucked
   into the right side of the nav so it lines up with the links. */
.nav__toggle {
  display: none;
  width: 44px;                /* 44px = Apple HIG min tap target */
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  padding: 0;
  border-radius: 10px;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
  color: var(--fg);
  transition: background 0.2s ease;
}
.nav__toggle:hover    { background: rgba(42, 37, 32, 0.06); }
.nav__toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
/* when the nav is open we morph the 3 bars into an "X" */
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- Mobile layout: phone-and-smaller --------------------------------
   Below 680px we show the hamburger and turn .nav__links into a
   full-width dropdown panel that slides down from under the nav bar.
   The [data-open] attribute is flipped by a small vanilla-JS handler
   in script.js. */
@media (max-width: 680px) {
  .nav { position: sticky; }        /* keep the toggle visible while scrolling */
  .nav__toggle { display: inline-flex; }

  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem var(--gutter) calc(0.75rem + env(safe-area-inset-bottom, 0px));
    background: rgba(245, 239, 230, 0.96);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid var(--line);
    font-size: var(--fs-base);

    /* start hidden, animate in */
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: transform 0.22s ease, opacity 0.22s ease, visibility 0.22s;
  }
  .nav__links[data-open="true"] {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }
  .nav__links a {
    display: block;
    padding: 0.9rem 0;
    color: var(--fg);
    border-bottom: 1px solid var(--line);
  }
  .nav__links a:last-child { border-bottom: 0; }
  .nav__links a::after { display: none; }
  /* Current page link: a subtle orange leading bar so you always
     know where you are in the menu. */
  .nav__links a[aria-current="page"] {
    color: var(--accent);
    padding-left: 0.75rem;
    border-left: 2px solid var(--accent);
  }
}

/* ======================================================================
   5. HERO
   Big headline, generous padding, everything centered in a narrow col.
   ====================================================================== */
.hero {
  min-height: 92vh;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(5rem, 14vh, 10rem) var(--gutter) 6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 2rem;
}

.eyebrow__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.hero__title {
  font-size: var(--fs-hero);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 500;
  max-width: 16ch;           /* constrain line length for readability */
  margin-bottom: 1.75rem;
}

/* this is the magic serif-italic trick: we swap the font inside <em> */
.hero__title em,
.contact__headline em {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.hero__sub {
  max-width: 46ch;
  font-size: var(--fs-lg);
  color: var(--fg-muted);
  margin-bottom: 2.5rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* ======================================================================
   6. BUTTONS
   ====================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  will-change: transform;
}

.btn--primary {
  background: var(--fg);
  color: var(--bg);
}
.btn--primary:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.btn--ghost {
  border: 1px solid var(--line);
  color: var(--fg);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* scroll hint at the bottom of the hero */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: var(--gutter);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.scroll-hint__line {
  display: inline-block;
  width: 48px;
  height: 1px;
  background: var(--fg-dim);
  position: relative;
  overflow: hidden;
}
.scroll-hint__line::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--accent);
  transform: translateX(-100%);
  animation: sweep 2.5s ease-in-out infinite;
}
@keyframes sweep {
  0%   { transform: translateX(-100%); }
  50%  { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* ======================================================================
   7. SECTIONS — the shared two-column pattern (label left, content right)
   ====================================================================== */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 7rem var(--gutter);
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  border-top: 1px solid var(--line);
}

.section--wide .focus-grid { /* the 4-card grid needs the full width */ }
.section--end { border-bottom: 1px solid var(--line); }

.section__label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  position: sticky;          /* labels stick while section scrolls by */
  top: 5rem;
  align-self: start;
  height: fit-content;
}

.section__num {
  color: var(--accent);
  font-weight: 500;
}

.section__body { max-width: 60ch; }

/* shared typography inside a section body */
.lede {
  font-size: var(--fs-xl);
  line-height: 1.4;
  font-weight: 400;
  color: var(--fg);
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.section__body p {
  color: var(--fg-muted);
  margin-bottom: 1rem;
}
.section__body em {
  font-family: var(--font-serif);
  color: var(--fg);
}

@media (max-width: 820px) {
  .section {
    grid-template-columns: 1fr;
    padding: 4.5rem var(--gutter);
    gap: 1.75rem;
  }
  .section__label { position: static; flex-direction: row; gap: 1rem; }
}

/* ======================================================================
   8. FOCUS GRID — the 4 numbered cards
   ====================================================================== */
.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;                            /* thin lines between cards */
  background: var(--line);             /* the "lines" are this bg showing through */
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.focus {
  background: var(--bg);               /* covers the grid bg, leaves 1px gaps */
  padding: 2.25rem 1.75rem 2.5rem;
  position: relative;
  transition: background 0.4s ease;
}

.focus:hover {
  background: var(--bg-raised);
}

.focus__num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--accent);
  letter-spacing: 0.14em;
  margin-bottom: 1.75rem;
}

.focus__title {
  font-family: var(--font-serif);
  font-size: var(--fs-3xl);
  font-weight: 400;
  letter-spacing: -0.015em;
  margin-bottom: 0.75rem;
}

.focus__body {
  font-size: var(--fs-base);
  color: var(--fg-muted);
  max-width: 32ch;
}

@media (max-width: 720px) {
  .focus-grid { grid-template-columns: 1fr; }
}

/* ======================================================================
   9. NOW LIST
   ====================================================================== */
.now-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.now-list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--line);
  color: var(--fg-muted);
}
.now-list li:last-child { border-bottom: 0; }
.now__tag {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  padding-top: 3px;
}

/* ======================================================================
   10. POSTS LIST
   ====================================================================== */
.posts { display: flex; flex-direction: column; }
.post {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.3s ease;
}
.post:hover { padding-left: 0.5rem; }
.post__date {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--fg-muted);
  letter-spacing: 0.08em;
}
.post__title {
  font-size: var(--fs-lg);
  color: var(--fg);
  transition: color 0.25s ease;
}
.post:hover .post__title { color: var(--accent); }

@media (max-width: 620px) {
  .post { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* ======================================================================
   11. CONTACT
   ====================================================================== */
.contact__headline {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4vw + 1rem, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 500;
  margin-bottom: 1.75rem;
  max-width: 18ch;
}
.contact__links {
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  color: var(--fg-muted);
}
.contact__links a {
  color: var(--fg);
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.contact__links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ======================================================================
   12. FOOTER
   ====================================================================== */
.footer {
  /* Footer text uses --fg (deep warm near-black) for strong presence.
     --fg-dim only applies to the decorative dot separators between items. */
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem var(--gutter) 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--fg);
}
.footer__dot { color: var(--fg-dim); }                    /* dots stay subtle */

/* ======================================================================
   13. ACCESSIBILITY
   Respect users who have "reduce motion" turned on in their OS.
   ====================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* focus styles for keyboard users */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ======================================================================
   14. SHARED HELPERS USED BY THE NEW PAGES
   ====================================================================== */

/* A thin underline-on-hover link style used inline inside paragraphs */
.inline-link {
  color: var(--fg);
  border-bottom: 1px solid var(--fg-dim);
  transition: color 0.25s ease, border-color 0.25s ease;
}
.inline-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* A shorter hero for sub-pages like About / Blog where a full-viewport
   hero would waste space before the real content. */
.hero--compact {
  min-height: 0;
  padding-top: clamp(3.5rem, 10vh, 6rem);
  padding-bottom: 2.5rem;
}

/* Meta line under the blog hero ("X posts · RSS · Newsletter") */
.hero__meta {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--fg-muted);
}
.hero__meta strong { color: var(--accent); font-weight: 500; }
.hero__meta-sep    { color: var(--fg-dim); }

/* A slightly larger lede for credo-style paragraphs on the About page */
.lede--large {
  font-size: clamp(1.5rem, 2vw + 1rem, 2.1rem);
  line-height: 1.25;
  font-weight: 400;
  max-width: 24ch;
  color: var(--fg);
}
.lede--large em {
  font-family: var(--font-serif);
  color: var(--accent);
}

/* "Ad astra 🖤" style sign-off line */
.signoff {
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* Small text block under a posts list: "See all writing →" */
.section__more {
  margin-top: 1.75rem;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--fg-muted);
}

/* inline-em used in the hero sub; keeps italic color under control */
.inline-em {
  font-family: var(--font-serif);
  color: var(--fg);
}

/* ======================================================================
   15. TIMELINE (About > Past)
   A vertical list with a monospace theme tag on the left and the actual
   achievement on the right. A thin vertical line runs behind the left
   column to tie the list together visually.
   ====================================================================== */
.timeline {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.timeline__item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: clamp(1rem, 3vw, 2.25rem);
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.timeline__item:last-child { border-bottom: 0; }

.timeline__tag {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 0.35rem;
  position: relative;
}
/* a little dot in front of each tag — echoes the brand mark in the nav */
.timeline__tag::before {
  content: '';
  display: inline-block;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  margin-right: 0.55rem;
  transform: translateY(-2px);
  opacity: 0.75;
}

.timeline__title {
  font-family: var(--font-sans);
  font-size: var(--fs-xl);
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-bottom: 0.4rem;
  color: var(--fg);
}
.timeline__title em {
  font-family: var(--font-serif);
  font-weight: 400;
}

.timeline__body {
  color: var(--fg-muted);
  max-width: 56ch;
}
.timeline__body em {
  font-family: var(--font-serif);
  color: var(--fg);
}

@media (max-width: 640px) {
  .timeline__item { grid-template-columns: 1fr; gap: 0.35rem; }
  .timeline__tag { padding-top: 0; }
}

/* ======================================================================
   16. CTA PANEL (bottom of About page, bottom of Blog page)
   A soft raised card with a big statement + a row of links or a form.
   ====================================================================== */
.section--cta {
  /* override the two-column section grid for the CTA row */
  display: block;
  padding-top: 5rem;
  padding-bottom: 7rem;
}
.section--cta.section--end { border-bottom: 1px solid var(--line); }

.cta-panel {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.025),
    rgba(0, 0, 0, 0.0) 70%
  ), var(--bg-raised);
  position: relative;
  overflow: hidden;
}
/* a soft amber glow in the top-right corner */
.cta-panel::before {
  content: '';
  position: absolute;
  top: -120px; right: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  pointer-events: none;
}

.cta-panel__headline {
  font-size: clamp(2rem, 3.5vw + 1rem, 3.25rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 22ch;
  margin-bottom: 1.25rem;
  position: relative;
}
.cta-panel__headline em {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--accent);
}

.cta-panel__sub {
  color: var(--fg-muted);
  max-width: 52ch;
  margin-bottom: 2rem;
  position: relative;
}

.cta-panel__links {
  font-family: var(--font-mono);
  font-size: var(--fs-base);
  color: var(--fg-muted);
  position: relative;
}
.cta-panel__links a {
  color: var(--fg);
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.cta-panel__links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* newsletter form inside the CTA panel */
.newsletter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  max-width: 520px;
  position: relative;
}
.newsletter__label {
  position: absolute;                /* visually hidden, but accessible */
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.newsletter__input {
  flex: 1 1 220px;
  padding: 0.85rem 1.1rem;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg);
  font: inherit;
  font-size: var(--fs-base);
  transition: border-color 0.25s ease, background 0.25s ease;
}
.newsletter__input::placeholder { color: var(--fg-dim); }
.newsletter__input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.07);
}
.newsletter__submit { border: 0; }

/* ======================================================================
   17. BLOG INDEX — filter bar + year groups + post cards
   ====================================================================== */
.filter-bar {
  position: sticky;
  top: 60px;                          /* sit just below the nav */
  z-index: 5;
  background: rgba(245, 239, 230, 0.82);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--line);
}
.filter-bar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem var(--gutter);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  overflow-x: auto;           /* tags scroll horizontally on narrow screens */
  scrollbar-width: none;
}
.filter-bar__inner::-webkit-scrollbar { display: none; }

.filter-bar__label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  flex-shrink: 0;
}

.filter-bar__tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.tag-pill {
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.tag-pill:hover {
  color: var(--fg);
  border-color: var(--fg-dim);
}
.tag-pill.is-active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

/* --- the actual posts container ------------------------------------- */
.blog {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3rem var(--gutter) 2rem;
}

.blog__year { margin-bottom: 3rem; }

.blog__year-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-top: 1rem;
}
.blog__year-num {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  color: var(--accent);
}
.blog__year-line {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.blog__list {
  display: flex;
  flex-direction: column;
}

/* fade/shrink when hidden by filter */
.post-card[hidden] { display: none !important; }

.post-card {
  display: block;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.35s ease, background 0.35s ease;
}
.post-card:hover {
  padding-left: 0.6rem;
  background: linear-gradient(90deg, rgba(255,155,90,0.04), transparent 40%);
}

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  margin-bottom: 0.6rem;
}
.post-card__sep { color: var(--fg-dim); }

.post-card__title {
  font-family: var(--font-sans);
  font-size: clamp(1.35rem, 1.4vw + 0.9rem, 1.8rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 0.65rem;
  transition: color 0.25s ease;
}
.post-card:hover .post-card__title { color: var(--accent); }

.post-card__excerpt {
  color: var(--fg-muted);
  max-width: 68ch;
  margin-bottom: 0.9rem;
}
.post-card__excerpt em {
  font-family: var(--font-serif);
  color: var(--fg);
}

.post-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.post-card__tags li {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.blog__empty {
  text-align: center;
  padding: 3rem 0;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
}

/* ======================================================================
   18. ARTICLE / PROSE PAGE (single blog post)
   ====================================================================== */
.article {
  max-width: 720px;                  /* narrower column for reading comfort */
  margin: 0 auto;
  padding: clamp(2rem, 6vh, 4rem) var(--gutter) 4rem;
}

.article__header { margin-bottom: 3rem; }

.article__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 2rem;
  transition: color 0.25s ease;
}
.article__back:hover { color: var(--accent); }

.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  margin-bottom: 1.5rem;
}
.article__meta-sep { color: var(--fg-dim); }

.article__title {
  font-size: clamp(2rem, 4vw + 1rem, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 500;
  margin-bottom: 1.5rem;
  max-width: 20ch;
}
.article__title em {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--accent);
}

.article__standfirst {
  font-size: var(--fs-xl);
  line-height: 1.45;
  color: var(--fg-muted);
  max-width: 60ch;
  margin-bottom: 0.5rem;
}
.article__standfirst em {
  font-family: var(--font-serif);
  color: var(--fg);
}

/* --- .prose — long-form typography --------------------------------- */
.prose {
  font-size: 1.125rem;               /* 18px — more readable than default 16 */
  line-height: 1.75;
  color: var(--fg);
}

.prose > * + * { margin-top: 1.4em; }  /* consistent vertical rhythm */

.prose p,
.prose ol,
.prose ul { max-width: 65ch; }

.prose__lede {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--fg);
}

.prose h2 {
  font-family: var(--font-sans);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-top: 3rem;
  color: var(--fg);
}
.prose h2 em {
  font-family: var(--font-serif);
  font-weight: 400;
}

.prose h3 {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--fg);
  margin-top: 2.25rem;
}

.prose em {
  font-family: var(--font-serif);
  color: var(--fg);
}

.prose strong {
  font-weight: 600;
  color: var(--fg);
}

.prose a {
  color: var(--fg);
  border-bottom: 1px solid var(--fg-dim);
  transition: color 0.25s ease, border-color 0.25s ease;
}
.prose a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* lists */
.prose__list {
  padding-left: 1.25em;
}
.prose__list li {
  list-style: decimal;
  color: var(--fg-muted);
  padding-left: 0.3em;
  margin-bottom: 0.6em;
}
.prose__list li::marker {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* pull-quote / blockquote */
.prose__quote {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  line-height: 1.35;
  color: var(--fg);
  border-left: 2px solid var(--accent);
  padding: 0.35em 0 0.35em 1.25em;
  margin: 2.5rem 0;
  max-width: 55ch;
}
.prose__quote em {
  color: var(--accent);
}

/* figure + caption */
.prose__figure {
  margin: 2.5rem 0;
}
.prose__figure-placeholder {
  display: grid;
  place-items: center;
  padding: 3.5rem 1rem;
  border: 1px dashed var(--line);
  border-radius: 4px;
  color: var(--fg-dim);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  background: rgba(0, 0, 0, 0.025);
}
.prose__figure figcaption {
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  max-width: 55ch;
}

/* a subtle horizontal rule — three dots, centered */
.prose__rule {
  border: 0;
  height: 1px;
  margin: 3rem auto;
  width: 120px;
  background:
    radial-gradient(circle, var(--fg-dim) 1px, transparent 1px) 0 0/30px 100%;
}

.prose__postscript {
  color: var(--fg-muted);
}

/* footnotes block */
.article__footnotes {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  max-width: 65ch;
}
.article__footnotes-title {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.article__footnotes ol {
  padding-left: 1.25em;
}
.article__footnotes li {
  list-style: decimal;
  margin-bottom: 0.6em;
  padding-left: 0.3em;
}
.article__footnotes li::marker { color: var(--accent); }

/* prev/next post nav */
.article__nav {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.article__nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.article__nav-link:hover {
  border-color: var(--accent);
  background: rgba(255, 155, 90, 0.03);
  transform: translateY(-1px);
}
.article__nav-link--next { text-align: right; }

.article__nav-kicker {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.article__nav-title {
  font-size: var(--fs-base);
  color: var(--fg);
  line-height: 1.3;
}

@media (max-width: 620px) {
  .article__nav { grid-template-columns: 1fr; }
  .article__nav-link--next { text-align: left; }
}


/* ======================================================================
   19. CUSTOM CURSOR
   ----------------------------------------------------------------------
   Two layered elements:
     .cursor--dot   — a tiny amber dot that tracks the mouse exactly
     .cursor--ring  — a larger ring that follows with smooth easing

   The JS positions them every frame with translate3d(x,y,0). The
   `translate(-50%, -50%)` at the end centers them on the cursor point.

   We hide the native cursor only on fine-pointer devices (desktops).
   On touch/coarse devices the native cursor is kept intact.
   ====================================================================== */
@media (pointer: fine) {
  /* hide the native arrow on desktops so our custom cursor takes over */
  html, body { cursor: none; }
  a, button, .btn, input, textarea, label, [role="tab"] { cursor: none; }
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 100;
  /* initial off-screen position until JS moves it */
  transform: translate3d(-100px, -100px, 0);
  will-change: transform;
}

.cursor--dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(255, 155, 90, 0.8);
}

.cursor--ring {
  width: 34px;
  height: 34px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: rgba(255, 155, 90, 0.0);
  /* animate only the appearance-state changes; the position itself is
     smoothed in JS via lerp, so no CSS transition on `transform`. */
  transition:
    width 0.22s ease,
    height 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease,
    opacity 0.22s ease;
}

/* when hovering a link/button — ring grows and lightly fills */
.cursor--ring.is-hover {
  width: 56px;
  height: 56px;
  background: rgba(255, 155, 90, 0.08);
  border-color: var(--fg);
}

/* brief squeeze on click */
.cursor--ring.is-down {
  width: 26px;
  height: 26px;
  background: rgba(255, 155, 90, 0.25);
}


/* ======================================================================
   20. WORK SECTION (homepage teaser + full page)
   ----------------------------------------------------------------------
   A bento-style grid of venture cards. Hover lifts the card slightly,
   brightens the border, and reveals the arrow in the CTA.
   ====================================================================== */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.work-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.75rem 1.6rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0) 70%),
    var(--bg-raised);
  position: relative;
  overflow: hidden;
  transition:
    border-color 0.3s ease,
    transform 0.3s ease,
    background 0.3s ease;
}

.work-card::after {
  /* subtle amber corner-glow, revealed on hover */
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.work-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background:
    linear-gradient(180deg, rgba(234,88,12,0.06), rgba(255,255,255,0) 70%),
    var(--bg-raised);
}
.work-card:hover::after { opacity: 1; }

.work-card__tag {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.work-card__title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.work-card__body {
  color: var(--fg-muted);
  font-size: var(--fs-base);
  max-width: 40ch;
  flex: 1;
}

.work-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--fg-muted);
  letter-spacing: 0.06em;
}

.work-card__cta {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
  transition: color 0.25s ease;
}
.work-card:hover .work-card__cta { color: var(--accent); }

/* a wide variant for the first card ("Featured") */
.work-card--feature {
  grid-column: 1 / -1;
  min-height: 240px;
  padding: 2.5rem 2.25rem 2.25rem;
}
.work-card--feature .work-card__title {
  font-size: clamp(2.2rem, 3vw + 1rem, 3rem);
}
.work-card--feature .work-card__body { max-width: 52ch; font-size: var(--fs-lg); }

@media (max-width: 720px) {
  .work-grid { grid-template-columns: 1fr; }
  .work-card--feature { min-height: 0; padding: 1.75rem 1.5rem 1.5rem; }
}

/* On the dedicated work.html page, the grid wants to use the full
   section width, not the narrow .section__body (60ch) width. */
.section__body--wide { max-width: none; }
.section--wide .section__body { max-width: none; }


/* ======================================================================
   21. NAV v2 — centered (benjaminarya.com pattern)
   ----------------------------------------------------------------------
   The existing `.nav` used `justify-content: space-between` (brand left,
   links right). Ben's nav is centered. We switch to a 3-column grid:

     [ 1fr spacer | auto links | 1fr spacer ]

   Putting the brand inside the first spacer with `justify-self: start`
   keeps it pinned left while the middle column stays perfectly centered
   in the viewport regardless of brand width.

   We also add an active-page indicator using the `aria-current="page"`
   attribute that's already in the HTML — semantic + zero extra markup.
   ====================================================================== */
.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.nav__brand  { justify-self: start; }
.nav__links  { justify-self: center; gap: 2.25rem; }

/* active page: the link that matches the current URL is purple */
.nav__links a[aria-current="page"] { color: var(--accent); }
.nav__links a[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--accent);
}

/* on narrow screens, drop the right spacer + let flex handle it */
@media (max-width: 820px) {
  .nav { grid-template-columns: auto 1fr; }
  .nav__links {
    justify-self: end;
    gap: 1.25rem;
    font-size: 0.8rem;
    overflow-x: auto;
    scrollbar-width: none;
    max-width: 100%;
  }
  .nav__links::-webkit-scrollbar { display: none; }
}


/* ======================================================================
   22. EYEBROW PILL (purple capsule above the hero headline)
   ----------------------------------------------------------------------
   Used on every page's hero. An inline-flex pill with a small icon slot
   on the left and a row of comma-separated keywords. It replaces the
   older `.eyebrow` text-only line — we keep both so sub-pages that
   haven't been upgraded yet still look correct.
   ====================================================================== */
.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--accent-soft);
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  margin-bottom: 2rem;
}

.eyebrow-pill__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}


/* ======================================================================
   23. HERO SPLIT — two-column hero (text left, portrait+orbit right)
   ----------------------------------------------------------------------
   Benjamin Arya's homepage hero is a classic two-column layout.
   - left: eyebrow → headline → body → CTAs
   - right: a circular portrait with institution logos "floating"
            around it on a subtle parallax/drift animation.

   On mobile we stack: portrait above text.
   ====================================================================== */
.hero-split {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4rem, 10vh, 7rem) var(--gutter) 5rem;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-split__title {
  font-size: clamp(2.2rem, 3.5vw + 1rem, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin-bottom: 1.5rem;
  max-width: 16ch;
}
.hero-split__title em {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.hero-split__body {
  max-width: 44ch;
  font-size: var(--fs-lg);
  color: var(--fg-muted);
  margin-bottom: 2rem;
}
.hero-split__body em {
  font-family: var(--font-serif);
  color: var(--fg);
}

/* When we have the split layout, the CTA group already exists — just a
   small override for breathing room */
.hero-split .hero__cta { margin-top: 0.5rem; }

/* ---- long-bio variant ---------------------------------------------
   When the left column holds the full bio (title + paragraphs + bullet
   list + closing + CTAs), the portrait would float awkwardly centered
   against a tall text column. This modifier top-aligns the portrait
   instead, so it reads like an author photo at the top of an article.
   A tiny sticky position keeps the portrait in view as you scroll past
   long text — remove if you prefer it anchored.                        */
.hero-split--bio { align-items: start; }
.hero-split--bio .hero-split__title {
  max-width: 20ch;
  margin-bottom: 1.25rem;
  /* bump the title a touch larger on the home page — it's a proper
     statement piece and should read loud. fluid clamp keeps it sane
     from mobile through ultra-wide screens. */
  font-size: clamp(2.6rem, 4.5vw + 1rem, 4.4rem);
}
/* One prose style for intro paragraphs and bullet lines — same family,
   size, and rhythm so the bio reads as one continuous voice.
   Size was 1.2rem; dialed down to 1.05rem (≈15px at our 14px root)
   for a calmer, more readable column width. */
.hero-split--bio .hero-split__body,
.hero-split--bio .bio-list li {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: normal;
}

.hero-split--bio .hero-split__body {
  max-width: 58ch;
  margin-bottom: 1.3rem;
  color: var(--fg);            /* slightly stronger than muted — it's prose */
}
.hero-split--bio .hero-split__portrait {
  position: sticky;
  top: clamp(5rem, 12vh, 7rem);
}

/* the small "A FEW THINGS ABOUT ME" overline above the bullet list */
.hero-split__subhead {
  font-family: var(--font-mono);
  /* Was fs-xs (tiny eyebrow). Bumped to lg so "A few things about me"
     reads as a real mini-heading above the bullet list. */
  font-size: var(--fs-lg);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 1.75rem 0 1rem;
}

/* the bullet list itself. No round disc markers — instead a small
   orange dash sits in the left gutter for each item, matching the
   accent colour and feeling more editorial than default bullets. */
.bio-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 58ch;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}
.bio-list li {
  /* No visible bullet marker — the items read as short paragraphs.
     The `gap` on the parent creates the rhythm between entries.
     Font size / line-height for the home bio come from
     `.hero-split--bio .bio-list li` so they match `.hero-split__body`. */
  color: var(--fg);
}
.bio-list em {
  /* Serif display font (still non-italic after the italic pass) —
     slight visual distinction for emphasized words without colour shift. */
  font-family: var(--font-serif);
  color: var(--fg);
}

/* --- Slider fits inside the hero-split right column -----------------
   On the home page the slider replaces the standalone portrait. We
   scope a few overrides so the big default slider (520px-wide block
   with external arrows) adapts to the narrower hero column and feels
   like a natural portrait-sized card rather than a standalone page-
   level carousel. Arrows jump INSIDE the frame here because there
   isn't room for external gutters. */
.hero-split__portrait .slider {
  --slider-w: 100%;                /* fill the portrait container */
  --slider-aspect: 4 / 5;          /* classic editorial portrait ratio */
  --slider-radius: 22px;
  padding: 0;                      /* no external arrow gutters */
}
.hero-split__portrait .slider__arrow {
  /* half-transparent cream pill instead of a full opaque card */
  background: rgba(251, 247, 240, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hero-split__portrait .slider__arrow--prev { left:  0.6rem; }
.hero-split__portrait .slider__arrow--next { right: 0.6rem; }

@media (max-width: 820px) {
  .hero-split {
    grid-template-columns: 1fr;
    padding-top: clamp(2rem, 6vh, 4rem);
  }
  .hero-split__portrait { order: -1; justify-self: center; }
  .hero-split--bio .hero-split__portrait {
    position: static;              /* turn off sticky on mobile */
  }
}


/* ======================================================================
   24. PORTRAIT + PLANETARY LOGO ORBIT (true 3D)
   ----------------------------------------------------------------------
   The right column of the hero. A circular portrait sits at the center
   and a ring of institution/company logos orbits around it HORIZONTALLY
   — like planets around the sun. When a logo rotates around the back,
   it is occluded by the photo (because its 3D Z is negative) AND its
   back face is hidden (`backface-visibility: hidden`) so we never see
   a mirror. The effect: logos glide in from one side, orbit to the
   other, and disappear behind the photo before reappearing.

   Key CSS ingredients:
     • `perspective` on the outermost container → turns the browser into
        a 3D camera (without it, Z values are flattened).
     • `transform-style: preserve-3d` on every ancestor → tells the browser
        to keep children in 3D space rather than collapsing them into a
        flat layer. Required at each nesting level.
     • `backface-visibility: hidden` on each logo → when it rotates past
        90°, the back face is culled instead of showing a mirrored copy.
     • A single @keyframes (orbit-ring) that sweeps rotateY 0° → 360°.
        Each logo has a different `--angle` offset so they're spaced
        around the ring and all orbit in lockstep.
   ====================================================================== */
.hero-split__portrait {
  position: relative;
  /* Smaller cap (was 440px) makes the slider read as a true portrait
     card next to the long bio, not a hero-sized photo. */
  width: min(100%, 340px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  /* perspective value = virtual distance from viewer to the 3D scene.
     Smaller numbers = stronger (more dramatic) depth. 1200px is mild. */
  perspective: 1400px;
  perspective-origin: 50% 50%;
  transform-style: preserve-3d;
}

.portrait__photo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68%;
  height: 68%;
  /* center it AND lift it very slightly forward so z-fighting with
     edge-on logos (at Z=0) never happens. 1px is enough. */
  transform: translate3d(-50%, -50%, 1px);
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #d9cfbf, #c3b4a0);
  box-shadow:
    0 0 0 1px rgba(42, 37, 32, 0.10),
    0 10px 40px rgba(42, 37, 32, 0.15),
    0 0 60px var(--accent-glow);
  /* The photo is a flat element in a 3D scene. We tell the browser
     NOT to treat it as a preserve-3d container — it's a solid plane,
     and that helps depth sorting against the orbiting logos. */
  z-index: 2;
}

.portrait__photo--placeholder {
  display: grid;
  place-items: center;
  color: var(--fg);
  font-family: var(--font-serif);
  font-size: 6rem;
  letter-spacing: -0.04em;
}

/* --- THE ORBIT: a 3D group that spins around the Y axis ------------- */
.portrait__orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  /* the orbit is anchored at a single 3D point (the center of the ring).
     We give it zero size and let each logo reach outward with translateZ. */
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  animation: orbit-ring 28s linear infinite;
}

@keyframes orbit-ring {
  from { transform: rotateY(0deg);   }
  to   { transform: rotateY(360deg); }
}

/* --- A SINGLE LOGO on the ring ------------------------------------
   Each logo gets a static --angle (its offset around the ring) and a
   --radius (how far out from the center). The combined transform is:

       rotateY(angle) translateZ(radius)

   …which places the logo somewhere on a circle of `radius` around the
   Y axis. When the parent .portrait__orbit spins, the whole ring spins
   with it — so every logo gracefully orbits.

   `backface-visibility: hidden` + preserve-3d on the parent = when a
   logo rotates past 90° (its back face toward the camera), it vanishes.
   That's what makes the "disappear behind the photo" effect look clean.
*/
.portrait__logo {
  --angle: 0deg;
  --radius: 200px;
  --size: 66px;
  position: absolute;
  /* sit AT the orbit's 3D anchor point, then jump outward */
  top: 0;
  left: 0;
  width: var(--size);
  height: var(--size);
  transform:
    translate(-50%, -50%)
    rotateY(var(--angle))
    translateZ(var(--radius));
  backface-visibility: hidden;
  border-radius: 14px;
  overflow: hidden;
  background: var(--logo-bg, #ffffff);
  box-shadow:
    0 8px 22px rgba(42, 37, 32, 0.18),
    inset 0 0 0 1px rgba(42, 37, 32, 0.06);
  transition: box-shadow 0.3s ease;
}

/* The actual image inside the tile */
.portrait__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;                       /* breathing room around each logo */
  display: block;
}

/* On hover-capable devices, a subtle purple glow when cursor nears.
   Hover only works while the logo is on the front half of the orbit
   anyway — which is the whole point. */
@media (hover: hover) {
  .portrait__logo:hover {
    box-shadow:
      0 10px 26px rgba(42, 37, 32, 0.22),
      0 0 0 1px var(--accent),
      0 0 22px var(--accent-glow);
  }
}

/* Accessibility: users who asked their OS to reduce motion should not
   see anything spinning. We park the ring at its starting angle. */
@media (prefers-reduced-motion: reduce) {
  .portrait__orbit { animation: none; }
}

/* On narrow screens we shrink the radius and the logo size so everything
   still fits inside the portrait column. */
@media (max-width: 820px) {
  .portrait__logo { --radius: 150px; --size: 52px; }
}


/* ======================================================================
   25. SKILL PILLS (About page badge row)
   ----------------------------------------------------------------------
   Row of small rounded tags describing areas of expertise.
   Similar to the filter tag-pills but slightly softer.
   ====================================================================== */
.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
}
.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.03);
  color: var(--fg);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.03em;
}
.skill-pill__icon { width: 12px; height: 12px; color: var(--accent); }


/* ======================================================================
   26. ICON SECTIONS (About page body)
   ----------------------------------------------------------------------
   Each section is an icon + heading on one row, then a body paragraph
   (or bullet list) below. Replaces the numbered section labels on
   pages where the numbered rhythm would feel too formal.
   ====================================================================== */
.icon-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem var(--gutter);
}
.icon-section + .icon-section {
  border-top: 1px solid var(--line);
  padding-top: 2.5rem;
  margin-top: 1rem;
}
.icon-section__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.icon-section__icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex-shrink: 0;
}
.icon-section__title {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.icon-section__body {
  color: var(--fg-muted);
  font-size: var(--fs-base);
  line-height: 1.7;
}
.icon-section__body p + p { margin-top: 0.8rem; }
.icon-section__body em {
  font-family: var(--font-serif);
  color: var(--fg);
}
.icon-section__body ul {
  margin-top: 0.8rem;
  padding-left: 1rem;
}
.icon-section__body li {
  list-style: disc;
  margin-left: 0.25rem;
  margin-bottom: 0.35rem;
}
.icon-section__body li::marker { color: var(--accent); }


/* ======================================================================
   27. ABOUT FOOTER GRID — 3 columns (Education / Beyond Lab / Languages)
   ====================================================================== */
.about-grid-3 {
  max-width: var(--maxw);
  margin: 3rem auto 0;
  padding: 3rem var(--gutter) 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  border-top: 1px solid var(--line);
}
.about-col__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}
.about-col__icon { width: 18px; height: 18px; color: var(--accent); }
.about-col__title {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.005em;
}
.about-col__item {
  margin-bottom: 1rem;
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  line-height: 1.55;
}
.about-col__item strong {
  display: block;
  color: var(--fg);
  font-weight: 500;
  margin-bottom: 0.15rem;
}
.about-col__item em {
  display: block;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.75rem;
  color: var(--fg-dim);
  margin-top: 0.2rem;
  letter-spacing: 0.02em;
}

@media (max-width: 820px) {
  .about-grid-3 { grid-template-columns: 1fr; gap: 2rem; }
}


/* ======================================================================
   28. EXPERIENCE PAGE — 2-col layout (timeline | sidebar)
   ====================================================================== */
.experience {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3rem var(--gutter) 4rem;
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}

.experience__title {
  font-family: var(--font-sans);
  font-size: clamp(1.75rem, 2.5vw + 1rem, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

/* --- the vertical timeline ----------------------------------------- */
.timeline-v {
  position: relative;
  padding-left: 1.75rem;
}
.timeline-v::before {
  content: '';
  position: absolute;
  left: 0.4rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.tl-entry {
  position: relative;
  padding: 0 0 2rem 0;
}
.tl-entry::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 0.55rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px var(--bg), 0 0 12px var(--accent-glow);
}
.tl-date {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}
.tl-title {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.2rem;
  letter-spacing: -0.01em;
}
.tl-org {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--fg-muted);
  margin-bottom: 0.6rem;
}
.tl-org__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--logo-bg, var(--fg-dim));
}
.tl-body {
  color: var(--fg-muted);
  font-size: var(--fs-sm);
  line-height: 1.6;
  max-width: 52ch;
}

/* --- the sidebar with grouped info cards --------------------------- */
.sidebar-card {
  margin-bottom: 2rem;
}
.sidebar-card__head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}
.sidebar-card__icon { width: 16px; height: 16px; color: var(--accent); }
.sidebar-card__title {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.005em;
}
.sidebar-card__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.sidebar-card__item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  line-height: 1.45;
}
.sidebar-card__item::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 0.55rem;
  flex-shrink: 0;
  opacity: 0.75;
}
.sidebar-card__item strong {
  display: block;
  color: var(--fg);
  font-weight: 500;
}
.sidebar-card__item em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fg-dim);
  letter-spacing: 0.04em;
  margin-left: 0.35rem;
}

@media (max-width: 900px) {
  .experience { grid-template-columns: 1fr; }
}


/* ======================================================================
   29. PROJECTS PAGE — filter pills + 3-column project grid
   ====================================================================== */
.projects {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem var(--gutter) 4rem;
}

.projects__intro {
  text-align: center;
  max-width: 48ch;
  margin: 0 auto 2.5rem;
  color: var(--fg-muted);
  font-size: var(--fs-lg);
  line-height: 1.55;
}

.projects__filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 3rem;
}
/* reuses .tag-pill from the blog filter — see section 17.
   We only override the "is-active" color to be purple now. */
.tag-pill.is-active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 900px) { .projects__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .projects__grid { grid-template-columns: 1fr; } }

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
  color: inherit;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}
.project-card[hidden] { display: none; }

.project-card__art {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 3rem;
  color: #fff;
  background: var(--art-bg, linear-gradient(135deg, #4b2e83, #7a449a));
  position: relative;
}

/* Full-width logo/banner inside the card art area (e.g. Telos Circle). */
.project-card__art--banner {
  background: #0a0a0a;
}
/* Longevity Biotech Fellowship — matches official lockup background. */
.project-card__art--brand-lbf {
  background: #001d86;
}
/* Light band for paper figures / heatmaps so labels stay legible. */
.project-card__art--figure {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
}
.project-card__art-banner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 0.5rem 0.85rem;
  box-sizing: border-box;
}

/* Photo hero in the card art area (e.g. Residency Vienna aerial). */
.project-card__art--photo {
  background: var(--bg-sunken);
}
.project-card__art-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.project-card__category {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(251, 247, 240, 0.88);
  backdrop-filter: blur(8px);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.project-card__category-icon { width: 10px; height: 10px; color: var(--accent); }

.project-card__body {
  padding: 1.2rem 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}
.project-card__title {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.project-card__desc {
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  line-height: 1.55;
  flex: 1;
}
.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.25rem;
}
.project-card__tags li {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-muted);
}
.project-card__cta {
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
a.project-card__cta {
  text-decoration: none;
  align-self: flex-start;
}
a.project-card__cta:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.project-card__cta--muted {
  color: var(--fg-muted);
  cursor: default;
}
.project-card__cta-row {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: baseline;
}
.project-card__cta-row .project-card__cta {
  margin-top: 0;
}


/* ======================================================================
   30. PODCASTS PAGE — same card pattern, 2-col grid
   ====================================================================== */
.podcasts {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem var(--gutter) 4rem;
}
.podcasts__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
@media (max-width: 720px) { .podcasts__grid { grid-template-columns: 1fr; } }


/* ======================================================================
   31. CONTACT PAGE
   ====================================================================== */
.contact-page {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(2rem, 6vh, 4rem) var(--gutter) 4rem;
  text-align: center;
}
.contact-page__title {
  font-size: clamp(2rem, 4vw + 1rem, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 1.25rem;
}
.contact-page__title em {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--accent);
}
.contact-page__sub {
  color: var(--fg-muted);
  font-size: var(--fs-lg);
  max-width: 52ch;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}
@media (max-width: 620px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-raised);
  color: var(--fg);
  text-align: left;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.contact-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.contact-card__icon {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  flex-shrink: 0;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 10px;
}
.contact-card__icon svg { width: 16px; height: 16px; }
.contact-card__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  display: block;
  margin-bottom: 0.1rem;
}
.contact-card__value {
  font-size: var(--fs-base);
  color: var(--fg);
}


/* ======================================================================
   31b. CONTACT FORM ("Send a Message" panel)
   ----------------------------------------------------------------------
   A dark raised card with three labelled fields and a full-width submit
   button. Icons sit inside each field on the left (top-aligned for the
   textarea) — a common convention that tells the reader at a glance
   which type of value the field expects.
   ====================================================================== */
.message-form {
  max-width: 540px;
  margin: 3rem auto 0;
  padding: clamp(1.75rem, 3vw, 2.25rem);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: left;
}

.message-form__title {
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-align: center;
  margin-bottom: 1.75rem;
}

.form-field {
  margin-bottom: 1.1rem;
}

.form-field__label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--fg-muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
}

.form-field__wrap {
  position: relative;
}

/* The icon sits absolutely inside the input so the text starts to the
   right of it. pointer-events:none means clicks pass through to the
   actual input underneath. */
.form-field__icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--fg-dim);
  pointer-events: none;
}
/* For a textarea, we want the icon anchored near the top-left instead
   of vertically centered in a multi-line box. */
.form-field__icon--top {
  top: 0.85rem;
  transform: none;
}

.form-field__input,
.form-field__textarea {
  width: 100%;
  padding: 0.8rem 0.95rem 0.8rem 2.5rem;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--fg);
  font: inherit;
  font-size: var(--fs-base);
  transition: border-color 0.2s ease, background 0.2s ease,
              box-shadow 0.2s ease;
}
.form-field__input::placeholder,
.form-field__textarea::placeholder {
  color: var(--fg-dim);
}
.form-field__input:focus,
.form-field__textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.07);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-field__textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.5;
}

/* ---------- Submit button ---------- */
.message-form__submit {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.95rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  background: rgba(0, 0, 0, 0.03);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease,
              color 0.25s ease, transform 0.2s ease;
}
.message-form__submit:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}
.message-form__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Submission status line ---------- */
.form-status {
  text-align: center;
  margin-top: 1rem;
  min-height: 1.35rem;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--fg-muted);
}
.form-status--success { color: #0a8a4f; }
.form-status--error   { color: #c0392b; }


/* ======================================================================
   32. GENERIC PAGE HERO CENTERED
   Smaller, centered hero used on Experience/Projects/Podcasts/Contact.
   ====================================================================== */
.page-hero {
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(2.5rem, 8vh, 5rem) var(--gutter) 2rem;
}
.page-hero .eyebrow-pill { margin-bottom: 1.5rem; }
.page-hero__title {
  font-size: clamp(2rem, 4vw + 1rem, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.page-hero__title em {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--accent);
}
.page-hero__sub {
  color: var(--fg-muted);
  max-width: 52ch;
  margin: 0 auto;
  font-size: var(--fs-lg);
  line-height: 1.55;
}


/* ======================================================================
   33. PHOTO SLIDER (About page)
   ----------------------------------------------------------------------
   An auto-rotating carousel that looks like a large profile-picture card.
   One slide visible at a time; others sit stacked behind it at opacity:0.
   On each advance the active slide fades out and the next one fades in
   (crossfade transition).

   Anatomy:
     .slider-wrap    — outer section for centring on the page
       .slider          — positioning context for arrows + dots
         .slider__frame  — the rounded box that CROPS the photo
           .slider__track— wrapping element; kept for semantic clarity
             .slider__slide   — one per photo, absolutely stacked
                 img
                 .slider__caption (tiny label pinned bottom-left)
         .slider__arrow  — prev / next round buttons on the sides
         .slider__dots   — little dots below the frame
   ====================================================================== */

.slider-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem var(--gutter) 5rem;
  display: flex;
  justify-content: center;
}

.slider {
  /* CSS custom properties scoped to THIS component: easier to tune
     without scrolling back up to :root. Change one number here and
     the slider reshapes — sizes, roundness, speeds, etc. */
  --slider-w:       min(92vw, 520px);     /* max width of the photo card */
  --slider-aspect:  4 / 5;                /* portrait 4:5 — good for people */
  --slider-radius:  28px;                 /* corner roundness */
  --slider-fade:    0.9s;                 /* crossfade duration */

  position: relative;
  width: var(--slider-w);
  /* let the slider breathe for arrows — outside the frame, inside the box */
  padding: 0 2.5rem;
  outline: none;                           /* focus-ring replaced below */
}

/* ------- the clipped box that shows exactly one photo at a time ------ */
.slider__frame {
  position: relative;
  width: 100%;
  aspect-ratio: var(--slider-aspect);
  border-radius: var(--slider-radius);
  overflow: hidden;                        /* crops images to the rounded box */
  background: var(--bg-sunken);            /* shown briefly before img loads */
  box-shadow:
    0 20px 50px -20px rgba(42, 37, 32, 0.35),
    0 0 0 1px rgba(42, 37, 32, 0.08);
}

/* track is just a semantic wrapper — absolute children stack inside */
.slider__track {
  position: absolute;
  inset: 0;
}

/* ------- a single slide — stacked, crossfaded via opacity ------------ */
.slider__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;                       /* screen readers skip hidden slides */
  transition:
    opacity var(--slider-fade) ease,
    visibility 0s linear var(--slider-fade);
}
.slider__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition:
    opacity var(--slider-fade) ease,
    visibility 0s;
}

.slider__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;                        /* fills the box, crops overflow */
  object-position: center;
  display: block;
  /* a very gentle scale on the active slide gives the rotation a sense
     of depth — like a breath in-and-out between images */
  transform: scale(1.02);
  transition: transform 6s ease;
}
.slider__slide.is-active img {
  transform: scale(1.0);
}

/* ------- caption overlay in the bottom-left of every slide ----------- */
.slider__caption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  padding: 0.4rem 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(10, 14, 20, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 999px;
}

/* ------- prev / next arrow buttons on the sides of the slider -------- */
.slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  background: var(--bg-raised);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(42, 37, 32, 0.18);
  transition: background 0.2s ease, color 0.2s ease,
              transform 0.2s ease, border-color 0.2s ease;
}
.slider__arrow:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.06);
}
.slider__arrow:active {
  transform: translateY(-50%) scale(0.96);
}
.slider__arrow svg { width: 1rem; height: 1rem; }
.slider__arrow--prev { left:  0; }
.slider__arrow--next { right: 0; }

/* ------- dots below the frame --------------------------------------- */
.slider__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}
.slider__dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 50%;
  background: var(--fg-dim);
  opacity: 0.45;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.slider__dot:hover { opacity: 0.85; transform: scale(1.2); }
.slider__dot.is-active {
  background: var(--accent);
  opacity: 1;
  transform: scale(1.3);
}

/* ------- focus ring for keyboard users ------------------------------- */
.slider:focus-visible .slider__frame {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* On narrow screens the arrows sit INSIDE the photo frame (semi-transparent)
   so the carousel never overflows. */
@media (max-width: 520px) {
  .slider {
    padding: 0;
  }
  .slider__arrow {
    background: rgba(251, 247, 240, 0.85);
    backdrop-filter: blur(6px);
  }
  .slider__arrow--prev { left:  0.6rem; }
  .slider__arrow--next { right: 0.6rem; }
}

/* Accessibility: users with reduced-motion turned on get instant swaps
   instead of smooth crossfades (the JS also disables auto-rotation). */
@media (prefers-reduced-motion: reduce) {
  .slider__slide,
  .slider__slide img {
    transition: none;
  }
}

/* ======================================================================
   34. iPHONE / SMALL-SCREEN POLISH
   ----------------------------------------------------------------------
   Everything below only kicks in on phone-sized viewports and/or iOS.
   The idea: make the site feel native on iPhone without affecting the
   desktop layout at all.

   What we handle here:
     1. Horizontal-overflow guard (no surprise scrollbars).
     2. Safe-area insets for the notch / dynamic island / home bar.
     3. Tap-highlight + touch-action tweaks for snappier taps.
     4. Touch targets at least 44x44 (Apple HIG minimum).
     5. Typography that fits smaller screens without manual edits.
     6. A couple of long-bio / slider tweaks so nothing clips.
   ====================================================================== */

/* 1. Never allow horizontal scroll on small screens. */
html, body { overflow-x: hidden; }

/* 2. iPhone notch / home indicator safe areas.
   `env(safe-area-inset-*)` returns the extra space the OS reserves for
   the notch / home indicator on iOS. We add it on top of existing
   padding so content stays clear of both. */
.nav {
  padding-top:    calc(1.1rem + env(safe-area-inset-top, 0px));
  padding-left:   max(var(--gutter), env(safe-area-inset-left));
  padding-right:  max(var(--gutter), env(safe-area-inset-right));
}
.footer {
  padding-bottom: calc(3rem + env(safe-area-inset-bottom, 0px));
  padding-left:   max(var(--gutter), env(safe-area-inset-left));
  padding-right:  max(var(--gutter), env(safe-area-inset-right));
}

/* 3. Snappier taps on touch devices.
   - Remove the grey tap flash iOS adds to every <a>/<button>.
   - `touch-action: manipulation` removes the 300ms double-tap zoom delay.
   - Prevent iOS Safari from auto-sizing text on orientation change. */
a, button, .btn, .nav__toggle {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
html { -webkit-text-size-adjust: 100%; }

/* 4. Make sure interactive elements clear the 44px Apple-HIG target
   on phones (buttons already do; this covers small text links in nav). */
@media (max-width: 680px) {
  .nav__links a { min-height: 44px; display: flex; align-items: center; }
}

/* 5. Phone-only typography + spacing tweaks. */
@media (max-width: 560px) {
  /* Big cream page padding can eat the whole viewport on iPhone SE.
     Tighten the horizontal gutter a touch. */
  :root { --gutter: 1.1rem; }

  /* The homepage hero title uses a clamp() that scales with viewport.
     Below 360px it was still a little too loud — cap the smallest size. */
  .hero__title,
  .hero-split--bio .hero-split__title { line-height: 1.08; }

  /* Portrait slider: shrink one more step on phones so it never forces
     sideways scrolling even on the narrowest iPhone (320px-ish). */
  .hero-split__portrait { width: min(100%, 300px); }

  /* Bio prose: drop a hair in size and gutter for a calmer column. */
  .hero-split--bio .hero-split__body,
  .hero-split--bio .bio-list li { font-size: 1rem; line-height: 1.6; }

  /* Footer: stack items vertically so the mono text never wraps weirdly
     across two lines half-way through a word. */
  .footer { gap: 0.35rem; font-size: 0.7rem; }

  /* Buttons: full-width-ish CTAs read much better on a thumb. */
  .hero__cta .btn { flex: 1 1 auto; justify-content: center; }
}

/* 6. Media never leaks outside its container.
   Useful for logos / screenshots in Experience + Projects cards. */
img, svg, video { max-width: 100%; height: auto; }
