@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Space+Grotesk:wght@400;500;700&display=swap");

[hidden] {
  display: none !important;
}

:root {
  --bg: #081018;
  --bg-deep: #050a11;
  --surface: rgba(11, 20, 31, 0.78);
  --surface-strong: rgba(14, 27, 41, 0.96);
  --surface-soft: rgba(121, 170, 255, 0.08);
  --border: rgba(154, 188, 255, 0.14);
  --border-strong: rgba(154, 188, 255, 0.3);
  --text: #ecf4ff;
  --muted: #9fb3ca;
  --link: #91c1ff;
  --accent: #6df7c1;
  --accent-alt: #6ba4ff;
  --accent-warm: #ffd36f;
  --good: #7df7c2;
  --warn: #ffd36f;
  --bad: #ff8d8d;
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 720px at 10% 0%, rgba(83, 123, 255, 0.22), transparent 55%),
    radial-gradient(900px 600px at 100% 0%, rgba(109, 247, 193, 0.11), transparent 45%),
    linear-gradient(180deg, rgba(7, 15, 24, 0.98), rgba(5, 10, 17, 1));
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(145, 193, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(145, 193, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 70%);
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0;
  color: var(--muted);
  max-width: 72ch;
  line-height: 1.65;
}

ul {
  margin: 0;
  padding-left: 1.1rem;
}

li {
  color: var(--muted);
  line-height: 1.6;
}

