/* ============================================================
   glass-v1.css — visual layer over styles-v3.css
   Softens the grid-and-box look: translucent surfaces, real depth,
   rounded geometry, warm light. Inspiration: Apple's material
   surfaces + mid-century computing warmth (Olivetti/IBM era).
   Loaded AFTER styles-v3.css. Remove the <link> to revert.
   ============================================================ */

:root {
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 34px;

  --glass: rgba(255, 253, 250, 0.62);
  --glass-strong: rgba(255, 253, 250, 0.82);
  --hairline: rgba(23, 23, 23, 0.09);
  --hairline-light: rgba(255, 255, 255, 0.14);

  --shadow-1: 0 1px 2px rgba(40, 32, 24, 0.05), 0 2px 8px rgba(40, 32, 24, 0.04);
  --shadow-2: 0 2px 6px rgba(40, 32, 24, 0.06), 0 10px 26px rgba(40, 32, 24, 0.07);
  --shadow-3: 0 4px 12px rgba(40, 32, 24, 0.07), 0 22px 54px rgba(40, 32, 24, 0.10);
  --shadow-red: 0 8px 22px rgba(177, 2, 2, 0.24);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- ambient warmth behind everything ---------- */
body {
  background:
    radial-gradient(1100px 620px at 82% -8%, rgba(177, 2, 2, 0.07), transparent 62%),
    radial-gradient(900px 560px at 6% 4%, rgba(214, 160, 90, 0.13), transparent 60%),
    radial-gradient(1200px 800px at 50% 108%, rgba(120, 140, 160, 0.10), transparent 64%),
    var(--paper);
  background-attachment: fixed;
}

/* ---------- header: flush glass bar pinned to the top ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  width: 100%;
  max-width: none;
  margin: 0 0 8px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
  background: rgba(250, 247, 242, 0.72);
  backdrop-filter: saturate(1.8) blur(20px);
  -webkit-backdrop-filter: saturate(1.8) blur(20px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  min-height: 68px;
  transition: box-shadow 300ms var(--ease), background 300ms var(--ease);
}

/* the decorative ring behind the hero read as an artifact; retire it */
.hero::before {
  display: none;
}

.nav-cta {
  border-radius: 999px;
  box-shadow: var(--shadow-1);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}

nav a:not(.nav-cta) {
  padding: 7px 11px;
  border-radius: 999px;
  transition: background 200ms var(--ease), color 200ms var(--ease);
}

nav a:not(.nav-cta):hover {
  background: rgba(23, 23, 23, 0.06);
}

/* ---------- buttons: pill, lifted ---------- */
.button {
  border-radius: 999px;
  transition: transform 240ms var(--ease), box-shadow 240ms var(--ease), background 200ms var(--ease);
}

.button-primary {
  box-shadow: var(--shadow-red);
  background-image: linear-gradient(180deg, #c81616 0%, #b10202 55%, #870000 100%);
}

.button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(177, 2, 2, 0.32);
}

.button-secondary {
  border-color: var(--hairline);
  background: var(--glass-strong);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-1);
}

.button-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

/* ---------- hero: rounded, luminous mark ---------- */
.hero-mark,
.course-code-mark {
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-3);
  overflow: hidden;
}

