﻿/* ==========================================================================
   Rachel Young â€” portfolio
   Tokens â†’ base â†’ layout â†’ components â†’ responsive
   ========================================================================== */

:root {
  /* Palette */
  --ink:        #17332C;
  --ink-soft:   #2C4A43;
  --teal:       #1FBFA8;
  --teal-deep:  #0E7A6B;
  --green-deep: #0B5A3A;
  --mint:       #DFF7F1;
  --mint-line:  #CDE9E2;
  --terra:      #C97B4A;
  --sand:       #F0AD6B;
  --cream:      #FBF2EC;
  --cream-warm: #FCF1E9;
  --card:       #FBFAF7;
  --card-line:  #E7E0D6;
  --body:       #3A332C;
  --muted:      #5A5044;
  --faint:      #9A8C7A;

  /* Type */
  --font-display: 'Jost', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* Layout */
  --wrap: 1120px;
  --gutter: 48px;
  --section-y: 80px;
  --header-h: 74px;
}

/* ---------- Base ---------- */

* { box-sizing: border-box; }

/* `hidden` has to beat the display values set on .contact-form / .skill-group */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  /* Exactly the header, no more: a snapped section then occupies the whole
     strip of viewport below it, which is what the section heights assume. */
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--ink); }

h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.01em; }

p, li, label, input, textarea, button { font-family: var(--font-body); }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 10px 0;
  font-family: var(--font-body);
  font-size: 14px;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Layout primitives ---------- */

.container {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
}

.section-alt   { background: #fff; }
.section-cream { background: var(--cream); }
.section-warm  { background: var(--cream-warm); }
.section-mint  { background: var(--mint); }

/* One section per screen.
   Every section fills the window and centres its own content, and the page
   snaps to section tops — so you land on a whole section instead of half of
   one. Snapping is `proximity`, not `mandatory`, so a section that outgrows a
   short window can still be scrolled through normally. Off below 901px, where
   the stacked layouts are taller than the viewport by design. */
@media (min-width: 901px) {
  html { scroll-snap-type: y proximity; }

  /* Tighter than the mobile rhythm: the sections are screen-height anyway,
     and the spare room is what lets the dense ones fit. */
  :root { --section-y: 32px; }

  main > section {
    /* The sticky header covers the top of the viewport, so a section only
       ever gets the strip below it. Sizing to 100svh instead would push
       every section 74px past the fold and pad the short ones with air. */
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100svh - var(--header-h));
    display: grid;
    align-content: center;
    align-content: safe center;
    scroll-snap-align: start;
  }
  main > section > .container { width: 100%; }
}

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}
.eyebrow--terra { color: var(--terra); }
.eyebrow--deep  { color: var(--teal-deep); }

.section-title {
  font-size: 38px;
  font-weight: 600;
  color: var(--ink);
  margin: 12px 0 18px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin: 14px 0 32px;
}
.section-head .section-title { margin: 0; max-width: 18ch; }
.section-head .section-title--wide { max-width: 26ch; }
.section-head p {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
  max-width: 44ch;
}

/* ---------- Scroll reveal ---------- */
/* Scoped to .js so the page still renders with scripting off. */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -14px rgba(23, 51, 44, 0.5);
}
.btn:active { transform: translateY(0); }

.btn--solid {
  background: var(--ink);
  color: #fff;
  border: 1.5px solid var(--ink);
  padding: 15px 32px;
}
.btn--solid:hover { color: #fff; }

.btn--ghost {
  background: transparent;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  padding: 15px 32px;
}

.btn--sm { padding: 10px 22px; font-size: 13.5px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--mint);
  border-bottom: 1px solid rgba(23, 51, 44, 0.08);
}

.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand {
  font-size: 21px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  gap: 30px;
  align-items: center;
  font-size: 14.5px;
  white-space: nowrap;
}

.navlink {
  position: relative;
  color: var(--ink);
}
.navlink::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1.5px;
  background: var(--teal);
  transition: width 0.28s ease;
}
.navlink:hover::after,
.navlink[aria-current='true']::after { width: 100%; }

/* Mobile menu button â€” hidden on desktop */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1.5px solid rgba(23, 51, 44, 0.18);
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.8px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
  transition: transform 0.25s ease, background 0.1s ease;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 20px;
  height: 1.8px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, top 0.25s ease;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }

