/* Portfolio theme: CSS variables + repeating texture tiles (see --page-bg-tile). */

:root {
  /* Leatherstone 015 Dusty Rhino — page texture + palette */
  --color-bg: #a9a298;
  --color-surface: #d8d2c9;
  --color-text: #2c2823;
  --color-muted: #5a544c;
  --color-border: #8f887e;
  --color-accent: #454038;
  --page-bg-tile: url("../textures/backgrounds/bg-19-leatherstone-dusty-rhino.webp?v=7");
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Lora", Georgia, "Times New Roman", serif;
  --font-nav: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --site-header-height: 4.25rem;
  /* Floating bar: inset from viewport when sticky + reserved space above inner bar */
  --site-header-float-top: 1.25rem;
  --site-header-stack: calc(var(--site-header-float-top) + var(--site-header-height));
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --max-width: 56rem;
  --radius: 2px;
  /* Repeating page background tile (assets/textures/backgrounds/) */
  /* Slightly larger repeat reduces moiré / “shimmer” on fine weaves at some zoom levels */
  --page-bg-size: 576px;
  /* Smoked Hickory — skills strip + Experience; skill cards use parchment palette below */
  --skills-section-bg-tile: url("../textures/backgrounds/bg-10-leatherstone-smoked-hickory.webp?v=1");
  --skills-section-bg-size: 480px;
  --skill-gold: #9a7828;
  --skill-gold-soft: color-mix(in srgb, var(--skill-gold) 80%, #d4c9a8);
  /* Education + summary modular headings (slightly darker than #AD9669; tweak in one place) */
  --modular-section-heading-gold: #927a4f;
  --modular-card-border: color-mix(in srgb, var(--skill-gold) 38%, var(--color-border));
  --modular-card-shadow:
    0 1px 0 color-mix(in srgb, var(--color-surface) 82%, transparent) inset,
    0 32px 70px color-mix(in srgb, var(--color-text) 18%, transparent),
    0 14px 36px color-mix(in srgb, var(--color-text) 11%, transparent),
    0 6px 16px color-mix(in srgb, var(--color-text) 7%, transparent);
  /* Skill cards — parchment palette (skills strip only) */
  --skill-card-bg: #f2eadc;
  --skill-card-header: #4e342e;
  --skill-card-body-text: #2c1e1b;
  --skill-card-accent: #8d6e63;
  --skill-card-border: #d7ccc8;
  --skill-card-pad: 16px;
  --skill-card-radius: 14px;
  --skill-card-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--site-header-stack) + var(--space-2));
  height: 100%;
  /* Marquee bleed uses 100vw; clip stray horizontal overflow on narrow viewports */
  overflow-x: clip;
}

/*
 * Page backdrop: apply to body (not html + var(--url)) so tiles repeat for full document
 * height reliably across browsers.
 */
body {
  margin: 0;
  min-height: 100%;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-repeat: repeat;
  background-size: var(--page-bg-size) var(--page-bg-size);
  background-image: var(--page-bg-tile);
}

main {
  position: relative;
  z-index: 0;
}

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

  .site-top .top-bar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: none;
  }

  .site-top.is-scrolled .top-bar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .top-bar-brand,
  .top-bar-center a {
    transition: none;
  }

  .top-bar-brand:hover,
  .top-bar-brand:active,
  .top-bar-center a:hover,
  .top-bar-center a:active {
    transform: none;
  }

  .top-bar-center a::after {
    transition: none;
  }

  .timeline-item {
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
  }

  .timeline-item.timeline-left.is-active .timeline-dot,
  .timeline-item.timeline-right.is-active .timeline-dot {
    animation: none;
    box-shadow: none;
  }

  .timeline-item-surface::before {
    display: none;
  }

  .timeline-graphic::before {
    transition: none;
  }
}

.skip-link {
  position: absolute;
  left: -999px;
  top: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  left: var(--space-2);
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 100;
  transform-origin: left center;
  transform: scaleX(0);
  pointer-events: none;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--color-accent) 72%, var(--skill-gold) 28%),
    var(--skill-gold),
    color-mix(in srgb, var(--color-surface) 35%, var(--color-accent))
  );
  box-shadow:
    0 0 14px color-mix(in srgb, var(--skill-gold) 45%, transparent),
    0 1px 0 color-mix(in srgb, var(--color-surface) 55%, transparent) inset;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(var(--max-width), 100% - var(--space-8));
  margin-inline: auto;
}

/* Header inner row: full width of floating card; padding pins brand / nav to the card edges */
.top-bar-inner.container {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: var(--space-4);
}

/* Header — sticky shell (parent = body) so bar stays pinned; .top-bar is the glass card */
.site-top {
  position: sticky;
  top: 0;
  z-index: 50;
  /* One band of page texture above the card at rest and while stuck */
  padding-top: var(--site-header-float-top);
  padding-left: max(var(--space-8), env(safe-area-inset-left, 0px));
  padding-right: max(var(--space-8), env(safe-area-inset-right, 0px));
  background: transparent;
  border-bottom: none;
  box-shadow: none;
}

.top-bar {
  container-type: inline-size;
  container-name: topbar;
  width: 80%;
  margin-inline: auto;
  border-radius: max(var(--radius), 0.5rem);
  border: 1px solid color-mix(in srgb, var(--color-text) 14%, transparent);
  /* Light wash over matching tile; mostly see-through so hero/content reads through */
  background-color: var(--color-bg);
  background-image:
    linear-gradient(
      color-mix(in srgb, var(--color-surface) 38%, transparent),
      color-mix(in srgb, var(--color-surface) 38%, transparent)
    ),
    var(--page-bg-tile);
  background-repeat: no-repeat, repeat;
  background-size: 100% 100%, var(--page-bg-size) var(--page-bg-size);
  background-position: 0 0, 0 0;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--color-surface) 65%, transparent) inset,
    0 4px 24px color-mix(in srgb, var(--color-text) 7%, transparent);
}

.top-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: var(--space-3);
}

.top-bar-left,
.top-bar-right {
  margin: 0;
  font-size: 0.875rem;
}

/* Keep brand lockup optically centered vs. nav row (p + inline-flex baseline quirks) */
.top-bar-left {
  display: flex;
  align-items: center;
  line-height: 1;
}