.hero-mark {
  background-image: linear-gradient(155deg, #d01414 0%, #b10202 46%, #7c0000 100%);
}

.hero-mark::after {
  border-radius: var(--r-xl);
}

.course-code-mark {
  background-image: linear-gradient(155deg, #2c2a29 0%, #171717 52%, #0b0b0b 100%);
}

.hero-photo img {
  border: 0;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
}

/* ---------- panels: glass cards instead of ruled boxes ---------- */
.essentials {
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.essentials-links a {
  border-right: 1px solid var(--hairline);
  transition: background 220ms var(--ease), color 220ms var(--ease), transform 220ms var(--ease);
}

.essentials-links a:hover,
.essentials-links a:focus-visible {
  background: linear-gradient(180deg, #c81616, #870000);
}

.lab-strip {
  border: 1px solid var(--hairline);
  border-left: 0;
  border-radius: var(--r-lg);
  background: var(--glass-strong);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-2);
  position: relative;
  overflow: hidden;
}

.lab-strip::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, #d01414, #870000);
}

.availability-note,
.fill-in {
  border-left: 0;
  border-radius: var(--r-md);
  background: var(--glass-strong);
  box-shadow: var(--shadow-1);
  position: relative;
  overflow: hidden;
}

.availability-note::before,
.fill-in::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, #d01414, #870000);
}

/* ---------- dark sections: rounded slabs, not full bleed ---------- */
.courses-section,
.course-start {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 78px 46px;
  border-radius: var(--r-xl);
  background-image: linear-gradient(168deg, #262423 0%, #171717 48%, #0d0d0d 100%);
  box-shadow: var(--shadow-3);
}

.contact-section {
  border-radius: var(--r-xl);
  background-image: linear-gradient(150deg, #cf1515 0%, #b10202 48%, #820000 100%);
  box-shadow: var(--shadow-3);
  padding: 62px;
}

/* ---------- cards: separated, floating, no shared grid lines ---------- */
.course-grid,
.principles-grid,
.work-grid {
  border-top: 0;
  border-left: 0;
  gap: 18px;
}

.course-card {
  border: 1px solid var(--hairline-light);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.035);
  transition: transform 300ms var(--ease), background 300ms var(--ease), box-shadow 300ms var(--ease);
}

.course-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
}

.principle-card {
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-1);
  transition: transform 300ms var(--ease), box-shadow 300ms var(--ease);
}

.principle-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
}

.work-grid a {
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--glass);
  box-shadow: var(--shadow-1);
  transition: transform 260ms var(--ease), box-shadow 260ms var(--ease), background 220ms var(--ease);
}

.work-grid a:hover,
.work-grid a:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
  background: linear-gradient(180deg, #c81616, #870000);
}

.course-corner {
  border-radius: 2px;
}

/* ---------- lists: hairlines instead of hard rules ---------- */
.focus-list,
.focus-list > div,
.faq-list details {
  border-color: var(--hairline);
}

.course-start ol,
.course-start li {
  border-color: var(--hairline-light);
}

.focus-list > div,
.faq-list details {
  transition: background 220ms var(--ease);
  border-radius: var(--r-sm);
}

.focus-list > div:hover,
.faq-list details:hover {
  background: rgba(255, 255, 255, 0.5);
}

.faq-list summary,
.faq-list details p {
  padding-left: 14px;
  padding-right: 14px;
}

.faq-list summary {
  border-radius: var(--r-sm);
}

/* ---------- section dividers: fade, don't slice ---------- */
.course-overview,
.video-section,
.pull-quote,
footer {
  border-top: 0;
  position: relative;
}

.course-overview::before,
.video-section::before,
.pull-quote::before,
footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rule) 18%, var(--rule) 82%, transparent);
}

/* ---------- pull quote: glass slab ---------- */
.pull-quote blockquote {
  border-left: 0;
  padding: 30px 34px;
  border-radius: var(--r-lg);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-1);
  position: relative;
  overflow: hidden;
}

.pull-quote blockquote::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, #d01414, #870000);
}

/* ---------- media ---------- */
.video-embed {
  border: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-2);
}