.nav-toggle[aria-expanded='true'] span { background: transparent; }
.nav-toggle[aria-expanded='true'] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded='true'] span::after  { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */

.hero .container {
  padding-top: 40px;
  padding-bottom: 40px;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 56px;
  align-items: center;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.hero-kicker span {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--terra);
}
.hero-kicker svg { flex-shrink: 0; }

.hero h1 {
  font-size: 56px;
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  background: linear-gradient(100deg, var(--teal) 0%, var(--sand) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lede {
  font-size: 18px;
  color: #4A3F36;
  line-height: 1.65;
  max-width: 50ch;
  margin: 26px 0 0;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
}

/* ---------- Hero voice intro ---------- */

/* Sits directly under the hero photo, so face and voice read as one thing. */
.voice-wrap { display: flex; }

.voice {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 6px 16px 6px 6px;
  border: 1.5px solid var(--mint-line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  max-width: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.voice:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -18px rgba(23, 51, 44, 0.45);
  border-color: var(--teal);
}
.voice:active { transform: translateY(0); }

/* Elapsed-time fill, sits behind the label */
.voice-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--mint);
  transition: width 0.15s linear;
}

.voice-icon,
.voice-label,
.voice-wave,
.voice-time { position: relative; }

.voice-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Icon swap is class-driven: the `hidden` property does nothing on SVG. */
.voice-icon .icon-play { margin-left: 2px; }
.voice .icon-pause { display: none; }
.voice.is-playing .icon-play { display: none; }
.voice.is-playing .icon-pause { display: block; }

.voice-label {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  white-space: nowrap;
}

/* Waveform. It idles gently — a small "there's a voice here" wave — and
   goes full-amplitude while the clip plays. */
.voice-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 18px;
  flex-shrink: 0;
}
.voice-wave i {
  display: block;
  width: 3px;
  height: 18px;
  border-radius: 2px;
  background: var(--teal-deep);
  opacity: 0.45;
  transform: scaleY(0.3);
  animation: voiceWave 1.5s ease-in-out infinite;
  transition: opacity 0.2s ease;
}
.voice-wave i:nth-child(2) { animation-delay: 0.18s; }
.voice-wave i:nth-child(3) { animation-delay: 0.36s; }
.voice-wave i:nth-child(4) { animation-delay: 0.12s; }
.voice-wave i:nth-child(5) { animation-delay: 0.3s; }

@keyframes voiceWave {
  0%, 100% { transform: scaleY(0.28); }
  50%      { transform: scaleY(0.62); }
}
@keyframes voiceWavePlaying {
  0%, 100% { transform: scaleY(0.25); }
  50%      { transform: scaleY(1); }
}

.voice:hover .voice-wave i,
.voice:focus-visible .voice-wave i { opacity: 0.75; animation-duration: 1s; }

.voice-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* Playing state */
.voice.is-playing .voice-icon { background: var(--teal-deep); }
.voice.is-playing .voice-wave i {
  opacity: 1;
  animation-name: voiceWavePlaying;
  animation-duration: 0.85s;
}

.hero-aside {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-photo {
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 4.85;
  box-shadow: 0 30px 60px -30px rgba(23, 51, 44, 0.4);
}
.hero-photo picture { display: block; width: 100%; height: 100%; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hero-stat {
  background: var(--mint);
  border-radius: 20px;
  padding: 20px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-stat .num {
  font-size: 32px;
  font-weight: 600;
  color: var(--teal);
  line-height: 1;
}

.hero-stat .label {
  font-family: var(--font-body);
  font-size: 12px;
  color: #4A5B54;
  line-height: 1.4;
  margin-top: 7px;
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 56px;
  align-items: start;
}

.prose p {
  font-size: 17px;
  color: var(--body);
  line-height: 1.8;
  margin: 0 0 18px;
}
.prose p:last-child { margin-bottom: 0; }

.pullquote {
  border-left: 2px solid var(--sand);
  padding: 4px 0 4px 26px;
}
.pullquote p {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.55;
  margin: 0;
}
.pullquote cite {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--terra);
  margin-top: 14px;
  font-style: normal;
}

/* Rachel's own words, closing the About prose */
.prose .prose-quote {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.55;
  border-left: 2px solid var(--teal);
  padding-left: 22px;
  margin: 26px 0 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 36px;
}
.stat { border-top: 2px solid var(--mint); padding-top: 16px; }
.stat .num {
  font-size: 34px;
  font-weight: 600;
  color: var(--teal);
  line-height: 1;
}
.stat .label {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 6px;
}

/* ---------- Experience ----------
   Built on the About stat row: a rule, a big figure, a label. Four of them,
   present on the left and school on the right, so the rules themselves read as
   the timeline. No boxes and no bullets — the duties are already covered in
   About and Skills, and repeating them here only made the page longer. */

.xp-line {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.xp-node { position: relative; }

/* The rule, in two layers: a mint one that draws itself left to right on
   scroll, and a teal one that fills over it when the stop is current. */
.xp-node::before,
.xp-node::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 2px;
  transform-origin: left center;
}
.xp-node::before {
  right: 0;
  background: var(--mint);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.xp-node::after {
  width: 0;
  background: var(--teal);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.js .xp-line:not(.in) .xp-node::before { transform: scaleX(0); }
.xp-line.in .xp-node:nth-child(1)::before { transition-delay: 0.05s; }
.xp-line.in .xp-node:nth-child(2)::before { transition-delay: 0.17s; }
.xp-line.in .xp-node:nth-child(3)::before { transition-delay: 0.29s; }
.xp-line.in .xp-node:nth-child(4)::before { transition-delay: 0.41s; }

.xp-node.is-passed::after,
.xp-node.is-active::after { width: 100%; }

.xp-node-btn {
  display: block;
  width: 100%;
  padding: 26px 0 0;
  border: 0;
  border-radius: 10px;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.xp-node-btn:hover { transform: translateY(-4px); }
.xp-node-btn:focus-visible { outline-offset: 7px; }

.xp-node-years {
  display: block;
  font-family: var(--font-display);
  font-size: 60px;
  font-weight: 600;
  color: var(--teal);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}
.xp-node-years small {
  font-size: 0.36em;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
  margin-left: 6px;
}
/* The stop she's at now reads warm rather than teal, so "present" is legible
   at a glance without a label saying so. */
.xp-node--now .xp-node-years { color: var(--terra); }

/* Company line — logo mark and name on one row. The min-height is two lines of
   the name, so a company that wraps doesn't drop its role and place out of
   line with the rest of the row. */
.xp-node-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  min-height: 46px;
}

.xp-node-logo {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.3s ease;
}
.xp-node-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}
.xp-node-btn:hover .xp-node-logo,
.xp-node.is-active .xp-node-logo {
  transform: scale(1.08);
  box-shadow: 0 12px 22px -14px rgba(23, 51, 44, 0.7);
}

.xp-node-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  transition: color 0.3s ease;
}
.xp-node-btn:hover .xp-node-name,
.xp-node.is-active .xp-node-name { color: var(--teal-deep); }

.xp-node-role {
  display: block;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 16px;
  /* Two lines' worth, for the same reason. */
  min-height: 2.4em;
}

.xp-node-place {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--faint);
  margin-top: 10px;
}

/* Contents arrive just behind their own rule. */
.js .xp-line:not(.in) .xp-node-years,
.js .xp-line:not(.in) .xp-node-head,
.js .xp-line:not(.in) .xp-node-role,
.js .xp-line:not(.in) .xp-node-place { opacity: 0; transform: translateY(16px); }

.xp-node-years,
.xp-node-head,
.xp-node-role,
.xp-node-place { transition: opacity 0.55s ease, transform 0.55s ease; }
.xp-line.in .xp-node-years,
.xp-line.in .xp-node-head,
.xp-line.in .xp-node-role,
.xp-line.in .xp-node-place { opacity: 1; transform: none; }

.xp-line.in .xp-node:nth-child(1) .xp-node-years { transition-delay: 0.12s; }
.xp-line.in .xp-node:nth-child(2) .xp-node-years { transition-delay: 0.24s; }
.xp-line.in .xp-node:nth-child(3) .xp-node-years { transition-delay: 0.36s; }
.xp-line.in .xp-node:nth-child(4) .xp-node-years { transition-delay: 0.48s; }
.xp-line.in .xp-node:nth-child(1) .xp-node-head,
.xp-line.in .xp-node:nth-child(1) .xp-node-role,
.xp-line.in .xp-node:nth-child(1) .xp-node-place { transition-delay: 0.2s; }
.xp-line.in .xp-node:nth-child(2) .xp-node-head,
.xp-line.in .xp-node:nth-child(2) .xp-node-role,
.xp-line.in .xp-node:nth-child(2) .xp-node-place { transition-delay: 0.32s; }
.xp-line.in .xp-node:nth-child(3) .xp-node-head,
.xp-line.in .xp-node:nth-child(3) .xp-node-role,
.xp-line.in .xp-node:nth-child(3) .xp-node-place { transition-delay: 0.44s; }
.xp-line.in .xp-node:nth-child(4) .xp-node-head,
.xp-line.in .xp-node:nth-child(4) .xp-node-role,
.xp-line.in .xp-node:nth-child(4) .xp-node-place { transition-delay: 0.56s; }
/* ---------- Hard moments ---------- */

.moment-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: center;
  margin-top: 26px;
}

/* Second story has no photo â€” the panel takes the picture's place */
.moment-grid--flip { grid-template-columns: 1.15fr 0.85fr; }
.moment-grid--flip .moment-panel { order: 2; }
.moment-grid--flip .moment-body { order: 1; }

.moment-panel {
  min-height: 320px;
  border-radius: 20px;
  background: linear-gradient(150deg, #BEE9DC 0%, #EFD3B4 55%, #E9B98A 100%);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 30px 60px -34px rgba(74, 63, 54, 0.45);
}
.moment-panel svg {
  width: 34px;
  height: 34px;
  padding: 14px;
  box-sizing: content-box;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  color: var(--ink);
}
.moment-panel span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.moment-title {
  font-size: 30px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 20px;
  line-height: 1.2;
}

.moment-photo {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(74, 63, 54, 0.42);
}
.moment-photo picture { display: block; }
.moment-photo img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.moment-body p {
  font-size: 16.5px;
  color: var(--body);
  line-height: 1.8;
  margin: 0 0 16px;
}
.moment-body p.emphasis {
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 0;
}

/* ---------- Full story ----------
   The opening lines are always on the page — enough to start reading and
   decide. The rest is folded behind the arrow below them, and script.js
   animates the height between the peek and the full text. No inner
   scrollbox: the section grows instead.

   `--story-peek` is the visible height when collapsed, and the collapse only
   applies under `html.js` — with scripting off the whole story shows and the
   button is hidden, rather than trapping the text behind a dead control. */

.story {
  --story-peek: 190px;
  /* The fade has to end on the section's own background. Override this if a
     story is ever dropped into a section with a different ground. */
  --story-fade: var(--cream-warm);
  margin-top: 22px;
}

.story-body {
  position: relative;
  padding-left: 20px;
  border-left: 2px solid #EAD9C7;
  overflow: hidden;
}
.story-body p {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--body);
  margin-bottom: 18px;
}
.story-body p:last-child { margin-bottom: 0; }

.js .story-body.is-collapsed { max-height: var(--story-peek); }

/* The text runs out under a fade rather than a hard cut, so it reads as
   "continues" instead of "ends here". Sits on the animated bottom edge, so
   it tracks the height as it travels. */
.story-body::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 76px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(252, 241, 233, 0) 0%, var(--story-fade) 88%);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.js .story-body.is-collapsed::after { opacity: 1; }

