/* ===================================================================
   Nikola Knežević — personal site
   Multi-page, Apple-inspired polish
   =================================================================== */

:root {
  --bg:         #070a14;
  --bg-soft:    #0a0e1a;
  --bg-panel:   #0e1424;
  --bg-glass:   rgba(10, 14, 26, 0.55);
  --ink:        #eef1f8;
  --ink-soft:   #a4acc0;
  --ink-faint:  #6a7290;
  --line:       rgba(232, 236, 245, 0.07);
  --line-strong:rgba(232, 236, 245, 0.16);

  --amber:      #e8b75a;
  --amber-2:    #f6c66d;
  --cyan:       #7fb9d1;

  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body:    "General Sans", "Inter", system-ui, -apple-system, sans-serif;

  --container: 1240px;
  --container-narrow: 900px;
  --gutter: clamp(20px, 4vw, 72px);

  --radius-sm:  8px;
  --radius:     14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --shadow-soft: 0 1px 2px rgba(0,0,0,0.2), 0 18px 60px -30px rgba(0, 0, 0, 0.55);
  --shadow-lift: 0 4px 14px rgba(0,0,0,0.25), 0 30px 90px -40px rgba(0, 0, 0, 0.7);

  /* Apple-ish easing curves */
  --ease:       cubic-bezier(0.22, 1, 0.36, 1);
  --ease-swift: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-hero:  cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* -------- Base -------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
/* Prevent any accidental overflowing element from widening the layout viewport
   (and on iOS, widening the visual viewport past `width=device-width`). */
html, body { overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--amber);
  letter-spacing: 0.01em;
}
strong { color: #fff; font-weight: 600; }
::selection { background: var(--amber); color: #0a0e1a; }

/* -------- Page transition curtain -------- */
.page-fade {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.page-fade.is-ready {
  opacity: 1;
  transform: none;
}
.page-fade.is-leaving {
  opacity: 0;
  transform: translateY(-14px);
  transition: opacity 0.35s var(--ease), transform 0.4s var(--ease);
}

/* Reduced motion — disable transitions */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
  .page-fade { opacity: 1 !important; transform: none !important; }
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--amber), var(--amber-2) 60%, #fff6d6);
  box-shadow: 0 0 10px rgba(232, 183, 90, 0.6);
  z-index: 200;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* Starfield canvas — global, with a gentle scroll-linked fade so the cosmos
   is present on every page but gracefully bows out as you reach the end. */
#starfield {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  z-index: -2;
  pointer-events: none;
  opacity: var(--starfield-opacity, 1);
  transition: opacity 420ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity;
}

/* Cursor glow removed */

/* ================= NAVIGATION ================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  z-index: 100;
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease), padding 0.4s var(--ease), backdrop-filter 0.5s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: var(--bg-glass);
  backdrop-filter: saturate(1.4) blur(22px);
  -webkit-backdrop-filter: saturate(1.4) blur(22px);
  border-bottom-color: var(--line);
  padding: 12px var(--gutter);
}
.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}
.nav__logo svg { color: var(--amber); flex-shrink: 0; }
.nav__links {
  display: flex;
  gap: 30px;
  font-size: 14px;
  color: var(--ink-soft);
}
.nav__links a {
  position: relative;
  transition: color 0.25s var(--ease);
  padding: 4px 0;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--amber);
  transition: width 0.35s var(--ease);
}
.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after { width: 100%; }
.nav__links a[aria-current="page"] { color: var(--ink); }

.nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.nav__icon:hover { color: var(--amber); border-color: var(--amber); transform: translateY(-1px); }
.nav__cv {
  font-size: 13px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: all 0.25s var(--ease);
}
.nav__cv:hover { border-color: var(--amber); color: var(--amber); }

/* Mobile nav */
.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
@media (max-width: 880px) {
  .nav__links { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav.is-open .nav__links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    padding: 24px var(--gutter);
    background: rgba(7, 10, 20, 0.95);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    gap: 18px;
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open .nav__links a { font-size: 16px; }
}

/* ================= PAGE HEADER ================= */
.page-head {
  padding: 180px var(--gutter) 40px;
  max-width: var(--container);
  margin: 0 auto;
}
.page-head__eyebrow {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 24px;
}
.page-head__eyebrow span { color: var(--amber); margin-right: 6px; }
.page-head__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(44px, 8vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 32px;
  color: var(--ink);
}
.page-head__lede {
  max-width: 60ch;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
}

/* ================= HERO (home) ================= */
.hero {
  position: relative;
  padding: 180px var(--gutter) 100px;
  max-width: var(--container);
  margin: 0 auto;
}
.hero__meta {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 44px;
}
.tag::before { content: '◎ '; color: var(--amber); }
.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(44px, 8.5vw, 128px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 40px;
  color: var(--ink);
}
.hero__title .line {
  display: block;
  opacity: 0;
  transform: translateY(26px);
  animation: fadeUp 0.95s var(--ease-hero) forwards;
}
.hero__title .line:nth-child(1) { animation-delay: 0.10s; }
.hero__title .line:nth-child(2) { animation-delay: 0.25s; }
.hero__title .line:nth-child(3) { animation-delay: 0.40s; }

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

.hero__sub {
  max-width: 620px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 56px;
  opacity: 0;
  animation: fadeUp 0.95s var(--ease-hero) 0.55s forwards;
}
.hero__cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 72px;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease-hero) 0.65s forwards;
}

.hero__footer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  animation: fadeUp 0.9s var(--ease-hero) 0.75s forwards;
}
.hero__stat { min-width: 0; }
.stat__num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  color: var(--amber);
  line-height: 1;
  display: block;
  margin-bottom: 8px;
}
.stat__label {
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.45;
}
@media (max-width: 640px) {
  .hero__footer { grid-template-columns: repeat(2, 1fr); }
}

.hero__image-wrap {
  margin-top: 80px;
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 16/9;
  border: 1px solid var(--line);
  opacity: 0;
  animation: fadeUp 1.1s var(--ease-hero) 0.85s forwards;
  box-shadow: var(--shadow-soft);
}
.hero__image-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 12s ease-out;
  will-change: transform;
}
.hero__image-wrap.is-ready img { transform: scale(1.0); }
.hero__image-wrap:hover img { transform: scale(1.08); }
.hero__caption {
  position: absolute;
  bottom: 18px; left: 20px;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.05em;
}

/* ================= Featured work teasers (home) ================= */
.teasers {
  max-width: var(--container);
  margin: 110px auto 0;
  padding: 0 var(--gutter);
}
.teasers__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 4.4vw, 52px);
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0 0 14px;
}
.teasers__sub {
  color: var(--ink-soft);
  margin: 0 0 56px;
  max-width: 60ch;
  font-size: 15px;
  letter-spacing: 0.01em;
}
@media (max-width: 720px) {
  .teasers { margin-top: 80px; }
}
.teaser-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}
.teaser {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.015), rgba(255,255,255,0) 60%);
  overflow: hidden;
  transition: transform 0.6s var(--ease), border-color 0.6s var(--ease), box-shadow 0.6s var(--ease);
  display: flex;
  flex-direction: column;
  isolation: isolate;
}
.teaser:hover {
  transform: translateY(-4px);
  border-color: rgba(232, 183, 90, 0.35);
  box-shadow: var(--shadow-lift);
}
.teaser__media {
  position: relative;
  aspect-ratio: 16/11;
  overflow: hidden;
  background: #0a0e1a;
}
.teaser__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 1.4s var(--ease);
}
.teaser:hover .teaser__media img { transform: scale(1.06); }
.teaser__body {
  padding: 22px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.teaser__eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
}
.teaser__heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
}
.teaser__text {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.55;
}
.teaser__link {
  margin-top: auto;
  padding-top: 14px;
  font-size: 13px;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.05em;
}
.teaser__link .arrow {
  transition: transform 0.35s var(--ease);
}
.teaser:hover .teaser__link .arrow { transform: translateX(4px); }

/* Teaser sizing on 12-col grid */
.teaser--wide  { grid-column: span 8; }
.teaser--half  { grid-column: span 6; }
.teaser--third { grid-column: span 4; }
.teaser--full  { grid-column: span 12; }
@media (max-width: 900px) {
  .teaser--wide, .teaser--half, .teaser--third, .teaser--full { grid-column: span 12; }
}

/* ================= SECTION ================= */
.section {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 120px var(--gutter);
}
.section--dark {
  max-width: none;
  /* Translucent so the fixed starfield blends subtly through the rest of the page */
  background: linear-gradient(180deg, rgba(10, 14, 26, 0.72), rgba(7, 10, 20, 0.78));
  margin: 80px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
}
.section--dark > * {
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
}
.section--dark .section__grid:first-child { margin-top: 0; }
.section--tight { padding-top: 64px; padding-bottom: 64px; }

.section__grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  margin-bottom: 56px;
}
.section__grid--about {
  grid-template-columns: 1fr 1.6fr 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 0;
}
@media (max-width: 900px) {
  .section__grid,
  .section__grid--about { grid-template-columns: 1fr; gap: 32px; }
}

.section__label {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 6px;
}
.section__label span { color: var(--amber); margin-right: 6px; }

.section__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 4.5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 28px;
  color: var(--ink);
}
.section__body p { color: var(--ink-soft); margin: 0 0 18px; max-width: 62ch; }
.section__body p:last-child { margin-bottom: 0; }
.section__body--wide p { max-width: 72ch; }

.lede {
  font-size: 20px !important;
  line-height: 1.55;
  color: var(--ink) !important;
}

.section__aside img {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  aspect-ratio: 3/4;
  object-fit: cover;
  width: 100%;
  box-shadow: var(--shadow-soft);
}
.section__aside--wide img {
  aspect-ratio: 5/4;
  object-fit: cover;
  object-position: center 30%;
}
.section__aside .caption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-faint);
  line-height: 1.5;
  font-style: italic;
}
.caption {
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  margin-top: 14px;
}

