/* ─── v2 TOKENS ──────────────────────────────────────────────────
   Light-first, wide layout. Geist (same as v1) + Instrument Serif
   for small italic accents. Army green is the brand accent.
   ─────────────────────────────────────────────────────────────── */

:root {
  --bg:            #F5F5F2;
  --surface:       #FFFFFF;
  --surface-2:     #EEEEEA;
  --ink:           #121212;
  --ink-2:         #55554F;
  --ink-3:         #8F8F88;
  --ink-4:         #C9C9C2;
  --line:          rgba(0, 0, 0, 0.08);
  --line-strong:   rgba(0, 0, 0, 0.14);
  --shadow-soft:   0 1px 2px rgba(0,0,0,0.04), 0 8px 24px -10px rgba(0,0,0,0.12);
  --shadow-lift:   0 2px 4px rgba(0,0,0,0.05), 0 18px 40px -18px rgba(0,0,0,0.22);

  /* Army green: --accent for fills/strokes, --accent-ink for text on the page bg */
  --accent:        #4B5320;
  --accent-ink:    #4B5320;
  --accent-soft:   rgba(75, 83, 32, 0.12);

  /* The one raised button: a soft lift, no glow */
  --btn-bg:        #1A1A1A;
  --btn-ink:       #F5F5F2;
  --btn-lift:      inset 0 1px 0 rgba(255,255,255,0.10), 0 1px 2px rgba(0,0,0,0.18), 0 8px 18px -8px rgba(0,0,0,0.40);
  --btn-lift-hover:inset 0 1px 0 rgba(255,255,255,0.10), 0 2px 4px rgba(0,0,0,0.16), 0 14px 26px -10px rgba(0,0,0,0.45);


  --star:          #F5B301;
  --logo-invert:   0;

  --font:          'Geist', system-ui, sans-serif;
  --mono:          'Geist Mono', ui-monospace, monospace;
  --serif:         'Instrument Serif', Georgia, serif;

  --wrap:          1440px;
  --gutter:        clamp(20px, 9vw, 168px);
  --radius:        8px;
  --radius-lg:     6px;
  --ease:          cubic-bezier(0.16, 1, 0.3, 1);
  --spring:        cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] {
  --bg:            #0C0C0D;
  --surface:       #161618;
  --surface-2:     #1C1C1F;
  --ink:           #EDEDEA;
  --ink-2:         #A6A6A0;
  --ink-3:         #74746F;
  --ink-4:         #3A3A3D;
  --line:          rgba(255, 255, 255, 0.08);
  --line-strong:   rgba(255, 255, 255, 0.14);
  --shadow-soft:   0 1px 2px rgba(0,0,0,0.4), 0 10px 28px -12px rgba(0,0,0,0.7);
  --shadow-lift:   0 2px 4px rgba(0,0,0,0.4), 0 20px 44px -18px rgba(0,0,0,0.8);
  --accent:        #8C9A55;
  --accent-ink:    #A9B776;
  --accent-soft:   rgba(140, 154, 85, 0.16);
  --btn-bg:        #EDEDEA;
  --btn-ink:       #0C0C0D;
  --btn-lift:      inset 0 -1px 0 rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.5), 0 10px 22px -8px rgba(0,0,0,0.85);
  --btn-lift-hover:inset 0 -1px 0 rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.5), 0 16px 30px -10px rgba(0,0,0,0.9);
  --logo-invert:   1;
}

/* ─── BASE ───────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  transition: background 300ms var(--ease), color 300ms var(--ease);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* [hidden] must win over component display rules (form, success panel, cards) */
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent-soft); color: var(--ink); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Placeholder marker: anything Nate still needs to fill in */
.tbd {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 0 4px;
  text-decoration: underline dashed 1px;
  text-underline-offset: 3px;
}

.draft-banner {
  font-family: var(--mono);
  font-size: 11px;
  text-align: center;
  padding: 8px 16px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
.draft-banner a { text-decoration: underline; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}

.section { padding-top: clamp(96px, 12vw, 160px); }

.section__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 40px;
}
.section__title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
}
.section__lede { max-width: 380px; font-size: 15px; color: var(--ink-2); text-align: right; }

/* ─── BUTTONS & CHIPS ────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: transform 160ms var(--ease), box-shadow 300ms var(--ease), background 200ms var(--ease), border-color 200ms var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 300ms var(--spring); }
.btn:hover svg { transform: translateX(3px); }

/* The only raised button on the page */
.btn--primary {
  background: var(--btn-bg);
  color: var(--btn-ink);
  box-shadow: var(--btn-lift);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--btn-lift-hover); }

.btn--outline {
  background: transparent;
  border: 1px solid var(--line-strong);
}
.btn--outline:hover { border-color: var(--ink); }

