/* ==========================================================================
   Tony Kim — Portfolio
   Shared visual system: "Field Notes"

   A career told like a working notebook, not a corporate deck. Cream paper,
   espresso ink, a warm brass accent, an editorial serif for headlines, a
   humanist sans for reading, monospace for dates and tags, and a rare
   handwritten line for asides. Type mechanics (scale, tracking, weight,
   rhythm) are tuned for that serif, not inherited from the old Apple-style
   system: no negative letter-spacing on the serif, a smaller and more
   intimate display scale, and tighter vertical rhythm than a product page.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;1,500&family=Karla:wght@400;500;600&family=Caveat:wght@600&family=IBM+Plex+Mono:wght@500;600&display=swap");

:root {
  /* Palette: warm neutral base (paper/ink), one accent hue (brass) */
  --color-bg: #f7f2e7;
  --color-bg-alt: #fdfbf6;
  --color-ink: #26201a;
  --color-ink-soft: #726a5c;
  --color-line: #e4dbc8;
  --color-accent: #b5652e;
  --color-accent-ink: #ffffff;

  /* Type scale */
  --font-serif: "Lora", Georgia, "Times New Roman", serif;
  --font-sans: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --font-hand: "Caveat", cursive;
  --size-hero: clamp(2.25rem, 4.6vw, 3.75rem);
  --size-h1: clamp(1.75rem, 3.1vw, 2.5rem);
  --size-h2: clamp(1.375rem, 2.2vw, 1.75rem);
  --size-body-lg: clamp(1.0625rem, 1.4vw, 1.25rem);
  --size-body: 1.0625rem;
  --size-small: 0.9375rem;

  /* Rhythm — closer than a product page; this reads like a page, not a deck */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3.25rem;
  --space-xl: 5.5rem;
  --space-2xl: 7rem;

  --max-width: 1100px;
  --max-width-text: 640px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ---- Nav ---- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 242, 231, 0.88);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--color-line);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.site-nav__brand {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  letter-spacing: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0.3em;
}

.site-nav__brand::after {
  content: "*";
  color: var(--color-accent);
  font-size: 0.85em;
}

.site-nav__links {
  display: flex;
  align-items: stretch;
  gap: var(--space-md);
  height: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__links > li {
  display: flex;
  align-items: center;
}

.site-nav__links a,
.site-nav__dropdown-trigger {
  font-size: var(--size-small);
  text-decoration: none;
  color: var(--color-ink-soft);
  transition: color 0.2s ease;
}

.site-nav__links a:hover,
.site-nav__dropdown-trigger:hover {
  color: var(--color-ink);
}

.site-nav__item--dropdown {
  position: relative;
}

.site-nav__dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  padding: 0;
  background: none;
  font-family: inherit;
  cursor: pointer;
}

.site-nav__dropdown-chevron {
  font-size: 0.7em;
  line-height: 1;
  transition: transform 0.2s ease;
}

.site-nav__dropdown {
  position: absolute;
  top: calc(100% - 1px);
  right: 0;
  width: min(280px, calc(100vw - 2rem));
  margin: 0;
  padding: var(--space-xs);
  list-style: none;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-line);
  border-radius: 10px;
  box-shadow: 0 18px 45px rgba(38, 32, 26, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.site-nav__dropdown a {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 9px;
  color: var(--color-ink);
  line-height: 1.25;
}

.site-nav__dropdown a:hover,
.site-nav__dropdown a:focus-visible {
  background: var(--color-bg-alt);
}

.site-nav__item--dropdown:hover .site-nav__dropdown,
.site-nav__item--dropdown[data-open="true"] .site-nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-nav__item--dropdown:hover .site-nav__dropdown-chevron,
.site-nav__item--dropdown[data-open="true"] .site-nav__dropdown-chevron {
  transform: rotate(180deg);
}

@media (max-width: 600px) {
  .site-nav__links {
    gap: var(--space-sm);
  }

  .site-nav__dropdown {
    position: fixed;
    top: 51px;
    right: var(--space-sm);
    left: var(--space-sm);
    width: auto;
    max-height: calc(100vh - 67px);
    overflow-y: auto;
  }
}

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

.hero {
  padding: var(--space-2xl) 0 var(--space-xl);
  text-align: center;
}

.hero__photo {
  width: 176px;
  height: 176px;
  border-radius: 12px;
  object-fit: cover;
  margin: 0 auto var(--space-md);
  border: 1px solid var(--color-line);
}

.hero__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  margin: 0 0 var(--space-md);
  font-weight: 600;
  font-size: var(--size-body-lg);
  color: var(--color-ink);
}