/* ================= FEATURE ================= */
.feature {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
  margin: 40px 0 80px;
}
.feature--reverse { grid-template-columns: 1fr 1.1fr; }
.feature--reverse .feature__image { order: 2; }
@media (max-width: 900px) {
  .feature, .feature--reverse { grid-template-columns: 1fr; gap: 32px; }
  .feature--reverse .feature__image { order: 0; }
}
.feature__image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.feature__image--contain {
  object-fit: contain;
  background: #0a0e1a;
  padding: 20px;
}

/* Wide scientific plot */
.feature--plot { display: block; margin: 40px 0 80px; }
.feature__plot { margin: 0 0 40px; padding: 0; border: 0; background: transparent; }
.feature__plot img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #0a0e1a;
  box-shadow: var(--shadow-soft);
}
.feature__plot figcaption {
  margin: 14px auto 0;
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0.01em;
  line-height: 1.5;
  text-align: center;
  max-width: 640px;
}
.feature--plot .feature__text { max-width: 760px; margin: 0 auto; }
.feature__image-link {
  display: block;
  line-height: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.feature__image-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 70px -24px rgba(232, 183, 90, 0.28);
}
.feature__image-link .feature__image { border-radius: var(--radius-lg); }
.feature__duo {
  display: grid;
  grid-template-rows: auto auto;
  gap: 20px;
}
.feature--reverse .feature__duo { order: 2; }
@media (max-width: 900px) { .feature--reverse .feature__duo { order: 0; } }
.feature__duo-item {
  margin: 0;
  background: #0a0e1a;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 14px 14px 10px;
  box-shadow: var(--shadow-soft);
}
.feature__duo-item img {
  width: 100%; height: auto;
  display: block;
  border-radius: calc(var(--radius-lg) - 6px);
  background: #000;
}
.feature__duo-item figcaption {
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  line-height: 1.45;
}
.feature__text h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
  margin: 8px 0 16px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.feature__text p { color: var(--ink-soft); margin: 0 0 18px; }
/* Secondary caption-style copy inside a feature block. Smaller and slightly
   muted so it reads as context, not primary narrative. */
.feature__text p.feature__note {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-soft);
  opacity: 0.85;
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 4px;
}

/* Inline link */
.inline-link {
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid rgba(232, 183, 90, 0.3);
  transition: border-color 0.2s, color 0.2s;
}
.inline-link:hover { color: #f3cf85; border-bottom-color: var(--amber); }

/* ================= BULLETS ================= */
.bullets {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  border-top: 1px solid var(--line);
}
.bullets li {
  padding: 12px 0 12px 24px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--ink-soft);
  position: relative;
}
.bullets li::before {
  content: '';
  position: absolute;
  left: 2px; top: 20px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px rgba(232,183,90,0.6);
}

/* ================= CARDS ================= */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 24px;
}
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .cards { grid-template-columns: 1fr; } }

/* Centered variant for sections with 3 cards (e.g. research Context) */
.cards--centered {
  grid-template-columns: repeat(3, minmax(0, 320px));
  justify-content: center;
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 900px) { .cards--centered { grid-template-columns: 1fr; max-width: 520px; } }
.card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card:hover {
  border-color: var(--amber);
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}
.card h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  margin: 8px 0 10px;
  line-height: 1.15;
  color: var(--ink);
}
.card p { font-size: 14px; color: var(--ink-soft); line-height: 1.55; margin: 0; }

/* ================= SKILLS ================= */
.skills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-top: 32px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}
@media (max-width: 900px) { .skills { grid-template-columns: 1fr; gap: 32px; } }
.skills h5 {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 20px;
}
.skills ul { list-style: none; padding: 0; margin: 0; }
.skills li {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 16px;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}
.bar {
  height: 2px;
  background: rgba(232,236,245,0.08);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}
.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--amber), var(--amber-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.4s var(--ease-hero);
}
.skills.in-view .bar i { transform: scaleX(1); }

/* ================= TIMELINE ================= */
.timeline {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 180px; top: 0; bottom: 0;
  width: 1px;
  background: var(--line);
}
.timeline li {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 48px;
  padding: 28px 0;
  position: relative;
  border-top: 1px solid var(--line);
}
.timeline li:first-child { border-top: none; padding-top: 0; }
.timeline li::before {
  content: '';
  position: absolute;
  left: 176px; top: 36px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 14px rgba(232,183,90,0.6);
}
.timeline li:first-child::before { top: 8px; }
.timeline__date {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  padding-top: 4px;
}
.timeline__body h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 10px;
  line-height: 1.2;
  color: var(--ink);
}
.timeline__body h4 a {
  color: inherit;
  border-bottom: 1px dashed rgba(127, 185, 209, 0.35);
  transition: border-color 0.2s, color 0.2s;
}
.timeline__body h4 a:hover { color: var(--cyan); border-bottom-color: var(--cyan); }
.timeline__body p {
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.6;
}
.muted { color: var(--ink-faint); font-weight: 400; font-family: var(--font-body); font-size: 15px; }

@media (max-width: 780px) {
  .timeline::before { left: 5px; }
  .timeline li { grid-template-columns: 1fr; gap: 8px; padding-left: 24px; }
  .timeline li::before { left: 1px; top: 34px; }
  .timeline li:first-child::before { top: 6px; }
}

/* Credentials grid */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 32px;
}
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .grid-4 { grid-template-columns: 1fr; } }
.cred {
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.015);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease);
}
.cred:hover { border-color: var(--line-strong); background: rgba(255,255,255,0.03); transform: translateY(-2px); }
.cred h5 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  margin: 10px 0 8px;
  color: var(--ink);
  line-height: 1.25;
}
.cred p { font-size: 13.5px; color: var(--ink-soft); margin: 0; line-height: 1.5; }

/* Scientific galleries */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 28px auto 44px;
  max-width: 1180px;
  justify-content: center;
  justify-items: center;
  width: 100%;
}
@media (max-width: 900px) { .gallery { grid-template-columns: 1fr; } }
.gallery figure {
  margin: 0;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-soft);
  width: 100%;
  max-width: 380px;
}
.gallery img { width: 100%; height: 220px; object-fit: contain; background: #fff; display: block; margin: 0 auto; }
.gallery figcaption {
  margin-top: 12px;
  padding: 0 2px;
  font-size: 12px;
  color: #596079;
  line-height: 1.45;
  font-style: italic;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  padding: 1px 6px;
  background: rgba(232,183,90,0.08);
  color: var(--amber-2);
  border-radius: 4px;
}

/* ================= CONTACT ================= */
.contact {
  padding: 40px 0 80px;
  max-width: 880px;
  margin: 0 auto;
}
.contact__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 5.5vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 20px 0 28px;
  color: var(--ink);
}
.contact__sub {
  font-size: 18px;
  color: var(--ink-soft);
  margin: 0 0 40px;
  max-width: 60ch;
}
.contact__links { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  font-size: 14.5px;
  border-radius: 999px;
  background: var(--amber);
  color: #0a0e1a !important;
  font-weight: 600;
  border: 1px solid var(--amber);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -10px rgba(232,183,90,0.55);
}
.btn--ghost {
  background: transparent;
  color: var(--ink) !important;
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--ink); box-shadow: none; }

/* ================= FOOTER ================= */
.footer {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 80px var(--gutter) 56px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  max-width: var(--container);
  margin: 120px auto 0;
}
@media (max-width: 820px) {
  .footer { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .footer { grid-template-columns: 1fr; }
}
.footer__col h6 {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 16px;
  font-weight: 500;
}
.footer__col a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  transition: color 0.2s var(--ease);
  color: var(--ink-soft);
}
.footer__col a:hover { color: var(--amber); }
.footer__brand p {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 8px;
}
.footer__brand small {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  display: block;
  line-height: 1.6;
}
.footer__sig {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

/* ================= REVEAL ================= */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1.1s var(--ease-hero), transform 1.1s var(--ease-hero);
  will-change: transform, opacity;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal--lift {
  transform: translateY(36px) scale(0.985);
}
.reveal--lift.in-view { transform: translateY(0) scale(1); }
/* Staggered children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.85s var(--ease-hero), transform 0.85s var(--ease-hero);
}
.reveal-stagger.in-view > * { opacity: 1; transform: none; }
.reveal-stagger.in-view > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.in-view > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger.in-view > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger.in-view > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-stagger.in-view > *:nth-child(5) { transition-delay: 0.32s; }
.reveal-stagger.in-view > *:nth-child(6) { transition-delay: 0.40s; }
.reveal-stagger.in-view > *:nth-child(7) { transition-delay: 0.48s; }
.reveal-stagger.in-view > *:nth-child(8) { transition-delay: 0.56s; }
.reveal-stagger.in-view > *:nth-child(9) { transition-delay: 0.64s; }

/* ================= TRAVEL GRID ================= */
.travel-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  margin-top: 56px;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--gutter);
}
.travel-grid__item {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #0f1422;
  aspect-ratio: 3 / 4;
  grid-column: span 4;
  transition: transform 0.7s var(--ease), box-shadow 0.7s var(--ease), border-color 0.7s var(--ease);
  box-shadow: var(--shadow-soft);
}
.travel-grid__item:nth-child(1) { grid-column: 1 / span 6; grid-row: 1 / span 2; aspect-ratio: 4 / 5; }
.travel-grid__item:nth-child(2) { grid-column: 7 / span 6; grid-row: 1; aspect-ratio: 3 / 2; margin-top: 28px; }
.travel-grid__item:nth-child(3) { grid-column: 7 / span 3; grid-row: 2; aspect-ratio: 3 / 4; }
.travel-grid__item:nth-child(4) { grid-column: 10 / span 3; grid-row: 2; aspect-ratio: 3 / 4; margin-top: 24px; }
.travel-grid__item--wide { grid-column: 1 / span 8; grid-row: 3; aspect-ratio: 16 / 10; }
.travel-grid__item:nth-child(6) { grid-column: 9 / span 4; grid-row: 3; aspect-ratio: 4 / 5; margin-top: 32px; }
.travel-grid__item:nth-child(7) { grid-column: 1 / span 4; grid-row: 4; aspect-ratio: 3 / 4; }
.travel-grid__item:nth-child(8) { grid-column: 5 / span 4; grid-row: 4; aspect-ratio: 3 / 4; margin-top: 36px; }
.travel-grid__item:nth-child(9) { grid-column: 9 / span 4; grid-row: 4; aspect-ratio: 3 / 4; }
.travel-grid__item--hero { grid-column: 1 / span 6; grid-row: 1 / span 2; aspect-ratio: 4 / 5; }

