:root {
  color-scheme: light;
  --duke-blue: #003087;
  --duke-blue-deep: #001f57;
  --duke-accent: #2e67ff;
  --paper: #ffffff;
  --ink: #10213f;
  --muted: #4d5e81;
  --border: #d9e3fa;
  --surface: #f5f8ff;
  --surface-strong: #e9f0ff;
  --accent: #2e67ff;
  --line-secondary: #2ac0a2;
  --shadow: 0 12px 30px rgba(7, 36, 94, 0.12);
  --hero-bg:
    radial-gradient(circle at 82% 28%, rgba(42, 192, 162, 0.14), transparent 24%),
    radial-gradient(circle at 18% 12%, rgba(46, 103, 255, 0.18), transparent 28%),
    linear-gradient(135deg, #eef4ff 0%, #dfeaff 46%, #f8fbff 100%);
  --hero-glow-bg: radial-gradient(circle, rgba(46, 103, 255, 0.22), transparent 62%);
  --hero-title: #0c1c3a;
  --hero-copy: #36527d;
  --hero-meta: #17345f;
  --hero-shell-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 251, 255, 0.76)),
    rgba(255, 255, 255, 0.7);
  --hero-shell-border: rgba(16, 33, 63, 0.08);
  --hero-shell-shadow:
    0 28px 70px rgba(14, 43, 98, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --hero-orbit-color: rgba(0, 48, 135, 0.12);
  --hero-label: rgba(16, 33, 63, 0.6);
  --hero-media-bg:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.98) 62%, #edf3ff 100%);
  --hero-media-shadow: drop-shadow(0 24px 36px rgba(10, 24, 54, 0.16));
  --hero-btn-primary-bg: #071326;
  --hero-btn-primary-text: #ffffff;
  --hero-btn-primary-border: #071326;
  --hero-btn-primary-shadow: 0 12px 30px rgba(7, 19, 38, 0.18);
  --hero-btn-secondary-border: rgba(7, 19, 38, 0.18);
  --hero-btn-secondary-bg: rgba(255, 255, 255, 0.56);
  --hero-btn-secondary-text: #071326;
  --feature-section-bg:
    radial-gradient(circle at top center, rgba(46, 103, 255, 0.07), transparent 28%),
    linear-gradient(180deg, rgba(4, 12, 26, 0.02), transparent 100%);
  --feature-card-bg: linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
  --feature-card-border: rgba(16, 33, 63, 0.07);
  --feature-card-shadow: 0 22px 52px rgba(10, 24, 54, 0.08);
  --feature-card-title: #10213f;
  --feature-card-copy: #4d5e81;
  --feature-media-border: rgba(16, 33, 63, 0.05);
  --feature-media-shadow: inset 0 0 0 1px rgba(7, 19, 38, 0.04);
  --feature-accent: linear-gradient(90deg, #2e67ff 0%, #2ac0a2 100%);
  --pdb-canvas-bg: #f6f9ff;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0e172a;
  --ink: #ecf3ff;
  --muted: #b8c7e6;
  --border: #2d3f69;
  --surface: #121f37;
  --surface-strong: #1a2a49;
  --accent: #6e9bff;
  --line-secondary: #4de2c7;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  --hero-bg:
    radial-gradient(circle at 82% 28%, rgba(78, 226, 199, 0.16), transparent 24%),
    radial-gradient(circle at 18% 12%, rgba(46, 103, 255, 0.22), transparent 26%),
    linear-gradient(135deg, #071326 0%, #0d1c35 48%, #081018 100%);
  --hero-glow-bg: radial-gradient(circle, rgba(46, 103, 255, 0.32), transparent 62%);
  --hero-title: #ffffff;
  --hero-copy: rgba(236, 243, 255, 0.84);
  --hero-meta: #eff5ff;
  --hero-shell-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(8, 16, 24, 0.55);
  --hero-shell-border: rgba(255, 255, 255, 0.14);
  --hero-shell-shadow:
    0 32px 80px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --hero-orbit-color: rgba(255, 255, 255, 0.12);
  --hero-label: rgba(236, 243, 255, 0.7);
  --hero-media-bg:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.9), rgba(242, 247, 255, 0.98) 62%, #ecf2ff 100%);
  --hero-media-shadow: drop-shadow(0 24px 36px rgba(10, 24, 54, 0.24));
  --hero-btn-primary-bg: #ffffff;
  --hero-btn-primary-text: #071326;
  --hero-btn-primary-border: #ffffff;
  --hero-btn-primary-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
  --hero-btn-secondary-border: rgba(255, 255, 255, 0.48);
  --hero-btn-secondary-bg: transparent;
  --hero-btn-secondary-text: #ffffff;
  --feature-section-bg:
    radial-gradient(circle at top center, rgba(46, 103, 255, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(4, 12, 26, 0.02), transparent 100%);
  --feature-card-bg: linear-gradient(180deg, rgba(232, 240, 255, 0.16) 0%, rgba(244, 248, 255, 0.06) 100%);
  --feature-card-border: rgba(207, 224, 255, 0.16);
  --feature-card-shadow: 0 24px 60px rgba(4, 10, 24, 0.18);
  --feature-card-title: #f4f8ff;
  --feature-card-copy: #d4def2;
  --feature-media-border: rgba(255, 255, 255, 0.05);
  --feature-media-shadow: inset 0 0 0 1px rgba(7, 19, 38, 0.03);
  --feature-accent: linear-gradient(90deg, #75a8ff 0%, #4de2c7 100%);
  --pdb-canvas-bg: #eef4ff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  line-height: 1.55;
}

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

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 10px;
  background: var(--duke-blue);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  z-index: 1000;
}

.skip-link:focus {
  top: 10px;
}

.container {
  width: min(1120px, calc(100% - 2.4rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 87%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.brand {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--duke-blue);
  background: color-mix(in srgb, var(--duke-blue) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--duke-blue) 30%, var(--border));
  border-radius: 999px;
  padding: 0.32rem 0.72rem;
}

body[data-theme="dark"] .brand {
  color: #d2e0ff;
  border-color: var(--border);
}

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

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.3rem 0.45rem;
  border-radius: 8px;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--surface);
  color: var(--ink);
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.44rem 0.75rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: var(--surface-strong);
}