.top-bar-brand {
  --brand-mark-height: clamp(1.625rem, 2.8vw, 2rem);
  /* Reference lockup: gap mark→divider ≈ 0.31×H; divider→text ≈ 0.49×H (H = monogram height) */
  --brand-gap-mark-divider: calc(var(--brand-mark-height) * 0.31);
  --brand-gap-divider-text: calc(var(--brand-mark-height) * 0.49);
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: inherit;
  text-decoration: none;
  border-radius: max(var(--radius), 0.35rem);
  padding: var(--space-1) var(--space-2);
  margin: calc(-1 * var(--space-1)) calc(-1 * var(--space-2));
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.top-bar-brand:hover {
  background-color: color-mix(in srgb, var(--color-surface) 55%, transparent);
  box-shadow: 0 1px 0 color-mix(in srgb, var(--color-text) 8%, transparent) inset;
  transform: translateY(-1px);
}

.top-bar-brand:hover .top-bar-brand-name {
  text-decoration: none;
}

.top-bar-brand:active {
  transform: translateY(0);
  transition-duration: 0.08s;
}

.top-bar-brand:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.top-bar-brand-mark {
  display: block;
  flex-shrink: 0;
  height: var(--brand-mark-height);
  width: auto;
  max-width: min(2.75rem, 22vw);
  aspect-ratio: 347 / 391;
  object-fit: contain;
  object-position: center;
  background: transparent;
  margin-right: var(--brand-gap-mark-divider);
}

.top-bar-brand-divider {
  flex-shrink: 0;
  width: 1px;
  height: var(--brand-mark-height);
  align-self: center;
  margin-right: var(--brand-gap-divider-text);
  background: var(--color-border);
}

.top-bar-brand-name {
  font-family: var(--font-display);
  /* ~caps 60–70% of monogram height; cap rem so the bar stays balanced on large logos */
  font-size: min(0.875rem, max(0.53125rem, calc(var(--brand-mark-height) * 0.58)));
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.top-bar-center {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.top-bar-center a {
  position: relative;
  font-family: var(--font-nav);
  color: var(--color-text);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: max(var(--radius), 0.3rem);
  padding: var(--space-2) var(--space-3);
  margin: calc(-1 * var(--space-2)) calc(-1 * var(--space-3));
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
}

@media (max-width: 640px) {
  .top-bar-center a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-block: var(--space-2);
  }
}

.top-bar-center a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.2rem;
  width: 0;
  height: 2px;
  border-radius: 1px;
  background: var(--color-accent);
  transform: translateX(-50%);
  transition: width 0.22s ease;
  pointer-events: none;
}

.top-bar-center a:hover {
  color: var(--color-accent);
  background-color: color-mix(in srgb, var(--color-accent) 9%, transparent);
}

.top-bar-center a:hover::after {
  width: calc(100% - 1.25rem);
}

.top-bar-center a:active {
  transform: scale(0.97);
  transition-duration: 0.08s;
}

.top-bar-center a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.top-bar-center a:focus-visible::after {
  width: 0;
}

/* When the glass bar is narrow enough to wrap, center brand + nav rows */
@container topbar (max-width: 36rem) {
  .top-bar-inner {
    justify-content: center;
  }

  .top-bar-left {
    display: flex;
    justify-content: center;
    flex: 1 1 100%;
    text-align: center;
  }

  .top-bar-center {
    flex: 1 1 100%;
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .top-bar-inner {
    justify-content: center;
  }

  .top-bar-left {
    display: flex;
    justify-content: center;
    flex: 1 1 100%;
    text-align: center;
  }

  .top-bar-center {
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* Sections */
.section {
  padding-block: var(--space-12);
  border-bottom: 1px solid var(--color-border);
}

.section:last-of-type {
  border-bottom: none;
}

/* Gold band flush to section top (matches Skills strip divider) */
.section.section--divider-top {
  padding-top: 0;
}

/* Hero — pull under sticky header so transparent band shows same vignette as hero, not raw body tile */
.hero-section {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: calc(-1 * var(--site-header-stack));
  padding-top: calc(var(--space-12) + var(--site-header-stack));
  padding-bottom: var(--space-12);
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  background: transparent;
  border-bottom: none;
}

/* Edge vignette: darkens hero bounds only; sits above page tile, below copy/headshot */
.hero-section::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* Stronger top edge so the wash reads under the sticky header / safe area */
  background:
    linear-gradient(
      to bottom,
      color-mix(in srgb, var(--color-text) 10%, transparent) 0%,
      transparent 18%
    ),
    radial-gradient(
      ellipse 102% 88% at 50% 36%,
      transparent 32%,
      color-mix(in srgb, var(--color-text) 7%, transparent) 52%,
      color-mix(in srgb, var(--color-text) 20%, transparent) 100%
    ),
    linear-gradient(
      to bottom,
      color-mix(in srgb, var(--color-text) 12%, transparent),
      transparent 22%,
      transparent 100%
    ),
    linear-gradient(
      to right,
      color-mix(in srgb, var(--color-text) 16%, transparent),
      transparent 14%,
      transparent 86%,
      color-mix(in srgb, var(--color-text) 16%, transparent)
    );
  /* Feather mask: full strength through mid-hero, soft fade in lower third → Skills */
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 62%,
    color-mix(in srgb, #000 55%, transparent) 78%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 62%,
    color-mix(in srgb, #000 55%, transparent) 78%,
    transparent 100%
  );
  mask-repeat: no-repeat;
  mask-size: 100% 100%;
}

@media (max-width: 979px) {
  /* Extend vignette into safe area + header band so the top edge matches desktop “full bleed” */
  .hero-section::after {
    inset: unset;
    top: calc(
      -1 * (env(safe-area-inset-top, 0px) + var(--site-header-stack) + var(--space-2))
    );
    left: 0;
    right: 0;
    bottom: 0;
  }
}

.hero-section .container.hero-grid {
  position: relative;
  z-index: 1;
  width: min(74rem, 100% - var(--space-8));
}

.hero-grid {
  display: grid;
  row-gap: var(--space-8);
  align-items: center;
}

@media (min-width: 980px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 36%);
    column-gap: clamp(var(--space-12), 8vw, 7rem);
  }

  .hero-copy {
    justify-self: start;
    transform: none;
  }

  .hero-grid > .headshot-card {
    justify-self: end;
    transform: none;
  }
}

.eyebrow {
  margin: 0 0 var(--space-2);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.page-title {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
}

.hero-section .page-title .page-title__initial {
  font-size: 1.3em;
}

.hero-section .page-title {
  /* Size by actual text content so "larger" is visually true, not full-column width */
  display: inline-block;
  width: max-content;
  max-width: 100%;
  box-sizing: border-box;
  margin-inline: auto;
  text-align: center;
  white-space: nowrap;
  line-height: 1.05;
  overflow: visible;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
  font-size: var(--hero-title-size);
  color: var(--color-text);
  /* Soft letter depth + localized glow (multi-layer text-shadow; no extra DOM) */
  text-shadow:
    0 -0.03em 0.06em color-mix(in srgb, var(--color-surface) 52%, transparent),
    0 0.07em 0.12em color-mix(in srgb, var(--color-text) 28%, transparent),
    0 0.12em 0.24em color-mix(in srgb, var(--color-text) 15%, transparent),
    0 0 0.55em color-mix(in srgb, var(--color-surface) 38%, transparent),
    0 0 1.05em color-mix(in srgb, var(--color-surface) 22%, transparent),
    0 0 1.85em color-mix(in srgb, var(--color-surface) 11%, transparent);
}

.subtitle {
  margin: 0 0 var(--space-4);
  font-size: 1.125rem;
  color: var(--color-muted);
}

.lede {
  margin: 0 0 var(--space-6);
  max-width: 40rem;
  font-family: var(--font-display);
}

.hero-section .lede {
  display: inline-block;
  width: max-content;
  max-width: 100%;
  box-sizing: border-box;
  margin-inline: auto;
  text-align: center;
  white-space: nowrap;
  font-size: var(--hero-description-size);
  line-height: 1.15;
  font-weight: 400;
  color: rgba(63, 57, 49, 1);
  margin-bottom: var(--space-8);
  /* Seamless read aid: no fill/box — drop-shadow follows letter alpha, colors match tile */
  filter:
    drop-shadow(
      0 0 0.35em color-mix(in srgb, var(--color-surface) 32%, transparent)
    )
    drop-shadow(
      0 0 0.85em color-mix(in srgb, var(--color-bg) 24%, transparent)
    );
  /* Light micro-depth only; wide halos come from filter so there is no visible “chip” */
  text-shadow:
    0 -0.02em 0.04em color-mix(in srgb, var(--color-surface) 28%, transparent),
    0 0.045em 0.075em color-mix(in srgb, var(--color-text) 14%, transparent),
    0 0.075em 0.14em color-mix(in srgb, var(--color-text) 7%, transparent),
    0 0 0.22em color-mix(in srgb, var(--color-surface) 16%, transparent);
}

.hero-copy {
  --hero-type-scale: 1;
  --hero-description-size: clamp(
    calc(1.05rem * var(--hero-type-scale)),
    calc(0.95rem * var(--hero-type-scale)) + 0.55vw,
    calc(1.35rem * var(--hero-type-scale))
  );
  /* Cap title so long uppercase line fits narrow viewports */
  --hero-title-size: min(
    calc(65px * var(--hero-type-scale)),
    clamp(1.3rem, 9.25vw + 0.85rem, calc(65px * var(--hero-type-scale)))
  );
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  container-type: inline-size;
  container-name: hero;
  width: 100%;
  min-width: 0;
  overflow: visible;
}

@container hero (min-width: 0px) {
  .hero-section .page-title {
    font-size: var(--hero-title-size);
  }

  .hero-section .lede {
    max-width: 100%;
  }
}

/* Single-column hero: keep name inside the viewport (nowrap + max-content overflows on phones) */
@media (max-width: 979px) {
  .hero-copy {
    --hero-title-size: min(
      calc(48px * var(--hero-type-scale)),
      clamp(1.05rem, 6.25vw + 0.5rem, calc(48px * var(--hero-type-scale)))
    );
  }

  .hero-section .page-title {
    display: block;
    width: 100%;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: break-word;
    text-wrap: balance;
  }

  .hero-section .page-title .page-title__initial {
    font-size: 1.18em;
  }
}

@media (max-width: 480px) {
  .hero-section .lede {
    white-space: normal;
    line-height: 1.35;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  width: 100%;
}

.btn {
  font-family: var(--font-body);
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-text);
  color: var(--color-surface);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.hero-section .btn {
  font-family: var(--font-display);
  font-size: calc(1.1375rem * var(--hero-type-scale));
  font-weight: 600;
  padding: calc(var(--space-2) * 1.3 * var(--hero-type-scale))
    calc(var(--space-4) * 1.3 * var(--hero-type-scale));
  color: var(--color-text);
  border-radius: 0.48rem;
  border: 1px solid
    color-mix(in srgb, var(--color-border) 68%, var(--color-text) 10%);
  background-color: var(--color-surface);
  background-image:
    linear-gradient(
      168deg,
      color-mix(in srgb, #fff 38%, transparent) 0%,
      color-mix(in srgb, #fff 12%, transparent) 26%,
      transparent 46%
    ),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--color-surface) 92%, #fff) 0%,
      color-mix(in srgb, var(--color-surface) 58%, var(--color-bg)) 48%,
      color-mix(in srgb, var(--color-border) 42%, var(--color-bg)) 100%
    );
  box-shadow:
    0 1px 0 color-mix(in srgb, #fff 36%, var(--color-surface)) inset,
    0 -1px 0 color-mix(in srgb, var(--color-text) 13%, transparent) inset,
    0 2px 3px color-mix(in srgb, var(--color-text) 9%, transparent) inset,
    0 4px 14px color-mix(in srgb, var(--color-text) 7%, transparent),
    0 1px 0 color-mix(in srgb, var(--color-surface) 48%, transparent);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.hero-section .btn:hover {
  opacity: 1;
  box-shadow:
    0 1px 0 color-mix(in srgb, #fff 46%, var(--color-surface)) inset,
    0 -1px 0 color-mix(in srgb, var(--color-text) 11%, transparent) inset,
    0 2px 2px color-mix(in srgb, var(--color-text) 7%, transparent) inset,
    0 6px 18px color-mix(in srgb, var(--color-text) 10%, transparent),
    0 1px 0 color-mix(in srgb, var(--color-surface) 54%, transparent);
  transform: translateY(-1px);
}

.hero-section .btn:active {
  opacity: 1;
  transform: translateY(1px);
  box-shadow:
    0 1px 2px color-mix(in srgb, var(--color-text) 11%, transparent) inset,
    0 2px 5px color-mix(in srgb, var(--color-text) 13%, transparent) inset,
    0 1px 3px color-mix(in srgb, var(--color-text) 5%, transparent),
    0 1px 0 color-mix(in srgb, var(--color-surface) 38%, transparent);
}

/* Hero CTA: glass + pointer trail (vanilla port of HoverButton) */
.hero-section .btn.btn--hover-glow {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  border-radius: 1.5rem;
  /* Same warm browns as original; slightly stronger border + fill read against the tile */
  border: 1px solid rgba(168, 154, 146, 0.4);
  background: none;
  background-color: rgba(58, 50, 45, 0.2);
  background-image: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--color-text) 10%, transparent),
    0 1px 3px color-mix(in srgb, var(--color-text) 11%, transparent),
    0 4px 14px color-mix(in srgb, var(--color-text) 9%, transparent);
  transition: box-shadow 0.3s ease, transform 0.2s ease;
  --btn-glow-highlight: #e8ecf2;
  --btn-glow-start: #f6f7f9;
  --btn-glow-mid: #a0a8b4;
  --btn-glow-end: #322e2b;
}

.hero-section .btn.btn--hover-glow::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  box-shadow:
    inset 0 0 0 1px rgba(184, 172, 162, 0.32),
    inset 0 0 16px 0 rgba(176, 162, 150, 0.13),
    inset 0 -3px 12px 0 rgba(148, 136, 126, 0.22),
    0 1px 3px 0 rgba(0, 0, 0, 0.44),
    0 4px 12px 0 rgba(0, 0, 0, 0.38);
  mix-blend-mode: multiply;
  transition: transform 0.3s ease;
  z-index: 0;
}

.hero-section .btn.btn--hover-glow:active::before {
  transform: scale(0.975);
}

.hero-section .btn.btn--hover-glow:hover {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--color-text) 11%, transparent),
    0 2px 4px color-mix(in srgb, var(--color-text) 12%, transparent),
    0 8px 22px color-mix(in srgb, var(--color-text) 10%, transparent);
}

.hero-section .btn.btn--hover-glow:active {
  opacity: 1;
  transform: translateY(1px);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--color-text) 9%, transparent),
    0 1px 2px color-mix(in srgb, var(--color-text) 9%, transparent),
    0 2px 8px color-mix(in srgb, var(--color-text) 7.5%, transparent);
}