.travel-grid__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.6s var(--ease), filter 0.7s var(--ease);
  filter: saturate(0.95) brightness(0.96);
}
.travel-grid__item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 40px 20px 16px;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(10,14,26,0) 0%, rgba(10,14,26,0.85) 70%, rgba(10,14,26,0.92) 100%);
  opacity: 0.92;
  transition: opacity 0.6s var(--ease);
}
.travel-grid__item:hover {
  transform: translateY(-3px);
  border-color: rgba(232, 183, 90, 0.35);
  box-shadow: 0 24px 48px -24px rgba(0,0,0,0.65);
}
.travel-grid__item:hover img {
  transform: scale(1.05);
  filter: saturate(1.05) brightness(1);
}
.travel-grid__item:hover figcaption { opacity: 1; }
.travel-grid__note {
  max-width: 1280px;
  margin: 28px auto 0;
  padding: 0 var(--gutter);
  font-size: 14px;
  color: var(--ink-soft);
  font-style: italic;
}
/* Travel: trim section so the grid doesn't float above empty black */
main > .section:has(.travel-grid) {
  padding-top: 40px;
  padding-bottom: 40px;
}
@media (max-width: 900px) {
  .travel-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .travel-grid__item,
  .travel-grid__item--hero,
  .travel-grid__item--wide,
  .travel-grid__item:nth-child(1),
  .travel-grid__item:nth-child(2),
  .travel-grid__item:nth-child(3),
  .travel-grid__item:nth-child(4),
  .travel-grid__item:nth-child(5),
  .travel-grid__item:nth-child(6),
  .travel-grid__item:nth-child(7),
  .travel-grid__item:nth-child(8),
  .travel-grid__item:nth-child(9) {
    grid-column: span 1;
    grid-row: auto;
    aspect-ratio: 3 / 4;
    margin-top: 0;
  }
  .travel-grid__item--wide,
  .travel-grid__item:nth-child(2) { grid-column: span 2; aspect-ratio: 16 / 10; }
  .travel-grid__item figcaption { opacity: 1; }
}

/* ================= PAGE NEXT (inter-page nav) ================= */
.page-next {
  max-width: var(--container);
  margin: 120px auto 0;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 720px) { .page-next { grid-template-columns: 1fr; } }
.page-next a {
  position: relative;
  padding: 40px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0) 60%);
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease), transform 0.4s var(--ease);
  overflow: hidden;
  isolation: isolate;
}
.page-next a:hover {
  border-color: rgba(232, 183, 90, 0.35);
  transform: translateY(-3px);
  background: linear-gradient(180deg, rgba(232,183,90,0.04), rgba(255,255,255,0) 60%);
}
.page-next__eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
}
.page-next__title {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.01em;
  margin-top: 10px;
  color: var(--ink);
  font-weight: 500;
}
.page-next__arrow {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  transition: all 0.3s var(--ease);
}
.page-next a:hover .page-next__arrow {
  color: #0a0e1a;
  background: var(--amber);
  border-color: var(--amber);
  transform: rotate(-45deg);
}

/* ============================================================
   New components: details, projects grid, contact, posts, cv, kpi
   Added April 2026
   ============================================================ */