.wrap {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.section {
  padding: 2.75rem 0;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.eyebrow,
.kicker,
.brand-subtitle,
.small,
.tag {
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
}

.eyebrow::before {
  content: "";
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  box-shadow: 0 0 24px rgba(109, 247, 193, 0.35);
}

.mono {
  font-family: "IBM Plex Mono", Consolas, monospace;
}

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

.small {
  font-size: 0.82rem;
  line-height: 1.55;
}

.stack > * + * {
  margin-top: 0.85rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(6, 12, 20, 0.72);
  border-bottom: 1px solid rgba(154, 188, 255, 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.8rem;
  padding: 0.9rem 0;
  flex-wrap: wrap;
}

.brand-lockup {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
}

.brand-lockup:hover {
  text-decoration: none;
}

.brand-title {
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-subtitle {
  font-size: 0.72rem;
}

.site-nav {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.site-nav__link:hover,
.site-nav__link.is-active {
  color: var(--text);
  text-decoration: none;
  background: rgba(145, 193, 255, 0.08);
  border-color: rgba(145, 193, 255, 0.18);
}

.site-status {
  margin-left: auto;
}

.site-footer {
  padding: 2rem 0 3rem;
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.35rem 1.45rem;
  background: rgba(10, 17, 27, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.footer-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.hero {
  padding: 4.2rem 0 2rem;
}

.hero-grid,
.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.95fr);
  gap: 1.35rem;
  align-items: stretch;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.hero-copy p {
  font-size: 1.02rem;
}

.hero-panel,
.panel,
.card,
.feature-card,
.stat-card,
.resource-card {
  padding: 1.3rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(15, 28, 42, 0.96), rgba(8, 16, 25, 0.94)),
    var(--surface);
  box-shadow: var(--shadow);
}

.hero-panel {
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -10% -30% auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(109, 247, 193, 0.18), transparent 70%);
}

.cta,
.actions,
.row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn,
.mini-btn,
.chip,
.pager button,
.search button,
.tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(145, 193, 255, 0.2);
  background: linear-gradient(180deg, rgba(109, 247, 193, 0.12), rgba(109, 247, 193, 0.04));
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.btn:hover,
.mini-btn:hover,
.chip:hover,
.pager button:hover,
.search button:hover,
.tab:hover {
  text-decoration: none;
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.btn-secondary,
.mini-btn,
.tab,
.chip,
.pager button,
.search button {
  background: rgba(145, 193, 255, 0.06);
}

.btn-ghost {
  background: transparent;
}

.btn-block {
  width: 100%;
}

.btn-small {
  min-height: 2.35rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.88rem;
}

.pill,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(145, 193, 255, 0.18);
  background: rgba(145, 193, 255, 0.06);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1;
}

.badge.good {
  border-color: rgba(125, 247, 194, 0.28);
  color: var(--good);
}

.badge.warn {
  border-color: rgba(255, 211, 111, 0.28);
  color: var(--warn);
}

.badge.bad {
  border-color: rgba(255, 141, 141, 0.28);
  color: var(--bad);
}

.dot {
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 999px;
  background: var(--warn);
  box-shadow: 0 0 18px rgba(255, 211, 111, 0.4);
}

.dot.good {
  background: var(--good);
  box-shadow: 0 0 18px rgba(125, 247, 194, 0.38);
}

.dot.bad {
  background: var(--bad);
  box-shadow: 0 0 18px rgba(255, 141, 141, 0.34);
}

.dot.warn {
  background: var(--warn);
}

.stat-grid,
.feature-grid,
.card-grid,
.champions-grid,
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.stat-card,
.feature-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.stat-card strong,
.kpi {
  font-size: 1.7rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.signal-list {
  list-style: none;
  padding: 0;
}

.signal-list li {
  position: relative;
  padding-left: 1rem;
}

.signal-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: var(--accent);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.input-grid {
  display: grid;
  gap: 0.9rem;
}

.input,
.select,
.search input {
  width: 100%;
  min-height: 3rem;
  padding: 0.82rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(145, 193, 255, 0.16);
  background: rgba(6, 13, 22, 0.88);
  color: var(--text);
  font: inherit;
  outline: none;
}

.input:focus,
.select:focus,
.search input:focus {
  border-color: rgba(109, 247, 193, 0.48);
  box-shadow: 0 0 0 1px rgba(109, 247, 193, 0.3);
}

.status-line {
  min-height: 1.5rem;
}

.collection {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.resource-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.resource-card__meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.divider {
  height: 1px;
  background: rgba(145, 193, 255, 0.1);
  margin: 0.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.9rem 0.7rem;
  border-bottom: 1px solid rgba(145, 193, 255, 0.1);
  text-align: left;
  font-size: 0.95rem;
}

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

td.num {
  text-align: right;
}

.tabs {
  display: inline-flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding: 0.45rem;
  border-radius: 18px;
  background: rgba(145, 193, 255, 0.05);
  border: 1px solid rgba(145, 193, 255, 0.12);
}

.tab {
  min-height: 2.4rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.88rem;
}

.tab[aria-selected="true"] {
  background: rgba(109, 247, 193, 0.14);
  border-color: rgba(109, 247, 193, 0.34);
  color: var(--text);
}

.tab-badge {
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(145, 193, 255, 0.16);
  font-size: 0.74rem;
  color: var(--muted);
}

.tab-panel[hidden] {
  display: none;
}

.grid {
  display: grid;
  gap: 1rem;
}

.stream-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(145, 193, 255, 0.22);
  background: rgba(10, 17, 27, 0.75);
}

.thumb-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(145, 193, 255, 0.14);
  background: linear-gradient(135deg, rgba(109, 247, 193, 0.1), rgba(107, 164, 255, 0.12));
}

.player {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.stream-top {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: start;
}

.stream-title {
  font-size: 1.08rem;
  font-weight: 700;
}

.stream-meta,
.stream-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.search {
  display: flex;
  gap: 0.8rem;
  padding: 0.7rem;
  border-radius: 20px;
  border: 1px solid rgba(145, 193, 255, 0.16);
  background: rgba(10, 17, 27, 0.82);
}

.chips {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.chip.is-active {
  border-color: rgba(109, 247, 193, 0.38);
  background: rgba(109, 247, 193, 0.14);
}

.archive-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.archive-results {
  min-width: 0;
}

.archive-toolbar {
  position: sticky;
  top: 6.2rem;
  z-index: 12;
  align-self: start;
  max-height: calc(100vh - 7.2rem);
  overflow: auto;
}

.archive-semester {
  gap: 1rem;
  scroll-margin-top: 7.5rem;
}

.archive-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.archive-entry {
  min-height: 100%;
}

.archive-entry__actions {
  align-items: stretch;
}

.archive-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.course-details {
  border: 1px solid rgba(145, 193, 255, 0.14);
  border-radius: 18px;
  background: rgba(7, 14, 23, 0.72);
  overflow: hidden;
}

.course-details[open] {
  border-color: rgba(145, 193, 255, 0.24);
}

.course-details__summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  cursor: pointer;
}

.course-details__summary::-webkit-details-marker {
  display: none;
}

.course-details__summary::after {
  content: "+";
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
}

.course-details[open] .course-details__summary::after {
  content: "-";
}

.course-details__meta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: end;
}

.course-details__body {
  padding: 0 1.1rem 1.1rem;
}

.status {
  min-height: 1.3rem;
}

.modal {
  border: 1px solid rgba(145, 193, 255, 0.16);
  background: rgba(8, 16, 25, 0.98);
  color: var(--text);
  border-radius: 22px;
  width: min(980px, calc(100vw - 2rem));
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.7);
}

.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
}

.modal-body {
  padding: 1.25rem;
}

.archive-preview {
  position: relative;
  overflow: hidden;
}

.archive-preview__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.archive-preview__header {
  margin-bottom: 0;
}

.archive-preview__frame-wrap {
  min-height: 62vh;
  border-radius: 18px;
  border: 1px solid rgba(145, 193, 255, 0.14);
  background: rgba(5, 10, 17, 0.95);
  overflow: hidden;
}

.archive-preview__placeholder {
  min-height: 62vh;
  justify-content: center;
}

.archive-preview__frame,
.archive-preview__video {
  width: 100%;
  min-height: 62vh;
  border: 0;
  display: block;
  background: rgba(5, 10, 17, 0.95);
}

.archive-preview__image {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: rgba(5, 10, 17, 0.95);
}

.archive-preview__text-wrap {
  min-height: 62vh;
  padding: 1rem;
  overflow: auto;
}

.archive-preview__text {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.7;
  color: var(--text);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.coursework-viewer-page main.section {
  padding-top: 2rem;
}

.is-embedded-reader {
  background: rgba(5, 10, 17, 0.98);
}

.is-embedded-reader::before {
  display: none;
}

.is-embedded-reader main.section {
  padding: 0;
}

.is-embedded-reader .wrap {
  width: 100%;
}

.reader-shell {
  min-height: 70vh;
}

.reader-shell__header {
  margin-bottom: 0;
}

.reader-panel {
  min-height: 62vh;
  border-radius: 18px;
  border: 1px solid rgba(145, 193, 255, 0.14);
  background: rgba(5, 10, 17, 0.95);
  overflow: hidden;
}

.reader-placeholder {
  min-height: 62vh;
  justify-content: center;
}

.reader-document {
  padding: 1.2rem;
}

.reader-text {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.7;
  color: var(--text);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.reader-prose {
  color: var(--text);
}

.reader-prose > :first-child {
  margin-top: 0;
}

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

.reader-prose p,
.reader-prose li,
.reader-prose td,
.reader-prose th,
.reader-prose blockquote {
  color: var(--text);
}

.reader-prose h1,
.reader-prose h2,
.reader-prose h3,
.reader-prose h4 {
  margin-top: 1.2rem;
  margin-bottom: 0.6rem;
}

.reader-prose ul,
.reader-prose ol {
  padding-left: 1.2rem;
}

.reader-prose table {
  margin-top: 1rem;
}

.reader-figure {
  margin: 0;
  padding: 1rem;
}

.reader-image {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
}

.reader-frame,
.reader-video {
  width: 100%;
  min-height: 62vh;
  border: 0;
  display: block;
  background: rgba(5, 10, 17, 0.95);
}

.champ-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.champ-year {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.champ-name {
  font-size: 1.15rem;
  font-weight: 700;
}

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

.champ-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.loading {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.loading .dot {
  background: var(--accent-alt);
  animation: pulse 1s infinite ease-in-out;
}

.error {
  color: var(--bad);
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.35;
  }

  50% {
    transform: scale(1.35);
    opacity: 1;
  }

  100% {
    transform: scale(1);
    opacity: 0.35;
  }
}

@media (max-width: 980px) {
  .archive-layout,
  .hero-grid,
  .split-grid,
  .stat-grid,
  .feature-grid,
  .metrics-grid,
  .champions-grid,
  .archive-grid {
    grid-template-columns: 1fr;
  }

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

  .site-status {
    margin-left: 0;
  }

  .archive-toolbar {
    position: static;
    max-height: none;
  }
}

@media (max-width: 720px) {
  body::before {
    background-size: 28px 28px;
  }

  .hero {
    padding-top: 3rem;
  }

  h1 {
    font-size: clamp(2.2rem, 12vw, 3.5rem);
  }

  .wrap {
    width: min(100% - 1.2rem, 1180px);
  }

  .site-header__inner,
  .site-footer__inner,
  .stream-top,
  .section-heading,
  .course-details__summary {
    flex-direction: column;
    align-items: start;
  }

  th,
  td {
    font-size: 0.88rem;
    padding-inline: 0.45rem;
  }

  .course-details__meta {
    justify-content: start;
  }

  .archive-preview__frame-wrap,
  .archive-preview__placeholder,
  .archive-preview__frame,
  .archive-preview__video,
  .archive-preview__text-wrap,
  .reader-panel,
  .reader-placeholder,
  .reader-frame,
  .reader-video {
    min-height: 50vh;
  }

  .archive-preview__image {
    max-height: 56vh;
  }

  .reader-image {
    max-height: 56vh;
  }
}
