/* ================================================================
   Brett White · Portfolio
   Kami foundation, slightly warmer / more web-friendly.
   - Parchment + ink-blue stays as the base
   - Hover affordances + smooth scroll permitted (interactive site)
   - Animated charts permitted (variation C)
   - Italic still avoided; rules > boxes; one serif per page
   ================================================================ */

:root {
  /* Surfaces */
  --parchment:    #f5f4ed;
  --parchment-2:  #efeee5;   /* slightly darker band for section alternation */
  --ivory:        #faf9f5;
  --warm-sand:    #e8e6dc;
  --deep-dark:    #141413;
  --dark-surface: #1f1e1c;

  /* Brand — accent picker overrides this */
  --brand:        #1B365D;
  --brand-light:  #2D5A8A;
  --brand-tint:   #EEF2F7;

  /* Text — warm grays */
  --near-black:  #141413;
  --dark-warm:   #3d3d3a;
  --olive:       #504e49;
  --stone:       #6b6a64;

  /* Borders */
  --border:      #e8e6dc;
  --border-soft: #ebe8dc;

  /* Stacks */
  --serif: Charter, Georgia, "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans:  var(--serif);
  --mono:  "JetBrains Mono", "SF Mono", "Fira Code", Consolas, Monaco, monospace;

  /* Density (Tweaks-controlled) */
  --density: 1;                       /* 0.85 compact · 1 comfortable · 1.18 airy */
  --section-pad-y: calc(120px * var(--density));
  --gap-md:        calc(20px * var(--density));
  --gap-lg:        calc(36px * var(--density));
  --gap-xl:        calc(64px * var(--density));

  /* Type scale (web — slightly larger than print Kami) */
  --fs-display:  clamp(40px, 5vw, 72px);
  --fs-h1:       clamp(32px, 3.4vw, 44px);
  --fs-h2:       28px;
  --fs-h3:       20px;
  --fs-lede:     20px;
  --fs-body:     17px;
  --fs-small:    14px;
  --fs-tag:      12px;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("./fonts/JetBrainsMono.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--parchment);
  color: var(--near-black);
  font-family: var(--serif);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Dark mode — warm parchment swaps to warm dark; ink-blue accent swaps to amber. */
body.theme-dark {
  --parchment:    #141413;
  --parchment-2:  #1c1b18;
  --ivory:        #1f1e1c;
  --warm-sand:    #2a2825;
  --near-black:   #f1efe6;
  --dark-warm:    #d6d3c8;
  --olive:        #a8a59a;
  --stone:        #87867f;
  --border:       #2a2825;
  --border-soft:  #2f2d29;
  --brand:        #E07B3F;
  --brand-light:  #F0985E;
  --brand-tint:   #2A1F15;
}

/* ---------- Type primitives ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 500;
  font-style: normal;
  color: var(--near-black);
  margin: 0;
}
.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--fs-display);
  line-height: 1.04;
  letter-spacing: -1.5px;
  color: var(--near-black);
}
.lede {
  font-size: var(--fs-lede);
  line-height: 1.5;
  color: var(--olive);
  max-width: 56ch;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--stone);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand);
}
.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  border-left: 2.5px solid var(--brand);
  border-radius: 1.5px;
  padding-left: 14px;
  margin: 0 0 28px;
  line-height: 1.2;
}

p { margin: 0 0 14px; color: var(--dark-warm); }
em { font-style: normal; color: var(--brand); }
strong, b { font-weight: 500; color: var(--near-black); }
a { color: var(--brand); text-decoration: none; border-bottom: 1px solid currentColor; transition: color 0.18s ease; }
a:hover { color: var(--brand-light); }
code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--brand-tint);
  color: var(--brand);
  padding: 1px 6px;
  border-radius: 3px;
}

/* ---------- Layout shell ---------- */
.page { width: 100%; min-height: 100vh; }
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 48px;
}
section.band {
  padding: var(--section-pad-y) 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 62px;
}
section.band.alt { background: var(--parchment-2); }
section.band:first-of-type { border-top: 0; }

/* ---------- Top nav ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--parchment) 92%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  padding: 14px 48px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  font-size: var(--fs-small);
}
.topnav .topnav-left { justify-self: start; }
.topnav .topnav-right { justify-self: end; display: flex; gap: 6px; align-items: center; }
.topnav-centered nav { justify-self: center; }
.topnav .brand-mark {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.2px;
  color: var(--near-black);
}
.topnav .brand-mark .dot { color: var(--brand); }
.topnav nav {
  display: flex;
  gap: 28px;
}
.topnav nav a {
  color: var(--olive);
  border-bottom: 0;
  font-size: 13px;
  letter-spacing: 0.2px;
  position: relative;
  padding: 4px 0;
}
.topnav nav a:hover { color: var(--near-black); }
.topnav nav a.is-current::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -2px;
  height: 1.5px;
  background: var(--brand);
}
.mobile-nav {
  display: none;
  position: relative;
}
.mobile-nav__menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 60;
  min-width: 220px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--parchment) 96%, transparent);
  box-shadow: 0 18px 40px rgb(36 30 22 / 14%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform-origin: top right;
  animation: mobile-menu-in 0.18s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  /* Stack items, size to text so underlines align with text bounds */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.mobile-nav__menu a {
  display: inline-block;
  position: relative;
  padding: 12px 18px;
  border-bottom: 0;
  border-radius: 6px;
  color: var(--olive);
  font-size: 19px;
  letter-spacing: 0;
}
.mobile-nav__menu a:hover,
.mobile-nav__menu a:focus-visible {
  color: var(--near-black);
  outline: none;
}
.mobile-nav__menu a.is-current {
  color: var(--near-black);
}
/* Hover + active underline — animates in from the left */
.mobile-nav__menu a::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 7px;
  height: 1.6px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.32s cubic-bezier(.4,0,.4,1);
}
.mobile-nav__menu a:hover::after,
.mobile-nav__menu a:focus-visible::after {
  transform: scaleX(1);
}
.mobile-nav__menu a.is-current::after {
  animation: menu-underline-draw 0.5s cubic-bezier(.4,0,.4,1) 0.18s forwards;
}
@keyframes menu-underline-draw {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}
@keyframes mobile-menu-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Icon button (used in topnav right rail) */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: transparent;
  color: var(--olive);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 0 !important;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.icon-btn:hover {
  background: var(--ivory);
  color: var(--brand);
  border-color: var(--border);
}

