/* ============================================================
   Tokens
   ============================================================ */
:root {
  --ink: #12181f;
  --ink-soft: #4a5568;
  --bg: #ffffff;
  --bg-alt: #f4f6f8;
  --bg-raised: #ffffff;
  --accent: #c8102e;
  --accent-ink: #ffffff;
  --border: #e2e6ea;

  --max: min(94vw, 960px);
  --max-narrow: min(94vw, 700px);
  --gutter: clamp(1rem, 3vw, 1.5rem);
  --radius: 8px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef1f5;
    --ink-soft: #a3adba;
    --bg: #0f1216;
    --bg-alt: #171b21;
    --bg-raised: #191d24;
    --border: #262c34;
    --accent: #ff5a72;
    --accent-ink: #14161a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: clamp(16px, 0.9vw + 14px, 18px);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

a:focus-visible,
button:focus-visible,
.nav-toggle-label:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

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

/* ============================================================
   Header / nav
   ============================================================ */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 20;
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}
@media (prefers-color-scheme: dark) {
  .site-header.is-scrolled { box-shadow: 0 2px 16px rgba(0, 0, 0, .4); }
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-top: .9rem;
  padding-bottom: .9rem;
  position: relative;
  gap: .5rem 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  white-space: nowrap;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; }
.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.1rem;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--ink-soft);
  font-size: .95rem;
  padding: .25rem 0;
}
.site-nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
}
.nav-toggle, .nav-toggle-label { display: none; }

@media (max-width: 880px) {
  .nav-toggle-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    padding: .5rem;
    margin: -.5rem;
    border-radius: 6px;
  }
  .nav-toggle-label:hover { background: var(--bg-alt); }
  .nav-toggle-label span {
    width: 22px; height: 2px; background: var(--ink);
    transition: transform .2s ease, opacity .2s ease;
  }
  .site-nav {
    display: none;
    width: 100%;
    max-height: 70vh;
    overflow-y: auto;
  }
  .site-nav ul { flex-direction: column; gap: .1rem; padding: .5rem 0 .75rem; }
  .site-nav a { display: block; padding: .6rem .25rem; }
  .nav-toggle:checked ~ .site-nav { display: block; }
  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

/* ============================================================
   Type / layout base
   ============================================================ */
main { display: block; }

section, article {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) var(--gutter);
}

h1 { font-size: clamp(1.7rem, 1.1rem + 2.4vw, 2.75rem); margin: 0 0 .5rem; line-height: 1.15; }
h2 { font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem); margin: 2.25rem 0 .85rem; line-height: 1.25; }
h3 { font-size: 1.1rem; margin: 1.25rem 0 .5rem; }
p { margin: 0 0 1rem; }
p, .note, .lede, li { max-width: 68ch; }
.lede { font-size: clamp(1.05rem, .95rem + .3vw, 1.25rem); color: var(--ink-soft); }

/* ============================================================
   Hero
   ============================================================ */
.hero { padding-top: clamp(1.75rem, 4vw, 3.5rem); padding-bottom: 1rem; }

.hero-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.15fr .85fr; }
  .hero-media { position: sticky; top: 5.5rem; }
}

.hero .facts {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  margin: 1rem 0 1.5rem;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: .95rem;
  max-width: none;
}
.hero .facts li { display: flex; gap: .35rem; max-width: none; }
.hero .facts strong { color: var(--ink); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.25rem;
}
.btn {
  display: inline-block;
  padding: .65rem 1.2rem;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: .95rem;
  transition: opacity .15s ease, transform .15s ease;
}
.btn:hover { text-decoration: none; opacity: .88; }
.btn:active { transform: translateY(1px); }
.btn.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}

/* ============================================================
   Video
   ============================================================ */
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-alt);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1rem 0 1.5rem;
}
.video-embed iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.video-embed--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  border: 1px dashed var(--border);
  text-align: center;
  padding: 1rem;
}