.hero__brand-logo {
  height: 28px;
  width: auto;
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 var(--space-sm);
}

.hero__headline {
  font-family: var(--font-serif);
  font-size: var(--size-hero);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.18;
  margin: 0 auto var(--space-md);
  max-width: 780px;
  text-wrap: balance;
}

.hero__headline--pandora {
  font-size: clamp(2.25rem, 5.25vw, 4.5rem);
}

@media (min-width: 760px) {
  .hero__headline--pandora .hero__headline-nowrap {
    white-space: nowrap;
  }
}

.hero__sub {
  font-size: var(--size-body-lg);
  color: var(--color-ink-soft);
  max-width: var(--max-width-text);
  margin: 0 auto var(--space-lg);
}

.hero__cta {
  display: inline-flex;
  gap: var(--space-md);
}

.hero__prompt {
  font-size: var(--size-body);
  font-weight: 600;
  color: var(--color-accent);
  margin: 0 auto var(--space-lg);
}

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

.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-size: var(--size-body);
  text-decoration: none;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

.btn--primary:hover {
  opacity: 0.85;
}

.btn--text {
  color: var(--color-accent);
  padding: 0.7rem 0;
}

.btn--text::after {
  content: " \2192";
}

/* ---- Sections ---- */

section {
  padding: var(--space-xl) 0;
}

section + section {
  border-top: 1px solid var(--color-line);
}

.section-alt {
  background: var(--color-bg-alt);
}

.section__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 var(--space-xs);
}

.section__title {
  font-family: var(--font-serif);
  font-size: var(--size-h1);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.25;
  margin: 0 0 var(--space-md);
  max-width: 760px;
  text-wrap: balance;
}

.section__lede {
  font-size: var(--size-body-lg);
  color: var(--color-ink-soft);
  max-width: var(--max-width-text);
  margin: 0 0 var(--space-lg);
}

/* ---- Case study cards (homepage grid) ---- */

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.case-card {
  display: block;
  text-decoration: none;
  color: var(--color-ink);
  border: 1px solid var(--color-line);
  border-radius: 14px;
  padding: var(--space-md);
  background: var(--color-bg-alt);
  box-shadow: 0 0 0 rgba(38, 32, 26, 0);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.case-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -14px rgba(38, 32, 26, 0.28);
}

.case-card__logo {
  height: 18px;
  width: auto;
  margin-bottom: var(--space-sm);
}

.case-card__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-ink-soft);
  margin: 0 0 var(--space-xs);
}

.case-card__title {
  font-family: var(--font-serif);
  font-size: var(--size-h2);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
  margin: 0 0 var(--space-sm);
}

.case-card__desc {
  font-size: var(--size-body);
  color: var(--color-ink-soft);
  margin: 0;
}

/* ---- Simple link lists (whitepapers, code, etc) ---- */

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.link-list li {
  border-top: 1px solid var(--color-line);
  padding: var(--space-md) 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.download-cta {
  margin-top: var(--space-md);
}

.download-cta__note {
  max-width: var(--max-width-text);
  margin: var(--space-sm) 0 0;
  font-size: var(--size-small);
  line-height: 1.5;
  color: var(--color-ink-soft);
}

.link-list li:last-child {
  border-bottom: 1px solid var(--color-line);
}

.link-list__title {
  font-family: var(--font-serif);
  font-size: var(--size-body-lg);
  font-weight: 500;
}

.link-list__meta {
  font-size: var(--size-small);
  color: var(--color-ink-soft);
}

.pending {
  color: var(--color-ink-soft);
  font-style: italic;
}

/* ---- Case study page: full-bleed visual block ---- */

.visual-block {
  border-radius: 12px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-line);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink-soft);
  font-size: var(--size-small);
  text-align: center;
  padding: var(--space-md);
  overflow: hidden;
}

.visual-block img,
.visual-block iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.video-link {
  position: relative;
  text-decoration: none;
  cursor: pointer;
}

.video-link__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  transition: transform 0.2s ease;
}

.video-link:hover .video-link__play {
  transform: translate(-50%, -50%) scale(1.08);
}

.video-link__label {
  position: absolute;
  bottom: var(--space-sm);
  right: var(--space-sm);
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: var(--size-small);
  padding: 0.4rem 0.8rem;
  border-radius: 980px;
}