.btn--hover-glow__ripples {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
}

.btn--hover-glow__label {
  position: relative;
  z-index: 2;
}

.btn-hover-circle {
  position: absolute;
  width: 1rem;
  height: 1rem;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  filter: blur(12px);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.14s ease;
  mix-blend-mode: screen;
}

.btn-hover-circle.btn-hover-circle--in {
  opacity: 0.92;
}

.btn-hover-circle.btn-hover-circle--out {
  opacity: 0;
  transition: opacity 0.85s ease;
}

@media (prefers-reduced-motion: reduce) {
  .hero-section .btn {
    transition: none;
  }

  .hero-section .btn:hover,
  .hero-section .btn:active {
    transform: none;
  }

  .hero-section .btn.btn--hover-glow::before {
    transition: none;
  }

  .btn-hover-circle {
    transition: none;
  }
}

.btn:hover {
  opacity: 0.9;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
}

.headshot-card {
  position: relative;
  width: 100%;
  max-width: min(100%, 32rem);
  margin-inline: auto;
  padding: 0;
  border: none;
  border-radius: 0.875rem;
  background: transparent;
  box-shadow:
    0 2px 4px color-mix(in srgb, var(--color-text) 10%, transparent),
    0 10px 28px color-mix(in srgb, var(--color-text) 14%, transparent),
    0 22px 52px color-mix(in srgb, var(--color-text) 12%, transparent);
}

@media (min-width: 980px) {
  .headshot-card {
    max-width: none;
    margin-inline: 0;
  }
}

.headshot-photo {
  position: relative;
  margin: 0;
  padding: 5px;
  border-radius: 0.875rem;
  /* Theme-tied gradient frame: accent → border tones */
  background: linear-gradient(
    148deg,
    color-mix(in srgb, var(--color-accent) 42%, var(--color-surface)) 0%,
    color-mix(in srgb, var(--color-border) 55%, var(--color-muted)) 48%,
    color-mix(in srgb, var(--color-surface) 70%, var(--color-accent)) 100%
  );
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--color-surface) 38%, transparent),
    inset 0 1px 0 color-mix(in srgb, var(--color-surface) 55%, transparent);
}

/* Light sweep only on hover; clipped to photo inset so outer frame/shadows match pre-gleam look */
.headshot-photo::after {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: 2;
  border-radius: 0.65rem;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: soft-light;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 26%,
    color-mix(in srgb, #fff 80%, transparent) 50%,
    transparent 74%,
    transparent 100%
  );
  background-size: 260% 100%;
  background-repeat: no-repeat;
  background-position: 100% 50%;
  opacity: 0;
  animation: none;
}

/* Triggered via .is-headshot-gleam-playing (script) so the sweep finishes even if pointer leaves */
.headshot-photo.is-headshot-gleam-playing::after {
  /* linear avoids ease-in-out “braking” at every keyframe (felt as a start stutter) */
  animation: headshot-gleam 1.9s linear 1 forwards;
}

.headshot-img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  border: none;
  border-radius: 0.65rem;
  box-shadow: 0 1px 3px color-mix(in srgb, var(--color-text) 12%, transparent);
}

