:root {
  color-scheme: dark;
  --paper: #1b1612;
  --paper-rgb: 27 22 18;
  --paper-2: #2a241f;
  --ink: #f3eee4;
  --muted: #b7aea3;
  --line: #3f372f;
  --teal: #7ecfc8;
  --teal-soft: #1c3331;
  --copper: #e0a080;
  --white: #322b25;
  --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --max: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.6;
  font-weight: 400;
}

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

a { color: var(--teal); text-underline-offset: 0.18em; }

a:hover { color: var(--ink); }

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.8rem;
  z-index: 20;
}

.skip:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 0.9rem 6vw;
  background: rgb(var(--paper-rgb) / 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-family: var(--serif);
  color: var(--ink);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 560;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav a:hover { color: var(--teal); }

main {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  padding-bottom: 1.5rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
  padding: 1.4rem 0 0.2rem;
  scroll-margin-top: 5.25rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--copper);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.02em; }

h1 {
  margin: 0 0 0.55rem;
  font-size: clamp(2.15rem, 4vw, 3.3rem);
  line-height: 1.02;
}

.lede { margin: 0; font-size: 1.05rem; max-width: 38rem; }

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

.portrait {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 2px 36px 2px 2px;
  background: var(--paper-2);
}

.section { padding: 1.5rem 0 0; scroll-margin-top: 5.25rem; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  margin-bottom: 0.6rem;
}

.section-head h2 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
}

.section-head p { margin: 0; max-width: 40rem; color: var(--muted); }

.filters { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.filters button,
.episode {
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
}

.filters button {
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  color: var(--muted);
}

.filters button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--white);
  border-color: var(--line);
}

.list { border-top: 1px solid var(--line); }

.row {
  display: grid;
  grid-template-columns: 9.2rem 1fr auto;
  gap: 0.65rem 1.1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.row[hidden] { display: none; }

.when {
  margin: 0.25rem 0 0;
  color: var(--copper);
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}

.when span,
.tag {
  display: inline-block;
  margin: 0;
  color: var(--teal);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

.talk:has(img) {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.talk-photo {
  width: 150px;
  height: 100px;
  object-fit: cover;
  border-radius: 2px 16px 2px 2px;
  background: var(--paper-2);
}

.talk-photo.stage { object-position: 86% center; }

.talk-photo.uxdx { object-position: right center; }

.talk-photo.hall { object-position: 8% center; }

.talk-photo.panel { object-position: 30% 42%; }

.row h3 { margin: 0 0 0.25rem; font-size: 1.35rem; line-height: 1.25; }

.row p { margin: 0.2rem 0 0; }

.meta { color: var(--muted); font-size: 0.95rem; }

.text-link {
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  padding-top: 0.3rem;
}

.text-link:hover { text-decoration: underline; }

.player-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 1.2rem;
  align-items: start;
}

.episode-list { display: grid; gap: 0.6rem; }

.episode {
  text-align: left;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  display: grid;
  gap: 0.25rem;
}

.episode[aria-pressed="true"] {
  background: var(--teal-soft);
  border-color: var(--teal);
}

.episode .tag { margin: 0; }

.episode strong { font-family: var(--serif); font-size: 1.15rem; font-weight: 560; }

.episode span:last-child { color: var(--muted); font-size: 0.95rem; }

.screen {
  background: #100e0c;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.screen iframe { width: 100%; height: 100%; border: 0; }

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

.about-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

.facts-slot {
  position: relative;
  min-height: 0;
}

.facts {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.facts > h3,
.certs-group { flex-shrink: 0; }

.prose .quote:last-child { margin-bottom: 0; }

.prose p { margin: 0 0 1rem; }

.prose h3,
.facts h3,
.certs-group h3 {
  font-size: 1.15rem;
  margin: 1rem 0 0.45rem;
}

.certs-group h3 { margin-top: 0; }

.facts > h3:first-child { margin-top: 0; }

.quote {
  margin: 0 0 1.1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--teal);
}

.quote blockquote { margin: 0; }

.quote figcaption { margin-top: 0.35rem; color: var(--muted); font-size: 0.92rem; }

.jobs-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-right: 0.35rem;
  scrollbar-width: thin;
  scrollbar-color: var(--copper) transparent;
}

.jobs-scroll::-webkit-scrollbar { width: 7px; }

.jobs-scroll::-webkit-scrollbar-thumb {
  background: var(--copper);
  border-radius: 99px;
}

.jobs-scroll::-webkit-scrollbar-track { background: transparent; }

.facts.can-scroll::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0.7rem;
  bottom: 1px;
  height: 3.6rem;
  pointer-events: none;
  background: linear-gradient(to bottom, rgb(var(--paper-rgb) / 0), var(--paper) 70%);
}

.jobs-more {
  display: none;
  position: absolute;
  z-index: 2;
  left: calc(50% - 0.35rem);
  bottom: 0;
  transform: translateX(-50%);
  place-items: center;
  padding: 0.8rem 1rem 0.28rem;
  border: 0;
  background: transparent;
  color: var(--copper);
  cursor: pointer;
}

.facts.can-scroll .jobs-more { display: grid; }

.jobs-more svg { width: 1.15rem; height: 1.15rem; display: block; }

.jobs-more:hover { color: var(--ink); }

.facts.is-open {
  position: static;
  overflow: visible;
}

.facts.is-open .jobs-scroll {
  flex: none;
  min-height: auto;
  overflow: visible;
}

.about-grid:has(.facts.is-open) { align-items: start; }

.jobs { list-style: none; margin: 0; padding: 0; }

.jobs li { padding: 0.65rem 0.15rem; border-top: 1px solid var(--line); }

.jobs li:first-child { border-top: 0; }

.job-title { margin: 0; font-weight: 600; }

.job-meta { margin: 0.1rem 0 0.35rem; color: var(--copper); font-size: 0.92rem; }

.jobs p:last-child { margin: 0; color: var(--muted); }

.certs { list-style: none; margin: 0; padding: 0; }

.certs li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

.certs span { color: var(--muted); white-space: nowrap; }

.contact {
  margin-top: 1.2rem;
  padding: 1.2rem 0 0.2rem;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 2.5rem;
  align-items: center;
}

.contact h2 { margin: 0; font-size: clamp(1.45rem, 2.4vw, 1.9rem); line-height: 1.2; }

.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem 1rem;
}