/* ---------- mobile ---------- */
@media (max-width: 850px) {
  .site-header {
    top: 8px;
    padding: 0 14px;
  }

  .nav-menu-button {
    border-radius: 999px;
    border-color: var(--hairline);
    background: var(--glass-strong);
    box-shadow: var(--shadow-1);
  }

  .nav-toggle:checked + .nav-menu-button {
    background: var(--ink);
  }

  .nav-links {
    top: calc(100% + 10px);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    background: #fbf9f5;
    backdrop-filter: saturate(1.6) blur(24px);
    -webkit-backdrop-filter: saturate(1.6) blur(24px);
    box-shadow: var(--shadow-3), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    overflow: hidden;
  }

  .nav-links a {
    border-color: var(--hairline);
  }

  .courses-section,
  .course-start,
  .contact-section {
    padding-left: 24px;
    padding-right: 24px;
    border-radius: var(--r-lg);
  }

  .course-grid,
  .principles-grid {
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button,
  .course-card,
  .principle-card,
  .work-grid a,
  .nav-cta {
    transition: none;
  }

  .button:hover,
  .course-card:hover,
  .principle-card:hover,
  .work-grid a:hover,
  .nav-cta:hover {
    transform: none;
  }
}

/* ---------- typography: native system faces (SF on Apple, Segoe on Windows) ---------- */
body,
.button,
nav a,
input,
select,
textarea {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text",
    "Segoe UI", system-ui, Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

h1,
h2,
h3,
.hero-mark-large,
.course-code-mark strong,
.pull-quote p {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display",
    "Segoe UI", system-ui, Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: -0.035em;
}

.eyebrow,
.course-format,
.text-link,
footer,
.course-number,
.focus-list span,
.course-start li > span,
.principle-card > span {
  letter-spacing: 0.08em;
}

.hero-intro,
.course-page-lead,
.course-overview-copy,
.about-copy p,
.faq-list details p,
.contact-copy p {
  font-size: 1.06rem;
  line-height: 1.62;
}

/* ---------- specular gloss on solid tiles ---------- */
.hero-mark,
.course-code-mark,
.contact-section,
.courses-section,
.course-start {
  position: relative;
  isolation: isolate;
}

.hero-mark::before,
.course-code-mark::before,
.contact-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 70% at 18% -12%, rgba(255, 255, 255, 0.30), transparent 58%),
    radial-gradient(90% 60% at 100% 108%, rgba(0, 0, 0, 0.22), transparent 62%);
  pointer-events: none;
}

.courses-section::before,
.course-start::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(90% 60% at 12% -10%, rgba(255, 255, 255, 0.09), transparent 58%);
  pointer-events: none;
}