@keyframes headshot-gleam {
  0% {
    opacity: 0;
    background-position: 100% 50%;
  }

  6% {
    opacity: 0.45;
    background-position: 100% 50%;
  }

  14% {
    opacity: 0.96;
    background-position: 100% 50%;
  }

  21% {
    opacity: 0.96;
    background-position: 91% 50%;
  }

  68% {
    opacity: 0.9;
    background-position: -62% 50%;
  }

  /* Single closing segment: fade out with no flat 88%–100% plateau (that delayed re-hover) */
  100% {
    opacity: 0;
    background-position: -62% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .headshot-photo.is-headshot-gleam-playing::after {
    animation: none;
  }
}

/* Highlights */
.section-kicker {
  margin: 0 0 var(--space-2);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.section > .container > h2 {
  margin: 0;
  font-family: var(--font-nav);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.highlights-list {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .highlights-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .highlights-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.highlight-chip {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.highlight-chip-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

.highlight-chip-text {
  font-size: 0.875rem;
}

/* Skills — Smoked Hickory section; gold divider marks transition from hero (page tile) */
.highlights-section {
  padding-bottom: var(--space-12);
  background-color: var(--color-bg);
  background-image: var(--skills-section-bg-tile);
  background-repeat: repeat;
  background-size: var(--skills-section-bg-size) var(--skills-section-bg-size);
}

.skills-section-divider {
  width: 100%;
  height: 6px;
  margin: 0 0 var(--space-8) 0;
  overflow: visible;
  position: relative;
  z-index: 2;
  border: none;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--color-text) 55%, transparent) 0%,
    color-mix(in srgb, var(--skill-gold) 75%, #5c4518) 10%,
    color-mix(in srgb, var(--skill-gold) 95%, #e8d49a) 50%,
    color-mix(in srgb, var(--skill-gold) 75%, #5c4518) 90%,
    color-mix(in srgb, var(--color-text) 55%, transparent) 100%
  );
  box-shadow:
    0 5px 24px color-mix(in srgb, var(--skill-gold) 55%, transparent),
    0 -3px 18px color-mix(in srgb, var(--skill-gold) 32%, transparent),
    inset 0 2px 0 color-mix(in srgb, #fff 38%, transparent),
    inset 0 -2px 0 color-mix(in srgb, #000 28%, transparent);
}

.skills-section-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 5%,
    color-mix(in srgb, #fff 55%, var(--skill-gold)) 50%,
    transparent 95%
  );
  opacity: 0.85;
  pointer-events: none;
}

.skills-section-divider::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 11px;
  height: 11px;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--skill-gold) 85%, #fff),
    var(--skill-gold),
    color-mix(in srgb, var(--skill-gold) 65%, var(--color-text))
  );
  box-shadow:
    0 0 22px color-mix(in srgb, var(--skill-gold) 70%, transparent),
    0 0 8px color-mix(in srgb, #fff 35%, transparent),
    inset 0 1px 1px color-mix(in srgb, #fff 50%, transparent);
  border: 1px solid color-mix(in srgb, var(--skill-gold) 50%, var(--color-text));
  pointer-events: none;
}

/* Skills — continuous horizontal loop of 3D tiles */
.skills-tiles-marquee-bleed {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: var(--space-12) 0;
}

.skills-tiles-marquee-root {
  position: relative;
}

.skills-tiles-marquee__viewport {
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.skills-tiles-marquee__viewport.is-dragging-marquee {
  cursor: grabbing;
  touch-action: none;
  user-select: none;
}

.skills-tiles-marquee-root .skills-tiles-marquee__track,
.skills-tiles-marquee-root .skill-card-3d {
  touch-action: pan-y;
}

.skills-tiles-marquee__viewport.is-dragging-marquee .skills-tiles-marquee__track,
.skills-tiles-marquee__viewport.is-dragging-marquee .skill-card-3d {
  touch-action: none;
}

.skills-tiles-marquee__track {
  display: flex;
  width: max-content;
  transform: translate3d(0, 0, 0);
  animation: skills-tiles-marquee-slide 72s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  contain: layout style paint;
}

/* script.js drives transform + infinite wrap when interactive marquee is enabled */
.skills-tiles-marquee__track.is-js-marquee {
  animation: none;
}

@keyframes skills-tiles-marquee-slide {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.skills-tiles-marquee__group {
  display: flex;
  flex-shrink: 0;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 20px;
  padding-inline-end: 20px;
}

.skills-tiles-marquee__slide {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  width: min(19rem, 78vw);
  transform: translateZ(0);
}

.skill-card-3d {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  cursor: pointer;
  outline: none;
}

.skill-card-3d__perspective {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  height: auto;
  perspective: 1200px;
  perspective-origin: 50% 50%;
}

.skill-card-3d__tilt {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  height: auto;
  transform-style: preserve-3d;
  will-change: transform;
}

.skill-card-3d__stack {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--skill-card-radius);
  transform-style: preserve-3d;
  background-color: var(--skill-card-bg);
  background-image: none;
  box-shadow: var(--skill-card-shadow);
  border: 1px solid var(--skill-card-border);
}

.skill-card-3d__gradient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--skill-card-accent) 14%, transparent) 0%,
    transparent 50%,
    color-mix(in srgb, var(--skill-card-header) 8%, transparent) 100%
  );
}

.skill-card-3d__noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image: radial-gradient(
    circle at 1px 1px,
    color-mix(in srgb, var(--skill-card-border) 80%, transparent) 1px,
    transparent 0
  );
  background-size: 14px 14px;
}

.skill-card-3d__sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, #fff 55%, transparent) 0%,
    transparent 38%,
    transparent 62%,
    color-mix(in srgb, var(--skill-card-accent) 10%, transparent) 100%
  );
  opacity: 0.45;
}

.skill-card-3d.is-tilted .skill-card-3d__sheen {
  opacity: 0.65;
}

.skill-card-3d__body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: var(--skill-card-pad);
  transform: translateZ(36px);
}

.skill-card-3d__copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: flex-start;
  gap: 0.75rem;
  min-height: 0;
}

.skill-card-3d__icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  color: var(--skill-card-accent);
}

.skill-card-3d__icon svg {
  width: 2.5rem;
  height: 2.5rem;
}

.skill-card-3d__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.2;
  color: var(--skill-card-header);
  text-shadow: none;
}

.skill-card-3d__list {
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  font-size: clamp(0.875rem, 1.65vw, 1rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--skill-card-body-text);
}

.skill-card-3d__list li {
  position: relative;
  margin: 0;
  padding-left: 1.1em;
}

.skill-card-3d__list li + li {
  margin-top: 0.5rem;
}

.skill-card-3d__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.35em;
  height: 0.35em;
  border-radius: 50%;
  background-color: var(--skill-card-accent);
}

.skill-card-3d__rim {
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--skill-card-radius) + 1px);
  pointer-events: none;
  opacity: 0;
  z-index: -1;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--skill-card-accent) 40%, transparent),
    color-mix(in srgb, var(--skill-card-header) 25%, transparent)
  );
  filter: blur(14px);
  transition: opacity 0.4s ease;
}

.skill-card-3d.is-tilted .skill-card-3d__rim {
  opacity: 0.35;
}

.skill-card-3d:focus-visible .skill-card-3d__stack {
  outline: 2px solid var(--skill-card-accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .skills-tiles-marquee__track {
    animation: none;
    transform: translateX(0);
  }

  .skill-card-3d__rim {
    transition: none;
  }

  .skill-card-3d.is-tilted .skill-card-3d__rim {
    opacity: 0;
  }
}

/* Education */
#education .container {
  position: relative;
}

.education-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-top: var(--space-6);
  position: relative;
  padding-left: var(--space-5);
}

.education-stack::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--skill-gold) 55%, var(--color-border)),
    color-mix(in srgb, var(--color-accent) 35%, var(--color-border))
  );
  opacity: 0.75;
  pointer-events: none;
}

.education-card {
  position: relative;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  transition:
    transform 0.26s ease,
    box-shadow 0.26s ease,
    border-color 0.26s ease;
}

.education-card::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-5) + 0.2rem);
  top: 1.15rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid color-mix(in srgb, var(--skill-gold) 70%, var(--color-border));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-surface) 90%, transparent);
  z-index: 1;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .education-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--color-border) 70%, var(--skill-gold));
    box-shadow:
      0 10px 24px color-mix(in srgb, var(--color-text) 7%, transparent),
      0 2px 6px color-mix(in srgb, var(--color-text) 4%, transparent);
  }
}

.education-card:focus-within {
  outline: none;
}

.education-card:focus-within::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 2px solid color-mix(in srgb, var(--color-accent) 45%, transparent);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .education-card {
    transition: none;
  }

  .education-card:hover {
    transform: none;
  }
}

@media (max-width: 480px) {
  .education-stack {
    padding-left: var(--space-4);
  }

  .education-card::before {
    left: calc(-1 * var(--space-4) + 0.15rem);
  }

  .education-stack::before {
    left: 0.4rem;
  }
}

.education-title {
  margin: 0 0 var(--space-2);
  font-family: var(--font-nav);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.education-org {
  margin: 0 0 var(--space-1);
  font-size: 0.9375rem;
}

.education-dates {
  margin: 0;
  font-size: 0.875rem;
}

/* Subtle small ring; long tail fully transparent so it vanishes before the next beat */
@keyframes timeline-dot-pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-accent) 14%, transparent);
  }

  18% {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-muted) 4%, transparent);
  }

  30%,
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