/* Details / collapsible cards ------------------------------ */
.details-group { display: flex; flex-direction: column; gap: .75rem; margin-top: 3rem; }
.details-card {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.02);
  overflow: hidden;
  transition: background .25s ease, border-color .25s ease;
}
.details-card[open] { background: rgba(255,255,255,.035); border-color: rgba(232,183,90,.25); }
.details-card summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 1.4rem;
  display: flex; align-items: center; justify-content: space-between;
  font-family: "General Sans", sans-serif;
  font-weight: 500;
  font-size: 1.02rem;
  letter-spacing: .01em;
  color: var(--fg, #f4eee4);
}
.details-card summary::-webkit-details-marker { display: none; }
.details-card__chev {
  transition: transform .25s ease;
  color: var(--amber, #e8b75a);
  font-size: 1.3rem;
  line-height: 1;
}
.details-card[open] .details-card__chev { transform: rotate(90deg); }
.details-card__body {
  padding: 0 1.4rem 1.3rem;
  color: rgba(244,238,228,.78);
  font-size: .95rem;
  line-height: 1.65;
}
.details-card__body p { margin: .75rem 0; }
.details-card__body p:first-child { margin-top: 0; }
.details-card__body code {
  background: rgba(127,185,209,.08);
  color: var(--cyan, #7fb9d1);
  padding: .1em .4em;
  border-radius: 4px;
  font-size: .88em;
}

/* Parameter table inside details --------------------------- */
.params {
  width: 100%;
  border-collapse: collapse;
  margin: .5rem 0;
  font-size: .9rem;
}
.params th, .params td {
  text-align: left;
  padding: .6rem .8rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.params th {
  font-family: "General Sans", sans-serif;
  font-weight: 500;
  color: var(--amber, #e8b75a);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.params td:first-child { color: rgba(244,238,228,.9); }
.params td:last-child { color: rgba(244,238,228,.6); font-style: italic; }

/* KPI grid (quant results) --------------------------------- */
.results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 2.5rem 0 1.5rem;
}
.kpi {
  padding: 1.3rem 1.2rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
  text-align: left;
}
.kpi__val {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.4rem;
  font-weight: 500;
  color: var(--amber, #e8b75a);
  line-height: 1.05;
  letter-spacing: -.01em;
}
.kpi__lbl {
  margin-top: .3rem;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(244,238,228,.55);
}

/* Projects grid -------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}
.project-card {
  display: flex; flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.02);
  overflow: hidden;
  transition: transform .4s cubic-bezier(.2,.8,.2,1), border-color .3s ease, background .3s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(232,183,90,.3);
  background: rgba(255,255,255,.04);
}
.project-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0b1020;
}
.project-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.2,.8,.2,1);
}
.project-card:hover .project-card__media img { transform: scale(1.04); }
.project-card__body { padding: 1.2rem 1.3rem 1.4rem; }
.project-card__eyebrow {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--amber, #e8b75a);
  margin-bottom: .5rem;
}
.project-card h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 .6rem;
  letter-spacing: -.005em;
}
.project-card p {
  font-size: .92rem;
  color: rgba(244,238,228,.72);
  line-height: 1.55;
  margin: 0 0 1rem;
}
.project-card__tags {
  display: flex; flex-wrap: wrap; gap: .4rem;
}
.project-card__tags span {
  font-size: .7rem;
  padding: .22rem .6rem;
  border: 1px solid rgba(127,185,209,.25);
  border-radius: 999px;
  color: var(--cyan, #7fb9d1);
  letter-spacing: .03em;
}

/* Contact page --------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 2rem; } }

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .75rem;
}
.contact-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.02);
  text-decoration: none;
  color: inherit;
  transition: transform .3s ease, border-color .3s ease, background .3s ease;
}
.contact-card:hover {
  transform: translateY(-2px);
  border-color: rgba(232,183,90,.35);
  background: rgba(255,255,255,.04);
}
.contact-card__icon {
  width: 42px; height: 42px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: rgba(232,183,90,.08);
  color: var(--amber, #e8b75a);
}
.contact-card__eyebrow {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(244,238,228,.5);
  margin-bottom: .15rem;
}
.contact-card__value {
  font-family: "General Sans", sans-serif;
  font-weight: 500;
  font-size: .98rem;
  color: var(--fg, #f4eee4);
}

.contact-form h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
  font-weight: 500;
  margin: 0 0 .4rem;
}
.contact-form .muted { margin: 0 0 1.2rem; }

.form { display: flex; flex-direction: column; gap: 1rem; }
.form label { display: flex; flex-direction: column; gap: .4rem; }
.form label span {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(244,238,228,.6);
  font-family: "General Sans", sans-serif;
  font-weight: 500;
}
.form input, .form textarea {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: .7rem .9rem;
  color: var(--fg, #f4eee4);
  font-family: "General Sans", sans-serif;
  font-size: .95rem;
  transition: border-color .2s ease, background .2s ease;
}
.form input:focus, .form textarea:focus {
  outline: none;
  border-color: var(--amber, #e8b75a);
  background: rgba(255,255,255,.05);
}
.form textarea { resize: vertical; min-height: 120px; }
.form button { align-self: flex-start; margin-top: .5rem; }

.contact-meta {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.06);
  text-align: center;
}

/* Writing / posts ------------------------------------------ */
.section--posts {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.post {
  padding: 3rem 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.post:first-child { padding-top: 1rem; }
.post:last-child { border-bottom: none; }
.post__date {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--amber, #e8b75a);
}
.post__title {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.4rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.01em;
  margin: .7rem 0 1rem;
}
.post__lede {
  font-size: 1.1rem;
  color: rgba(244,238,228,.82);
  line-height: 1.55;
  margin: 0 0 1.8rem;
  font-style: italic;
}
.post__body p {
  font-size: 1.02rem;
  line-height: 1.75;
  color: rgba(244,238,228,.85);
  margin: 1.1rem 0;
}
.post__body code {
  background: rgba(127,185,209,.08);
  color: var(--cyan, #7fb9d1);
  padding: .1em .4em;
  border-radius: 4px;
  font-size: .88em;
}

/* CV page -------------------------------------------------- */
.cv__grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 900px) { .cv__grid { grid-template-columns: 1fr; gap: 2rem; } }

.cv__aside { position: sticky; top: 6rem; }
@media (max-width: 900px) { .cv__aside { position: static; } }

.cv__block { margin-bottom: 2rem; }
.cv__block h4 {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--amber, #e8b75a);
  margin: 0 0 .7rem;
  font-family: "General Sans", sans-serif;
  font-weight: 500;
}
.cv__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.cv__list li, .cv__list a {
  font-size: .92rem;
  color: rgba(244,238,228,.85);
  line-height: 1.5;
}
.cv__list a {
  text-decoration: none;
  border-bottom: 1px dotted rgba(127,185,209,.4);
  color: var(--cyan, #7fb9d1);
  transition: color .2s ease, border-color .2s ease;
}
.cv__list a:hover { color: var(--amber, #e8b75a); border-color: var(--amber, #e8b75a); }

.cv__section { margin-bottom: 3rem; }
.cv__section h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.9rem;
  font-weight: 500;
  margin: 0 0 1.5rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  letter-spacing: -.01em;
}

.cv__entry {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  margin-bottom: 1.8rem;
}
@media (max-width: 700px) { .cv__entry { grid-template-columns: 1fr; gap: .4rem; } }

.cv__when {
  font-size: .8rem;
  color: rgba(244,238,228,.55);
  font-family: "General Sans", sans-serif;
  padding-top: .25rem;
  letter-spacing: .02em;
}
.cv__what h5 {
  font-family: "General Sans", sans-serif;
  font-size: 1.02rem;
  font-weight: 500;
  margin: 0 0 .4rem;
  color: var(--fg, #f4eee4);
}
.cv__what p {
  margin: 0;
  font-size: .93rem;
  line-height: 1.6;
  color: rgba(244,238,228,.75);
}

.cv__bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: .7rem 1.5rem;
}
.cv__bullets li {
  position: relative;
  padding-left: 1.2rem;
  font-size: .93rem;
  line-height: 1.5;
  color: rgba(244,238,228,.82);
}
.cv__bullets li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--amber, #e8b75a);
  font-size: 1.4em;
  line-height: 1;
  top: -.1em;
}

/* Utility --------------------------------------------------- */
.muted { color: rgba(244,238,228,.55); }

/* ============================================================
   Apple‑style narrative sections (research + quant rewrite)
   ============================================================ */

.section--narrative {
  padding-top: 96px;
  padding-bottom: 96px;
}
.section--narrative + .section--narrative { padding-top: 48px; }

.narrative {
  max-width: 780px;
  margin: 0 auto 56px;
  text-align: center;
}
.narrative__kicker {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.2rem, 4.4vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.008em;
  color: var(--amber, #e8b75a);
  margin: 0 0 18px;
  display: inline-block;
  position: relative;
}
.narrative__kicker::after {
  content: "";
  display: block;
  width: 56%;
  max-width: 180px;
  height: 1px;
  margin-top: 14px;
  background: linear-gradient(90deg, rgba(232,183,90,.9), rgba(127,185,209,.35) 70%, transparent);
}
.narrative__h {
  font-family: "Cormorant Garamond", serif;
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin: 0 0 .75em;
  color: var(--fg, #f4eee4);
}
.narrative__p {
  font-family: "General Sans", sans-serif;
  font-size: clamp(1rem, 1.08vw, 1.15rem);
  line-height: 1.65;
  color: rgba(244, 238, 228, .78);
  margin: 0 0 1em;
}
.narrative__note {
  font-size: .9rem;
  color: rgba(244, 238, 228, .55);
  margin-top: .75rem;
}

/* Data‑source grid (research page) ------------------------- */
.data-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1080px;
  margin: 48px auto 56px;
}
@media (max-width: 900px) {
  .data-grid { grid-template-columns: 1fr; }
}
.data-card {
  padding: 28px 26px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.02);
  transition: border-color .3s ease, transform .3s ease;
}
.data-card:hover {
  border-color: rgba(232,183,90,.3);
  transform: translateY(-3px);
}
.data-card__tag {
  display: inline-block;
  font-family: "General Sans", sans-serif;
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cyan, #7fb9d1);
  margin-bottom: 14px;
}
.data-card h4 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 1.45rem;
  line-height: 1.15;
  margin: 0 0 10px;
  color: var(--fg);
}
.data-card p {
  font-family: "General Sans", sans-serif;
  font-size: .95rem;
  line-height: 1.55;
  color: rgba(244,238,228,.72);
  margin: 0;
}

/* KPI grid (research answer block) ------------------------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1040px;
  margin: 40px auto 56px;
}
@media (max-width: 900px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .kpi-grid { grid-template-columns: 1fr; } }
.kpi {
  padding: 26px 22px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015));
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .3s ease;
}
.kpi:hover { border-color: rgba(232,183,90,.28); }
.kpi__label {
  font-family: "General Sans", sans-serif;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(244,238,228,.55);
}
.kpi__value {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1.15;
  color: var(--fg, #f4eee4);
  font-feature-settings: "tnum";
}
.kpi__value sub { font-size: .7em; font-weight: 400; opacity: .85; }

/* Toolbox grid (quant) ------------------------------------- */
.toolbox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 1000px;
  margin: 32px auto 0;
}
@media (max-width: 820px) { .toolbox-grid { grid-template-columns: 1fr; } }
.toolbox-card {
  padding: 28px 24px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.02);
  transition: border-color .3s ease;
}
.toolbox-card:hover { border-color: rgba(232,183,90,.25); }
.toolbox-card h5 {
  font-family: "General Sans", sans-serif;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber, #e8b75a);
  margin: 0 0 14px;
}
.toolbox-card ul { list-style: none; padding: 0; margin: 0; }
.toolbox-card li {
  font-family: "General Sans", sans-serif;
  font-size: .98rem;
  line-height: 1.5;
  color: rgba(244,238,228,.82);
  padding: 8px 0;
  border-top: 1px solid rgba(255,255,255,.05);
}
.toolbox-card li:first-child { border-top: none; padding-top: 0; }

/* Projects page polish ------------------------------------- */
.projects-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 1024px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .projects-grid { grid-template-columns: 1fr; } }

.project-card {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.015);
  transition: transform .35s cubic-bezier(.2,.7,.2,1),
              border-color .3s ease,
              background .3s ease,
              box-shadow .3s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(232,183,90,.3);
  background: rgba(255,255,255,.035);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.55);
}
.project-card--feature {
  grid-column: span 3;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}
@media (max-width: 1024px) {
  .project-card--feature { grid-column: span 2; grid-template-columns: 1fr; }
}
@media (max-width: 640px) { .project-card--feature { grid-column: span 1; } }
.project-card--feature .project-card__media { aspect-ratio: auto; height: 100%; min-height: 260px; }
.project-card--feature .project-card__body { padding: 2.2rem 2.4rem; display: flex; flex-direction: column; justify-content: center; }
.project-card--feature h3 { font-size: 1.6rem; }

.project-card--nolink { cursor: default; }
.project-card--nolink:hover { transform: none; border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.02); box-shadow: none; }

.project-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(0,0,0,.25);
  border-radius: 18px 18px 0 0;
}
.project-card--feature .project-card__media { border-radius: 18px 0 0 18px; }
@media (max-width: 1024px) {
  .project-card--feature .project-card__media { border-radius: 18px 18px 0 0; }
}

.project-card__media--placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(127,185,209,.08), rgba(232,183,90,.06));
}
.project-card__placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: rgba(244,238,228,.55);
  font-family: "General Sans", sans-serif;
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.project-card h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: -.005em;
}
.project-card p {
  font-family: "General Sans", sans-serif;
  font-size: .95rem;
  line-height: 1.55;
  color: rgba(244,238,228,.72);
}
.project-card__tags { display: none; } /* remove the ugly "code text" tags */

/* Contact page — Apple style ------------------------------ */
.page-head--contact { padding-bottom: 40px; }

.contact-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}
@media (max-width: 960px) {
  .contact-layout { grid-template-columns: 1fr; gap: 40px; }
}

.contact-aside { display: flex; flex-direction: column; gap: 24px; }
.contact-aside__title {
  font-family: "General Sans", sans-serif;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--amber, #e8b75a);
  margin: 0;
}
.contact-aside__lede {
  font-family: "General Sans", sans-serif;
  font-size: 1.02rem;
  line-height: 1.6;
  color: rgba(244,238,228,.78);
  margin: 0;
}
.contact-cards--stack {
  grid-template-columns: 1fr;
  gap: 10px;
}
.contact-card {
  padding: 14px 16px;
  border-radius: 14px;
}
.contact-aside__meta {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex; flex-direction: column; gap: 8px;
}
.contact-aside__meta p {
  margin: 0;
  font-family: "General Sans", sans-serif;
  font-size: .9rem;
  color: rgba(244,238,228,.72);
  display: flex; gap: 12px; align-items: baseline;
}
.contact-aside__label {
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(244,238,228,.45);
  min-width: 82px;
}

/* Large form card ------------------------------------------ */
.contact-form-card {
  padding: 40px 44px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  background:
    radial-gradient(circle at 0% 0%, rgba(232,183,90,.06), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(127,185,209,.05), transparent 55%),
    rgba(255,255,255,.02);
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.55);
}
@media (max-width: 640px) { .contact-form-card { padding: 28px 22px; } }