html:not(.js) .story-toggle { display: none; }

.story-toggle {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.2s ease;
}
.story-toggle:hover { color: var(--terra); }

/* The arrow itself: small, round, and nudging downward until it's used. */
.story-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid #EAD9C7;
  color: var(--ink);
  box-shadow: 0 8px 18px -12px rgba(74, 63, 54, 0.55);
  animation: storyNudge 2.4s ease-in-out infinite;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.story-toggle:hover .story-arrow {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  animation: none;
}
.story-toggle[aria-expanded='true'] .story-arrow {
  transform: rotate(180deg);
  animation: none;
}
.story-toggle[aria-expanded='true'] .story-label { color: var(--muted); }

@keyframes storyNudge {
  0%, 100%   { transform: translateY(0); }
  45%        { transform: translateY(4px); }
  70%        { transform: translateY(0); }
}

/* While a story is open the section is taller than the window on purpose —
   snapping would fight you halfway down the text. */
main > section.story-open { scroll-snap-align: none; }

@media (min-width: 901px) {
  /* Open, the text column is much taller than the photo. Top-align the row
     and let the photo ride along beside the reading instead of sitting
     marooned in the middle of it. */
  .story-open .moment-grid { align-items: start; }
  .story-open .moment-photo {
    position: sticky;
    top: calc(var(--header-h) + 24px);
  }
}