/* ---------- student essentials: centered liquid-glass dock ---------- */
.essentials {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 70;
  width: max-content;
  max-width: calc(100% - 24px);
  margin: 0;
  display: block;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: rgba(252, 250, 247, 0.80);
  backdrop-filter: saturate(1.9) blur(30px);
  -webkit-backdrop-filter: saturate(1.9) blur(30px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 0 0 1px rgba(255, 255, 255, 0.45) inset,
    0 10px 34px rgba(40, 32, 24, 0.16),
    0 2px 8px rgba(40, 32, 24, 0.08);
}

.essentials-intro {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .essentials {
    animation: dock-in 760ms var(--ease) 260ms both;
  }
}

@keyframes dock-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(26px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

.essentials-links {
  display: flex;
  grid-template-columns: none;
}

.essentials-links a {
  min-height: 54px;
  padding: 0 22px;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  border-right: 1px solid rgba(23, 23, 23, 0.08);
  border-bottom: 0;
  border-radius: 0;
}

.essentials-links a:last-child {
  border-right: 0;
}

.essentials-links span {
  font-size: 0.9rem;
  font-weight: 700;
}

.essentials-links small {
  display: none;
}

.essentials-links a:hover,
.essentials-links a:focus-visible {
  background: linear-gradient(180deg, rgba(200, 22, 22, 0.92), rgba(135, 0, 0, 0.94));
  color: white;
}

/* keep the dock from covering the end of the page */
footer {
  padding-bottom: 96px;
}

@media (max-width: 850px) {
  .essentials {
    bottom: 10px;
    width: calc(100% - 20px);
    max-width: none;
    border-radius: var(--r-lg);
    background: rgba(252, 250, 247, 0.92);
  }

  .essentials-links a {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 6px;
  }

  .essentials-links span {
    font-size: 0.7rem;
    text-align: center;
    white-space: normal;
  }
}

/* ---------- breathing room ---------- */

.course-card {
  padding: 32px;
}

.principle-card {
  padding: 32px;
}

/* ============================================================
   Scroll-driven motion. Native CSS scroll timelines, no JS.
   Browsers without support simply show the content, unanimated.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .principle-card,
    .course-card,
    .work-grid a,
    .focus-list > div,
    .faq-list details,
    .pull-quote blockquote,
    .lab-strip,
    .course-start li,
    .hero-photo,
    .video-embed,
    .section-heading,
    .course-overview > div {
      animation: rise-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 62%;
    }

    .hero-mark,
    .course-code-mark {
      animation: mark-in linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 40%;
    }

    .hero-copy > * {
      animation: rise-in 700ms var(--ease) both;
    }

    .hero-copy > .eyebrow { animation-delay: 40ms; }
    .hero-copy > h1 { animation-delay: 90ms; }
    .hero-copy > .hero-intro { animation-delay: 170ms; }
    .hero-copy > .hero-actions { animation-delay: 250ms; }

    .courses-section,
    .course-start,
    .contact-section {
      animation: slab-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }

  @keyframes rise-in {
    from {
      opacity: 0;
      transform: translateY(26px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes mark-in {
    from {
      opacity: 0;
      transform: translateY(40px) scale(0.94);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  @keyframes slab-in {
    from {
      opacity: 0.35;
      transform: translateY(34px) scale(0.985);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
}

/* ============================================================
   More motion. Still no JavaScript.
   ============================================================ */

/* scroll progress hairline along the bottom edge of the header */
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, #d01414, var(--red-dark));
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .site-header::after {
      animation: progress linear both;
      animation-timeline: scroll(root block);
    }
  }

  @keyframes progress {
    to {
      transform: scaleX(1);
    }
  }

  /* staggered card entrances */
  @supports (animation-timeline: view()) {
    .course-grid > :nth-child(2),
    .principles-grid > :nth-child(2),
    .work-grid > :nth-child(2) { animation-range: entry 4% entry 66%; }

    .course-grid > :nth-child(3),
    .principles-grid > :nth-child(3),
    .work-grid > :nth-child(3) { animation-range: entry 8% entry 70%; }

    .course-grid > :nth-child(4),
    .work-grid > :nth-child(4) { animation-range: entry 12% entry 74%; }

    .course-grid > :nth-child(5) { animation-range: entry 16% entry 78%; }

    .focus-list > div:nth-child(2) { animation-range: entry 4% entry 66%; }
    .focus-list > div:nth-child(3) { animation-range: entry 8% entry 70%; }
    .focus-list > div:nth-child(4) { animation-range: entry 12% entry 74%; }
    .focus-list > div:nth-child(5) { animation-range: entry 16% entry 78%; }
  }

  /* link underline sweep */
  .text-link {
    background-image: linear-gradient(90deg, var(--red), var(--red));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 2px;
    border-bottom-color: transparent;
    transition: background-size 320ms var(--ease), color 200ms var(--ease);
  }

  .text-link:hover,
  .text-link:focus-visible {
    background-size: 100% 2px;
  }

  /* arrows lean into the direction they point */
  .button span[aria-hidden],
  .course-card-actions a span[aria-hidden] {
    display: inline-block;
    transition: transform 280ms var(--ease);
  }

  .button:hover span[aria-hidden],
  .course-card-actions a:hover span[aria-hidden] {
    transform: translateX(3px);
  }

  .essentials-links a span,
  .nav-cta span[aria-hidden] {
    transition: transform 280ms var(--ease);
  }

  .essentials-links a:hover span {
    transform: translateY(-1px);
  }
}

/* ============================================================
   Visual components: stat strip, photo bands, dock icons,
   connected step timeline.
   ============================================================ */

/* ---------- big numbers ---------- */
.stat-strip {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto 92px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.stat-strip > div {
  padding: 30px 26px 26px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-1);
  transition: transform 300ms var(--ease), box-shadow 300ms var(--ease);
}

.stat-strip > div:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
}

.stat-strip strong {
  display: block;
  font-size: clamp(2.6rem, 5vw, 4.1rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.05em;
  background: linear-gradient(160deg, #d01414, #870000);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-strip span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* ---------- photo bands ---------- */
.photo-band {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto 46px;
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-3);
}

.photo-band img {
  display: block;
  width: 100%;
  height: clamp(220px, 34vw, 400px);
  object-fit: cover;
  object-position: center 38%;
  transform: scale(1.02);
  transition: transform 1.2s var(--ease);
}

.photo-band:hover img {
  transform: scale(1.06);
}

.photo-band figcaption {
  position: absolute;
  left: 22px;
  bottom: 18px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(252, 250, 247, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-1);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- dock icons ---------- */
.essentials-links svg {
  width: 19px;
  height: 19px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.68;
  transition: opacity 240ms var(--ease), transform 240ms var(--ease);
}

.essentials-links a:hover svg,
.essentials-links a:focus-visible svg {
  opacity: 1;
  transform: translateY(-1px) scale(1.06);
}

/* ---------- step timeline ---------- */
.course-start ol {
  position: relative;
  border-top: 0;
}

.course-start ol::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.06));
}