/* Experience — Smoked Hickory (bg-10), same weave vars as skills strip */
#timeline {
  position: relative;
  overflow: hidden;
  padding-bottom: var(--space-8);
  background-color: var(--color-bg);
  background-image: var(--skills-section-bg-tile);
  background-repeat: repeat;
  background-size: var(--skills-section-bg-size) var(--skills-section-bg-size);
}

#timeline .container {
  position: relative;
  z-index: 1;
  width: min(72rem, 100% - var(--space-8));
}

/* Timeline — center spine, alternating cards (scroll-driven fill via --timeline-scroll) */
.timeline-graphic {
  --timeline-scroll: 0;
  --timeline-gutter: clamp(2.25rem, 5vw, 3.25rem);
  --timeline-dot: clamp(1.5rem, 2.4vw, 1.875rem);
  --timeline-dot-r: calc(var(--timeline-dot) / 2);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  padding: var(--space-4) 0 var(--space-8);
  min-height: 0;
}

.timeline-graphic::before {
  content: "";
  position: absolute;
  left: calc(50% - 2px);
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--color-accent) 55%, var(--skill-gold)) 0%,
    var(--skill-gold) 40%,
    color-mix(in srgb, var(--skill-gold) 75%, #e8d49a) 72%,
    color-mix(in srgb, var(--skill-gold) 55%, #f2e8c4) 100%
  );
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--color-text) 12%, transparent),
    0 0 24px color-mix(in srgb, var(--skill-gold) 32%, transparent),
    0 0 36px rgba(232, 212, 154, 0.22);
  transform-origin: top center;
  transform: scaleY(var(--timeline-scroll));
  pointer-events: none;
}

.timeline-year-bubble {
  align-self: center;
  z-index: 2;
  padding: var(--space-2) var(--space-3);
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-border) 70%, var(--color-text));
  background: color-mix(in srgb, var(--color-surface) 92%, var(--color-bg));
  color: var(--color-text);
  font-family: var(--font-nav);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: scale(0.88) translateY(10px);
  transition:
    transform 480ms ease,
    opacity 480ms ease;
}

.timeline-year-bubble.is-active {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.timeline-item {
  --job-tint: transparent;
  --mx: 50%;
  --my: 38%;
  position: relative;
  width: calc(50% - var(--timeline-gutter));
  opacity: 0;
  filter: blur(4px);
  transform: translate3d(var(--enter-x, 0), 36px, 0) scale(0.98);
  transition:
    opacity 500ms ease,
    filter 520ms ease,
    transform 650ms cubic-bezier(0.2, 0.8, 0.16, 1);
  transition-delay: calc(var(--item-order, 0) * 65ms);
}

/* Card chrome lives on the surface so hover lift does not move the spine orb */
.timeline-item-surface {
  position: relative;
  z-index: 0;
  padding: var(--space-4) var(--space-4) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: 1.125rem;
  background: color-mix(in srgb, var(--color-surface) 88%, transparent);
  box-shadow:
    0 2px 4px color-mix(in srgb, var(--color-text) 8%, transparent),
    0 10px 28px color-mix(in srgb, var(--color-text) 14%, transparent);
  transition:
    border-color 320ms ease,
    box-shadow 360ms ease,
    background 320ms ease,
    transform 320ms cubic-bezier(0.2, 0.8, 0.16, 1);
}

/* Pointer-tracking “spotlight” (JS sets --mx / --my on .timeline-item); fades in on hover */
.timeline-item-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle min(120%, 22rem) at var(--mx) var(--my),
    color-mix(in srgb, var(--job-tint) 34%, transparent) 0%,
    color-mix(in srgb, var(--job-tint) 12%, transparent) 38%,
    transparent 58%
  );
  opacity: 0;
  transition: opacity 420ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
  z-index: 1;
}

/* Per-role accent: ~10% tint wash on card + stronger wash toward spine / year */
.timeline-item-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-sizing: border-box;
  background:
    linear-gradient(
      155deg,
      color-mix(in srgb, var(--job-tint) 10%, transparent) 0%,
      color-mix(in srgb, var(--job-tint) 4%, transparent) 42%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 85% 55% at var(--job-tint-anchor, 50%) 0%,
      color-mix(in srgb, var(--job-tint) 9%, transparent),
      transparent 62%
    );
  pointer-events: none;
  z-index: 0;
}

.timeline-item.timeline-left .timeline-item-surface::after {
  --job-tint-anchor: 0%;
}

.timeline-item.timeline-right .timeline-item-surface::after {
  --job-tint-anchor: 100%;
}

.timeline-item-surface > .timeline-head,
.timeline-item-surface > .timeline-sub,
.timeline-item-surface > .timeline-body {
  position: relative;
  z-index: 2;
}

.timeline-item.type-leadership .timeline-item-surface {
  border-color: color-mix(in srgb, var(--color-accent) 35%, var(--color-border));
  background: color-mix(in srgb, var(--color-surface) 90%, transparent);
}

.timeline-item.type-business .timeline-item-surface {
  border-color: color-mix(in srgb, var(--skill-card-header) 28%, var(--color-border));
  background: color-mix(in srgb, var(--color-surface) 90%, transparent);
}

.timeline-item.type-trades .timeline-item-surface {
  border-color: color-mix(in srgb, var(--skill-gold) 40%, var(--color-border));
  background: color-mix(in srgb, var(--color-surface) 90%, transparent);
}

.timeline-left {
  margin-right: auto;
  --enter-x: -56px;
}

.timeline-right {
  margin-left: auto;
  --enter-x: 56px;
}

.timeline-dot {
  position: absolute;
  top: var(--space-4);
  z-index: 3;
  width: var(--timeline-dot);
  height: var(--timeline-dot);
  border-radius: 50%;
  box-sizing: border-box;
  isolation: isolate;
  pointer-events: none;
  transform-origin: 50% 50%;
  /* Role tint (30%) + light disc behind artwork + PNG */
  background-color: transparent;
  background-image:
    radial-gradient(
      circle closest-side,
      color-mix(in srgb, var(--job-tint) 30%, transparent) 0%,
      color-mix(in srgb, var(--job-tint) 18%, transparent) 48%,
      transparent 70%
    ),
    radial-gradient(
      circle closest-side,
      color-mix(in srgb, var(--color-surface) 88%, #fff) 0%,
      color-mix(in srgb, var(--color-surface) 45%, transparent) 62%,
      transparent 72%
    ),
    url("../images/timeline-dot.png?v=2");
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-position: center, center, center;
  background-size: 100% 100%, 135% 135%, 92% 92%;
  filter: contrast(1.35) brightness(0.88)
    drop-shadow(0 0 12px color-mix(in srgb, var(--job-tint) 30%, transparent));
  box-shadow: none;
  transition:
    transform 260ms ease,
    box-shadow 260ms ease,
    filter 260ms ease;
}

/* Dot center on spine: gutter from card inner edge to spine axis = --timeline-gutter */
.timeline-item.timeline-left .timeline-dot {
  left: 100%;
  right: auto;
  transform: translateX(calc(var(--timeline-gutter) - var(--timeline-dot-r)));
}

.timeline-item.timeline-right .timeline-dot {
  right: 100%;
  left: auto;
  transform: translateX(calc(-1 * (var(--timeline-gutter) - var(--timeline-dot-r))));
}

.timeline-item.is-active {
  opacity: 1;
  filter: blur(0);
  transform: translate3d(0, 0, 0) scale(1);
}

.timeline-item.is-active .timeline-item-surface {
  border-color: color-mix(in srgb, var(--color-border) 55%, var(--color-accent));
  background: color-mix(in srgb, var(--color-surface) 94%, var(--color-bg));
  box-shadow:
    0 4px 8px color-mix(in srgb, var(--color-text) 10%, transparent),
    0 16px 40px color-mix(in srgb, var(--color-text) 18%, transparent);
}

.timeline-item.is-active .timeline-item-surface::after {
  background:
    linear-gradient(
      155deg,
      color-mix(in srgb, var(--job-tint) 12%, transparent) 0%,
      color-mix(in srgb, var(--job-tint) 5%, transparent) 42%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 90% 58% at var(--job-tint-anchor, 50%) 0%,
      color-mix(in srgb, var(--job-tint) 11%, transparent),
      transparent 62%
    );
}

.timeline-item.is-active:hover .timeline-item-surface::before {
  opacity: 1;
}

/* Surface lifts toward spine; orb stays fixed (sibling of surface) */
.timeline-item.timeline-left.is-active:hover .timeline-item-surface {
  transform: translate3d(-5px, -7px, 0);
  border-color: color-mix(in srgb, var(--job-tint) 42%, var(--color-border));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--job-tint) 28%, transparent),
    0 10px 22px color-mix(in srgb, var(--job-tint) 14%, transparent),
    0 26px 50px color-mix(in srgb, var(--color-text) 16%, transparent);
}