.tag-row {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.tag {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--ink);
  background: var(--mint);
  border-radius: 999px;
  padding: 6px 15px;
  font-weight: 600;
}

/* ---------- Skills ---------- */

.skills-intro {
  font-size: 16px;
  color: var(--muted);
  margin: 12px 0 24px;
  max-width: 62ch;
}

/* Tabs and their one-line hint share a row, so the filter costs no height. */
.skill-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 20px;
}
.skill-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tabs-hint {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  margin-left: auto;
}
.skill-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--mint-line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.skill-tab:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -14px rgba(23, 51, 44, 0.5);
}
.skill-tab[aria-selected='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.skill-tab .dot { width: 8px; height: 8px; border-radius: 50%; }

/* Each category keeps its own labelled band, with a count and a rule that
   runs out to the edge of the grid. */
.skill-group { display: block; margin-bottom: 22px; }
.skill-group:last-child { margin-bottom: 0; }
.skill-group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.skill-group-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}
.skill-group-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.skill-group-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
}
.skill-group-rule { flex: 1; height: 1px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.skill-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 16px;
  padding: 14px 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.skill-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px -18px rgba(23, 51, 44, 0.35);
  border-color: var(--mint-line);
}
.skill-card .icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.skill-card h4 {
  font-size: 15px;
  color: var(--ink);
  margin: 2px 0 5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.skill-card p {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.icon--teal  { background: var(--mint);     color: var(--teal-deep); }
.icon--terra { background: #FCEEE3;         color: var(--terra); }
.icon--green { background: #E3F2E9;         color: var(--green-deep); }
.icon--warm  { background: var(--cream-warm); color: var(--terra); }

.chip {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--terra);
  background: var(--cream-warm);
  border: 1px solid #F3D3B8;
  border-radius: 999px;
  padding: 2px 7px;
}

/* ---------- Hobbies ---------- */

.hobby-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.hobby-card {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 16px;
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.hobby-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px -18px rgba(23, 51, 44, 0.35);
  border-color: var(--mint-line);
}
.hobby-card .icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.hobby-card h3 {
  font-size: 16px;
  color: var(--ink);
  margin: 0 0 6px;
  font-weight: 600;
}
.hobby-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
  margin-top: 16px;
}

.contact-intro h2 {
  font-size: 42px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 14px;
}
.contact-intro > p {
  font-size: 16px;
  color: #3A5B54;
  line-height: 1.7;
  margin: 0 0 26px;
  max-width: 42ch;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--teal-deep);
}
.contact-list svg { flex-shrink: 0; }
.contact-list a,
.contact-list span {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 13.5px;
  overflow-wrap: anywhere;
}
.contact-list a:hover { color: var(--teal-deep); }

.socials {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.socials a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #B9E0D6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.socials a:hover {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.contact-form,
.form-done {
  background: #fff;
  border: 1px solid var(--mint-line);
  border-radius: 20px;
  box-shadow: 0 24px 46px -28px rgba(23, 51, 44, 0.3);
}
.contact-form {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-form label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5A7168;
  display: block;
  margin-bottom: 7px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  font-size: 15px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--mint-line);
  border-radius: 11px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.contact-form textarea { resize: vertical; min-height: 108px; }
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--teal);
  background: #fff;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #A9A296; }

.contact-form .btn--solid {
  padding: 15px;
  font-weight: 600;
  text-align: center;
}

.form-done {
  padding: 44px 28px;
  text-align: center;
}
.form-done .check {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--mint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--teal-deep);
}
.form-done h3 {
  font-size: 22px;
  color: var(--ink);
  margin: 0 0 8px;
  font-weight: 600;
}
.form-done p {
  font-size: 14.5px;
  color: var(--muted);
  margin: 0;
}

.site-footer {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: #5A7168;
  margin-top: 48px;
  padding-top: 26px;
  border-top: 1px solid rgba(23, 51, 44, 0.12);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Floating chat ----------
   Bottom-right "message Rachel" widget. Everything in it is built or driven
   by script.js, so the whole block is scoped to .js — with scripting off the
   launcher never appears and the contact section is the only route, which is
   what we want rather than a dead button. */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.chat { display: none; }
.js .chat {
  display: block;
  position: fixed;
  right: 26px;
  bottom: 26px;
  /* Over the sticky header (50) but under the skip link (100). */
  z-index: 80;
  font-family: var(--font-body);
}

/* --- Launcher --- */

.chat-launcher {
  position: relative;
  display: block;
  width: 68px;
  height: 68px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
  box-shadow: 0 18px 34px -14px rgba(23, 51, 44, 0.55);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  /* The ring is drawn with a border on the face, not on the button, so the
     shadow underneath stays a clean circle. */
}
.chat-launcher:hover { transform: translateY(-3px) scale(1.04); }
.chat-launcher:active { transform: translateY(0) scale(0.98); }

.chat-launcher-face {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 2.5px solid #fff;
  transition: opacity 0.2s ease, transform 0.28s ease;
}
.chat-launcher-face picture,
.chat-launcher-face img { display: block; width: 100%; height: 100%; }
.chat-launcher-face img { object-fit: cover; object-position: 50% 22%; }

/* Open state swaps the portrait for a close X, in place. */
.chat-launcher-x {
  position: absolute;
  inset: 0;
  margin: auto;
  color: #fff;
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
  transition: opacity 0.2s ease, transform 0.28s ease;
}
.chat.is-open .chat-launcher-face { opacity: 0; transform: scale(0.6); }
.chat.is-open .chat-launcher-x { opacity: 1; transform: rotate(0) scale(1); }

/* "She's around" dot — same green in both places it appears. */
.chat-dot {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #34C77B;
  border: 2.5px solid #fff;
}
.chat-launcher > .chat-dot::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid #34C77B;
  animation: chatPing 2.4s ease-out infinite;
}
@keyframes chatPing {
  0%        { transform: scale(1);   opacity: 0.7; }
  70%, 100% { transform: scale(2.1); opacity: 0; }
}
.chat.is-open .chat-launcher > .chat-dot { display: none; }