.course-start li {
  position: relative;
  border-bottom: 0;
  padding: 16px 0;
  align-items: start;
}

.course-start li > span {
  position: relative;
  z-index: 1;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(160deg, #d01414, #870000);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  color: white;
  font-size: 0.68rem;
}

@media (max-width: 850px) {
  .stat-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 56px;
  }

  .stat-strip > div {
    padding: 22px 18px 18px;
  }

  .photo-band {
    border-radius: var(--r-lg);
  }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .stat-strip > div,
    .photo-band {
      animation: rise-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 62%;
    }

    .stat-strip > div:nth-child(2) { animation-range: entry 5% entry 66%; }
    .stat-strip > div:nth-child(3) { animation-range: entry 10% entry 70%; }
    .stat-strip > div:nth-child(4) { animation-range: entry 15% entry 74%; }
  }
}

/* ============================================================
   Animated gradient stroke on the dock + course-card redesign
   ============================================================ */

@property --dock-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.essentials {
  border: 2px solid transparent;
  background:
    linear-gradient(rgba(252, 250, 247, 0.82), rgba(252, 250, 247, 0.82)) padding-box,
    conic-gradient(
      from var(--dock-angle),
      #b10202 0%,
      #e4581f 14%,
      #f0a23c 26%,
      #b10202 42%,
      #7c0000 58%,
      #d01414 74%,
      #f0a23c 88%,
      #b10202 100%
    ) border-box;
}

@media (prefers-reduced-motion: no-preference) {
  .essentials {
    animation:
      dock-in 760ms var(--ease) 260ms both,
      dock-spin 7s linear infinite;
  }
}

@keyframes dock-spin {
  to {
    --dock-angle: 360deg;
  }
}

@media (max-width: 850px) {
  .essentials {
    background:
      linear-gradient(rgba(252, 250, 247, 0.93), rgba(252, 250, 247, 0.93)) padding-box,
      conic-gradient(
        from var(--dock-angle),
        #b10202 0%,
        #e4581f 14%,
        #f0a23c 26%,
        #b10202 42%,
        #7c0000 58%,
        #d01414 74%,
        #f0a23c 88%,
        #b10202 100%
      ) border-box;
  }
}

/* ---------- course cards: watermark, accent glow, clearer hierarchy ---------- */
.course-card {
  overflow: hidden;
  padding: 34px 32px 30px;
}

.course-card::after {
  content: "";
  position: absolute;
  right: -18%;
  top: -34%;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(208, 20, 20, 0.34), transparent 66%);
  opacity: 0.55;
  transition: opacity 420ms var(--ease), transform 520ms var(--ease);
  pointer-events: none;
}

.course-card:hover::after {
  opacity: 0.95;
  transform: scale(1.12);
}

.course-grid > :nth-child(2) .course-card::after,
.course-grid > :nth-child(2)::after {
  background: radial-gradient(circle, rgba(228, 88, 31, 0.32), transparent 66%);
}

.course-grid > :nth-child(3)::after {
  background: radial-gradient(circle, rgba(240, 162, 60, 0.28), transparent 66%);
}

.course-grid > :nth-child(4)::after {
  background: radial-gradient(circle, rgba(120, 150, 175, 0.30), transparent 66%);
}

.course-grid > :nth-child(5)::after {
  background: radial-gradient(circle, rgba(150, 120, 180, 0.30), transparent 66%);
}

.course-card .course-number {
  font-size: 0.72rem;
  opacity: 0.8;
}

.course-card h3 {
  margin-top: 4px;
}

.course-card .course-title {
  color: rgba(255, 255, 255, 0.92);
}

.course-card-actions {
  margin-top: 20px;
}

.course-card-actions a {
  border-radius: 999px;
  padding: 9px 16px;
  transition: transform 240ms var(--ease), background 220ms var(--ease), box-shadow 240ms var(--ease);
}