/* ---------- Cards & frames ---------- */
.card {
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { box-shadow: 0 4px 24px rgba(0,0,0,0.05); }

/* ---------- Reviews ---------- */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap-md);
}
.review-card {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}
.review-card__quote {
  margin: 0;
  color: var(--dark-warm);
  font-size: 16px;
  line-height: 1.62;
}
.review-card__meta {
  padding-top: 16px;
  border-top: 1px dotted var(--border);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.review-card__meta span:first-child {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--brand);
}
.review-card__meta span:last-child {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--brand);
  text-align: right;
}

.metrics-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media (min-width: 1025px) {
  .metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

/* ---------- Tags ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: var(--fs-tag);
  letter-spacing: 0.4px;
  background: var(--brand-tint);
  color: var(--brand);
  padding: 3px 9px;
  border-radius: 3px;
  margin: 2px 4px 2px 0;
}
body.theme-dark .tag { background: var(--brand-tint); color: var(--brand-light); }

/* ---------- Dash list ---------- */
ul.dash { list-style: none; padding: 0; margin: 0; }
ul.dash li {
  position: relative;
  padding-left: 16px;
  line-height: 1.55;
  color: var(--dark-warm);
  margin-bottom: 6px;
}
ul.dash li::before {
  content: "\2013";
  position: absolute;
  left: 0;
  color: var(--brand);
}

/* ---------- Mono labels ---------- */
.mono-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--stone);
}
.history-date {
  display: grid;
  justify-items: center;
  row-gap: 6px;
  width: 100%;
  text-align: center;
  line-height: 1.2;
}
.history-date__arrow {
  color: var(--olive);
  line-height: 1;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* ---------- ScribbleFrame (rough.js hand-drawn portrait border) ---------- */
.scribble-frame {
  position: relative;
  display: block;
  line-height: 0; /* removes the baseline gap under <img> */
  color: var(--brand); /* currentColor on stroked paths inherits this — auto-updates on theme switch */
  transition: color 0.25s ease-out;
  max-width: 100%;
}
.scribble-frame > img {
  display: block;
  position: relative;
  z-index: 0;
  width: 100%;
  max-width: 100%;
  height: auto;
}
.scribble-svg {
  position: absolute;
  pointer-events: none;
  overflow: visible;
  z-index: 1;
}
.scribble-underline {
  position: relative;
  display: inline-block;
  color: var(--brand);
  transition: color 0.25s ease-out;
}
.scribble-svg-underline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 1;
}