.timeline-item.timeline-right.is-active:hover .timeline-item-surface {
  transform: translate3d(5px, -7px, 0);
  border-color: color-mix(in srgb, var(--job-tint) 42%, var(--color-border));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--job-tint) 28%, transparent),
    0 10px 22px color-mix(in srgb, var(--job-tint) 14%, transparent),
    0 26px 50px color-mix(in srgb, var(--color-text) 16%, transparent);
}

.timeline-item.is-active:hover .timeline-item-surface {
  transition-delay: 0ms;
  transition-duration: 220ms, 280ms, 220ms, 320ms;
}

.timeline-item.is-active:hover .timeline-item-surface::after {
  background:
    linear-gradient(
      155deg,
      color-mix(in srgb, var(--job-tint) 18%, transparent) 0%,
      color-mix(in srgb, var(--job-tint) 7%, transparent) 40%,
      transparent 68%
    ),
    radial-gradient(
      ellipse 92% 62% at var(--job-tint-anchor, 50%) 0%,
      color-mix(in srgb, var(--job-tint) 16%, transparent),
      transparent 60%
    );
}

.timeline-item.timeline-left.is-active .timeline-dot {
  transform: translateX(calc(var(--timeline-gutter) - var(--timeline-dot-r))) scale(1.12);
  filter: contrast(1.42) brightness(0.9)
    drop-shadow(0 0 14px color-mix(in srgb, var(--job-tint) 30%, transparent));
  animation: timeline-dot-pulse 2.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

.timeline-item.timeline-right.is-active .timeline-dot {
  transform: translateX(calc(-1 * (var(--timeline-gutter) - var(--timeline-dot-r)))) scale(1.12);
  filter: contrast(1.42) brightness(0.9)
    drop-shadow(0 0 14px color-mix(in srgb, var(--job-tint) 30%, transparent));
  animation: timeline-dot-pulse 2.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}

.timeline-title {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.35vw, 1.125rem);
  font-weight: 600;
  line-height: 1.25;
}

.timeline-date {
  flex-shrink: 0;
  font-size: 0.8125rem;
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-border) 85%, var(--color-text));
  background: color-mix(in srgb, var(--color-surface) 75%, var(--color-bg));
  color: var(--color-muted);
}

.timeline-sub {
  margin: var(--space-2) 0;
  font-size: 0.875rem;
}

.timeline-body {
  margin: var(--space-3) 0 0;
  font-size: 0.9375rem;
}

@media (prefers-reduced-motion: reduce) {
  .timeline-item-surface {
    transition: none;
  }

  .timeline-item.is-active:hover .timeline-item-surface {
    transform: none;
  }
}

@media (max-width: 900px) {
  #timeline .container {
    width: min(var(--max-width), 100% - var(--space-8));
  }

  .timeline-graphic {
    gap: var(--space-6);
    padding-left: var(--space-12);
    padding-right: 0;
  }

  .timeline-graphic::before {
    left: 1.125rem;
  }

  .timeline-left,
  .timeline-right {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    --enter-x: 0px;
  }

  /*
   * Spine axis is at 1.125rem + 2px from the graphic’s left; cards start after padding-left
   * (space-12). Dot position is relative to the card, so subtract that inset — otherwise
   * the marker sits inside the card and covers copy.
   */
  .timeline-item.timeline-left .timeline-dot,
  .timeline-item.timeline-right .timeline-dot {
    left: calc(1.125rem + 2px - var(--space-12) - var(--timeline-dot-r));
    right: auto;
    transform: none;
  }

  .timeline-item.timeline-left.is-active .timeline-dot,
  .timeline-item.timeline-right.is-active .timeline-dot {
    transform: scale(1.12);
  }

  .timeline-year-bubble {
    align-self: flex-start;
    margin-left: calc(-1 * var(--space-12) + 0.25rem);
    font-size: 0.75rem;
  }
}

.muted {
  color: var(--color-muted);
}

/* Projects */
#projects .container {
  width: min(92rem, calc(100% - max(1rem, env(safe-area-inset-left, 0px)) - max(1rem, env(safe-area-inset-right, 0px))));
  max-width: none;
}

#projects .container > h2,
#timeline .container > h2 {
  font-family: "Playfair Display", var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111;
  text-align: center;
  width: 100%;
  margin-inline: auto;
}

#timeline .container > h2 {
  margin-bottom: var(--space-6);
}

#projects .container > h2 {
  margin-bottom: var(--space-8);
}

#projects.section.section--divider-top {
  padding-bottom: clamp(3.75rem, 9vw, 5.75rem);
}

.projects-showcase {
  margin-top: var(--space-8);
  display: grid;
  gap: var(--space-6);
}

@media (max-width: 979px) {
  .projects-showcase {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }

  .projects-showcase-tiles {
    display: contents;
  }

  .project-tile {
    width: 100%;
    max-width: 100%;
    padding: var(--space-5);
  }

  .project-featured {
    width: 100%;
    max-width: 100%;
  }
}

@media (min-width: 980px) {
  .projects-showcase {
    grid-template-columns: minmax(0, min(32rem, 36vw)) minmax(0, 1fr);
    align-items: start;
    gap: var(--space-6) var(--space-8);
  }

  .projects-showcase-detail {
    align-self: stretch;
    position: relative;
  }

  .project-featured {
    max-height: min(calc(92dvh * 0.8), calc((100dvh - var(--site-header-stack) - var(--space-8)) * 0.8));
    width: 100%;
    will-change: transform;
  }
}

@media (min-width: 1280px) {
  .projects-showcase {
    grid-template-columns: minmax(0, min(36rem, 34vw)) minmax(0, 1fr);
    gap: var(--space-6) var(--space-8);
  }
}

.projects-showcase-tiles {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 980px) {
  .projects-showcase-tiles {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: var(--space-4);
  }
}

.project-tile {
  position: relative;
  display: grid;
  gap: var(--space-3);
  width: 100%;
  min-height: 0;
  text-align: left;
  border: 1px solid color-mix(in srgb, var(--color-border) 78%, var(--color-text));
  border-radius: 0.8rem;
  padding: var(--space-4);
  color: inherit;
  font: inherit;
  background:
    linear-gradient(
      150deg,
      color-mix(in srgb, var(--color-surface) 92%, #fff),
      color-mix(in srgb, var(--color-surface) 84%, var(--color-bg))
    );
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 42%, transparent),
    0 6px 16px color-mix(in srgb, var(--color-text) 7%, transparent);
  cursor: pointer;
  transition:
    border-color 0.26s ease,
    transform 0.26s ease,
    box-shadow 0.26s ease,
    background 0.26s ease;
}

@media (min-width: 980px) {
  .project-tile {
    min-height: 0;
    overflow: hidden;
    padding: var(--space-5);
    align-content: start;
  }

  .project-tile-title {
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    line-height: 1.3;
  }

  .project-tile-summary {
    font-size: clamp(1rem, 1.3vw, 1.1875rem);
    line-height: 1.58;
  }

  .project-tile-meta {
    font-size: clamp(0.625rem, 0.85vw, 0.6875rem);
    max-width: 100%;
  }

  .project-tile-role {
    font-size: clamp(0.625rem, 0.85vw, 0.6875rem);
  }

  .project-tile-progress {
    margin-top: var(--space-2);
  }
}

.project-tile::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 0.8rem 0 0 0.8rem;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--skill-gold) 90%, var(--color-accent)),
    color-mix(in srgb, var(--color-accent) 70%, var(--skill-gold))
  );
  opacity: 0.75;
}