.course-card-actions a:first-child {
  box-shadow: 0 6px 16px rgba(177, 2, 2, 0.32);
}

.course-card-actions a:hover {
  transform: translateY(-2px);
}

/* section headings on dark slabs: solid white, maximum legibility */
.courses-section .section-heading h2,
.course-start h2 {
  color: #ffffff;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.45);
}

/* ============================================================
   Fluid scale. The page grows with the viewport instead of
   sitting in a fixed 1180px column.
   ============================================================ */
:root {
  --shell: min(92vw, 1680px);
}

html {
  font-size: clamp(15px, 0.3125vw + 12px, 21px);
}

.hero,
.about-section,
footer,
.lab-strip,
.teaching-section,
.faq-section,
.contact-section,
.course-overview,
.course-support,
.course-page-hero,
.video-section,
.pull-quote,
.courses-section,
.course-start,
.stat-strip,
.photo-band {
  width: var(--shell);
  margin-left: auto;
  margin-right: auto;
}

.site-header {
  padding: 0 max(20px, calc((100vw - var(--shell)) / 2));
}

/* fluid vertical rhythm */
.teaching-section {
  padding: clamp(60px, 6.5vw, 132px) 0;
}

.faq-section {
  padding: clamp(60px, 6.5vw, 138px) 0;
  gap: clamp(36px, 5vw, 96px);
}

.about-section {
  padding: clamp(60px, 6.5vw, 132px) 0;
}

.course-overview {
  padding: clamp(56px, 6vw, 126px) 0;
  gap: clamp(36px, 5vw, 96px);
}

.courses-section,
.course-start {
  padding: clamp(48px, 5vw, 104px) clamp(22px, 3vw, 62px);
}

.contact-section {
  padding: clamp(38px, 4.2vw, 84px);
  gap: clamp(32px, 4.5vw, 84px);
}

.hero {
  gap: clamp(32px, 4vw, 86px);
  min-height: clamp(520px, 56vw, 760px);
}

.course-page-hero {
  gap: clamp(32px, 4.5vw, 92px);
  min-height: clamp(480px, 50vw, 740px);
}

.hero-mark {
  min-height: clamp(280px, 26vw, 460px);
}

.course-code-mark {
  min-height: clamp(300px, 28vw, 500px);
}

.course-card,
.principle-card {
  padding: clamp(24px, 2.4vw, 42px);
}

/* wide screens get a third column instead of oversized cards */
@media (min-width: 1500px) {
  .course-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat-strip {
    gap: 24px;
  }
}