/* ---- Device mockups (MacBook / iPhone shells with auto-scrolling screenshots) ---- */

.device {
  margin: 0 auto;
}

.device__screen > .video-link {
  position: absolute;
  inset: 0;
}

.device__screen > .video-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.device__screen > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Rule: every device shell gets an explicit width (not just max-width) so
   it renders at full, consistent size in any layout context, including
   flex columns like .device-stack, where auto margins alone would let it
   shrink to its content size instead of filling up to max-width. */

.device--macbook {
  max-width: 900px;
  width: 100%;
}

.device--macbook .device__lid {
  position: relative;
  background: #26201a;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.45);
}

.device--macbook .device__camera {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3a3a3c;
}

.device--macbook .device__screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
}

/* Overrides the default 16:10 macbook screen ratio for videos recorded at a
   different aspect ratio, so object-fit: cover doesn't crop the content. */
.device--macbook .device__screen--video {
  aspect-ratio: 49 / 25;
}

.device--iphone {
  max-width: 220px;
  width: 100%;
}

.device-video {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

.device--iphone .device__frame {
  position: relative;
  background: #26201a;
  border-radius: 48px;
  padding: 12px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.45);
}

.device--iphone .device__screen {
  position: relative;
  aspect-ratio: 9 / 19.5;
  border-radius: 36px;
  overflow: hidden;
  background: #000;
}

/* Email graphic: a built representation of a mobile email, used where no
   real screenshot exists (or where a screenshot's aspect ratio doesn't fit
   a phone frame cleanly). Not a recreation of any product's UI. */

.device__screen--graphic {
  background: #fff;
  padding: 56px var(--space-sm) var(--space-sm);
  display: flex;
  flex-direction: column;
}

.email-graphic__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: var(--space-sm);
}

.email-graphic__avatar {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}

.email-graphic__sender {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-ink);
}

.email-graphic__time {
  margin: 0;
  font-size: 0.65rem;
  color: var(--color-ink-soft);
}

.email-graphic__subject {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-ink);
  line-height: 1.3;
}

.email-graphic__preview {
  margin: 0 0 var(--space-sm);
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--color-ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.email-graphic__cta {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-accent-ink);
  background: var(--color-accent);
  padding: 0.4rem 0.8rem;
  border-radius: 980px;
}

.device--iphone .device__island {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 24px;
  background: #000;
  border-radius: 14px;
  z-index: 2;
}

.device__scroll {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.device__image {
  display: block;
  width: 100%;
  height: auto;
  will-change: transform;
}

@keyframes device-autoscroll {
  0%, 8% {
    transform: translateY(0);
  }
  92%, 100% {
    transform: translateY(var(--scroll-distance, 0px));
  }
}

.device__scroll.has-scroll .device__image {
  animation: device-autoscroll 6s ease-in-out infinite alternate;
}

.device__scroll:hover .device__image {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .device__scroll.has-scroll .device__image {
    animation: none;
    transform: translateY(0);
  }
}

.device-figure {
  margin: 0;
}

/* Pre-composited device screenshots (bezel baked in from a real device
   mockup, e.g. Figma's iPhone 17 Pro) rather than a CSS-drawn frame. */
.device-photo {
  display: block;
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
}

.device-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* ---- Workprint: reasoning flow ---- */

.workprint-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-sm);
  margin: var(--space-lg) 0;
  padding: 0;
  list-style: none;
}

.workprint-flow__item {
  min-height: 260px;
  padding: var(--space-md);
  border: 1px solid var(--color-line);
  border-radius: 12px;
  background: var(--color-bg-alt);
}

.workprint-flow__step {
  margin: 0 0 var(--space-lg);
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.workprint-flow__item h3 {
  font-family: var(--font-serif);
  margin: 0 0 var(--space-sm);
  font-size: var(--size-body-lg);
  letter-spacing: 0;
}

.workprint-flow__item > p:last-child {
  margin: 0;
  color: var(--color-ink-soft);
}

@media (max-width: 760px) {
  .workprint-flow {
    grid-template-columns: 1fr;
  }

  .workprint-flow__item {
    min-height: 0;
  }

  .workprint-flow__step {
    margin-bottom: var(--space-md);
  }
}

.device-caption {
  display: block;
  text-align: center;
  margin-top: var(--space-sm);
  color: var(--color-accent);
  text-decoration: none;
  font-size: var(--size-small);
}

.device-caption::after {
  content: " \2192";
}

.device-caption:hover {
  text-decoration: underline;
}

.device-caption--plain {
  color: var(--color-ink-soft);
}

.device-caption--plain::after {
  content: none;
}

/* ---- Plain screenshot card: a shadow for depth, no device frame ---- */

.shot-card {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

.shot-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--color-line);
}

