/* ---------------------------------------------------------------------------
   Design tokens
   --------------------------------------------------------------------------- */
:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --text: #1b1b18;
  --muted: #5f5e57;
  --line: #e5e1d8;
  --accent: #0b6b5b;
  --accent-soft: #e7f2ef;
  --shadow: 0 1px 2px rgb(0 0 0 / 4%), 0 8px 24px rgb(0 0 0 / 4%);

  --container: 70rem;
  --measure: 64ch;
  --radius: 14px;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12130f;
    --surface: #191a15;
    --text: #eceae1;
    --muted: #a3a199;
    --line: #2c2d26;
    --accent: #6fd3bd;
    --accent-soft: #1a2b27;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 20%);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 600;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.1em 0.35em;
  border-radius: 5px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------------------------------------------------------------------------
   Draft banner + skip link
   --------------------------------------------------------------------------- */
.draft {
  background: var(--accent-soft);
  color: var(--accent);
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  padding: 0.5rem 1rem;
}

.draft code {
  background: transparent;
  padding: 0;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: 0.75rem 1rem;
  z-index: 100;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
}

/* ---------------------------------------------------------------------------
   Header
   --------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 3.75rem;
}

.brand {
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: clamp(0.9rem, 2.5vw, 1.75rem);
  font-size: 0.9rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

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

@media (max-width: 40rem) {
  .nav li:nth-child(3) {
    display: none;
  }
}

/* ---------------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------------- */
.hero {
  padding-block: clamp(4rem, 11vw, 7.5rem) clamp(2.5rem, 6vw, 4rem);
}

.hero h1 {
  font-size: clamp(2.75rem, 8vw, 5rem);
  letter-spacing: -0.035em;
}

.tagline {
  margin-top: 1.5rem;
  max-width: 34ch;
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  line-height: 1.45;
  color: var(--muted);
}

.tagline span {
  color: var(--text);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 2.25rem;
  font-size: 0.95rem;
}

.links a {
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}

.links a:hover {
  border-color: var(--accent);
}

/* ---------------------------------------------------------------------------
   Proof strip
   --------------------------------------------------------------------------- */
.proof {
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.proof ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem 2rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.proof strong {
  display: block;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
}

@media (max-width: 44rem) {
  .proof ul {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------------------------------------------------------------------------
   Sections
   --------------------------------------------------------------------------- */
.section {
  padding-block: clamp(3rem, 7vw, 5rem);
  scroll-margin-top: 5rem;
}

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

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.15rem);
}

.lede {
  margin-top: 1rem;
  max-width: var(--measure);
  color: var(--muted);
}

.prose {
  margin-top: 1.75rem;
  max-width: var(--measure);
  display: grid;
  gap: 1.15rem;
}

.prose p:first-child::first-letter {
  font-size: 1.05em;
}

/* ---------------------------------------------------------------------------
   Experience entries
   --------------------------------------------------------------------------- */
.entries {
  margin-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.group-title {
  margin-top: 3.5rem;
}

.entry {
  display: grid;
  grid-template-columns: 11.5rem 1fr;
  gap: 0.4rem 2rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.entry-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.82rem;
  color: var(--muted);
  padding-top: 0.2rem;
}

.entry-date {
  font-variant-numeric: tabular-nums;
  color: var(--text);
  font-weight: 500;
}

.entry h3 {
  font-size: 1.02rem;
}

.org {
  color: var(--muted);
  font-weight: 500;
}

.entry p {
  margin-top: 0.4rem;
  max-width: 60ch;
  color: var(--muted);
  font-size: 0.96rem;
}

@media (max-width: 46rem) {
  .entry {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .entry-meta {
    flex-direction: row;
    gap: 0.75rem;
  }
}

/* ---------------------------------------------------------------------------
   Cards
   --------------------------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 160ms ease, border-color 160ms ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.card--active {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.card h3 {
  font-size: 1.02rem;
}

.card p {
  font-size: 0.93rem;
  color: var(--muted);
}

.card-meta {
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}

.badge {
  flex: none;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  white-space: nowrap;
}

.badge--muted {
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
}

/* ---------------------------------------------------------------------------
   Photo gallery
   --------------------------------------------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.shot {
  margin: 0;
}

.shot-img {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  border: 1px dashed color-mix(in srgb, var(--muted) 45%, transparent);
  background-color: var(--surface);
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0 12px,
    color-mix(in srgb, var(--line) 55%, transparent) 12px 13px
  );
}

.shot-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.shot-img:has(img) {
  border-style: solid;
  border-color: var(--line);
  background-image: none;
}

.shot figcaption {
  margin-top: 0.55rem;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------------------------------------------------------------------------
   Casts
   --------------------------------------------------------------------------- */
.empty {
  margin-top: 2rem;
  padding: 2rem 1.5rem;
  border: 1px dashed color-mix(in srgb, var(--muted) 45%, transparent);
  border-radius: var(--radius);
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.cast-player {
  margin-top: 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #121314;
}

.cast-card {
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  box-shadow: var(--shadow);
}

.cast-card:hover,
.cast-card[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.cast-card h3 {
  font-size: 1rem;
}

.cast-card p {
  font-size: 0.9rem;
  color: var(--muted);
}

.cast-card .card-meta {
  padding-top: 0.25rem;
}

/* ---------------------------------------------------------------------------
   Background / lists
   --------------------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem 4rem;
  margin-top: 2rem;
}

@media (max-width: 46rem) {
  .split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.list-title {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.plain-list {
  display: grid;
  gap: 0.7rem;
  font-size: 0.95rem;
}

.plain-list li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}

.plain-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

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

.languages {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  color: var(--muted);
}

.languages strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------------------------------------------------------------------------
   Contact + footer
   --------------------------------------------------------------------------- */
.contact-link {
  margin-top: 1.75rem;
}

.contact-link a {
  font-size: clamp(1.4rem, 4vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  border-bottom: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
  padding-bottom: 2px;
}

.contact-link a:hover {
  border-color: var(--accent);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--accent);
}

.notfound {
  padding-block: 20vh;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