.contact-form-card__head { margin-bottom: 28px; }
.contact-form-card__title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 400;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -.012em;
  margin: 0 0 10px;
  color: var(--fg, #f4eee4);
}
.contact-form-card__lede {
  font-family: "General Sans", sans-serif;
  font-size: 1rem;
  color: rgba(244,238,228,.62);
  margin: 0;
}

.form--apple { display: flex; flex-direction: column; gap: 18px; }
.form--apple .form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form--apple .form__row { grid-template-columns: 1fr; } }
.form--apple .form__field { display: flex; flex-direction: column; gap: 8px; }
.form--apple .form__label {
  font-family: "General Sans", sans-serif;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(244,238,228,.55);
}
.form--apple input,
.form--apple textarea {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--fg, #f4eee4);
  font-family: "General Sans", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.form--apple input::placeholder,
.form--apple textarea::placeholder { color: rgba(244,238,228,.3); }
.form--apple input:focus,
.form--apple textarea:focus {
  outline: none;
  border-color: rgba(232,183,90,.5);
  background: rgba(255,255,255,.05);
  box-shadow: 0 0 0 3px rgba(232,183,90,.08);
}
.form--apple textarea { resize: vertical; min-height: 140px; font-family: "General Sans", sans-serif; }

.form__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; margin-top: 8px; flex-wrap: wrap;
}
.form__note {
  margin: 0;
  font-family: "General Sans", sans-serif;
  font-size: .88rem;
  color: rgba(244,238,228,.5);
}
.btn--primary {
  background: var(--amber, #e8b75a);
  color: #1a1305;
  border: 1px solid var(--amber, #e8b75a);
  padding: 14px 24px;
  border-radius: 12px;
  font-family: "General Sans", sans-serif;
  font-weight: 500;
  font-size: .98rem;
  letter-spacing: .01em;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .25s ease, background .2s ease;
}
.btn--primary:hover {
  background: #f0c472;
  transform: translateY(-1px);
  box-shadow: 0 10px 30px -10px rgba(232,183,90,.55);
}
.btn--primary:active { transform: translateY(0); }

/* Params table polish (research recovered parameters) ----- */
.params { width: 100%; border-collapse: collapse; margin-top: 8px; }
.params th, .params td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  text-align: left;
  font-family: "General Sans", sans-serif;
  font-size: .92rem;
  vertical-align: top;
}
.params th {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(244,238,228,.55);
}
.params td:nth-child(2) {
  font-feature-settings: "tnum";
  color: var(--fg, #f4eee4);
}

/* ============ Section variant for alternating speaking features ============ */
.section--alt {
  background: linear-gradient(180deg, rgba(232,183,90,0.025) 0%, rgba(127,185,209,0.02) 100%);
  border-top: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* ============ Chip nav (anchor pills) ============ */
.chip-nav {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.03);
  color: var(--fg, #e8e7e3);
  font: 500 13px/1 var(--font-sans, "General Sans", system-ui, sans-serif);
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  white-space: nowrap;
}
.chip::before {
  content: "#";
  color: var(--amber, #e8b75a);
  opacity: 0.75;
  font-weight: 600;
}
.chip:hover,
.chip:focus-visible {
  background: rgba(232,183,90,0.08);
  border-color: rgba(232,183,90,0.35);
  color: #fff;
  transform: translateY(-1px);
  outline: none;
}

/* Static image wrapper (no link) — neutralises hover lift */
.feature__image-link--static {
  display: block;
  cursor: default;
}
.feature__image-link--static:hover { transform: none; }

/* Smooth anchor scroll & offset for sticky header */
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 88px; }

/* ============ Mobile polish (≤768px) ============ */
@media (max-width: 768px) {
  .page-head {
    padding-top: 72px;
    padding-bottom: 40px;
  }
  .page-head__title {
    font-size: clamp(38px, 10.5vw, 56px);
    line-height: 1.02;
    letter-spacing: -0.02em;
  }
  .page-head__lede {
    font-size: 17px;
    line-height: 1.55;
    max-width: 100%;
  }
  .chip-nav {
    margin-top: 24px;
    gap: 8px;
    /* Enable horizontal scroll on very narrow screens */
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .chip-nav::-webkit-scrollbar { display: none; }
  .chip {
    padding: 8px 14px;
    font-size: 12.5px;
    flex-shrink: 0;
  }

  .section {
    padding-top: 48px;
    padding-bottom: 48px;
  }
  .section--alt {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .feature,
  .feature--reverse {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .feature__image {
    border-radius: 14px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
  }
  .feature__text h3 {
    font-size: clamp(24px, 6vw, 30px);
    line-height: 1.2;
    letter-spacing: -0.015em;
    margin-top: 10px;
  }
  .feature__text .eyebrow {
    font-size: 11px;
    letter-spacing: 0.14em;
  }
  .feature__text p {
    font-size: 15.5px;
    line-height: 1.62;
  }

  .page-next {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 420px) {
  .page-head {
    padding-top: 56px;
  }
  .page-head__title {
    font-size: clamp(34px, 11vw, 44px);
  }
  .feature__image {
    aspect-ratio: 5 / 4;
  }
}

/* =========================================================================
   CONTACT PAGE — split hero with minimalist underline form
   ========================================================================= */
.section.contact-hero {
  padding-top: clamp(56px, 9vw, 120px);
  padding-bottom: clamp(48px, 6vw, 88px);
}
.contact-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(48px, 7vw, 112px);
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 960px) {
  .contact-split {
    grid-template-columns: 1fr;
    gap: 64px;
  }
}

.contact-split__form {
  position: relative;
}
.contact-split__eyebrow {
  font: 500 11px/1 var(--font-sans, "General Sans", system-ui, sans-serif);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(232,183,90,0.85);
  margin-bottom: clamp(28px, 4vw, 48px);
}
.contact-split__eyebrow span {
  color: rgba(232,183,90,0.55);
  margin-right: 4px;
}

/* ---------- Display side (right) ---------- */
.contact-split__aside {
  padding-top: 32px; /* optical alignment with first input */
}
.contact-display {
  font-family: var(--font-serif, "Cormorant Garamond", serif);
  font-weight: 500;
  font-size: clamp(72px, 11vw, 160px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: #f5f2ec;
  margin: 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contact-display span:first-child { align-self: flex-start; }
.contact-display span:last-child  { align-self: flex-end; }
.contact-display__rule {
  display: block;
  align-self: center;
  width: clamp(120px, 18vw, 220px);
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(232,183,90,0.9) 30%, rgba(127,185,209,0.9) 70%, transparent 100%);
  margin: 6px 0;
}
.contact-display__lede {
  font: 400 17px/1.6 var(--font-sans, "General Sans", system-ui, sans-serif);
  color: rgba(232,231,227,0.72);
  max-width: 36ch;
  margin: 0 0 32px;
}
@media (max-width: 960px) {
  .contact-split__aside { padding-top: 0; order: -1; }
  .contact-display {
    font-size: clamp(56px, 15vw, 88px);
    align-items: flex-start;
  }
  .contact-display span:last-child { align-self: flex-start; }
  .contact-display__rule {
    width: 80px;
    margin-left: 4px;
  }
}

/* ---------- Form (left) ---------- */
.form-line {
  display: flex;
  flex-direction: column;
  gap: clamp(22px, 3vw, 32px);
}
.form-line__honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.form-line__field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.form-line__label {
  font: 500 12.5px/1 var(--font-sans, "General Sans", system-ui, sans-serif);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232,231,227,0.72);
  transition: color 0.3s ease;
}
.form-line__optional {
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(232,231,227,0.38);
  margin-left: 4px;
}
.form-line__input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.14);
  border-radius: 0;
  padding: 8px 0 12px;
  color: #f5f2ec;
  font: 400 17px/1.45 var(--font-sans, "General Sans", system-ui, sans-serif);
  outline: none;
  transition: border-color 0.3s ease, padding 0.3s ease;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}
.form-line__input::placeholder {
  color: rgba(232,231,227,0.32);
  font-weight: 400;
}
.form-line__input:hover {
  border-bottom-color: rgba(255,255,255,0.28);
}
.form-line__input:focus {
  border-bottom-color: var(--amber, #e8b75a);
}
.form-line__field:focus-within .form-line__label {
  color: var(--amber, #e8b75a);
}
.form-line__input--textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.55;
  padding-bottom: 14px;
  font-family: var(--font-sans, "General Sans", system-ui, sans-serif);
}

/* Validation: red underline only after user attempts submit */
.form-line__input:user-invalid {
  border-bottom-color: rgba(225,116,116,0.7);
}
.form-line__input:user-invalid + .form-line__label,
.form-line__field:has(.form-line__input:user-invalid) .form-line__label {
  color: rgba(225,116,116,0.9);
}

/* Autofill cosmetics */
.form-line__input:-webkit-autofill,
.form-line__input:-webkit-autofill:hover,
.form-line__input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f5f2ec;
  -webkit-box-shadow: 0 0 0 40px transparent inset;
  transition: background-color 5000s ease-in-out 0s;
  caret-color: var(--amber, #e8b75a);
}

/* Submit — elegant wide CTA */
.form-line__submit {
  margin-top: clamp(16px, 2.5vw, 28px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 18px 32px;
  background: #f5f2ec;
  color: #0a0a10;
  border: 1px solid #f5f2ec;
  border-radius: 999px;
  font: 600 15px/1 var(--font-sans, "General Sans", system-ui, sans-serif);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, transform 0.25s ease, box-shadow 0.3s ease;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 10px 30px -18px rgba(232,183,90,0.0);
}
.form-line__submit svg {
  transition: transform 0.3s ease;
}
.form-line__submit:hover {
  background: var(--amber, #e8b75a);
  color: #0a0a10;
  border-color: var(--amber, #e8b75a);
  transform: translateY(-1px);
  box-shadow: 0 14px 36px -14px rgba(232,183,90,0.5);
}
.form-line__submit:hover svg {
  transform: translateX(4px);
}
.form-line__submit:active {
  transform: translateY(0);
}
.form-line__submit:focus-visible {
  outline: 2px solid var(--amber, #e8b75a);
  outline-offset: 3px;
}

.form-line__note {
  margin-top: 4px;
  font: 400 13.5px/1.5 var(--font-sans, "General Sans", system-ui, sans-serif);
  color: rgba(232,231,227,0.5);
  text-align: center;
}

/* ---------- Chips + meta under display ---------- */
.contact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}
.contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.025);
  color: #f5f2ec;
  font: 500 13px/1 var(--font-sans, "General Sans", system-ui, sans-serif);
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.contact-chip svg { opacity: 0.7; transition: opacity 0.25s ease; }
.contact-chip:hover {
  background: rgba(232,183,90,0.07);
  border-color: rgba(232,183,90,0.35);
  transform: translateY(-1px);
}
.contact-chip:hover svg { opacity: 1; }

.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.contact-meta > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  align-items: baseline;
}
.contact-meta dt {
  font: 500 11px/1 var(--font-sans, "General Sans", system-ui, sans-serif);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232,231,227,0.45);
  margin: 0;
}
.contact-meta dd {
  margin: 0;
  font: 400 14.5px/1.4 var(--font-sans, "General Sans", system-ui, sans-serif);
  color: rgba(232,231,227,0.85);
}

/* =========================================================================
   THANKS PAGE
   ========================================================================= */
.section.thanks-hero {
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding-top: clamp(60px, 10vw, 140px);
  padding-bottom: clamp(60px, 10vw, 140px);
}
.thanks-card {
  max-width: 640px;
  text-align: center;
  margin: 0 auto;
}
.thanks-icon {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin: 0 auto 28px;
  background: radial-gradient(circle at 30% 30%, rgba(232,183,90,0.18), rgba(127,185,209,0.06) 65%, transparent 80%);
  color: var(--amber, #e8b75a);
  border: 1px solid rgba(232,183,90,0.25);
}
.thanks-eyebrow {
  font: 500 11px/1 var(--font-sans, "General Sans", system-ui, sans-serif);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(232,183,90,0.85);
  margin-bottom: 16px;
}
.thanks-title {
  font-family: var(--font-serif, "Cormorant Garamond", serif);
  font-weight: 500;
  font-size: clamp(64px, 11vw, 120px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: #f5f2ec;
  margin: 0 0 24px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.thanks-title__rule {
  display: block;
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232,183,90,0.8), rgba(127,185,209,0.8), transparent);
  margin: 6px 0;
}
.thanks-lede {
  font: 400 17px/1.6 var(--font-sans, "General Sans", system-ui, sans-serif);
  color: rgba(232,231,227,0.75);
  margin: 0 auto 32px;
  max-width: 48ch;
}
.thanks-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.btn--ghost {
  display: inline-flex;
  align-items: center;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: transparent;
  color: #f5f2ec;
  font: 500 14px/1 var(--font-sans, "General Sans", system-ui, sans-serif);
  text-decoration: none;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.btn--ghost:hover {
  border-color: rgba(232,183,90,0.5);
  background: rgba(232,183,90,0.05);
  transform: translateY(-1px);
}

/* =========================================================================
   Mobile polish for contact + thanks
   ========================================================================= */
@media (max-width: 768px) {
  .section.contact-hero {
    padding-top: 56px;
    padding-bottom: 72px;
  }
  .contact-display__lede {
    font-size: 15.5px;
    max-width: 100%;
  }
  .form-line__input {
    font-size: 16px; /* iOS zoom threshold */
  }
  .form-line__input--textarea {
    min-height: 140px;
  }
  .contact-chips {
    gap: 8px;
  }
  .contact-chip {
    padding: 9px 13px;
    font-size: 12.5px;
  }
  .contact-meta > div {
    grid-template-columns: 96px 1fr;
    gap: 12px;
  }
  .contact-meta dt { font-size: 10.5px; }
  .contact-meta dd { font-size: 14px; }

  .thanks-title { font-size: clamp(54px, 16vw, 80px); }
  .thanks-lede { font-size: 15.5px; }
}

/* =========================================================================
   Nav: ensure the extra Speaking/Travel items don't wrap awkwardly
   ========================================================================= */
@media (min-width: 1100px) {
  .header__nav { gap: clamp(16px, 1.6vw, 26px); }
}
@media (max-width: 1024px) and (min-width: 901px) {
  .header__nav a { font-size: 13.5px; }
}

/* =========================================================================
   Nav — mobile density fix (avoid logo wrapping + icon crowding)
   ========================================================================= */
@media (max-width: 640px) {
  .nav__logo {
    gap: 8px;
    font-size: 14px;
    letter-spacing: 0.01em;
    white-space: nowrap;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* Hide the two less-essential social icons on small phones; keep GitHub + CV + Menu */
  .nav__actions .nav__icon[aria-label="LinkedIn"],
  .nav__actions .nav__icon[aria-label="Instagram"] {
    display: none;
  }
  .nav__actions {
    gap: 8px;
  }
  .nav__cv {
    padding: 6px 12px;
    font-size: 12px;
  }
  .nav__toggle {
    padding: 6px 10px;
    font-size: 11px;
  }
  .nav__icon {
    width: 34px;
    height: 34px;
  }
}
@media (max-width: 380px) {
  .nav__logo { max-width: 50%; font-size: 13px; }
  .nav__cv { display: none; } /* CV stays in the hamburger menu / footer */
}

/* ====================== CONTACT PAGE — DEEP POLISH ====================== */
.contact-split__kicker {
  margin: 10px 0 40px;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(240, 238, 230, 0.62);
  max-width: 46ch;
  letter-spacing: 0.005em;
}

.form-line__section {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  gap: 12px;
  margin: 30px 0 18px;
}
.form-line__section:first-of-type { margin-top: 8px; }
.form-line__section-num {
  font-family: "Cormorant Garamond", serif;
  font-size: 26px;
  font-style: italic;
  color: var(--amber, #e8b75a);
  line-height: 1;
  opacity: 0.92;
}
.form-line__section-title {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(240, 238, 230, 0.78);
  font-weight: 500;
}
.form-line__section-rule {
  height: 1px;
  background: linear-gradient(90deg, rgba(240,238,230,0.28), rgba(240,238,230,0.02));
}

.form-line__hint {
  display: block;
  margin-top: 2px;
  margin-bottom: 6px;
  font-size: 12.5px;
  color: rgba(240, 238, 230, 0.45);
  letter-spacing: 0.012em;
}

.form-line__submit-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 26px;
}
.form-line__submit-meta {
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(240, 238, 230, 0.38);
}

/* Aside layout */
.contact-split__aside { position: relative; isolation: isolate; }
.contact-split__aside > * { position: relative; z-index: 2; }

/* Contact cosmos: a dedicated scroll-linked starfield window in the aside column */
.contact-cosmos {
  position: absolute;
  inset: -60px -80px -80px -40px;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 24px;
  mask-image: radial-gradient(ellipse at 60% 50%, #000 0%, #000 45%, rgba(0,0,0,0.55) 70%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 50%, #000 0%, #000 45%, rgba(0,0,0,0.55) 70%, transparent 100%);
}
.contact-cosmos canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* Subtle nebula glow underneath the canvas to give depth */
.contact-cosmos::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 35%, rgba(232, 183, 90, 0.10), transparent 55%),
    radial-gradient(ellipse at 30% 70%, rgba(127, 185, 209, 0.09), transparent 60%);
  filter: blur(20px);
}

.contact-aside__eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(240, 238, 230, 0.55);
  margin-bottom: 14px;
}

.contact-aside__pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid rgba(232, 183, 90, 0.32);
  border-radius: 999px;
  background: rgba(232, 183, 90, 0.06);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: rgba(240, 238, 230, 0.82);
  margin: 22px 0 18px;
}
.contact-aside__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--amber, #e8b75a);
  box-shadow: 0 0 0 0 rgba(232, 183, 90, 0.6);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 183, 90, 0.55); }
  50% { box-shadow: 0 0 0 8px rgba(232, 183, 90, 0); }
}

.contact-aside__label {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 14px;
  margin: 34px 0 14px;
}
.contact-aside__label-text {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(240, 238, 230, 0.7);
}
.contact-aside__label-rule {
  height: 1px;
  background: linear-gradient(90deg, rgba(240,238,230,0.24), rgba(240,238,230,0.02));
}

@media (max-width: 768px) {
  .form-line__section-num { font-size: 22px; }
  .contact-cosmos {
    inset: -40px -20px -40px -20px;
    border-radius: 18px;
  }
}

/* ====================== FLUID MOTION — ACCORDIONS, MENUS, REVEALS ====================== */

/* Animated details open/close via JS-driven height. JS adds .is-animating during transition. */
details.fluid-details > summary {
  cursor: pointer;
  list-style: none;
  transition: color 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
details.fluid-details > summary::-webkit-details-marker { display: none; }

.fluid-details__content {
  overflow: hidden;
  will-change: height, opacity;
}
.fluid-details:not([open]) .fluid-details__content { height: 0; }

/* Caret rotation on open */
details.fluid-details .caret,
details.fluid-details .summary-caret {
  display: inline-block;
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
details.fluid-details[open] .caret,
details.fluid-details[open] .summary-caret {
  transform: rotate(180deg);
}

/* Subtle enter animation for revealed children inside accordions */
@keyframes accord-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
details.fluid-details[open] .fluid-details__content > * {
  animation: accord-in 380ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Mobile nav drawer: fluid slide/fade */
@media (max-width: 768px) {
  .nav__drawer,
  .mobile-nav,
  .nav-mobile-panel {
    transition:
      opacity 280ms cubic-bezier(0.16, 1, 0.3, 1),
      transform 320ms cubic-bezier(0.16, 1, 0.3, 1),
      visibility 0s linear 320ms;
  }
  .nav__drawer.is-open,
  .mobile-nav.is-open,
  .nav-mobile-panel.is-open {
    visibility: visible;
    transition-delay: 0s;
  }
}

/* Extra fluidity for reveals: add a gentle blur-in on top of existing opacity/translate. */
.reveal { filter: blur(6px); transition-property: opacity, transform, filter; }
.reveal.in-view { filter: blur(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { filter: none !important; }
  .contact-aside__dot { animation: none; }
  details.fluid-details[open] .fluid-details__content > * { animation: none; }
}

/* ===========================================================
   APPLE-STYLE FLY-IN FOR IMAGES (scroll-triggered)
   =========================================================== */
.fly {
  opacity: 0;
  filter: blur(8px);
  will-change: transform, opacity, filter;
  transition:
    transform 1100ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity   900ms cubic-bezier(0.22, 1, 0.36, 1),
    filter    900ms cubic-bezier(0.22, 1, 0.36, 1);
}
.fly[data-fly="left"]  { transform: translate3d(-64px, 18px, 0) scale(0.985); }
.fly[data-fly="right"] { transform: translate3d( 64px, 18px, 0) scale(0.985); }
.fly[data-fly="up"]    { transform: translate3d(0, 48px, 0) scale(0.985); }
.fly.is-in {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0) scale(1);
}
@media (prefers-reduced-motion: reduce) {
  .fly { transition: none; opacity: 1; filter: none; transform: none; }
}
/* On narrow screens, reduce horizontal fly-in so the transform never creates
   overflow that pushes body scrollWidth past the layout viewport. */
@media (max-width: 720px) {
  .fly[data-fly="left"]  { transform: translate3d(-28px, 18px, 0) scale(0.985); }
  .fly[data-fly="right"] { transform: translate3d( 28px, 18px, 0) scale(0.985); }
}

/* ===========================================================
   SITE-WIDE MOTION POLISH
   - Per-word reveal for titles
   - Section heading underline sweep on enter
   - Magnetic hover for primary CTAs (desktop only)
   - Subtle cursor-tracked tilt for image cards / figures
   - Hero parallax (y-based depth on scroll)
   All hooks respect prefers-reduced-motion & touch devices.
   =========================================================== */

/* ---- Per-word reveal on big titles ---- */
.hero__title .word,
.page-head__title .word,
.teasers__title .word {
  display: inline-block;
  opacity: 0;
  transform: translate3d(0, 0.55em, 0);
  filter: blur(10px);
  transition:
    opacity 900ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 1000ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 900ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--word-delay, 0ms);
  will-change: transform, opacity, filter;
}
/* (whitespace between words is preserved as real text nodes when wrapping) */

.words-ready .hero__title .word,
.words-ready .page-head__title .word,
.words-ready .teasers__title .word {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}

/* ---- Section title: animated gradient underline on enter ---- */
.section__title,
.teasers__title,
.narrative__h {
  position: relative;
}
.section__title::after,
.teasers__title::after,
.narrative__h::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -14px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(232, 183, 90, 0.65), rgba(127, 185, 209, 0.35), transparent);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 1100ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.section__title.in-view::after,
.teasers__title.in-view::after,
.narrative__h.in-view::after {
  transform: scaleX(1);
}
@media (prefers-reduced-motion: reduce) {
  .section__title::after,
  .teasers__title::after,
  .narrative__h::after { transform: none; transition: none; }
}

/* ---- Magnetic hover on primary CTAs (desktop pointer only) ---- */
@media (hover: hover) and (pointer: fine) {
  .btn,
  .contact-chip {
    transition:
      transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
      background 180ms cubic-bezier(0.16, 1, 0.3, 1),
      color 180ms cubic-bezier(0.16, 1, 0.3, 1),
      border-color 180ms cubic-bezier(0.16, 1, 0.3, 1),
      box-shadow 180ms cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
  }
  .btn.is-magnetic,
  .contact-chip.is-magnetic {
    transform: translate3d(var(--mx, 0), var(--my, 0), 0);
  }
  .btn.is-magnetic-release,
  .contact-chip.is-magnetic-release {
    transform: translate3d(0, 0, 0);
    transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
  }
}

/* ---- Image card tilt (desktop pointer only) ---- */
@media (hover: hover) and (pointer: fine) {
  .tilt {
    transform-style: preserve-3d;
    transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
  }
  .tilt.is-tilting {
    transition: transform 80ms linear;
  }
  .tilt img,
  .tilt > * {
    backface-visibility: hidden;
  }
}

/* ---- Hero parallax (JS-driven translateY) ---- */
.hero__image-wrap {
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  .hero__image-wrap { transform: none !important; }
}

/* ---- Soft entrance for teasers/cards in grid (uses .reveal but adds blur) ---- */
.teaser-grid .teaser {
  transition:
    transform 820ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 720ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 720ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 260ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Nav links: animated underline indicator on hover ---- */
.nav__links a {
  position: relative;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--amber, #e8b75a);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  opacity: 0.9;
}
@media (hover: hover) and (pointer: fine) {
  .nav__links a:hover::after,
  .nav__links a.is-active::after {
    transform: scaleX(1);
  }
}

/* ---- Mobile adjustments ---- */
@media (max-width: 640px) {
  .hero__title .word,
  .page-head__title .word,
  .teasers__title .word {
    transform: translate3d(0, 0.35em, 0);
    filter: blur(6px);
  }
}

/* ===========================================================
   ULTRA MOTION PASS
   - Ambient floating orbs (amber/cyan/violet blurred blobs)
   - Custom cursor (dot + trailing ring, magnetic grow on hover)
   - Scroll progress orb (fixed corner ring + percentage)
   - Horizontal marquee between hero + teasers
   - Shimmer sheen sweep across large titles on reveal
   - Narrative kicker character reveal
   - Letter-wave hover for .hero__title em
   =========================================================== */

/* ---- Ambient floating orbs ---- */
.ambient-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;          /* above starfield (-2), below content */
  overflow: hidden;
}
.ambient-orbs__orb {
  position: absolute;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.22;
  will-change: transform;
  animation: orb-drift 28s ease-in-out infinite alternate;
}
.ambient-orbs__orb--amber {
  top: -220px; left: -200px;
  background: radial-gradient(circle at 40% 40%, rgba(232,183,90,0.55), rgba(232,183,90,0) 70%);
  animation-duration: 26s;
}
.ambient-orbs__orb--cyan {
  top: 28%; right: -240px;
  background: radial-gradient(circle at 40% 40%, rgba(127,185,209,0.45), rgba(127,185,209,0) 70%);
  animation-duration: 32s;
  animation-delay: -6s;
  opacity: 0.18;
}
.ambient-orbs__orb--violet {
  top: 12%; left: 42%;
  background: radial-gradient(circle at 40% 40%, rgba(162,140,210,0.35), rgba(162,140,210,0) 70%);
  animation-duration: 38s;
  animation-delay: -12s;
  opacity: 0.14;
}
@keyframes orb-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(80px, -60px, 0) scale(1.1); }
  100% { transform: translate3d(-40px, 40px, 0) scale(0.95); }
}
@media (max-width: 780px) {
  .ambient-orbs__orb { width: 320px; height: 320px; filter: blur(80px); opacity: 0.3; }
}
@media (prefers-reduced-motion: reduce) {
  .ambient-orbs__orb { animation: none; }
}

/* ---- Custom cursor ---- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 300;
  pointer-events: none;
  mix-blend-mode: normal;
  opacity: 0;
  transition: opacity 260ms ease-out;
}
.cursor.is-ready { opacity: 1; }
.cursor__dot,
.cursor__ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  transform: translate3d(-50%, -50%, 0);
  pointer-events: none;
  will-change: transform, width, height, background, border-color;
}
.cursor__dot {
  width: 6px; height: 6px;
  background: #f4e1b0;
  transition: transform 80ms linear, width 220ms cubic-bezier(0.22, 1, 0.36, 1), height 220ms cubic-bezier(0.22, 1, 0.36, 1), background 220ms ease-out, opacity 220ms;
  box-shadow: 0 0 14px rgba(232,183,90,0.55);
}
.cursor__ring {
  width: 30px; height: 30px;
  border: 1px solid rgba(245, 230, 200, 0.35);
  background: transparent;
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), width 320ms cubic-bezier(0.22, 1, 0.36, 1), height 320ms cubic-bezier(0.22, 1, 0.36, 1), border-color 280ms ease-out, opacity 220ms;
}
.cursor.is-hover .cursor__ring {
  width: 56px; height: 56px;
  border-color: rgba(232, 183, 90, 0.55);
  background: rgba(232, 183, 90, 0.06);
}
.cursor.is-hover .cursor__dot {
  width: 4px; height: 4px;
  background: #ffdf9e;
}
.cursor.is-press .cursor__ring { width: 38px; height: 38px; }
.cursor.is-hidden { opacity: 0; }
/* Disable on touch devices — we're not showing a cursor there */
@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor { display: none; }
}
body.cursor-ready { cursor: none; }
body.cursor-ready a, body.cursor-ready button, body.cursor-ready [role="button"] { cursor: none; }