/* ---------- History marginalia (hand-written notes in the right margin) ---------- */
.job-entry { position: relative; }
.job-body  { min-width: 0; }
.job-notes {
  position: relative;
  min-height: 1px;
  color: var(--brand);
  transition: color 0.25s ease-out;
}

/* One handwritten margin note — absolutely positioned to align with its anchor */
.margin-note {
  position: absolute;
  left: 0;
  display: grid;
  grid-template-columns: 14px max-content;
  column-gap: 14px;
  align-items: stretch;
  pointer-events: none;
}
.margin-note__bracket {
  width: 14px;
  overflow: visible;
  display: block;
}
.margin-note__bracket path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-dasharray: var(--len, 100);
  stroke-dashoffset: var(--len, 100);
  transition: stroke-dashoffset 0.5s cubic-bezier(.4,0,.4,1);
}
.margin-note.is-playing .margin-note__bracket path { stroke-dashoffset: 0; }

.margin-note__lines {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.note-line {
  font-family: "Caveat", "Comic Sans MS", cursive;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
  color: var(--brand);
  transform: rotateZ(var(--line-tilt, 0deg)) translateY(2px);
  transition: transform 1.8s cubic-bezier(.42,.05,.4,1);
  transition-delay: var(--line-delay, 0ms);
  white-space: nowrap;
}
.note-line .ink {
  display: inline-block;
  clip-path: inset(-6px 100% -6px 0);
  -webkit-clip-path: inset(-6px 100% -6px 0);
  transition: clip-path 1.8s cubic-bezier(.42,.05,.4,1),
              -webkit-clip-path 1.8s cubic-bezier(.42,.05,.4,1);
  transition-delay: var(--line-delay, 0ms);
}
.margin-note.is-playing .note-line {
  transform: rotateZ(var(--line-tilt, 0deg)) translateY(0);
}
.margin-note.is-playing .note-line .ink {
  clip-path: inset(-6px -2% -6px 0);
  -webkit-clip-path: inset(-6px -2% -6px 0);
}

/* Inline body ink mark (rough underline under a phrase) */
.ink-mark {
  position: relative;
  display: inline-block;
  color: var(--brand);
}
.ink-mark__svg {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 0;
}
.ink-mark__svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-dasharray: var(--len, 100);
  stroke-dashoffset: var(--len, 100);
  transition: stroke-dashoffset 0.55s cubic-bezier(.4,0,.4,1);
}
.ink-mark.is-playing .ink-mark__svg path { stroke-dashoffset: 0; }