.shot-card__caption {
  display: block;
  text-align: center;
  margin-top: var(--space-sm);
  font-size: var(--size-small);
  color: var(--color-ink-soft);
}

/* ---- Multi-shot grid for a set of screenshots ---- */

.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
}

.shot-grid figcaption {
  margin-top: var(--space-xs);
  font-size: var(--size-small);
  color: var(--color-ink-soft);
}

/* ---- Two-column detail rows (progressive disclosure) ---- */

.detail-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--space-lg);
  align-items: start;
}

@media (max-width: 720px) {
  .detail-row {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
}

.detail-row__label {
  font-size: var(--size-small);
  color: var(--color-ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}

.detail-row__body {
  font-size: var(--size-body-lg);
  margin: 0;
}

.detail-row + .detail-row {
  margin-top: var(--space-lg);
}

/* ---- Trust / collaborator strip ---- */

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
}

.trust-item {
  flex: 1 1 200px;
}

.trust-item__stat {
  font-family: var(--font-serif);
  font-size: var(--size-h2);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--color-accent);
  margin: 0 0 var(--space-xs);
}

.trust-item__label {
  font-size: var(--size-small);
  color: var(--color-ink-soft);
  margin: 0;
}

/* ---- Scroll reveal ---- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* A gentle per-row cascade for lists of .reveal siblings (timeline, resume
   roles) -- entries a little further down the list settle in a beat later,
   so scrolling through a career reads as unfolding rather than a flat wall
   appearing at once. Capped at 6 so a long list doesn't feel laggy. */
.timeline__entry.reveal:nth-child(1) { transition-delay: 0s; }
.timeline__entry.reveal:nth-child(2) { transition-delay: 0.06s; }
.timeline__entry.reveal:nth-child(3) { transition-delay: 0.12s; }
.timeline__entry.reveal:nth-child(4) { transition-delay: 0.18s; }
.timeline__entry.reveal:nth-child(5) { transition-delay: 0.24s; }
.timeline__entry.reveal:nth-child(n+6) { transition-delay: 0.3s; }

.resume-role.reveal:nth-child(1) { transition-delay: 0s; }
.resume-role.reveal:nth-child(2) { transition-delay: 0.06s; }
.resume-role.reveal:nth-child(3) { transition-delay: 0.12s; }
.resume-role.reveal:nth-child(4) { transition-delay: 0.18s; }
.resume-role.reveal:nth-child(5) { transition-delay: 0.24s; }
.resume-role.reveal:nth-child(n+6) { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .timeline__entry.reveal,
  .resume-role.reveal {
    transition-delay: 0s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---- Footer ---- */

.site-footer {
  padding: var(--space-xl) 0 var(--space-lg);
  border-top: 1px solid var(--color-line);
}

.site-footer__contact {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.ai-use {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-line);
  border-radius: 12px;
  padding: var(--space-md);
  font-size: var(--size-small);
  color: var(--color-ink-soft);
}

.ai-use h3 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 var(--space-sm);
}

.ai-use p {
  margin: 0;
  max-width: 760px;
}

.site-footer__meta {
  margin-top: var(--space-lg);
  font-size: var(--size-small);
  color: var(--color-ink-soft);
}

/* ---- Case study nav (prev/next, back link) ---- */

.case-top-nav {
  padding: var(--space-md) 0 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.case-top-nav a {
  text-decoration: none;
  color: var(--color-ink-soft);
}

.case-top-nav a:hover {
  color: var(--color-ink);
}

/* ---- Resume: header, skill tags, accordion ---- */

.resume-header {
  padding: var(--space-xl) 0 var(--space-lg);
}

.resume-header__name {
  font-family: var(--font-serif);
  font-size: var(--size-h1);
  font-weight: 600;
  letter-spacing: 0;
  margin: 0 0 var(--space-xs);
}

.resume-header__contact {
  font-size: var(--size-small);
  color: var(--color-ink-soft);
  margin: 0 0 var(--space-md);
}

.resume-header__contact a {
  color: var(--color-ink-soft);
}

.resume-header__summary {
  font-size: var(--size-body-lg);
  max-width: var(--max-width-text);
  margin: 0;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  list-style: none;
  margin: 0 0 var(--space-md);
  padding: 0;
}

.skill-tags li {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  border: 1px solid var(--color-line);
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  color: var(--color-ink-soft);
  background: var(--color-bg-alt);
}

.resume-role {
  border-top: 1px solid var(--color-line);
}

.resume-role:last-child {
  border-bottom: 1px solid var(--color-line);
}

.resume-role summary {
  list-style: none;
  cursor: pointer;
  padding: var(--space-md) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.resume-role summary::-webkit-details-marker {
  display: none;
}

.resume-role__heading {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.resume-role__head-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.resume-role__rung {
  flex-shrink: 0;
  margin-top: 0.3rem;
}

.resume-role__title {
  font-family: var(--font-serif);
  font-size: var(--size-body-lg);
  font-weight: 500;
  text-wrap: balance;
}

.resume-role__meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-ink-soft);
}

.resume-role__chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
  color: var(--color-ink-soft);
}

.resume-role[open] .resume-role__chevron {
  transform: rotate(180deg);
}

.resume-role__bullets {
  list-style: none;
  margin: 0 0 var(--space-md);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  opacity: 0;
  transition: opacity 0.16s ease 0.05s;
}

.resume-role[open] .resume-role__bullets {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .resume-role__bullets {
    opacity: 1;
    transition: none;
  }
}

.resume-role__bullets li {
  font-size: var(--size-body);
  color: var(--color-ink-soft);
  padding-left: 1.2rem;
  position: relative;
}

.resume-role__bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0.55;
}

