/* ---------------------------------------------------------------
   Design tokens, kept deliberately in step with allankoetter.gitlab.io
   so the two pages read as one site. Light palette is defined here in
   full; the dark block below redefines values only, never adds names.
   --------------------------------------------------------------- */

:root {
  --bg:            #fbfbfa;
  --bg-raised:     #ffffff;
  --text:          #16181d;
  --text-muted:    #565d6b;
  --accent:        #0b6e63;
  --accent-strong: #084f47;
  --border:        #e2e2dd;
  --shadow:        0 1px 2px rgb(16 24 32 / 4%), 0 8px 24px rgb(16 24 32 / 5%);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;

  --measure: 68ch;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --rhythm: clamp(3rem, 8vw, 5.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #0e1013;
    --bg-raised:     #15181d;
    --text:          #e7e9ed;
    --text-muted:    #9aa2ae;
    --accent:        #5ecfc0;
    --accent-strong: #8ee0d4;
    --border:        #242830;
    --shadow:        none;
  }
}

/* --------------------------------------------------------------- */

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

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

body {
  margin: 0;
  padding: 0 var(--gutter);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main, .footer { max-width: 62rem; margin-inline: auto; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--accent-strong); }

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

.mono { font-family: var(--font-mono); font-size: 0.92em; }

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

.hero { padding: clamp(3rem, 11vh, 6rem) 0 var(--rhythm); }

.eyebrow {
  margin: 0 0 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.eyebrow a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--border); }
.eyebrow a:hover { color: var(--accent); border-bottom-color: currentColor; }

h1 {
  margin: 0;
  font-size: clamp(2rem, 1.4rem + 3.2vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 600;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.lede {
  margin: 2rem 0 0;
  max-width: var(--measure);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  color: var(--text-muted);
  text-wrap: pretty;
}

.hero::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 2px;
  margin-top: 2.75rem;
  background: var(--accent);
}

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

.section { padding-bottom: var(--rhythm); }

.section > h2 {
  margin: 0 0 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-lede {
  max-width: var(--measure);
  margin: -0.5rem 0 1.75rem;
  color: var(--text-muted);
}

h3 { margin: 0 0 0.6rem; font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.008em; }

.prose { max-width: var(--measure); }

/* --- Curriculum table ------------------------------------------ */

/* The table is the one piece of content that can exceed a narrow
   viewport, so it scrolls inside its own box rather than pushing the
   page sideways. */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

caption { text-align: left; color: var(--text-muted); font-size: 0.875rem; padding-bottom: 0.75rem; }

th, td {
  text-align: left;
  padding: 0.7rem 1rem 0.7rem 0;
  border-bottom: 1px solid var(--border);
  vertical-align: baseline;
}

thead th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

td .da { display: block; color: var(--text-muted); font-size: 0.875rem; }

.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: 1.5rem; }

tbody tr:last-child td { border-bottom: none; }

tfoot td { font-weight: 600; border-top: 2px solid var(--border); border-bottom: none; }

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

/* --- Report cards ---------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 1rem;
}

.card {
  padding: 1.5rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: border-color 140ms ease, transform 140ms ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }

.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }

.card p { margin: 0; color: var(--text-muted); font-size: 0.9375rem; }

.meta {
  margin: 0 0 0.9rem !important;
  font-family: var(--font-mono);
  font-size: 0.78rem !important;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

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

.footer {
  padding: 2.25rem 0 3.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: baseline;
  justify-content: space-between;
}

.links { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.links a { font-size: 0.9375rem; text-decoration: none; border-bottom: 1px solid transparent; padding-bottom: 1px; }
.links a:hover { border-bottom-color: currentColor; }

.colophon { margin: 0; font-size: 0.8125rem; color: var(--text-muted); }

/* --------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  body { background: #fff; color: #000; }
  .card { box-shadow: none; }
}