.chat-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--terra);
  border: 2px solid var(--cream);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 17px;
}
.chat-badge[hidden] { display: none; }

/* --- Nudge bubble --- */

.chat-nudge {
  position: absolute;
  right: 6px;
  bottom: 82px;
  width: 258px;
  padding: 15px 17px;
  background: #fff;
  border: 1px solid var(--card-line);
  border-radius: 18px 18px 6px 18px;
  box-shadow: 0 20px 40px -22px rgba(23, 51, 44, 0.55);
  animation: chatNudgeIn 0.42s cubic-bezier(0.22, 1.2, 0.4, 1) both;
}
.chat-nudge p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--body);
}
.chat-nudge strong { color: var(--ink); }
/* Tail, pointing down at the launcher */
.chat-nudge::after {
  content: '';
  position: absolute;
  right: 20px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-right: 1px solid var(--card-line);
  border-bottom: 1px solid var(--card-line);
  transform: rotate(45deg);
}
.chat-nudge-x {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  padding: 0;
}
.chat-nudge-x:hover { background: var(--cream); color: var(--ink); }

@keyframes chatNudgeIn {
  from { opacity: 0; transform: translateY(10px) scale(0.94); }
  to   { opacity: 1; transform: none; }
}

/* --- Panel --- */

.chat-panel {
  position: absolute;
  right: 0;
  bottom: 84px;
  width: 366px;
  max-width: calc(100vw - 36px);
  max-height: min(600px, calc(100vh - 130px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 24px;
  box-shadow: 0 40px 70px -30px rgba(23, 51, 44, 0.6);
  transform-origin: 100% 100%;
  animation: chatPanelIn 0.34s cubic-bezier(0.22, 1.15, 0.4, 1) both;
}
/* It only takes focus so the panel is where the keyboard lands when it opens
   on a phone — it isn't a control, so it shouldn't wear a focus ring. */
.chat-panel:focus,
.chat-panel:focus-visible { outline: none; }
@keyframes chatPanelIn {
  from { opacity: 0; transform: translateY(16px) scale(0.92); }
  to   { opacity: 1; transform: none; }
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  background: var(--mint);
  border-bottom: 1px solid var(--mint-line);
  flex-shrink: 0;
}

.chat-avatar {
  position: relative;
  flex-shrink: 0;
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: visible;
}
.chat-avatar--lg { width: 46px; height: 46px; }
.chat-avatar picture { display: block; width: 100%; height: 100%; }
.chat-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 22%;
  border: 2px solid #fff;
}
.chat-avatar .chat-dot {
  right: -1px;
  bottom: -1px;
  width: 12px;
  height: 12px;
  border-width: 2px;
  border-color: var(--mint);
}

.chat-who { flex: 1; min-width: 0; line-height: 1.3; }
.chat-who strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.chat-who span {
  display: block;
  font-size: 11.5px;
  color: #4C7268;
  margin-top: 2px;
}

.chat-x {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
}
.chat-x:hover { background: rgba(23, 51, 44, 0.09); }

/* --- Thread --- */

.chat-log {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 15px 6px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  scrollbar-width: thin;
}

.chat-day {
  align-self: center;
  margin: 0 0 4px;
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(23, 51, 44, 0.06);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

/* One row = avatar gutter + bubble. The gutter stays even when the avatar is
   omitted, so a run of her messages lines up flush. */
.chat-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 90%;
  animation: chatMsgIn 0.32s cubic-bezier(0.22, 1.15, 0.4, 1) both;
}
.chat-row--me { align-self: flex-end; flex-direction: row-reverse; }
.chat-row--her { align-self: flex-start; }
.chat-row .chat-avatar { align-self: flex-end; margin-bottom: 2px; }
.chat-row .chat-avatar .chat-dot { display: none; }
.chat-row--her.no-face { padding-left: 42px; }

@keyframes chatMsgIn {
  from { opacity: 0; transform: translateY(9px); }
  to   { opacity: 1; transform: none; }
}

.chat-bubble {
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--body);
  overflow-wrap: anywhere;
}
.chat-row--her .chat-bubble {
  background: #fff;
  border: 1px solid var(--card-line);
  border-bottom-left-radius: 6px;
}
.chat-row--me .chat-bubble {
  background: var(--mint);
  border: 1px solid var(--mint-line);
  color: var(--ink);
  border-bottom-right-radius: 6px;
}
.chat-bubble p { margin: 0; font-size: inherit; line-height: inherit; }
.chat-bubble a { color: var(--teal-deep); text-decoration: underline; text-underline-offset: 2px; }
.chat-bubble p + p { margin-top: 7px; }
.chat-bubble .chat-time {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--faint);
  text-align: right;
}

/* Typing dots */
.chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 13px 15px;
}
.chat-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
  animation: chatType 1.1s ease-in-out infinite;
}
.chat-typing i:nth-child(2) { animation-delay: 0.16s; }
.chat-typing i:nth-child(3) { animation-delay: 0.32s; }
@keyframes chatType {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  40%      { opacity: 1;   transform: translateY(-3px); }
}

/* --- Voice message ---
   Plays the same assets/rachel-intro.mp3 the hero button does, off the same
   <audio> element, so the two controls stay in sync and the clip is only ever
   downloaded once. */

/* The voice note is its own control, so the bubble drops its padding and the
   row takes the full width of the log — the waveform needs the room. */
.chat-row--voice { max-width: 100%; width: 100%; }
.chat-row--voice .chat-bubble { flex: 1; min-width: 0; }
.chat-bubble--voice { padding: 0; }