.project-tile.is-active {
  border-color: color-mix(in srgb, var(--skill-gold) 66%, var(--color-border));
  transform: translateY(-2px);
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--color-surface) 96%, #fff),
      color-mix(in srgb, var(--color-surface) 78%, var(--color-bg))
    );
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 55%, transparent),
    0 12px 28px color-mix(in srgb, var(--color-text) 12%, transparent),
    0 0 26px color-mix(in srgb, var(--skill-gold) 24%, transparent);
}

@media (hover: hover) and (pointer: fine) {
  .project-tile:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--color-border) 68%, var(--skill-gold));
    box-shadow:
      inset 0 1px 0 color-mix(in srgb, #fff 48%, transparent),
      0 10px 24px color-mix(in srgb, var(--color-text) 10%, transparent);
  }
}

.project-tile:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.project-tile-meta {
  display: inline-flex;
  width: max-content;
  padding: var(--space-1) var(--space-2);
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-border) 85%, var(--color-text));
  background: color-mix(in srgb, var(--color-surface) 84%, var(--skill-gold));
  font-size: 0.6875rem;
  color: var(--color-muted);
}

.project-tile-role {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

.project-tile-title {
  font-family: var(--font-nav);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.project-tile-summary {
  font-size: clamp(1rem, 2.6vw, 1.125rem);
  line-height: 1.58;
  color: var(--color-muted);
}

.project-tile-progress {
  margin-top: var(--space-2);
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-border) 40%, transparent);
  overflow: hidden;
}

.project-tile-progress > span {
  display: block;
  width: calc(var(--project-progress, 0) * 1%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--color-accent) 76%, var(--skill-gold)),
    var(--skill-gold),
    color-mix(in srgb, var(--skill-gold) 74%, #fff)
  );
  box-shadow: 0 0 10px color-mix(in srgb, var(--skill-gold) 44%, transparent);
  transition: width 100ms linear;
}

.project-featured {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 1rem;
  border: 1px solid color-mix(in srgb, var(--color-border) 55%, var(--color-text));
  color: #111;
  background-color: color-mix(in srgb, var(--color-surface) 92%, var(--color-bg));
  overflow-x: hidden;
  overflow-y: auto;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 42%, transparent),
    0 14px 30px color-mix(in srgb, var(--color-text) 12%, transparent);
}

.project-featured-media {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  max-height: min(56vh, 26rem);
  background: color-mix(in srgb, var(--color-border) 35%, var(--color-bg));
  overflow: hidden;
  border-radius: 1rem 1rem 0 0;
}

.project-featured-lead {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  margin: 0;
  padding: var(--space-4) var(--space-5);
  background: none;
  border: none;
  pointer-events: none;
}

.project-featured-header-pill {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-border) 84%, var(--color-text));
  background: color-mix(in srgb, var(--color-surface) 82%, var(--skill-gold));
  font-size: 0.6875rem;
  color: var(--color-muted);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--color-text) 12%, transparent);
}

.project-featured-header-pill .project-featured-role {
  flex: 0 0 auto;
  margin-right: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font: inherit;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: inherit;
}

.project-featured-header-pill .project-featured-meta {
  display: block;
  flex: 1 1 12rem;
  min-width: 0;
  margin-left: auto;
  text-align: right;
  border: none;
  background: none;
  width: auto;
  max-width: 100%;
  padding: 0;
  white-space: normal;
  text-wrap: balance;
  box-shadow: none;
}

.project-featured-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.project-featured-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-5) var(--space-6);
  text-align: center;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--color-surface) 96%, #fff) 0%,
    color-mix(in srgb, var(--color-surface) 88%, var(--color-bg)) 100%
  );
}

.project-featured-content .project-featured-title,
.project-featured-content .project-featured-details {
  margin-inline: auto;
  width: 100%;
  max-width: 52ch;
}

.project-featured-content .project-featured-details {
  text-align: center;
  text-wrap: pretty;
}

@media (max-width: 979px) {
  .project-featured {
    margin-top: var(--space-1);
  }

  .project-featured-lead {
    padding: var(--space-3) var(--space-4);
  }

  .project-featured-media {
    max-height: min(42vh, 18rem);
    aspect-ratio: 16 / 10;
    border-radius: 1rem 1rem 0 0;
  }

  .project-featured-content {
    padding: var(--space-3) var(--space-4) var(--space-4);
    gap: var(--space-2);
  }
}

/* Featured image overlay: row + pill radius reads awkward when role/meta wrap on phones */
@media (max-width: 720px) {
  .project-featured-header-pill {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-2);
    border-radius: 0.7rem;
  }

  .project-featured-header-pill .project-featured-role {
    margin-right: 0;
  }

  .project-featured-header-pill .project-featured-meta {
    flex: none;
    width: 100%;
    min-width: 0;
    margin-left: 0;
    text-align: left;
    text-wrap: pretty;
  }
}

.project-featured-meta {
  display: inline-flex;
  width: max-content;
  padding: var(--space-1) var(--space-2);
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-border) 84%, var(--color-text));
  background: color-mix(in srgb, var(--color-surface) 82%, var(--skill-gold));
  font-size: 0.6875rem;
  color: var(--color-muted);
}

.project-featured-role {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
}

.project-featured-title {
  margin: 0;
  font-family: var(--font-nav);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.2;
}

.project-featured-details {
  margin: 0;
  font-size: clamp(1rem, 1.35vw, 1.125rem);
  line-height: 1.62;
  max-width: 52ch;
}

@media (max-width: 979px) {
  .project-featured-title {
    font-size: clamp(1.125rem, 4.5vw, 1.35rem);
    text-wrap: balance;
    overflow-wrap: break-word;
  }

  .project-featured-details {
    font-size: clamp(1rem, 3.2vw, 1.0625rem);
    line-height: 1.6;
    max-width: none;
  }
}

/* Desktop scroll-sync panel: ~20% smaller than default featured styles (mobile unchanged) */
@media (min-width: 980px) {
  .project-featured-media {
    max-height: min(calc(56vh * 0.8), calc(26rem * 0.8));
  }

  .project-featured-lead {
    padding: calc(var(--space-4) * 0.8) calc(var(--space-5) * 0.8);
  }

  .project-featured-header-pill {
    gap: calc(var(--space-2) * 0.8) calc(var(--space-4) * 0.8);
    padding: calc(var(--space-2) * 0.8) calc(var(--space-3) * 0.8);
  }

  .project-featured-content {
    gap: calc(var(--space-4) * 0.8);
    padding: calc(var(--space-5) * 0.8) calc(var(--space-5) * 0.8) calc(var(--space-6) * 0.8);
  }

  /* Typography uses default featured sizes; card footprint stays reduced above */
}

@media (prefers-reduced-motion: reduce) {
  .project-tile,
  .project-tile-progress > span {
    transition: none;
  }

  .project-tile:hover,
  .project-tile.is-active {
    transform: none;
  }
}

/* Education + summary — Dusty Rhino (bg-19), same tile as page body + balanced polish */
.education-summary-section {
  position: relative;
  background-color: var(--color-bg);
  background-image: var(--page-bg-tile);
  background-repeat: repeat;
  background-size: var(--page-bg-size) var(--page-bg-size);
}

.education-summary-section::before {
  content: "";
  position: absolute;
  inset: 0;
  max-width: var(--max-width);
  margin-inline: auto;
  width: min(var(--max-width), 100% - var(--space-8));
  pointer-events: none;
  background: radial-gradient(
    ellipse 85% 70% at 50% 0%,
    color-mix(in srgb, var(--color-accent) 6%, transparent),
    transparent 55%
  );
  opacity: 0.85;
}

.education-summary-section .container {
  position: relative;
  z-index: 1;
}

/* In-page #contact / #summary hash targets at section top */
.summary-contact-scroll-target {
  display: block;
  height: 0;
  width: 100%;
  overflow: hidden;
  pointer-events: none;
}

.summary-text {
  margin: 0;
}

.contact-cta-card__summary-text {
  width: 100%;
  max-width: 42rem;
  margin-inline: auto;
  text-align: center;
  color: var(--color-text);
}

/* Education + summary — modular cards, gap only (no column rules), stronger depth */
.education-summary-modular {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-6);
  align-items: stretch;
}

.education-summary-modular__education {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  gap: var(--space-5);
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.education-summary-modular__education > .education-module-card {
  flex-shrink: 0;
}

.education-module-card {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--modular-card-border);
  box-shadow: var(--modular-card-shadow);
}

.education-module-card__surface {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: var(--space-5);
  background: color-mix(in srgb, var(--color-surface) 94%, var(--color-bg));
}