/* Reset state — snap transitions off during scroll-out reset so they don't play backwards */
.job-entry.is-resetting,
.job-entry.is-resetting * {
  transition: none !important;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 15px;
  border-radius: 6px;
  padding: 11px 18px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #faf9f5;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.btn:hover { background: var(--brand-light); border-color: var(--brand-light); }
.btn.ghost {
  background: transparent;
  color: var(--brand);
}
.btn.ghost:hover { background: var(--brand-tint); color: var(--brand); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 44px 48px 56px;
  font-size: var(--fs-small);
  color: var(--stone);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ---------- Variation-scoped overrides (added inside each artboard) ---------- */
.var-minimalist { --section-pad-y: calc(140px * var(--density)); }
.var-data { --section-pad-y: calc(110px * var(--density)); }

/* ---------- Editorial portrait frame ---------- */
.portrait-frame {
  position: relative;
  aspect-ratio: 320 / 380;
  width: 100%;
  color: var(--brand);
}
.portrait-frame__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.portrait-frame__inner {
  position: absolute;
  inset: 24px 24px 36px;
  background: var(--ivory);
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
}
.portrait-frame__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: saturate(0.92) contrast(1.02);
}
.portrait-frame__banner {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  color: #faf9f5;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0 10px;
  line-height: 24px;
  white-space: nowrap;
}
body.theme-dark .portrait-frame__inner { background: var(--warm-sand); }

/* ================================================================
   Responsive overrides
   variant-editorial.jsx uses inline style props heavily, so most
   rules below use !important to win against inline style="..."
   attributes.

   Breakpoints tuned for Apple devices:
   ≤1100px  large tablet (iPad Pro/Air 13" portrait 1032,
                         iPad 11" landscape 1180+ stays desktop)
   ≤1024px  small tablet (iPad Pro/Air 11" portrait 820–834,
                         iPhone Pro Max landscape 956)
   ≤768px   phone (iPhone 16 Pro Max 440, iPhone 16 Pro 402,
                  iPad mini portrait 744)
   ≤480px   small phone (iPhone 16 Pro 402)
   ================================================================ */

/* ---------- Large tablet (≤1100px) ---------- */
/* Light padding adjustment so iPad Pro/Air 13" portrait (1032)
   doesn't feel edge-to-edge. Layout itself stays desktop. */
@media (max-width: 1100px) {
  .container { padding: 0 40px; }
  .topnav { padding: 14px 40px; }
  .site-footer { padding: 44px 40px 56px; }
}

/* ---------- Small tablet (≤1024px) ---------- */
/* Catches iPad Pro/Air 11" portrait (820–834) and iPhone landscape.
   Collapses the wider grids; nav + brand mark stay visible but tighten. */
@media (max-width: 1024px) {
  .container { padding: 0 32px; }
  .topnav { padding: 14px 32px; }
  .site-footer { padding: 40px 32px 48px; }

  /* Trim brand mark to just "Brett White" so 6-link nav fits beside icons */
  .topnav .brand-mark > span:nth-child(2),
  .topnav .brand-mark > span:nth-child(3) { display: none; }
  /* Tighten nav so 6 links fit comfortably alongside brand + icons */
  .topnav nav { gap: 20px; }
  .topnav nav a { font-size: 12px; }

  /* Skills metrics: 4-col → 2-col */
  .metrics-grid,
  [style*="repeat(4, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 32px 24px !important;
  }

  /* Skills L+R split (1.1fr 0.9fr) → stack */
  [style*="1.1fr 0.9fr"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  /* Skills matrix inner 2-col → 1-col */
  #skills [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Intro: stack and center the hero as a composed object */
  #intro [style*="minmax(280px, 400px) 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  #intro [style*="minmax(280px, 400px) 1fr"] > div:first-child {
    max-width: 360px;
    width: 100%;
    justify-self: center;
  }
  #intro [style*="minmax(280px, 400px) 1fr"] > div:last-child {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    justify-self: center;
    width: min(100%, 540px);
  }
  #intro h1.display + div {
    margin: 16px 0 22px !important;
  }
  #intro .lede {
    margin-left: 0;
    margin-right: 0;
  }
  #intro [style*="margin-top: 32px"][style*="display: flex"] {
    justify-content: flex-start !important;
  }

  /* History: hide marginalia and collapse back to the original 2-col grid */
  #history .job-entry { grid-template-columns: 120px 1fr !important; }
  #history .job-notes { display: none !important; }
  #history .job-body  { max-width: none !important; }
}

/* ---------- Phone (≤768px) ---------- */
/* iPhone portrait + iPad mini portrait. Hide center nav, stack everything,
   drop type sizes for narrow reading. */