.chat-voice {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 13px 9px 9px;
}
.chat-voice-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease;
}
.chat-voice-btn:hover { background: var(--teal-deep); }
.chat-voice-btn .icon-play { margin-left: 2px; }
.chat-voice-btn .icon-pause { display: none; }
.chat-voice.is-playing .chat-voice-btn { background: var(--teal-deep); }
.chat-voice.is-playing .icon-play { display: none; }
.chat-voice.is-playing .icon-pause { display: block; }

/* Click anywhere on the bars to seek. */
.chat-wave {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 26px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}
.chat-wave i {
  flex: 1;
  min-width: 2px;
  height: var(--h, 40%);
  border-radius: 2px;
  background: var(--mint-line);
  transition: background 0.12s linear;
  pointer-events: none;
}
.chat-wave i.on { background: var(--teal-deep); }

.chat-voice-time {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

/* --- Composer --- */

.chat-foot {
  flex-shrink: 0;
  padding: 10px 15px 13px;
  background: #fff;
  border-top: 1px solid var(--card-line);
}

.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.chat-chip {
  border: 1px solid var(--mint-line);
  background: var(--mint);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}
.chat-chip:hover { background: var(--teal); color: #fff; transform: translateY(-1px); }

.chat-input {
  width: 100%;
  min-height: 42px;
  max-height: 110px;
  resize: none;
  padding: 11px 14px;
  border: 1px solid var(--card-line);
  border-radius: 14px;
  background: var(--card);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.chat-input:focus { border-color: var(--teal); background: #fff; }
.chat-input::placeholder { color: #A9A296; }

.chat-send {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 9px;
}
.chat-go {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 10px;
  border: 0;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.chat-go svg { flex-shrink: 0; }
/* Answering a question: one Send, with a quiet way back out beside it. */
.chat-send--step { grid-template-columns: 1fr auto; }

.chat-cancel {
  border: 0;
  background: none;
  padding: 0 12px;
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--faint);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.chat-cancel:hover { color: var(--ink); }

.chat-go--mail { background: var(--ink); }
.chat-go[disabled] { opacity: 0.55; cursor: default; transform: none; }
.chat-input[disabled] { opacity: 0.6; cursor: default; }
.chat-go--wa   { background: #25D366; color: #07331B; }
.chat-go:hover { transform: translateY(-2px); box-shadow: 0 12px 22px -12px rgba(23, 51, 44, 0.6); }
.chat-go:active { transform: translateY(0); }

.chat-note {
  margin: 9px 0 0;
  text-align: center;
  font-size: 11px;
  color: var(--faint);
}

/* ---------- Filling the screen ----------
   Companion to the one-section-per-screen rule near the top of the file, kept
   down here so it lands after the components it adjusts. Blocks that would
   otherwise leave a section half empty grow with the window, so spare height
   becomes picture and card instead of padding. */

@media (min-width: 901px) {
  .moment-photo img { min-height: clamp(400px, 68vh, 660px); }
  .moment-panel { min-height: clamp(300px, 58vh, 560px); }

  .hobby-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .hobby-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: clamp(170px, 29vh, 300px);
    padding: 28px 32px;
  }
  .hobby-card .icon { width: 52px; height: 52px; margin-bottom: 18px; }
  .hobby-card h3 { font-size: 19px; margin-bottom: 8px; }
  .hobby-card p { font-size: 14.5px; }

  /* Contact: centre the two columns against each other and let the footer
     drop to the bottom edge, so the leftover height reads as layout rather
     than as a gap under the form. */
  .contact-grid { align-items: center; }
  #contact > .container { display: flex; flex-direction: column; justify-content: center; }
  #contact .site-footer { margin-top: auto; padding-top: 40px; }
}

/* Tall windows. Same one-screen rule, but the spare height goes into bigger
   type and roomier components instead of empty bands top and bottom. */
@media (min-width: 1200px) and (min-height: 950px) {
  :root { --section-y: 56px; }

  .hero h1 { font-size: 62px; }
  .hero-lede { font-size: 19px; margin-top: 30px; }
  .hero-actions { margin-top: 40px; }
  .hero-photo { aspect-ratio: 4 / 5.15; }
  .hero-stat { padding: 24px 20px; }

  .section-title { font-size: 42px; }
  .prose p { font-size: 18px; line-height: 1.85; }
  .pullquote p { font-size: 21px; }
  .stats { margin-top: 52px; }
  .stat .num { font-size: 38px; }

  .xp-line { margin-top: 62px; }
  .xp-node-btn { padding-top: 26px; }
  .xp-node-years { font-size: 64px; }
  .xp-node-logo { width: 42px; height: 42px; }
  .xp-node-name { font-size: 20px; }
  .xp-node-role { font-size: 14.5px; }

  .moment-title { font-size: 33px; }
  .moment-body p { font-size: 17.5px; }
  .moment-photo img { min-height: clamp(400px, 68vh, 780px); }
  .moment-panel { min-height: clamp(300px, 66vh, 740px); }

  .skill-card { padding: 16px; }
  .skill-card h4 { font-size: 15.5px; }
  .skill-card p { font-size: 13px; }
  .skill-card .icon { width: 42px; height: 42px; }

  .hobby-card { min-height: clamp(170px, 29vh, 380px); }

  .contact-intro h2 { font-size: 48px; }
  .contact-intro > p { font-size: 17.5px; }
  .contact-form { padding: 34px; gap: 20px; }
  .contact-form input,
  .contact-form textarea { font-size: 16px; padding: 14px 16px; }
  .contact-form textarea { min-height: 150px; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Laptop / small desktop. The gutter tightens early (1200 rather than 1080)
   because between those widths the extra text wrapping is what pushes the
   denser sections past one screen. */
@media (max-width: 1200px) {
  :root { --gutter: 32px; }
  .skill-card { padding: 13px 14px; }
  .skill-card p { line-height: 1.45; }
}

/* Narrow desktop: the two-column sections still have to clear one screen, so
   the body copy steps down a notch. */
@media (max-width: 1080px) {
  .nav { gap: 22px; font-size: 14px; }
  .hero h1 { font-size: 48px; }
  .section-title { font-size: 33px; }
  .prose p { font-size: 15.5px; line-height: 1.7; }
  .prose .prose-quote { font-size: 17px; }
  .pullquote p { font-size: 18px; }
  .moment-body p { font-size: 15.5px; }
  .xp-line { gap: 22px; }
  .xp-node-years { font-size: 44px; }
  .xp-node-head { gap: 10px; margin-top: 16px; }
  .xp-node-logo { width: 34px; height: 34px; }
  .xp-node-name { font-size: 16.5px; }
  .xp-node-role { font-size: 12.5px; margin-top: 11px; }
  .skill-card h4 { font-size: 14.5px; }
  .skill-card p { font-size: 12px; }
  .skill-card .icon { width: 34px; height: 34px; }
}

/* Tablet â€” collapse the nav into a menu, relax the multi-column grids */
@media (max-width: 900px) {
  :root { --section-y: 64px; }

  /* Nav */
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px var(--gutter) 22px;
    background: var(--mint);
    border-bottom: 1px solid rgba(23, 51, 44, 0.1);
    box-shadow: 0 24px 34px -26px rgba(23, 51, 44, 0.6);
    font-size: 16px;
    white-space: normal;
    /* Collapsed state â€” animated so the menu doesn't pop */
    display: flex;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease, visibility 0s linear 0.3s;
  }
  .site-header.nav-open .nav {
    max-height: 560px;
    opacity: 1;
    visibility: visible;
    transition: max-height 0.35s ease, opacity 0.25s ease, visibility 0s;
  }
  .nav .navlink {
    padding: 13px 2px;
    border-bottom: 1px solid rgba(23, 51, 44, 0.08);
  }
  .nav .navlink::after { display: none; }
  .nav .btn {
    margin-top: 14px;
    text-align: center;
    padding: 14px 22px;
    font-size: 15px;
  }

  /* Hero */
  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 56px;
    padding-bottom: 64px;
  }
  .hero-aside {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 16px;
  }
  .hero-photo { flex: 1 1 58%; aspect-ratio: 4 / 4.4; }
  .hero-stats { flex: 1 1 34%; }
  /* Photo and stats sit side by side; the voice pill takes the row below. */
  .voice-wrap { flex: 1 1 100%; order: 3; }
  .hero-stat {
    flex: 1 1 42%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* Content grids */
  .about-grid,
  .moment-grid,
  .moment-grid--flip,
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }

  /* Stacked, both stories read panel-then-text like the first one */
  .moment-grid--flip .moment-panel,
  .moment-grid--flip .moment-body { order: 0; }

  .moment-photo img { min-height: 300px; }
  .moment-panel { min-height: 200px; }

  /* Experience — two ruled columns instead of four. */
  .xp-line { grid-template-columns: repeat(2, 1fr); gap: 34px 30px; margin-top: 34px; }
  .xp-node-years { font-size: 46px; }
  /* Stacked, each stop stands alone — nothing left to keep level. */
  .xp-node-role { min-height: 0; }

  .card-grid    { grid-template-columns: repeat(2, 1fr); }
  .hobby-grid   { grid-template-columns: repeat(2, 1fr); }
}

/* Short desktop windows (13" laptops, a browser with lots of toolbars).
   Same one-screen goal, less air and slightly smaller display type. */
@media (min-width: 901px) and (max-height: 800px) {
  :root { --section-y: 36px; }
  .hero .container { padding-top: 40px; padding-bottom: 40px; }
  .hero-photo { aspect-ratio: 4 / 4.3; }
  .hero h1 { font-size: 46px; }
  .hero-lede { font-size: 17px; margin-top: 20px; }
  .hero-actions { margin-top: 26px; }
  .section-title { font-size: 32px; }
  .contact-intro h2 { font-size: 36px; }
  .stats { margin-top: 26px; }
  .moment-photo img { min-height: 320px; }
  .moment-title { font-size: 27px; margin-bottom: 16px; }
  .prose p { font-size: 15.5px; line-height: 1.7; margin-bottom: 14px; }
  .pullquote p { font-size: 18px; }
  .xp-line { margin-top: 32px; gap: 22px; }
  .xp-node-btn { padding-top: 16px; }
  .xp-node-years { font-size: 40px; }
  .xp-node-head { margin-top: 14px; }
  .xp-node-logo { width: 32px; height: 32px; }
  .xp-node-name { font-size: 16px; }
  .xp-node-role { font-size: 12.5px; margin-top: 10px; }
  .skill-card { padding: 11px 13px; }
  .skill-card p { font-size: 12px; line-height: 1.45; }
  .skill-card .icon { width: 34px; height: 34px; }
}

/* Large phone */
@media (max-width: 640px) {
  :root { --gutter: 20px; --section-y: 52px; }

  .brand { font-size: 19px; }

  .hero h1 { font-size: clamp(32px, 8.6vw, 42px); line-height: 1.14; }
  .hero-kicker span { font-size: 11px; letter-spacing: 0.09em; }
  .hero-lede { font-size: 16.5px; margin-top: 20px; }
  .hero-actions { margin-top: 26px; gap: 10px; }
  .hero-actions .btn {
    width: 100%;
    text-align: center;
    padding: 15px 20px;
    white-space: normal;
  }

  /* Single column again, so the pill goes straight back under the photo */
  .voice-wrap { order: 0; }
  .voice { width: 100%; padding-right: 16px; }
  .voice-wave { margin-left: auto; }
  .voice-time { margin-left: 4px; }
  .hero-aside { flex-direction: column; }
  .hero-photo { aspect-ratio: 4 / 4.6; }

  .section-title,
  .section-head .section-title { font-size: 29px; max-width: none; }
  .contact-intro h2 { font-size: 33px; }

  .section-head { display: block; margin-bottom: 26px; }
  .section-head p { margin-top: 12px; max-width: none; }

  .prose p { font-size: 16px; line-height: 1.75; }
  .pullquote { padding-left: 20px; }
  .pullquote p { font-size: 18px; }

  .stats { grid-template-columns: repeat(2, 1fr); gap: 20px 18px; margin-top: 36px; }
  .stat .num { font-size: 29px; }

  .moment-grid { gap: 28px; }
  .moment-photo img { min-height: 230px; }
  .story { --story-peek: 155px; }
  .story-body { padding-left: 16px; }
  .story-body p { font-size: 15px; line-height: 1.8; }
  .moment-panel { min-height: 170px; padding: 26px 20px; }
  .moment-title { font-size: 25px; margin-bottom: 16px; }
  .moment-body p { font-size: 15.5px; }

  /* Experience — tighter vertical timeline, logo and years on one line */
  /* Experience — one ruled entry per row */
  .xp-line { grid-template-columns: 1fr; gap: 26px; }
  .xp-node-years { font-size: 42px; }
  .xp-node-name { font-size: 17px; }
  .xp-node-role { font-size: 13px; margin-top: 10px; }

  /* Touch targets â€” keep the interactive bits thumb-sized */
  .brand { padding: 8px 0; }
  .skill-tab { padding: 12px 18px; }
  .contact-list { gap: 2px; }
  .contact-list li { min-height: 40px; }
  .contact-list a { display: block; padding: 11px 0; }

  /* Tabs scroll sideways instead of stacking into a tall block */
  .skills-intro { font-size: 15px; margin: 10px 0 18px; max-width: none; }
  .skill-group { margin-bottom: 18px; }
  .skill-group-name { font-size: 16px; }
  .skill-tabs { margin-bottom: 22px; }
  .tabs-hint { display: none; }
  .skill-tablist {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    max-width: 100%;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .skill-tablist::-webkit-scrollbar { display: none; }
  .skill-tab { flex: 0 0 auto; }

  .card-grid,
  .hobby-grid { grid-template-columns: 1fr; }

  .hobby-card { padding: 20px; }

  .contact-form { padding: 22px; }
  .form-done { padding: 36px 22px; }

  .site-footer {
    margin-top: 36px;
    flex-direction: column;
    gap: 6px;
    font-size: 11px;
    letter-spacing: 0.04em;
  }

  /* Chat: the panel spans the screen instead of floating in a corner of it. */
  .js .chat { right: 16px; bottom: 16px; left: 16px; }
  .chat-launcher { width: 60px; height: 60px; margin-left: auto; }
  .chat-nudge { right: 0; bottom: 74px; width: auto; max-width: 280px; margin-left: auto; }
  .chat-nudge::after { right: 18px; }

  .chat-panel {
    left: 0;
    right: 0;
    bottom: 74px;
    width: auto;
    max-width: none;
    max-height: min(560px, calc(100svh - 116px));
  }
  .chat-log { padding: 14px 12px 6px; }
  .chat-row { max-width: 88%; }
  .chat-foot { padding: 10px 12px 12px; }
}

/* Small phone */
@media (max-width: 380px) {
  :root { --gutter: 16px; }
  .hero-stat .num { font-size: 34px; }
  .contact-list a,
  .contact-list span { font-size: 12.5px; }

  .chat-voice { min-width: 0; }
  .chat-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .chat-chips::-webkit-scrollbar { display: none; }
  .chat-chip { flex: 0 0 auto; }
}

/* ---------- Preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; scroll-snap-type: none; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  /* The bars would otherwise freeze mid-keyframe as five tiny dots. */
  .voice-wave i { transform: scaleY(0.6); opacity: 0.6; }

  /* The experience slider still swaps cards — it just cuts rather than slides,
     and the contents arrive with the card instead of trailing behind it. */
  /* The timeline still highlights on hover and click — it just arrives whole
     instead of drawing itself in. */
  .js .xp-line:not(.in) .xp-node-years,
  .js .xp-line:not(.in) .xp-node-head,
  .js .xp-line:not(.in) .xp-node-role,
  .js .xp-line:not(.in) .xp-node-place { opacity: 1; transform: none; }
  .xp-node::before { transform: none !important; transition-delay: 0s !important; }
  .xp-node-btn:hover { transform: none; }
  .xp-node-btn:hover .xp-node-logo,
  .xp-node.is-active .xp-node-logo { transform: none; }

  /* The chat still opens and messages still arrive — they just appear rather
     than slide in, and the launcher stops pinging. script.js also drops the
     typing pauses so the thread is complete the moment the panel opens. */
  .chat-launcher > .chat-dot::after { animation: none; opacity: 0; }
  .chat-typing i { opacity: 0.6; transform: none; }
}

@media print {
  .site-header, .hero-actions, .contact-form, .nav-toggle, .chat { display: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  body { background: #fff; }
  /* Screen-height sections would print as mostly blank pages. */
  main > section { min-height: 0; display: block; }
  /* Print the full story whether or not it was open on screen. */
  .story-body,
  .js .story-body.is-collapsed { height: auto !important; max-height: none !important; }
  .story-body::after { display: none; }
  .story-toggle { display: none; }

  /* A slider prints as one visible card and three blank ones — so on paper the
     roles go back to being a plain list. */
  .xp-node::before { transform: none !important; }
  .xp-node-years,
  .xp-node-head,
  .xp-node-role,
  .xp-node-place { opacity: 1 !important; transform: none !important; }
}