.hero {
  position: relative;
  overflow: clip;
  padding: 5.5rem 0 4.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--hero-bg);
}

.hero-glow {
  position: absolute;
  inset: auto -180px -180px auto;
  width: 640px;
  height: 640px;
  background: var(--hero-glow-bg);
  pointer-events: none;
  filter: blur(10px);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(300px, 0.78fr);
  gap: clamp(1.5rem, 3vw, 3.5rem);
  align-items: center;
}

.hero-copy {
  max-width: 48rem;
}

.event-pill {
  display: inline-flex;
  margin: 0;
  padding: 0.36rem 0.74rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--duke-blue) 14%, transparent);
  color: var(--duke-blue);
  border: 1px solid color-mix(in srgb, var(--duke-blue) 32%, var(--border));
  font-weight: 700;
  font-size: 0.9rem;
}

body[data-theme="dark"] .event-pill {
  color: #d9e6ff;
}

.hero h1 {
  margin: 1rem 0 0.9rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(2.25rem, 4.4vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 15ch;
  color: var(--hero-title);
}

.hero-lead {
  margin: 0;
  color: var(--hero-copy);
  font-size: 1.06rem;
  max-width: 58ch;
}

.hero-meta {
  margin-top: 1.25rem;
  color: var(--hero-meta);
  font-size: 0.97rem;
}

.hero-meta p {
  margin: 0.36rem 0;
}

.hero-meta a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid color-mix(in srgb, currentColor 22%, transparent);
}

.hero-meta a:hover,
.hero-meta a:focus-visible {
  border-bottom-color: currentColor;
}

.hero-focus {
  margin: 1.15rem 0 0;
  padding: 0.92rem 1rem;
  border-left: 3px solid rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  color: rgba(236, 243, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  border-radius: 999px;
  padding: 0.85rem 1.35rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 48px;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--duke-blue);
  color: #fff;
  border-color: var(--duke-blue);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--duke-blue-deep);
  border-color: var(--duke-blue-deep);
}