.contact-links {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-links a {
  display: flex;
  color: var(--teal);
}

.contact-links svg {
  width: 1.45rem;
  height: 1.45rem;
  display: block;
}

.contact-links .mark-dev {
  width: 2.35rem;
  height: 1.35rem;
}

.contact-links a:hover { color: var(--ink); }

.site-footer {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 0.9rem 0 1.2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer p { margin: 0; }

@media (max-width: 860px) {
  .site-header {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.8rem;
    padding: 0.65rem 1rem;
  }

  .nav { gap: 0.2rem 0.75rem; }

  .nav a { font-size: 0.9rem; }

  main,
  .site-footer { width: calc(100% - 1.5rem); }

  .hero,
  .about-grid,
  .player-layout,
  .row {
    grid-template-columns: 1fr;
  }

  .about-grid { grid-template-columns: 1fr; }

  .about-main { display: contents; }

  .prose { order: 1; }

  .facts-slot { order: 2; }

  .certs-group { order: 3; }

  .prose .quote:last-child { margin-bottom: 0; }

  .facts-slot { position: static; }

  .facts {
    position: static;
    inset: auto;
    overflow: visible;
  }

  .hero {
    grid-template-columns: 7.75rem minmax(0, 1fr);
    align-items: center;
    padding: 1rem 0 0;
    gap: 0.85rem;
  }

  .eyebrow { margin-bottom: 0.3rem; }

  h1 {
    font-size: clamp(1.55rem, 6.4vw, 1.85rem);
    line-height: 1.12;
    margin-bottom: 0;
  }

  .portrait {
    order: -1;
    width: 7.75rem;
    height: 7.75rem;
  }

  .section { padding-top: 1.15rem; }

  .section-head {
    flex-direction: column;
    align-items: start;
    gap: 0.45rem;
  }

  .when { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 0.35rem 0.55rem; }

  .talk:has(img) { grid-template-columns: 1fr; gap: 0.65rem; }

  .talk-photo {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
  }

  .row h3 { font-size: 1.15rem; }

  .text-link { padding-top: 0.15rem; }

  .jobs-scroll {
    flex: none;
    min-height: auto;
    max-height: none;
    overflow: visible;
    padding-right: 0;
    scrollbar-width: auto;
  }

  .facts.can-scroll::after,
  .facts.can-scroll .jobs-more { display: none; }

  .certs li { align-items: baseline; }

  .certs a { min-width: 0; }

  .contact {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .contact-row {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .contact h2 { font-size: 1.45rem; }
}

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