@media (max-width: 768px) {
  :root { --section-pad-y: 64px; }
  .container { padding: 0 20px; }

  /* Top nav: hide center links + brand, icons on right, hamburger on the left */
  .topnav { padding: 12px 20px !important; }
  .topnav nav { display: none !important; }
  .topnav .brand-mark { display: none !important; }
  .topnav .topnav-right .mobile-nav {
    display: block;
    position: absolute;
    top: 12px;
    left: 20px;
    z-index: 70;
  }
  .topnav .topnav-right .mobile-nav__menu {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    left: 0;
    right: auto;
    transform-origin: top left;
  }
  .mobile-nav__trigger.is-open,
  .mobile-nav__trigger:focus-visible {
    color: var(--near-black);
    background: var(--ivory);
    border-color: var(--border);
    outline: none;
  }

  /* Bump h1 size + breathing room between lines on phone */
  #intro h1.display {
    font-size: 48px !important;
    line-height: 1.15 !important;
    letter-spacing: -1px !important;
  }
  #intro .lede { font-size: 19px !important; line-height: 1.55 !important; }

  /* Constrain portrait width when stacked so it doesn't dominate */
  #intro [style*="minmax(280px, 400px) 1fr"] > div:first-child {
    max-width: 280px;
  }

  /* About + Contact: wide grids → stack */
  #about > .container > div,
  #contact > .container > div {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  #contact .contact-row {
    grid-template-columns: minmax(76px, 0.34fr) minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 8px 16px !important;
    padding: 18px 0 !important;
  }
  #contact .contact-row .mono-label {
    padding-top: 5px;
  }
  #contact .contact-row__value {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: clamp(18px, 5vw, 22px) !important;
    line-height: 1.15;
  }
  #contact .contact-row__kind {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
    overflow-wrap: anywhere;
    letter-spacing: 0.16em !important;
  }

  /* Projects: 2-col → 1-col */
  #projects [style*="repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* Metrics: keep 2-col on phones */
  .metrics-grid,
  [style*="repeat(4, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 28px 20px !important;
  }

  /* History timeline: stack date above role; hide spine + dots */
  #history .job-entry {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 20px 0 !important;
  }
  #history .job-dates { padding-top: 0 !important; justify-self: start !important; }
  /* Dates render horizontally on mobile: Jun 2025 → Present */
  #history .history-date {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    width: auto !important;
    text-align: left !important;
    white-space: nowrap !important;
  }
  #history .history-date__arrow {
    position: relative;
    display: inline-block;
    width: 14px;
    overflow: hidden;
    color: transparent;
  }
  #history .history-date__arrow::after {
    content: "\2192"; /* → */
    position: absolute;
    left: 0;
    top: 0;
    color: var(--olive);
  }
  #history .job-body { padding-left: 0 !important; }
  /* The decorative spine — first child of #history's outer wrapper */
  #history > .container > div > div:first-child { display: none !important; }
  /* The per-row dot — absolute-positioned at left:115px */
  #history [style*="left: 115px"] { display: none !important; }

  /* Type sizing — override inline fontSize: "Xpx" props */
  [style*="font-size: 36px"] { font-size: 26px !important; }
  [style*="font-size: 64px"] { font-size: 44px !important; }
  #history h3[style*="font-size: 26px"] { font-size: 22px !important; }
  #projects h3[style*="font-size: 22px"] { font-size: 20px !important; }
  #contact h2.display[style*="font-size: 56px"] { font-size: 40px !important; }
  #contact .lede[style*="font-size: 19px"] { font-size: 17px !important; }
  #intro .lede[style*="font-size: 22px"] { font-size: 18px !important; }
  #reviews .lede[style*="font-size: 18px"] { font-size: 17px !important; }
  #reviews .reviews-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  #reviews .review-card {
    min-height: 0;
    gap: 18px;
    padding: 20px !important;
  }
  #reviews .review-card__quote {
    font-size: clamp(14.5px, 3.8vw, 15.5px);
    line-height: 1.52;
  }
  #reviews .review-card__meta {
    padding-top: 14px;
    gap: 12px;
  }
  #reviews .review-card__meta span:first-child {
    font-size: 17px;
  }
  #reviews .review-card__meta span:last-child {
    font-size: 10px;
    letter-spacing: 0.14em;
  }

  /* Footer */
  .site-footer {
    padding: 32px 20px 40px !important;
    flex-direction: column !important;
    gap: 12px !important;
    text-align: left;
  }
}

/* ---------- Small phone (≤480px) ---------- */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  [style*="font-size: 64px"] { font-size: 36px !important; }
  [style*="font-size: 36px"] { font-size: 22px !important; }
  .section-title { font-size: 22px !important; }
  #contact .contact-row {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
  #contact .contact-row .mono-label {
    padding-top: 0;
  }
  #contact .contact-row__kind {
    grid-column: 1;
  }
  .card { padding: 18px; }
  .reviews-grid { grid-template-columns: 1fr; }
  .review-card {
    min-height: 0;
    padding: 18px !important;
  }
  .review-card__quote {
    font-size: 14.5px;
    line-height: 1.5;
  }
  .review-card__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .review-card__meta span:last-child { text-align: left; }

  /* Education row: degree + year stack instead of inline */
  #skills div[style*="justify-content: space-between"][style*="align-items: baseline"] {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
  }
}