.btn-ghost {
  border-color: var(--border);
  background: var(--surface);
  color: var(--ink);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: var(--surface-strong);
}

.hero .btn-primary {
  background: var(--hero-btn-primary-bg);
  color: var(--hero-btn-primary-text);
  border-color: var(--hero-btn-primary-border);
  box-shadow: var(--hero-btn-primary-shadow);
}

.hero .btn-primary:hover,
.hero .btn-primary:focus-visible {
  filter: brightness(1.04);
}

.hero .btn-ghost {
  border-color: var(--hero-btn-secondary-border);
  background: var(--hero-btn-secondary-bg);
  color: var(--hero-btn-secondary-text);
}

.hero .btn-ghost:hover,
.hero .btn-ghost:focus-visible {
  filter: brightness(0.98);
}

.hero-visuals {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-orbit {
  position: absolute;
  border-radius: 999px;
  border: 1px solid var(--hero-orbit-color);
}

.orbit-one {
  width: min(84%, 420px);
  height: min(84%, 420px);
  transform: rotate(18deg);
}

.orbit-two {
  width: min(72%, 360px);
  height: min(72%, 360px);
  transform: rotate(-16deg);
  border-style: dashed;
  opacity: 0.8;
}

.hero-visual-shell {
  position: relative;
  width: min(100%, 500px);
  padding: 1.1rem;
  border-radius: 32px;
  background: var(--hero-shell-bg);
  border: 1px solid var(--hero-shell-border);
  box-shadow: var(--hero-shell-shadow);
  transform: perspective(1200px) rotateY(-10deg) rotateX(5deg) translateY(-6px);
}

.hero-visual-shell::before {
  content: "";
  position: absolute;
  inset: 12% 9% auto;
  height: 38%;
  background: radial-gradient(circle, rgba(46, 103, 255, 0.28), transparent 70%);
  filter: blur(24px);
  pointer-events: none;
}

.hero-visual-label {
  margin: 0 0 0.85rem;
  color: var(--hero-label);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-photo-wrap {
  position: relative;
  border-radius: 26px;
  background: var(--hero-media-bg);
  min-height: 410px;
  padding: clamp(1.2rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-photo-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 15%, rgba(255, 255, 255, 0.32) 35%, transparent 55%);
  pointer-events: none;
  mix-blend-mode: screen;
}

.hero-pdb-viewer,
.hero-photo {
  width: 100%;
  max-width: 430px;
  height: 360px;
  max-height: 100%;
}

.hero-pdb-viewer {
  position: relative;
  z-index: 2;
  cursor: grab;
  border-radius: 22px;
  overflow: hidden;
}

.hero-pdb-viewer:active {
  cursor: grabbing;
}

.hero-pdb-viewer canvas {
  border-radius: 22px;
}

.hero-photo {
  position: relative;
  object-fit: contain;
  filter: var(--hero-media-shadow);
  animation: heroFloat 7s ease-in-out infinite;
}

.hero-photo-fallback {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  transition: opacity 0.25s ease;
}

.hero-photo-wrap.viewer-ready .hero-photo-fallback {
  opacity: 0;
}

@keyframes heroFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-12px) rotate(2deg);
  }
}

.section {
  padding: 3.2rem 0;
}

.section-alt {
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 65%, transparent), transparent);
}

.section-head {
  margin-bottom: 1.2rem;
  max-width: 70ch;
}

.section-head.compact {
  margin-bottom: 0.4rem;
}

.kicker {
  margin: 0;
  color: var(--duke-blue);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-head h2 {
  margin: 0.35rem 0 0.3rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.4rem, 2.3vw, 2rem);
}

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

.featured-modules {
  background: var(--feature-section-bg);
}

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

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.feature-card {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 24px;
  background: var(--feature-card-bg);
  border: 1px solid var(--feature-card-border);
  box-shadow: var(--feature-card-shadow);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: var(--feature-accent);
}