.btn__count {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--ink-2);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px 0 10px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: transparent;
  font-size: 13px;
  transition: transform 260ms var(--spring), border-color 200ms var(--ease);
}
.chip:hover { transform: translateY(-2px) rotate(-1.5deg); border-color: var(--ink-3); }
.chip svg { width: 15px; height: 15px; flex: none; }
.ico { fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico--blue   { stroke: #2F6BFF; }
.ico--olive  { stroke: var(--accent-ink); }
.ico--violet { stroke: #7B4DFF; }
.ico--orange { stroke: #FF5A1F; }
.ico--green  { stroke: #1FA75A; }

/* ─── IDENTITY + HERO ────────────────────────────────────────── */

.hero { padding-top: clamp(48px, 7vw, 96px); }

.identity { display: flex; align-items: center; gap: 16px; }

.identity__avatar {
  position: relative;
  flex: none;
  width: 72px;
  height: 72px;
}
.identity__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow-soft), 0 0 0 4px var(--surface);
  transform: rotate(-4deg);
  transition: transform 400ms var(--spring);
}
.identity__avatar:hover img { transform: rotate(3deg) scale(1.06); }
.identity__wave {
  position: absolute;
  right: -10px;
  bottom: -6px;
  font-size: 22px;
  transform-origin: 70% 80%;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 200ms var(--ease), transform 300ms var(--spring);
}
.identity__avatar:hover .identity__wave { opacity: 1; transform: scale(1); animation: wave 900ms 200ms ease-in-out; }
@keyframes wave { 20%, 60% { rotate: 14deg; } 40%, 80% { rotate: -8deg; } }

.identity__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.identity__name { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.identity__role { font-size: 14px; color: var(--ink-3); }

.handle {
  display: inline-block;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--ink-3);
}

.hero__title {
  margin-top: 32px;
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  min-height: 2em;
}
.hero__title .muted { color: var(--ink-3); }
.caret {
  display: inline-block;
  width: 0.06em;
  height: 0.85em;
  margin-left: 0.04em;
  background: var(--accent);
  vertical-align: -0.06em;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero__text {
  max-width: 600px;
  margin-top: 20px;
  font-size: clamp(15px, 1.1vw, 16px);
  color: var(--ink-2);
  line-height: 1.55;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero .chips { margin-top: 24px; max-width: 50vw; }
/* Intro: two short first-person paragraphs right under the name */
.hero__intro { max-width: 560px; margin-top: 28px; }
.hero__intro p { font-size: clamp(15px, 1.1vw, 16px); line-height: 1.6; color: var(--ink-2); }
.hero__intro p + p { margin-top: 14px; }
.hl {
  color: var(--ink);
  font-weight: 500;
  background: linear-gradient(transparent 55%, #DDF0B0 55%);
  padding: 0 2px;
  transition: background-size 300ms var(--ease);
}
.hl:hover { background: #DDF0B0; }
[data-theme="dark"] .hl { background: linear-gradient(transparent 55%, rgba(140, 154, 85, 0.45) 55%); }
[data-theme="dark"] .hl:hover { background: rgba(140, 154, 85, 0.45); }

/* Worked with: overlapping round marks. Hover (or tap) one for a card with
   what I did there: a frame of the work when there is one, text when not. */
.worked { position: relative; display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.worked__label { font-size: 13px; color: var(--ink-3); }
.worked__logos { --ring: var(--bg); display: flex; align-items: center; }
.wk { margin-left: -9px; }
.wk:first-child { margin-left: 0; }
.wk__logo, .wk__mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--chip, #0C0C0C);
}
.wk__logo { box-shadow: 0 0 0 2.5px var(--ring), 0 2px 6px rgba(0,0,0,0.12); transition: transform 300ms var(--spring); }
.wk:hover .wk__logo, .wk.is-open .wk__logo, .wk__logo:focus-visible { transform: translateY(-3px); z-index: 2; }
.wk__logo img, .wk__mark img { width: 100%; height: 100%; object-fit: cover; }
.wk img.is-pad { width: 70%; height: 70%; object-fit: contain; }
.wk img.is-fit { width: 88%; height: 88%; border-radius: 50%; }

.wk__pop {
  position: absolute;
  left: 0;
  bottom: calc(100% + 14px);
  z-index: 30;
  width: min(380px, 100%);
  padding: 10px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 2px 4px rgba(0,0,0,0.06), 0 28px 56px -24px rgba(0,0,0,0.35);
  opacity: 0;
  visibility: hidden;
  translate: 0 8px;
  scale: 0.98;
  transform-origin: var(--caret, 40px) 100%;
  transition: opacity 220ms var(--ease), translate 320ms var(--ease), scale 320ms var(--ease), visibility 0s linear 320ms;
}
[data-theme="dark"] .wk__pop { background: #1A1A1D; border-color: rgba(255,255,255,0.08); }
.wk:hover .wk__pop, .wk.is-open .wk__pop, .wk:focus-within .wk__pop {
  opacity: 1;
  visibility: visible;
  translate: 0 0;
  scale: 1;
  transition-delay: 0s;
}
/* Invisible bridge so the mouse can travel from the logo up into the card */
.wk__pop::before { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 18px; }
/* Little pointer under the card, lined up with the hovered logo by site.js */
.wk__pop::after {
  content: '';
  position: absolute;
  top: 100%;
  left: var(--caret, 40px);
  width: 14px;
  height: 14px;
  translate: -50% -7px;
  rotate: 45deg;
  background: inherit;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.wk__media { display: grid; gap: 6px; margin-bottom: 10px; }
.wk__media--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wk__frame { display: block; overflow: hidden; border-radius: 7px; background: #ECEAE4; }
/* TRU's screens sit on the app's own deep green */
.wk__media--three .wk__frame { background: radial-gradient(120% 90% at 50% 0%, #2B7A70 0%, #134540 55%, #0C2C29 100%); }
.wk__frame--wide { aspect-ratio: 16 / 7; }
.wk__frame--wide video { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.wk__frame--phone { position: relative; aspect-ratio: 1; }
.wk__frame--phone img { position: absolute; top: 8px; left: 50%; height: calc(100% - 16px); width: auto; translate: -50% 0; border-radius: 7px; box-shadow: 0 6px 16px -8px rgba(0,0,0,0.4); }
.wk__head { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.wk__mark { width: 26px; height: 26px; flex: none; border-radius: 7px; }
.wk__head strong { display: block; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.wk__head span span { display: block; font-size: 12px; color: var(--ink-3); }
.wk__desc { margin-top: 8px; padding: 0 4px; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.wk__link { display: inline-block; margin: 8px 4px 2px; font-size: 12.5px; font-weight: 500; color: var(--ink); }
.wk__link:hover .chev { transform: translateX(3px); }

/* Resume: dashed outline and a little wiggle every few seconds */
.btn--resume {
  border: 1.5px dashed var(--ink-3);
  background: transparent;
  animation: nudge 5s ease-in-out 2.5s infinite;
}
.btn--resume:hover { border-color: var(--ink); border-style: solid; animation-play-state: paused; }
@keyframes nudge {
  0%, 14%, 100% { rotate: 0deg; }
  2% { rotate: -5deg; }
  4% { rotate: 4.5deg; }
  6% { rotate: -3.5deg; }
  8% { rotate: 2.5deg; }
  10% { rotate: -1deg; }
}
.wins__hint { margin-top: 14px; font-family: var(--mono); font-size: 11px; color: var(--ink-3); }

/* Results row: four colour cards, each leading with what changed.
   All four sit side by side so every result is visible at once. */
.wins {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  max-width: 1020px;
  margin-top: clamp(40px, 4vw, 56px);
}
/* Cards can be dragged anywhere (site.js); --dx/--dy hold where they were dropped */
.win {
  position: relative;
  rotate: var(--r, 0deg);
  translate: var(--dx, 0px) var(--dy, 0px);
  cursor: grab;
  transition: rotate 400ms var(--spring);
}
.win:hover { rotate: 0deg; }
.win.is-dragging { z-index: 6; cursor: grabbing; rotate: 2deg; transition: none; }
.win.is-dragging > a { box-shadow: 0 4px 8px rgba(0,0,0,0.1), 0 34px 60px -24px rgba(0,0,0,0.5); scale: 1.03; }
.win > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 16px;
  -webkit-user-drag: none;
  user-select: none;
  transition: box-shadow 300ms var(--ease), scale 300ms var(--spring), transform 400ms var(--spring);
  border-radius: var(--radius);
  background: var(--c);
  color: var(--c-ink);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 16px 32px -18px rgba(0,0,0,0.35);
}
.win:hover > a { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(0,0,0,0.08), 0 24px 44px -20px rgba(0,0,0,0.45); }
.win--coral  { --c: #FF7A59; --c-ink: #1A1A1A; --r: 1deg; }
.win--cobalt { --c: #3D5AFE; --c-ink: #FFFFFF; --r: -1.5deg; }
.win--lime   { --c: #DDF0B0; --c-ink: #1A1A1A; --r: -1deg; }
.win--olive  { --c: #4B5320; --c-ink: #F4F2E4; --r: -1deg; }
/* Copies made by site.js so the phone carousel loops; desktop never shows them */
.win--clone { display: none; }

.win__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
}
.win__num {
  margin-top: 14px;
  font-size: clamp(34px, 3.4vw, 50px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.win__text { margin: 8px 0 18px; font-size: 13.5px; line-height: 1.4; opacity: 0.88; }
.win__media {
  margin-top: auto;
  aspect-ratio: 16 / 10;
  border-radius: 5px;
  overflow: hidden;
  background: rgba(0,0,0,0.12);
}
.win__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 800ms var(--ease); }
.win:hover .win__media img { transform: scale(1.04); }



/* Social proof (from v1): avatars + stars */
.proof {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
}
.proof__avatars { display: flex; }
.proof__avatars img {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg);
  margin-left: -10px;
  transition: transform 260ms var(--spring);
}
.proof__avatars img:first-child { margin-left: 0; }
.proof__avatars img:hover { transform: translateY(-4px); }
.proof__divider { width: 1px; height: 32px; background: var(--line-strong); }
.proof__stars { display: flex; gap: 2px; color: var(--star); }
.proof__stars svg { width: 15px; height: 15px; fill: currentColor; }
.proof__text { font-size: 13px; color: var(--ink); font-weight: 500; line-height: 1.35; margin-top: 2px; }

/* ─── MARQUEES ───────────────────────────────────────────────── */

.marquee {
  --gap: 64px;
  --speed: 40s;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: var(--gap);
  width: max-content;
  animation: marquee var(--speed) linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - var(--gap) / 2)); } }

/* Client logos: visible in both themes, full colour on hover/tap */
.logos { margin-top: 56px; }
.logo img {
  height: 26px;
  width: auto;
  opacity: 0.5;
  filter: invert(var(--logo-invert));
  transition: opacity 250ms var(--ease);
}
.logo:hover img, .logo:focus-within img, .logo.is-on img { opacity: 1; }

/* ─── WHAT I DO (tree) ───────────────────────────────────────── */

/* What I do: just the tree, centred and spread across the page */
.wid { display: flex; flex-direction: column; align-items: center; text-align: center; }
.wid > div { display: flex; flex-direction: column; align-items: center; width: 100%; }
.wid .eyebrow { margin-bottom: 36px; }
@media (min-width: 1101px) {
  .wid .tree { gap: clamp(72px, 9vw, 160px); }
  .wid .branch { gap: clamp(72px, 9vw, 160px); }
  .wid .tree__branches { gap: 40px; }
  .wid .branch__leaves { gap: 10px; }
}

/* Horizontal tree: root, branch, leaves; wires drawn by site.js */
.tree {
  position: relative;
  display: flex;
  align-items: center;
  gap: 36px;
  width: max-content;
  max-width: 100%;
}
.tree__wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.tree__wires path { fill: none; stroke: var(--ink-4); stroke-width: 1.5; }
.tree__wires circle { fill: var(--accent); }
.tree__branches { display: flex; flex-direction: column; gap: 24px; }
.branch { display: flex; align-items: center; gap: 36px; }
.branch__leaves { display: flex; flex-direction: column; gap: 8px; }

.node {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.node--root { background: var(--accent); color: #F5F5F2; padding-left: 4px; }
.node--root img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.node--branch { background: var(--bg); border: 1px solid var(--line-strong); }

.tile {
  position: relative;
  z-index: 1;
  rotate: var(--r, 0deg);
  padding: 9px 14px 10px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  cursor: grab;
  user-select: none;
  touch-action: none;
  /* Clustered "fist" until the section is in view (offsets set by v2.js) */
  transform: translate(var(--tx, 0), var(--ty, 0)) scale(0.88);
  transition: transform 900ms var(--spring), box-shadow 200ms var(--ease), scale 200ms var(--spring);
  transition-delay: var(--delay, 0ms);
}
.tree.is-open .tile { transform: none; }
.tile:hover { scale: 1.04; }
.tile.is-dragging { cursor: grabbing; scale: 1.06; box-shadow: var(--shadow-lift); z-index: 5; transition-delay: 0ms; }
.tile small { display: block; font-family: var(--mono); font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.tile strong { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; white-space: nowrap; }
.wid__hint { margin-top: 20px; font-family: var(--mono); font-size: 11px; color: var(--ink-3); }

.wid__statement {
  font-size: clamp(22px, 2.5vw, 36px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.wid__statement .w { color: var(--ink-4); transition: color 300ms var(--ease); }
.wid__statement .w.on { color: var(--ink); }

/* ─── CASE STUDIES ───────────────────────────────────────────── */

.cases {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 20px;
}
.case { display: flex; flex-direction: column; }
.case__media {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
}
/* Matches the 16:9 mockups exactly so nothing gets cropped */
.case__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 800ms var(--ease);
}
.case:hover .case__media img { transform: scale(1.02); }

/* Case study cards that preview a walkthrough: the Warmlyn hero wallpaper
   with a framed screen in the middle. The frame takes an <img> or a
   muted, looping <video> (add poster="" for the first frame). */
.case__media--stage {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(12, 12, 12, 0.16), rgba(12, 12, 12, 0.36)),
    url("https://res.cloudinary.com/g5cnxha1/image/upload/f_auto,q_auto,w_1400/v1788252054/bg-image-1.png") center / cover no-repeat,
    #0C0C0C;
}
.case__stage {
  width: 78%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #171717;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.6);
  transition: transform 800ms var(--ease);
}
.case__media--stage img, .case__media--stage video { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; display: block; }
.case:hover .case__media--stage img { transform: none; }
.case:hover .case__stage { transform: scale(1.03); }
.case:hover .case__name { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

.case__body { display: flex; flex-direction: column; margin-top: 14px; }
.case__name { font-size: 14px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; color: var(--ink); }
.case__sub { margin-top: 2px; font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.case__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  font-size: 11px;
  line-height: 1.5;
  padding: 1px 7px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
}
.cases__more { display: flex; margin-top: 28px; }


/* ─── ABOUT (story) ─────────────────────────────────────────── */

.story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.story__head { position: sticky; top: 48px; }
.story__title {
  font-size: clamp(30px, 3.6vw, 52px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
}
.story__title .serif { font-size: 1.1em; font-weight: 400; color: var(--accent-ink); }
.story__body p { max-width: 540px; font-size: clamp(16px, 1.2vw, 18px); line-height: 1.6; color: var(--ink-2); }
.story__body p + p { margin-top: 18px; }
.story__body p:first-child::first-letter { font-family: var(--serif); font-size: 3.2em; float: left; line-height: 0.82; margin: 6px 8px 0 0; color: var(--ink); }
.story__body .traits { margin-top: 28px; }
.story__body .btn { margin-top: 28px; }

.polaroid {
  position: relative;
  justify-self: center;
  width: min(100%, 380px);
  padding: 14px 14px 48px;
  background: #FFFFFF;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06), 0 24px 48px -20px rgba(0,0,0,0.3);
  rotate: -3deg;
  transition: rotate 500ms var(--spring);
}
.polaroid:hover { rotate: 0deg; }
.polaroid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.polaroid figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 16px;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #9A9A93;
}
.polaroid__tape {
  position: absolute;
  width: 96px;
  height: 28px;
  background: rgba(200, 200, 190, 0.55);
  backdrop-filter: blur(2px);
}
.polaroid__tape--l { top: -10px; left: -18px; rotate: -38deg; }
.polaroid__tape--r { top: -10px; right: -18px; rotate: 38deg; }

.about__title {
  font-size: clamp(30px, 3.6vw, 52px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
}
.about__title .serif { font-size: 1.08em; color: var(--accent-ink); }

/* Two-tone pastel chips: light first word, bold second */
.traits { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.trait {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 4px;
  color: #1A1A1A;
  rotate: var(--r, 0deg);
  transition: rotate 300ms var(--spring), translate 300ms var(--spring);
}
.trait:hover { rotate: 0deg; translate: 0 -2px; }
.trait b { font-weight: 700; }
.trait--violet { background: #D9D2FF; --r: -2deg; }
.trait--lime   { background: #DDF0B0; --r: 1.5deg; }
.trait--sky    { background: #BEE7FF; --r: -1deg; }
.trait--peach  { background: #FFD3C2; --r: 2deg; }

.about__text { margin-top: 24px; max-width: 600px; color: var(--ink-2); }
.about .btn { margin-top: 28px; }

/* ─── EXPERIENCE (list) ─────────────────────────────────────── */

.xp { border-top: 1px solid var(--line); }
.xp__row { border-bottom: 1px solid var(--line); }
.xp__item {
  display: grid;
  /* Fixed date column, so every row's role lines up with the one above */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) 150px;
  grid-template-areas: "org role years" ". result result";
  gap: 4px clamp(16px, 3vw, 40px);
  align-items: center;
  padding: 18px 0;
}
.xp__org { grid-area: org; display: flex; align-items: center; gap: 10px; min-width: 0; }
.xp__icon {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: var(--logo, #121212);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
}
.xp__icon--img { background: #FFFFFF; box-shadow: inset 0 0 0 1px var(--line); }
.xp__icon--img img, .xp__icon--img svg { width: 70%; height: 70%; object-fit: contain; }
.xp__icon--full img { width: 100%; height: 100%; object-fit: cover; }
/* Circular marks: scale past the tile edge so the circle fills the square */
.xp__icon--round img { transform: scale(1.42); }
.xp__name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; }
.xp__arrow {
  flex: none;
  width: 11px;
  height: 11px;
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 300ms var(--spring), stroke 200ms var(--ease);
}
a.xp__item:hover .xp__name { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a.xp__item:hover .xp__arrow { transform: translate(2px, -2px); stroke: var(--ink); }
.xp__role { grid-area: role; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.xp__years { grid-area: years; text-align: right; font-size: 13px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.xp__result { grid-area: result; max-width: 48ch; font-size: 13.5px; line-height: 1.5; color: var(--ink-3); }

.job__link {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: underline dotted 1.5px;
  text-underline-offset: 4px;
  transition: color 200ms var(--ease);
}
.job__link:hover { color: var(--accent-ink); }

/* Small section headings with a count, for the lists further down */
.mini-head { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); }
.mini-head span { margin-left: 4px; font-size: 13px; font-weight: 400; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ─── WORK EXPERIENCE (compact) ──────────────────────────────── */

.exp { margin-top: 10px; }
.exp li { border-bottom: 1px solid var(--line); }
.exp__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 160px;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
}
a.exp__row:hover .xp__arrow { opacity: 1; transform: translate(2px, -2px); }
.exp__org { display: flex; align-items: center; gap: 10px; min-width: 0; }
.exp__name {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  transition: text-decoration-color 200ms var(--ease);
}
a.exp__row:hover .exp__name { text-decoration-color: var(--ink); }
.exp .xp__icon { width: 22px; height: 22px; border-radius: 6px; font-size: 11px; }
.exp .xp__arrow { align-self: flex-start; margin: -2px 0 0 -4px; }
.exp__role { font-size: 15px; color: var(--ink); }
.exp__years { font-size: 15px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }

/* ─── TESTIMONIALS (big quote + ratings + card marquee) ──────── */

.big-quote { max-width: 1040px; }
.big-quote blockquote {
  font-size: clamp(26px, 3.2vw, 46px);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.035em;
  text-wrap: pretty;
}
.mark {
  background: linear-gradient(transparent 58%, var(--accent-soft) 58%, var(--accent-soft) 94%, transparent 94%);
  padding-inline: 0.08em;
}
.big-quote figcaption { display: flex; align-items: center; gap: 14px; margin-top: 32px; }
.big-quote figcaption img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.big-quote figcaption span { display: flex; flex-direction: column; line-height: 1.35; font-size: 14px; color: var(--ink-3); }
.big-quote figcaption strong { color: var(--ink); font-weight: 600; font-size: 15px; }

.ratings {
  display: flex;
  flex-wrap: wrap;
  gap: 24px clamp(32px, 5vw, 80px);
  margin-top: clamp(40px, 4vw, 64px);
}
.ratings div { display: flex; flex-direction: column-reverse; gap: 4px; }
.ratings dt { font-size: 14px; color: var(--ink-3); }
.ratings__star { width: 0.62em; height: 0.62em; margin-left: 0.12em; fill: var(--star); vertical-align: 0.06em; }
.ratings dd { font-size: clamp(32px, 3.4vw, 48px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }

.reviews { --gap: 24px; --speed: 60s; margin-top: clamp(48px, 5vw, 72px); padding-block: 28px; }
.review {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  width: min(380px, 80vw);
  padding: 24px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  rotate: var(--r, 0deg);
  white-space: normal;
}
.review:nth-child(4n+1) { --r: -1.5deg; }
.review:nth-child(4n+2) { --r: 1deg; }
.review:nth-child(4n+3) { --r: -0.5deg; }
.review:nth-child(4n)   { --r: 1.5deg; }
.review blockquote { font-size: 15.5px; line-height: 1.55; }
.review figcaption { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-3); line-height: 1.3; }
.review figcaption img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.review figcaption b { display: block; color: var(--ink); font-weight: 600; font-size: 14px; }

/* Glide: scrolls on its own, stops under the mouse, drags and swipes (site.js) */
.glide { overflow-x: auto; scrollbar-width: none; cursor: grab; }
.glide::-webkit-scrollbar { display: none; }
.glide .marquee__track { animation: none; }
.glide.is-dragging { cursor: grabbing; user-select: none; }
.glide.is-dragging .review { pointer-events: none; }

/* ─── TOOLS ──────────────────────────────────────────────────── */

.tools { padding-bottom: clamp(24px, 4vw, 48px); }
.tools__list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.tools__list .tool { padding: 8px 14px 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 14px; }
.tools__list .tool { gap: 8px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); }
.tools__list .tool img { width: 20px; height: 20px; }
.tools .marquee { --gap: 48px; --speed: 55s; }
.tool {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(18px, 1.6vw, 23px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink-2);
  white-space: nowrap;
}
.tool img { width: 26px; height: 26px; }
.tool img.mono { filter: invert(var(--logo-invert)); }

/* ─── FOOTER ─────────────────────────────────────────────────── */

.footer {
  margin-top: clamp(96px, 12vw, 160px);
  padding-top: clamp(48px, 5vw, 72px);
  padding-bottom: 88px;
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px clamp(40px, 6vw, 120px);
}
.footer__title {
  font-weight: 600;
  font-size: clamp(26px, 2.4vw, 34px);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.footer__lede { margin-top: 10px; color: var(--ink-2); max-width: 360px; }
.footer__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.email-copy {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 6px 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 13px;
  transition: border-color 200ms var(--ease);
}
.email-copy:hover { border-color: var(--ink); }
.email-copy { max-width: 100%; }
#emailText { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.email-copy__hint {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--ink-2);
}

/* Link columns */
.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 32px clamp(40px, 5vw, 96px);
}
.footer__cols h3 {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.footer__cols ul { display: flex; flex-direction: column; gap: 10px; }
.footer__cols a {
  font-size: 15px;
  color: var(--ink-2);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: color 200ms var(--ease), background-size 300ms var(--ease);
}
.footer__cols a:hover { color: var(--ink); background-size: 100% 1px; }

.footer__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: clamp(48px, 6vw, 72px);
  font-size: 13px;
  color: var(--ink-3);
}
.socials { display: flex; gap: 6px; }
.socials a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 8px;
  color: var(--ink-2);
  transition: background 200ms var(--ease), color 200ms var(--ease);
}
.socials a:hover { background: var(--surface-2); color: var(--ink); }
.socials svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.socials svg.is-filled { fill: currentColor; stroke: none; width: 16px; height: 16px; }
.footer__credits { display: flex; flex-wrap: wrap; gap: 6px 20px; }

/* Giant sign-off with a cycling, outlined word */
.footer__giant {
  margin-top: clamp(24px, 3vw, 40px);
  font-size: min(16vw, 176px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.9;
  white-space: nowrap;
  color: var(--ink);
}
.footer__word {
  display: inline-grid;
  justify-items: start;
  vertical-align: bottom;
  height: 1em;
  overflow-x: visible;
  overflow-y: clip;
  transition: width 500ms var(--ease);
}
.footer__word span {
  grid-area: 1 / 1;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 0.035em var(--stroke, var(--accent));
  transition: -webkit-text-stroke-color 600ms var(--ease), transform 600ms var(--ease), opacity 400ms var(--ease);
}
.footer__word span:not(.is-on) { transform: translateY(105%); opacity: 0; }
.footer__word span.is-out { transform: translateY(-105%); opacity: 0; }
.footer__dot { color: var(--stroke, var(--accent)); transition: color 600ms var(--ease); }

/* ─── DOCK ───────────────────────────────────────────────────── */

.dock {
  position: fixed;
  left: 50%;
  bottom: 16px;
  translate: -50% 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(18, 18, 18, 0.88);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12), 0 10px 28px -10px rgba(0, 0, 0, 0.5);
  color: #EDEDEA;
}
.dock svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dock svg.is-filled { fill: currentColor; stroke: none; width: 15px; height: 15px; }
.dock__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
  color: rgba(237, 237, 234, 0.72);
  transition: background 200ms var(--ease), color 200ms var(--ease);
}
.dock__item:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.dock__item.is-active { color: #fff; background: rgba(255, 255, 255, 0.12); }
/* A 1px divider between the page links, the contact icons and the theme switch */
.dock__sep { display: grid; place-items: center; width: 9px; height: 32px; flex: none; }
.dock__sep::before { content: ''; width: 1px; height: 16px; background: rgba(255, 255, 255, 0.14); }
.dock__icon {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  flex: none;
  border-radius: 8px;
  color: rgba(237, 237, 234, 0.72);
  transition: background 200ms var(--ease), color 200ms var(--ease);
}
.dock__icon:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
/* Theme toggle shows a moon in light mode, a sun in dark mode */
.icon-sun { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* ─── REVEAL ─────────────────────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(28px); filter: blur(6px); transition: opacity 900ms var(--ease), transform 900ms var(--ease), filter 900ms var(--ease); transition-delay: var(--d, 0ms); }
/* Big blocks (frames, panels, cards) rise a little further and grow into place */
.case.reveal, .slider.reveal, .impact.reveal, .jmap-wrap.reveal, .who__card.reveal, .job.reveal, .bigcard.reveal, .flow.reveal, .build.reveal, .exp li.reveal { transform: translateY(48px) scale(0.97); }
.reveal.visible { opacity: 1; transform: none; filter: none; }

/* Reading progress on case studies (site.js adds the bar) */
.read-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .btn--resume { animation: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
  .tile { transform: none; }
  .marquee__track { flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee { mask-image: none; -webkit-mask-image: none; }
  .marquee [aria-hidden="true"] { display: none; }
  html { scroll-behavior: auto; }
}

/* ─── RESPONSIVE ─────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .cases { grid-template-columns: repeat(2, 1fr); }
  .wid { grid-template-columns: 1fr; }
  .tree, .wid__hint { justify-self: center; margin-inline: auto; }
  .wid__hint { text-align: center; }
  .footer__top { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .story { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .story__head { position: static; }
  .hero .chips { max-width: none; }
  .about { grid-template-columns: 1fr; }
  .polaroid { width: min(100%, 300px); }
}

/* Phones (incl. large phones and the Surface Duo's single screen) */
@media (max-width: 640px) {
  body { font-size: 15px; }

  .identity { gap: 12px; align-items: center; }
  .identity__avatar { width: 56px; height: 56px; }
  .identity__avatar img { border-radius: 10px; }
  .identity__row { gap: 8px; }
  .identity__name { font-size: 18px; }
  .identity__role { font-size: 13px; line-height: 1.4; }
  .handle { font-size: 11px; padding: 1px 8px; }

  .hero__title { margin-top: 24px; }
  .hero__text { margin-top: 18px; }
  .hero__actions { gap: 8px; margin-top: 24px; }
  .btn { height: 34px; padding: 0 12px; font-size: 12.5px; }
  .email-copy { height: 34px; }
  .chip { height: 30px; font-size: 12.5px; padding: 0 10px 0 8px; }
  .chip svg { width: 14px; height: 14px; }

  /* Results become a row you swipe through, running edge to edge */
  .wins {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: 74%;
    gap: 14px;
    max-width: none;
    margin-top: 36px;
    margin-inline: calc(-1 * var(--gutter));
    padding: 10px var(--gutter) 16px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .wins::-webkit-scrollbar { display: none; }
  .win { cursor: auto; translate: none; }
  .win--clone { display: list-item; list-style: none; }
  .wins__hint { display: none; }

  .section__head { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 28px; }
  .section__lede { text-align: left; }
  .cases { grid-template-columns: 1fr; gap: 32px; }

  .exp__row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "org years" "role role"; gap: 4px 12px; padding: 14px 0; }
  .exp__org { grid-area: org; }
  .exp__years { grid-area: years; }
  .exp__role { grid-area: role; padding-left: 32px; font-size: 14px; }
  .exp__name, .exp__years { font-size: 14.5px; }

  /* Tree goes vertical and centred: root on top, branches side by side */
  .tree { flex-direction: column; gap: 32px; width: 100%; }
  .tree__branches { flex-direction: row; gap: 14px; justify-content: center; width: 100%; }
  .branch { flex-direction: column; gap: 24px; flex: 1 1 0; min-width: 0; }
  .branch__leaves { align-items: center; width: 100%; }
  .tile { width: 100%; max-width: 190px; text-align: center; padding: 8px 10px 10px; }
  .tile strong { font-size: 15px; white-space: normal; }
  .tile small { font-size: 10px; white-space: normal; }

  /* Experience: company and years on top, role and result underneath */
  .xp__item {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "org years" "role role" "result result";
    align-items: center;
    gap: 2px 16px;
    padding: 16px 0;
  }
  .xp__role, .xp__result { padding-left: 34px; }
  .xp__name { font-size: 14.5px; }

  .ratings { gap: 20px 32px; }
  .footer { padding-top: 40px; padding-bottom: 84px; }
  .footer__top { gap: 36px; }
  .footer__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 16px; }
  .footer__cols h3 { font-size: 16px; margin-bottom: 10px; }
  .footer__cols ul { gap: 8px; }
  .footer__cols a { font-size: 13.5px; }
  .footer__meta { margin-top: 36px; gap: 12px; }
  .footer__meta { flex-direction: column-reverse; align-items: flex-start; }

}

/* Phones: the page links show their names instead of icons */
@media (max-width: 640px) {
  .dock__item svg { display: none; }
  .dock__item { padding: 0 10px; font-size: 12.5px; font-weight: 500; }
}
@media (max-width: 380px) {
  .dock__item { padding: 0 8px; font-size: 12px; }
  .dock__icon { width: 30px; }
}

/* Folded phones: a touch tighter still */
@media (max-width: 340px) {
  .dock { bottom: 12px; }
  .dock__item, .dock__icon { height: 30px; }
  .dock__icon { width: 28px; }
  .dock__item { padding: 0 6px; font-size: 11.5px; }
  .dock__sep { width: 7px; }
}

/* Folded phones (Galaxy Z Fold cover screen ~280–344px) */
@media (max-width: 360px) {
  :root { --gutter: 16px; }
  .identity__avatar { width: 48px; height: 48px; }
  .identity__name { font-size: 17px; }
  .tree__branches { flex-direction: column; align-items: center; gap: 28px; }
  .branch { width: 100%; }
  .tile { max-width: 220px; }
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .email-copy { font-size: 12px; padding-left: 12px; }
  .polaroid { width: min(100% - 28px, 300px); }
}

/* Inline chevron used in place of arrows on links and buttons */
.chev {
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin-left: 0.15em;
  vertical-align: -0.12em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 300ms var(--spring);
}
a:hover > .chev { transform: translateX(3px); }