@media (min-width: 2000px) {
  .work-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* small phones: the dock becomes icon-only, labels stay for screen readers */
@media (max-width: 620px) {
  .essentials {
    width: max-content;
    max-width: calc(100% - 20px);
    border-radius: 999px;
  }

  .essentials-links a {
    flex: none;
    min-width: 62px;
    min-height: 56px;
    padding: 0 4px;
  }

  .essentials-links span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .essentials-links svg {
    width: 23px;
    height: 23px;
    opacity: 0.9;
  }
}

/* ============================================================
   Dark mode. Follows the operating system setting.
   The already-dark slabs keep their own gradients; this flips
   the light surfaces and the tokens they are built from.
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f0ece5;
    --paper: #121110;
    --paper-light: #1b1a18;
    --muted: #a49d94;
    --rule: #383430;
    --red: #e34242;
    --red-dark: #b10202;

    --glass: rgba(32, 30, 28, 0.62);
    --glass-strong: rgba(32, 30, 28, 0.86);
    --hairline: rgba(255, 255, 255, 0.10);

    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.28);
    --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.38), 0 10px 26px rgba(0, 0, 0, 0.34);
    --shadow-3: 0 4px 12px rgba(0, 0, 0, 0.42), 0 22px 54px rgba(0, 0, 0, 0.44);
    --shadow-red: 0 8px 22px rgba(227, 66, 66, 0.28);
  }

  body {
    background:
      radial-gradient(1100px 620px at 82% -8%, rgba(227, 66, 66, 0.10), transparent 62%),
      radial-gradient(900px 560px at 6% 4%, rgba(190, 140, 80, 0.10), transparent 60%),
      radial-gradient(1200px 800px at 50% 108%, rgba(90, 120, 150, 0.12), transparent 64%),
      var(--paper);
  }

  /* surfaces that used the ink token as a background stay dark on their own */
  .nav-cta,
  .nav-toggle:checked + .nav-menu-button {
    background: #f0ece5;
    color: #121110;
  }

  .button-secondary:hover,
  .button-secondary:focus-visible {
    background: #f0ece5;
    color: #121110;
  }

  .site-header {
    background: rgba(20, 19, 18, 0.72);
    border-bottom-color: var(--hairline);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
  }

  .essentials {
    background:
      linear-gradient(rgba(26, 24, 22, 0.86), rgba(26, 24, 22, 0.86)) padding-box,
      conic-gradient(
        from var(--dock-angle),
        #b10202 0%,
        #e4581f 14%,
        #f0a23c 26%,
        #b10202 42%,
        #7c0000 58%,
        #d01414 74%,
        #f0a23c 88%,
        #b10202 100%
      ) border-box;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.10) inset,
      0 10px 34px rgba(0, 0, 0, 0.5);
  }

  .essentials-links a {
    border-right-color: rgba(255, 255, 255, 0.10);
  }

  .stat-strip strong {
    background: linear-gradient(160deg, #ff5a5a, #c81616);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .focus-list > div:hover,
  .faq-list details:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .photo-band figcaption {
    background: rgba(26, 24, 22, 0.84);
    color: var(--ink);
  }

  .hero-photo img,
  .photo-band img {
    filter: brightness(0.94) contrast(1.02);
  }

  .course-card {
    border-color: rgba(255, 255, 255, 0.10);
  }

  .light-note {
    color: #8e8880;
  }
}

/* ============================================================
   Native cross-document view transitions.
   Pages fade and lift into each other instead of hard-cutting.
   ============================================================ */
@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) {
    animation: vt-out 180ms var(--ease) both;
  }

  ::view-transition-new(root) {
    animation: vt-in 320ms var(--ease) both;
  }

  @keyframes vt-out {
    to {
      opacity: 0;
      transform: translateY(-6px);
    }
  }

  @keyframes vt-in {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
  }

  /* the header and the dock stay put while the page changes underneath */
  .site-header {
    view-transition-name: site-header;
  }

  .essentials {
    view-transition-name: dock;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* keep the card accent glow behind the card's own content */
.course-card > * {
  position: relative;
  z-index: 1;
}

.course-card::after {
  z-index: 0;
}

@media (prefers-color-scheme: dark) {
  .course-card::after {
    opacity: 0.4;
  }

  .course-card:hover::after {
    opacity: 0.7;
  }

  .courses-section::before,
  .course-start::before {
    background: radial-gradient(90% 60% at 12% -10%, rgba(255, 255, 255, 0.05), transparent 58%);
  }
}


/* ============================================================
   Hover, restrained. Depth, edge and weight — no motion tricks.
   The card rises a little, its shadow deepens, its top edge
   catches light, and its surface warms by a few percent.
   ============================================================ */
.course-card,
.principle-card,
.stat-strip > div,
.work-grid a,
.photo-band {
  transition:
    transform 280ms cubic-bezier(0.32, 0.72, 0, 1),
    box-shadow 280ms cubic-bezier(0.32, 0.72, 0, 1),
    border-color 280ms ease,
    background-color 280ms ease;
}

/* light cards: shadow deepens, edge firms, surface lifts a touch */
.principle-card,
.stat-strip > div,
.work-grid a {
  box-shadow:
    0 1px 2px rgba(40, 32, 24, 0.05),
    0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.principle-card:hover,
.stat-strip > div:hover,
.work-grid a:hover {
  transform: translateY(-3px);
  border-color: rgba(23, 23, 23, 0.16);
  background-color: rgba(255, 255, 255, 0.55);
  box-shadow:
    0 2px 4px rgba(40, 32, 24, 0.06),
    0 12px 28px rgba(40, 32, 24, 0.10),
    0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

/* dark cards: the surface warms and the top edge catches light */
.course-card {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.course-card:hover {
  transform: translateY(-3px);
  background-color: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.34),
    0 1px 0 rgba(255, 255, 255, 0.14) inset;
}

/* the colour accent stays, just steadier */
.course-card::after {
  opacity: 0.5;
  transition: opacity 320ms ease;
}

.course-card:hover::after {
  opacity: 0.72;
  transform: none;
}

.photo-band:hover {
  box-shadow: var(--shadow-3), 0 0 0 1px rgba(23, 23, 23, 0.06);
}

.photo-band img {
  transition: transform 900ms cubic-bezier(0.32, 0.72, 0, 1);
}

.photo-band:hover img {
  transform: scale(1.035);
}

@media (prefers-color-scheme: dark) {
  .principle-card,
  .stat-strip > div,
  .work-grid a {
    box-shadow:
      0 1px 2px rgba(0, 0, 0, 0.35),
      0 1px 0 rgba(255, 255, 255, 0.05) inset;
  }

  .principle-card:hover,
  .stat-strip > div:hover,
  .work-grid a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow:
      0 2px 6px rgba(0, 0, 0, 0.4),
      0 14px 32px rgba(0, 0, 0, 0.42),
      0 1px 0 rgba(255, 255, 255, 0.09) inset;
  }
}

@media (prefers-reduced-motion: reduce) {
  .course-card:hover,
  .principle-card:hover,
  .stat-strip > div:hover,
  .work-grid a:hover,
  .photo-band:hover img {
    transform: none;
  }
}

/* ============================================================
   Focus by recession. Hovering one card lets the others step
   back rather than making the hovered one shout. Uses :has(),
   so browsers without it simply show no change.
   ============================================================ */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .course-grid:has(.course-card:hover) .course-card:not(:hover),
  .principles-grid:has(.principle-card:hover) .principle-card:not(:hover),
  .stat-strip:has(> div:hover) > div:not(:hover),
  .work-grid:has(a:hover) a:not(:hover) {
    opacity: 0.58;
    transition: opacity 280ms cubic-bezier(0.32, 0.72, 0, 1);
  }

  .course-grid .course-card,
  .principles-grid .principle-card,
  .stat-strip > div,
  .work-grid a {
    transition:
      opacity 280ms cubic-bezier(0.32, 0.72, 0, 1),
      transform 280ms cubic-bezier(0.32, 0.72, 0, 1),
      box-shadow 280ms cubic-bezier(0.32, 0.72, 0, 1),
      border-color 280ms ease,
      background-color 280ms ease;
  }

  /* the publication list dims its siblings the same way */
  #publications ol:has(li:hover) li:not(:hover) {
    opacity: 0.55;
    transition: opacity 240ms ease;
  }
}