/* ============================================================
   Tables — plain (desktop/tablet) + card layout (narrow)
   ============================================================ */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: .95rem;
}
caption { text-align: left; color: var(--ink-soft); font-size: .85rem; margin-bottom: .4rem; }
th, td {
  text-align: left;
  padding: .65rem .8rem;
  border-bottom: 1px solid var(--border);
  max-width: none;
}
th { color: var(--ink-soft); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.overflow-table { overflow-x: auto; }

/* Key/value tables (academics, contact) */
.kv-table th { width: 38%; white-space: nowrap; }
@media (max-width: 480px) {
  .kv-table th { white-space: normal; width: 44%; }
}

/* Data tables (stats, schedule) — collapse to cards under 700px */
@media (max-width: 700px) {
  .responsive-table table,
  .responsive-table thead,
  .responsive-table tbody,
  .responsive-table th,
  .responsive-table td,
  .responsive-table tr {
    display: block;
  }
  .responsive-table thead {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .responsive-table caption { margin-bottom: .75rem; }
  .responsive-table tbody tr {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .85rem .9rem;
    margin-bottom: .85rem;
    background: var(--bg-raised);
  }
  .responsive-table tbody tr:last-child { margin-bottom: 0; }
  .responsive-table td {
    border: none;
    padding: .3rem 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    text-align: right;
  }
  .responsive-table td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--ink-soft);
    text-align: left;
  }
}

/* ============================================================
   Cards / lists — intrinsic responsive grid, no breakpoints needed
   ============================================================ */
.page-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}
.page-list a {
  display: block;
  height: 100%;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  transition: border-color .15s ease, transform .15s ease;
}
.page-list a:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.page-list .desc { display: block; color: var(--ink-soft); font-size: .9rem; margin-top: .25rem; max-width: none; }

.tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-soft);
  background: var(--bg-alt);
  padding: .2rem .5rem;
  border-radius: 4px;
}

.pitch {
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  padding: .9rem 1.1rem;
  border-radius: 4px;
  font-size: clamp(1rem, .95rem + .2vw, 1.1rem);
  color: var(--ink);
}

.note {
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  padding: .85rem 1rem;
  border-radius: 4px;
  font-size: .9rem;
  color: var(--ink-soft);
}

figure { margin: 0 0 1.5rem; }
figure img { width: 100%; border-radius: var(--radius); display: block; }
figcaption { font-size: .85rem; color: var(--ink-soft); margin-top: .4rem; }

img { max-width: 100%; }

/* ============================================================
   Log
   ============================================================ */
.log-index { max-width: var(--max-narrow); }
.log-entry { max-width: var(--max-narrow); }
.log-entry header { margin-bottom: 1rem; }
.log-entry .meta { color: var(--ink-soft); font-size: .9rem; }
.log-index-item {
  border-left: 3px solid var(--border);
  padding: .1rem 0 .1rem 1.1rem;
}
.log-index-item + .log-index-item { margin-top: 1.75rem; }
.log-index-item h2 { margin-top: 0; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 1.75rem 0 3rem;
  color: var(--ink-soft);
  font-size: .9rem;
}
.site-footer p { margin: 0 0 .25rem; max-width: none; }

.social-row {
  list-style: none;
  display: flex;
  gap: .6rem;
  margin: 1rem 0 0;
  padding: 0;
}
.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--ink-soft);
}
.social-icon svg { width: 18px; height: 18px; }
a.social-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}
.social-icon--placeholder {
  opacity: .4;
  cursor: default;
}

/* ============================================================
   Large-desktop refinement
   ============================================================ */
@media (min-width: 1280px) {
  :root { --gutter: 1.75rem; }
  .page-list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

/* ============================================================
   Print
   ============================================================ */
@media print {
  .site-header, .site-footer, .nav-toggle-label, .cta-row, .video-embed { display: none; }
  body { color: #000; background: #fff; font-size: 12pt; }
  a { color: #000; text-decoration: underline; }
  section, article { max-width: none; padding: 0; }
  .note { border-left-color: #000; background: none; }
}