/* ---- Hand-written aside: rare, small, never body copy ---- */

.hand-note {
  font-family: var(--font-hand);
  color: var(--color-accent);
  font-size: 1.2rem;
}

/* ---- Career timeline (homepage): the six-rung ladder ---- */

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

.timeline__entry {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-line);
}

.timeline:first-child .timeline__entry:first-child {
  border-top: 0;
}

.timeline__rung {
  flex-shrink: 0;
  margin-top: 0.35rem;
}

.timeline__body {
  flex: 1;
  min-width: 0;
}

.timeline__head {
  margin-bottom: 0.3rem;
}

.timeline__role {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0;
  text-wrap: balance;
}

/* Company + dates read as one grouped byline, deliberately in a different
   register (small, mono, uppercase, tracked) from the serif role above --
   the two shouldn't be mistakable for two lines of the same title. */
.timeline__subhead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.timeline__org {
  color: var(--color-ink-soft);
  text-transform: uppercase;
}

.timeline__meta {
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.timeline__meta::before {
  content: "\00b7";
  margin-right: 0.4rem;
  color: var(--color-line);
}

.timeline__desc {
  font-size: var(--size-body);
  color: var(--color-ink-soft);
  margin: 0 0 var(--space-xs);
  max-width: 62ch;
}

.timeline__cases {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--space-xs);
}

.timeline__case-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-decoration: none;
  color: var(--color-accent);
  border: 1px solid var(--color-line);
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.timeline__case-link:hover {
  border-color: var(--color-accent);
  background: var(--color-bg-alt);
}

.timeline__stage-key {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  margin: 0 0 var(--space-lg);
  padding: 0;
}

.timeline__stage-key::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 4px;
  right: 4px;
  height: 1px;
  background: var(--color-line);
}

.timeline__stage-key-item {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  line-height: 1.3;
  color: var(--color-ink-soft);
  text-align: center;
  padding: 0 0.35rem;
}

.timeline__stage-key-dot {
  width: 2px;
  height: 16px;
  border-radius: 1px;
  background: var(--color-accent);
  flex-shrink: 0;
}

/* Narrow screens: six items in a single nowrap row (each needing room for
   labels like "Instructional Designer") don't fit -- confirmed overflowing
   off-screen on a real phone. Wrap into a 3-column grid instead. The single
   continuous baseline doesn't make sense across two wrapped rows, so it's
   dropped here rather than trying to fake a per-row segment. */
@media (max-width: 640px) {
  .timeline__stage-key {
    flex-wrap: wrap;
    row-gap: var(--space-md);
  }

  .timeline__stage-key::before {
    content: none;
  }

  .timeline__stage-key-item {
    flex: 0 0 33.333%;
  }
}