/* ============================================================
   Text contrast. Several body-copy colours were hardcoded dark
   greys, which stayed dark in dark mode (1.6:1 — unreadable).
   Every one is restated here with a measured contrast ratio.
   ============================================================ */

/* both modes: card copy on the dark slabs, 7.4:1 -> 9.6:1 */
.course-card-body > p:last-child,
.course-card-body > p:not(.course-format):not(.course-title) {
  color: #c2bdb6;
}

.course-start li p {
  color: #c9c4bd;
}

.section-heading > p {
  color: #cfcac3;
}

@media (prefers-color-scheme: dark) {
  :root {
    --muted: #b5aea5;              /* 8.6:1 on the page background */
  }

  /* primary body copy — was 1.6:1, now 13.6:1 */
  .hero-intro,
  .about-copy p,
  .course-page-lead,
  .course-overview-copy,
  .course-support > div:last-child > p,
  .light-heading > p,
  .lab-strip p:last-child,
  .principle-card p,
  .faq-list details p,
  .fill-in,
  .section-switch,
  .work-grid small {
    color: #dfdad2;
  }

  /* secondary copy — 8.6:1 */
  .video-caption,
  .hero-photo figcaption,
  .pull-quote footer,
  .essentials-links small,
  .back-link,
  .light-note {
    color: #b5aea5;
  }

  /* headings and strong text stay at full strength */
  h1,
  h2,
  h3,
  .course-page-title,
  .pull-quote p,
  strong {
    color: var(--ink);
  }

  .course-page-title {
    color: #ff5a5a;
  }

  .faq-list summary {
    color: var(--ink);
  }
}