.feature-card h3 {
  color: var(--feature-card-title);
  font-size: 1.15rem;
}

.feature-card p {
  margin: auto 0 0;
  color: var(--feature-card-copy);
}

.feature-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  padding: 1rem;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--feature-media-border);
  box-shadow: var(--feature-media-shadow);
}

.feature-media img,
.feature-media svg {
  width: 100%;
  height: 100%;
  max-height: 220px;
  object-fit: contain;
}

.feature-media-graph svg {
  overflow: visible;
}

.syllabus-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

.syllabus-card {
  min-height: 330px;
  padding: 1.2rem;
}

.syllabus-primary {
  grid-column: 1 / -1;
  min-height: auto;
}

.syllabus-primary ul {
  column-count: 2;
  column-gap: 2rem;
}

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

.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
}

.card ul {
  margin: 0.65rem 0 0;
  padding-left: 1.05rem;
  color: var(--muted);
}

.card li {
  margin: 0.22rem 0;
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--duke-blue) 14%, transparent);
  color: var(--duke-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.6rem;
}

body[data-theme="dark"] .card-icon {
  color: #cfe0ff;
}

.card-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.material-card h3 {
  margin-bottom: 0.7rem;
}

.button-row {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.68;
}

.instructor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.profile-card {
  overflow: hidden;
  padding: 0;
}

.profile-media {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-strong) 88%, var(--paper)) 0%, color-mix(in srgb, var(--surface) 84%, var(--paper)) 100%);
  border-bottom: 1px solid var(--border);
  aspect-ratio: 4 / 3;
}

.profile-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 38%;
  background: linear-gradient(180deg, transparent, rgba(8, 16, 24, 0.12));
  pointer-events: none;
}

.profile-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.04);
}

.profile-media-anru img {
  object-position: 50% 24%;
}

.profile-media-alex img {
  object-position: 52% 18%;
  transform: scale(1.1);
}

.profile-media-fred img {
  object-position: 50% 18%;
  transform: scale(1.08);
}

.profile-content {
  padding: 1.05rem 1rem 1rem;
}

.profile-content h3 {
  margin: 0;
}

.role {
  margin: 0.25rem 0 0.52rem;
  color: var(--muted);
  font-weight: 600;
}

.profile-content p {
  margin: 0;
}

.profile-link {
  display: inline-flex;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: var(--duke-blue);
  text-decoration: none;
}

.profile-link:hover,
.profile-link:focus-visible {
  text-decoration: underline;
}

details {
  margin-top: 0.58rem;
  border-top: 1px dashed var(--border);
  padding-top: 0.48rem;
}

summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--duke-blue);
}

body[data-theme="dark"] summary {
  color: #d2e0ff;
}

details p {
  margin-top: 0.45rem;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.1rem 0 1rem;
  background: var(--surface);
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 1020px) {
  .hero-layout {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .syllabus-grid,
  .materials-grid,
  .instructor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-copy {
    max-width: none;
  }

  .hero-visuals {
    min-height: 420px;
  }

  .syllabus-primary ul {
    column-count: 1;
  }
}

@media (max-width: 700px) {
  .site-header {
    position: static;
  }

  .nav-row {
    flex-wrap: wrap;
  }

  .site-nav {
    width: 100%;
    order: 3;
    justify-content: flex-start;
    gap: 0.45rem;
  }

  .section {
    padding: 2.4rem 0;
  }

  .hero {
    padding: 4rem 0 3rem;
  }

  .hero h1 {
    max-width: 12ch;
    font-size: clamp(2rem, 12vw, 3.2rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-visuals {
    min-height: 320px;
  }

  .hero-visual-shell {
    transform: none;
    width: 100%;
  }

  .hero-photo-wrap {
    min-height: 280px;
  }

  .feature-grid,
  .syllabus-grid,
  .materials-grid,
  .instructor-grid {
    grid-template-columns: 1fr;
  }

  .syllabus-card {
    min-height: auto;
  }

  .profile-card img {
    transform: none;
  }
}