/* Match vertical rhythm of .contact-cta-card__body (gap between Summary heading and body) */
.education-module-card__surface--with-heading {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.education-module-card__section-title {
  margin: 0;
  width: 100%;
  text-align: left;
}

.education-module-card__row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.education-module-card__text-block {
  flex: 1;
  min-width: 0;
}

.education-module-card__text-block .education-title {
  margin-top: 0;
}

/* SVG Repo assets — mask so colour tracks --skill-gold */
.education-module-card__icon {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  background: var(--skill-gold);
}

.education-module-card__icon--cap {
  -webkit-mask: url("../icons/education-cap-svgrepo.svg") center / 78% no-repeat;
  mask: url("../icons/education-cap-svgrepo.svg") center / 78% no-repeat;
}

.education-module-card__icon--handshake {
  -webkit-mask: url("../icons/handshake-svgrepo.svg") center / 88% no-repeat;
  mask: url("../icons/handshake-svgrepo.svg") center / 88% no-repeat;
}

.education-summary-modular .contact-cta-card.education-summary-modular__summary {
  border: 1px solid var(--modular-card-border);
  border-radius: 0.5rem;
  box-shadow: var(--modular-card-shadow);
}

.education-summary-modular__summary {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.education-summary-modular__summary .contact-cta-card__summary-text {
  margin-inline: auto;
  max-width: 42rem;
  text-align: center;
}

.education-summary-modular__summary .contact-cta-card__action {
  margin-top: auto;
  align-self: center;
}

@media (max-width: 768px) {
  .education-summary-modular {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .education-summary-modular__education {
    height: auto;
    justify-content: flex-start;
  }
}

/* Contact — full-width CTA card + typewriter mailto button */
.contact-section__inner {
  width: min(72rem, 100% - var(--space-8));
  max-width: none;
  margin-inline: auto;
}

.contact-cta-card {
  --contact-type-ms: 65;
  position: relative;
  width: 100%;
  margin-top: 0;
  border-radius: 1rem;
  border: 1px solid color-mix(in srgb, var(--color-border) 55%, var(--skill-gold));
  background: color-mix(in srgb, var(--color-surface) 94%, var(--color-bg));
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--color-surface) 72%, transparent) inset,
    0 14px 36px color-mix(in srgb, var(--color-text) 9%, transparent),
    0 0 0 1px color-mix(in srgb, var(--skill-gold) 14%, transparent);
  overflow: hidden;
  isolation: isolate;
}

.contact-cta-card__accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--skill-gold) 92%, #fff),
    var(--skill-gold),
    color-mix(in srgb, var(--color-accent) 55%, var(--skill-gold))
  );
  box-shadow:
    0 0 20px color-mix(in srgb, var(--skill-gold) 45%, transparent),
    inset 0 0 0 1px color-mix(in srgb, #fff 35%, transparent);
  pointer-events: none;
  z-index: 1;
}

.contact-cta-card__body {
  position: relative;
  z-index: 2;
  padding: var(--space-6) var(--space-6) var(--space-6) calc(var(--space-6) + 5px);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
}

/* Modular summary: no left accent strip — symmetric padding + column fill */
.education-summary-modular__summary .contact-cta-card__body {
  flex: 1;
  align-items: stretch;
  width: 100%;
  padding: var(--space-6) var(--space-5);
}

.contact-cta-card__summary-heading {
  margin: 0;
  width: 100%;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.625rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: var(--color-text);
  text-align: center;
}

.education-summary-modular .contact-cta-card__summary-heading.modular-section-heading {
  color: var(--modular-section-heading-gold);
}

.contact-cta-card__action {
  position: relative;
  display: inline-flex;
  align-self: center;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: var(--space-3) var(--space-6);
  margin-top: 0;
  border-radius: 0.55rem;
  border: 1px solid color-mix(in srgb, var(--skill-gold) 42%, var(--color-border));
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: color-mix(in srgb, var(--color-text) 88%, var(--color-accent));
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--color-surface) 88%, #fff) 0%,
    color-mix(in srgb, var(--color-surface) 62%, var(--color-bg)) 48%,
    color-mix(in srgb, var(--skill-gold) 12%, var(--color-surface)) 100%
  );
  box-shadow:
    0 1px 0 color-mix(in srgb, #fff 42%, var(--color-surface)) inset,
    0 -1px 0 color-mix(in srgb, var(--color-text) 10%, transparent) inset,
    0 4px 16px color-mix(in srgb, var(--skill-gold) 22%, transparent),
    0 2px 6px color-mix(in srgb, var(--color-text) 6%, transparent);
  cursor: pointer;
  transition:
    transform 0.22s ease,
    box-shadow 0.28s ease,
    border-color 0.22s ease,
    color 0.22s ease;
}

.contact-cta-card__action::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.35rem;
  width: 0;
  height: 2px;
  border-radius: 1px;
  background: color-mix(in srgb, var(--skill-gold) 70%, var(--color-accent));
  transform: translateX(-50%);
  transition: width 0.24s ease;
  pointer-events: none;
}

.contact-cta-card__action:hover {
  color: var(--color-accent);
  border-color: color-mix(in srgb, var(--skill-gold) 58%, var(--color-accent));
  box-shadow:
    0 1px 0 color-mix(in srgb, #fff 48%, var(--color-surface)) inset,
    0 -1px 0 color-mix(in srgb, var(--color-text) 8%, transparent) inset,
    0 8px 28px color-mix(in srgb, var(--skill-gold) 32%, transparent),
    0 3px 10px color-mix(in srgb, var(--color-text) 8%, transparent);
  transform: translateY(-2px);
}

.contact-cta-card__action:hover::after {
  width: calc(100% - 2.5rem);
}

.contact-cta-card__action:active {
  transform: translateY(1px);
  transition-duration: 0.08s;
}

.contact-cta-card__action:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.contact-cta-card__action:focus-visible::after {
  width: 0;
}

.contact-cta-card__action-row {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  white-space: nowrap;
}

.contact-cta-card__typed {
  display: inline-block;
  min-width: 0.35em;
}

.contact-cta-card__cursor {
  display: inline-block;
  width: 0.08em;
  min-width: 2px;
  height: 1em;
  margin-left: 0.02em;
  align-self: center;
  border-radius: 1px;
  background: color-mix(in srgb, var(--skill-gold) 85%, var(--color-accent));
  opacity: 1;
  animation: contact-cta-cursor-blink 1.1875s steps(2, end) infinite;
}

.contact-cta-card[data-contact-cta].is-complete .contact-cta-card__cursor {
  animation: none;
  opacity: 0;
  width: 0;
  min-width: 0;
  margin: 0;
  overflow: hidden;
}

.contact-cta-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35em;
  height: 1.35em;
  color: color-mix(in srgb, var(--skill-gold) 55%, var(--color-accent));
  opacity: 0;
  transform: scale(0.65) rotate(-8deg);
  transition: none;
}

.contact-cta-card__icon-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.contact-cta-card[data-contact-cta].is-icon-visible .contact-cta-card__icon {
  animation: contact-cta-icon-pop 0.6875s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes contact-cta-cursor-blink {
  0%,
  45% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

@keyframes contact-cta-icon-pop {
  0% {
    opacity: 0;
    transform: scale(0.55) rotate(-12deg);
  }

  55% {
    opacity: 1;
    transform: scale(1.12) rotate(4deg);
  }

  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@media (max-width: 640px) {
  .contact-cta-card {
    --contact-type-ms: 47.5;
  }

  .contact-cta-card__body {
    padding: var(--space-5) var(--space-4) var(--space-5) calc(var(--space-4) + 5px);
  }

  .education-module-card__surface {
    padding: var(--space-4);
  }

  .education-summary-modular__summary .contact-cta-card__body {
    padding: var(--space-5) var(--space-4);
  }

  .contact-cta-card__action {
    align-self: stretch;
    width: 100%;
    max-width: 100%;
    padding-inline: var(--space-4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-cta-card__action {
    transition: none;
  }

  .contact-cta-card__action:hover,
  .contact-cta-card__action:active {
    transform: none;
  }

  .contact-cta-card__action::after {
    transition: none;
  }

  .contact-cta-card__cursor {
    animation: none;
    opacity: 0;
    width: 0;
    min-width: 0;
    margin: 0;
  }

  .contact-cta-card[data-contact-cta].is-icon-visible .contact-cta-card__icon {
    animation: none;
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* Footer */
.site-footer {
  padding-block: var(--space-3);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--color-muted);
}