/* ---- Title shimmer sheen (one-shot after reveal) ---- */
.hero__title,
.page-head__title,
.teasers__title {
  position: relative;
}
.hero__title::after,
.page-head__title::after,
.teasers__title::after {
  content: "";
  position: absolute;
  inset: 0;
  top: 0; left: 0; right: 0; bottom: 0;
  width: auto;
  height: auto;
  transform: none;
  transition: none;
  background: linear-gradient(100deg,
    transparent 20%,
    rgba(255, 240, 205, 0) 35%,
    rgba(255, 240, 205, 0.55) 50%,
    rgba(255, 240, 205, 0) 65%,
    transparent 80%);
  background-size: 220% 100%;
  background-position: 200% 0;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0;
  /* Only plays when .words-ready (JS triggers) */
}
.words-ready .hero__title::after,
.words-ready .page-head__title::after,
.words-ready .teasers__title::after {
  animation: title-shimmer 2600ms cubic-bezier(0.22, 1, 0.36, 1) 900ms 1 both;
}
@keyframes title-shimmer {
  0%   { opacity: 0; background-position: 200% 0; }
  25%  { opacity: 1; }
  100% { opacity: 0; background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__title::after, .page-head__title::after, .teasers__title::after { animation: none; }
}

/* Because we previously used .section__title::after, .teasers__title::after for the
   gradient underline sweep, keep that working by using a ::before for the shimmer.
   We already used ::after earlier for the underline. Swap: shimmer uses a new pseudo via
   nesting on a second class so the two don't collide. */
/* REDO: move underline sweep to ::before to free ::after for shimmer. */
.teasers__title::after { /* override to shimmer only — underline via ::before below */ }
.teasers__title::before,
.section__title::before,
.narrative__h::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -14px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(232, 183, 90, 0.65), rgba(127, 185, 209, 0.35), transparent);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 1100ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.teasers__title.in-view::before,
.section__title.in-view::before,
.narrative__h.in-view::before {
  transform: scaleX(1);
}
/* Neutralise old ::after underline rules — prevent double underline */
.section__title::after,
.narrative__h::after { content: none; }

/* ---- Narrative kicker character reveal ---- */
.narrative__kicker .char {
  display: inline-block;
  opacity: 0;
  transform: translate3d(0, 0.3em, 0);
  filter: blur(6px);
  transition:
    opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 800ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 700ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--char-delay, 0ms);
  will-change: transform, opacity, filter;
}
.narrative__kicker.chars-in .char {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}
@media (prefers-reduced-motion: reduce) {
  .narrative__kicker .char { opacity: 1; transform: none; filter: none; transition: none; }
}

/* ---- Letter wave on hero em ---- */
.hero__title em {
  position: relative;
}
.hero__title em .letter {
  display: inline-block;
  will-change: transform, color;
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1), color 420ms ease-out;
}
.hero__title em.is-waving .letter {
  animation: letter-wave 1400ms cubic-bezier(0.22, 1, 0.36, 1) var(--l-delay, 0ms) 1 both;
}
@keyframes letter-wave {
  0%   { transform: translateY(0); }
  35%  { transform: translateY(-14px); }
  60%  { transform: translateY(3px); }
  100% { transform: translateY(0); }
}
@media (hover: hover) and (pointer: fine) {
  .hero__title em:hover .letter { animation: letter-wave 900ms cubic-bezier(0.22, 1, 0.36, 1) var(--l-delay, 0ms) 1 both; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__title em .letter, .hero__title em.is-waving .letter { animation: none; }
}

/* ---- Hero stats: count-up helper ---- */
.stat__num.is-counting { font-variant-numeric: tabular-nums; }

/* ---- Smooth scroll ---- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---- Nav logo SVG draw-in ---- */
.nav__logo svg circle {
  transition: stroke-dashoffset 1400ms cubic-bezier(0.16, 1, 0.3, 1), fill-opacity 900ms cubic-bezier(0.22, 1, 0.36, 1);
}
.nav__logo svg circle:first-of-type {
  stroke-dasharray: 44;
  stroke-dashoffset: 44;
}
.nav__logo svg circle:last-of-type {
  fill-opacity: 0;
}
body.logo-drawn .nav__logo svg circle:first-of-type { stroke-dashoffset: 0; }
body.logo-drawn .nav__logo svg circle:last-of-type  { fill-opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .nav__logo svg circle:first-of-type { stroke-dashoffset: 0; }
  .nav__logo svg circle:last-of-type  { fill-opacity: 1; }
}

/* ============================================================== */
/* ULTRA MOTION PASS 2 — Million-dollar feel                      */
/* ============================================================== */

/* ---- Film-grain overlay (subtle, premium) ---- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 205;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><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 0.65 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain-shift 7.2s steps(8) infinite;
}
@keyframes grain-shift {
  0%   { transform: translate3d(0, 0, 0); }
  10%  { transform: translate3d(-3%, -2%, 0); }
  20%  { transform: translate3d(-7%, 3%, 0); }
  30%  { transform: translate3d(4%, -5%, 0); }
  40%  { transform: translate3d(-3%, 8%, 0); }
  50%  { transform: translate3d(-6%, 2%, 0); }
  60%  { transform: translate3d(5%, -1%, 0); }
  70%  { transform: translate3d(-5%, 6%, 0); }
  80%  { transform: translate3d(3%, -7%, 0); }
  90%  { transform: translate3d(-4%, 4%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}
@media (prefers-reduced-motion: reduce) { .grain { animation: none; opacity: 0.04; } }

/* ---- Spotlight (soft radial glow that follows cursor) ---- */
.spotlight {
  position: fixed;
  top: 0; left: 0;
  width: 640px; height: 640px;
  margin: -320px 0 0 -320px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1; /* Behind content, above starfield */
  background: radial-gradient(
    circle at center,
    rgba(232, 183, 90, 0.09) 0%,
    rgba(127, 185, 209, 0.045) 28%,
    rgba(127, 185, 209, 0.0) 60%
  );
  filter: blur(12px);
  opacity: 0;
  transform: translate3d(0, 0, 0);
  transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
body.spotlight-ready .spotlight { opacity: 1; }
@media (hover: none), (pointer: coarse) { .spotlight { display: none; } }
@media (prefers-reduced-motion: reduce) { .spotlight { display: none; } }

/* ---- Teaser card 3D tilt ---- */
.teaser {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition:
    transform 520ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 520ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 520ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.teaser.is-tilting {
  transition:
    transform 120ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 120ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 120ms cubic-bezier(0.22, 1, 0.36, 1);
}
.teaser__media,
.teaser__body {
  transform: translateZ(0);
  transition: transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}
.teaser.is-tilting .teaser__media { transform: translateZ(26px); }
.teaser.is-tilting .teaser__body  { transform: translateZ(14px); }

/* Internal shine that follows cursor across card */
.teaser::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    380px circle at var(--mx, 50%) var(--my, 50%),
    rgba(232, 183, 90, 0.09),
    rgba(127, 185, 209, 0.035) 35%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 420ms cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 1;
  mix-blend-mode: screen;
}
.teaser.is-tilting::before,
.teaser:hover::before { opacity: 1; }
.teaser > * { position: relative; z-index: 2; }
@media (hover: none), (pointer: coarse) {
  .teaser.is-tilting { transform: none !important; }
  .teaser.is-tilting .teaser__media,
  .teaser.is-tilting .teaser__body { transform: none; }
  .teaser::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .teaser, .teaser.is-tilting { transform: none !important; }
  .teaser__media, .teaser__body { transform: none !important; }
}

/* ---- Hero image frame — rotating conic gradient border ---- */
@property --hero-frame-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
.hero__image-wrap {
  position: relative;
}
.hero__image-wrap::before {
  content: "";
  position: absolute;
  inset: -1.5px;
  border-radius: inherit;
  padding: 1.5px;
  --hero-frame-angle: 0deg;
  background: conic-gradient(
    from var(--hero-frame-angle),
    rgba(232, 183, 90, 0.0) 0deg,
    rgba(232, 183, 90, 0.55) 70deg,
    rgba(127, 185, 209, 0.6) 150deg,
    rgba(255, 246, 214, 0.35) 210deg,
    rgba(127, 185, 209, 0.0) 290deg,
    rgba(232, 183, 90, 0.0) 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: hero-frame-spin 9s linear infinite;
  pointer-events: none;
  z-index: 1;
  opacity: 0.75;
}
@keyframes hero-frame-spin { to { --hero-frame-angle: 360deg; } }
@media (prefers-reduced-motion: reduce) {
  .hero__image-wrap::before { animation: none; }
}

/* ---- Magnetic link underline on nav (gradient grow) ---- */
.nav__links a::after {
  background: linear-gradient(90deg, var(--amber), #fff6d6 50%, var(--cyan)) !important;
  height: 1.5px !important;
  box-shadow: 0 0 12px rgba(232, 183, 90, 0.4);
  transform-origin: left center;
}

/* ---- Button gradient sheen on hover ---- */
.btn--primary { position: relative; overflow: hidden; isolation: isolate; }
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 246, 214, 0.35) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 0;
}
.btn--primary:hover::after { transform: translateX(110%); }
.btn--primary > * { position: relative; z-index: 1; }

/* ---- Scroll-velocity blur on fast scroll ---- */
body.is-scrolling-fast .teaser__media img,
body.is-scrolling-fast .hero__image-wrap img {
  filter: blur(2.5px) saturate(1.02);
  transition: filter 250ms cubic-bezier(0.22, 1, 0.36, 1);
}
body:not(.is-scrolling-fast) .teaser__media img,
body:not(.is-scrolling-fast) .hero__image-wrap img {
  transition: filter 500ms cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) {
  body.is-scrolling-fast .teaser__media img,
  body.is-scrolling-fast .hero__image-wrap img { filter: none; }
}

/* ---- Link underline sweep on any .narrative body link ---- */
.narrative a,
.section__body a,
.teaser__text a {
  position: relative;
  text-decoration: none;
  background-image: linear-gradient(90deg, var(--amber), var(--cyan));
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  transition: background-size 480ms cubic-bezier(0.16, 1, 0.3, 1), color 200ms;
}
.narrative a:hover,
.section__body a:hover,
.teaser__text a:hover { background-size: 100% 1px; }

