/* ==========================================================================
   CSS Custom Properties — Light Theme
   ========================================================================== */
:root {
  /* Colour palette */
  --color-bg: #ffffff;
  --color-bg-subtle: #f8f9fa;
  --color-bg-alt: #f0f2f5;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;
  --color-text: #1a202c;
  --color-text-muted: #718096;
  --color-text-inverse: #ffffff;

  /* Brand / accent */
  --color-primary: #7c3aed;
  --color-primary-hover: #6d28d9;
  --color-primary-light: #ede9fe;
  --color-secondary: #0ea5e9;
  --color-secondary-hover: #0284c7;
  --color-accent: #f59e0b;

  /* Semantic */
  --color-success: #10b981;
  --color-error: #ef4444;
  --color-warning: #f59e0b;

  /* Format badges */
  --color-2day-bg: #dbeafe;
  --color-2day-text: #1e40af;
  --color-4afternoon-bg: #d1fae5;
  --color-4afternoon-text: #065f46;

  /* Typography scale */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --max-width: 1100px;
  --nav-height: 64px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);

  /* Borders */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
}

/* ==========================================================================
   Dark Theme
   ========================================================================== */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0f1117;
    --color-bg-subtle: #161b22;
    --color-bg-alt: #1c2128;
    --color-surface: #161b22;
    --color-border: #30363d;
    --color-text: #e6edf3;
    --color-text-muted: #8b949e;
    --color-text-inverse: #0f1117;

    --color-primary: #a78bfa;
    --color-primary-hover: #c4b5fd;
    --color-primary-light: #2d1f5e;
    --color-secondary: #38bdf8;
    --color-secondary-hover: #7dd3fc;

    --color-2day-bg: #1e3a5f;
    --color-2day-text: #93c5fd;
    --color-4afternoon-bg: #064e3b;
    --color-4afternoon-text: #6ee7b7;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.5);
  }
}

/* ==========================================================================
   Base / Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + var(--space-4));
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img, video, iframe {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--color-primary-hover);
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-text);
}

p {
  max-width: 70ch;
}

ul, ol {
  padding-left: var(--space-6);
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-bg-alt);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  text-decoration: none;
  border-radius: var(--radius-md);
  z-index: 9999;
  font-weight: 600;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
}

/* Focus indicators */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Utility */
.hidden {
  display: none !important;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.section {
  padding-block: var(--space-16);
}

.section-intro {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-10);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

@media (prefers-color-scheme: dark) {
  .nav {
    background: rgba(15, 17, 23, 0.85);
  }
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.nav-logo {
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}

.nav-logo:hover {
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  list-style: none;
  padding: 0;
  gap: var(--space-1);
}

.nav-links a {
  display: block;
  padding: var(--space-2) var(--space-3);
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
  background-color: var(--color-primary-light);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  color: var(--color-text);
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.hamburger {
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.nav-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

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

.btn:active {
  transform: translateY(0);
}

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

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

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.btn-submit {
  width: 100%;
  justify-content: center;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding-top: calc(var(--nav-height) + var(--space-20));
  padding-bottom: var(--space-20);
  background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-subtle) 100%);
  text-align: center;
}

.hero h1 {
  font-size: clamp(var(--text-3xl), 6vw, var(--text-5xl));
  margin-bottom: var(--space-6);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--color-text-muted);
  margin-bottom: var(--space-10);
  max-width: 60ch;
  margin-inline: auto;
}

.hero-subtitle em {
  color: var(--color-primary);
  font-style: normal;
  font-weight: 600;
}

.hero-cta {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   Problem
   ========================================================================== */
.problem {
  background: var(--color-bg-subtle);
}

.problem h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-10);
  text-align: center;
  max-width: none;
}

.problem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.problem-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}

.problem-card h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
  color: var(--color-primary);
}

.problem-card p {
  color: var(--color-text-muted);
  max-width: none;
}

/* ==========================================================================
   Curriculum
   ========================================================================== */
.curriculum h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}

.curriculum-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.curriculum-day {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}

.day-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.curriculum-day h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-5);
}

.curriculum-day ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.curriculum-day li {
  padding-left: var(--space-6);
  position: relative;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.curriculum-day li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}

.curriculum-note {
  text-align: center;
  color: var(--color-text-muted);
  font-style: italic;
  max-width: none;
}

/* ==========================================================================
   Outcomes
   ========================================================================== */
.outcomes {
  background: var(--color-bg-subtle);
}

.outcomes h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-8);
}

.outcomes-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.outcomes-list li {
  padding: var(--space-4) var(--space-5) var(--space-4) var(--space-12);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  position: relative;
  font-size: var(--text-base);
}

.outcomes-list li::before {
  content: '✓';
  position: absolute;
  left: var(--space-5);
  color: var(--color-success);
  font-weight: 700;
  font-size: var(--text-lg);
}

/* ==========================================================================
   About
   ========================================================================== */
.about h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-10);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
}

.about-bio {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.about-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--color-primary);
  flex-shrink: 0;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-bio-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  flex: 1;
}

.about-bio h3 {
  font-size: var(--text-2xl);
}

.about-bio p {
  color: var(--color-text-muted);
}

.social-links {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-2);
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.social-links a:hover {
  color: var(--color-primary);
}

.about-video h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================================
   Dates
   ========================================================================== */
.dates {
  background: var(--color-bg-subtle);
}

.dates h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-8);
}

.dates-intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-10);
}

.formats-explainer h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-5);
}

.format-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.format-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

.format-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

.format-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.format-2day {
  background: var(--color-2day-bg);
  color: var(--color-2day-text);
}

.format-4afternoon {
  background: var(--color-4afternoon-bg);
  color: var(--color-4afternoon-text);
}

.pricing-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.price {
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--color-primary);
  max-width: none;
}

.price span {
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text-muted);
}

.min-participants {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  max-width: none;
}

.online-note {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  max-width: none;
}

/* Date cards */
.dates-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-12);
  color: var(--color-text-muted);
}

.dates-empty {
  text-align: center;
  padding: var(--space-12);
  color: var(--color-text-muted);
}

.dates-error {
  text-align: center;
  padding: var(--space-8);
  color: var(--color-error);
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: var(--radius-lg);
}

@media (prefers-color-scheme: dark) {
  .dates-error {
    background: #2d1515;
    border-color: #742a2a;
  }
}

.dates-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.date-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
}

.date-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.date-card-label {
  font-size: var(--text-xl);
  font-weight: 700;
}

.date-card-times {
  margin-bottom: var(--space-4);
}

.time-workshop {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.time-local {
  font-size: var(--text-sm);
  color: var(--color-primary);
  margin-top: var(--space-1);
}

/* Interest progress bar */
.date-interest-bar {
  margin-bottom: var(--space-5);
}

.interest-progress {
  height: 8px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-2);
}

.interest-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

.interest-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: none;
}

/* Interest form */
.date-card-form h4 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.date-card-confirmation {
  padding: var(--space-6);
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  color: var(--color-primary);
  font-weight: 500;
  text-align: center;
}

/* ==========================================================================
   Forms (shared)
   ========================================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
}

label .optional {
  font-weight: 400;
  color: var(--color-text-muted);
}

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: inherit;
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23718096' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-8);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

input:invalid:not(:placeholder-shown),
select:invalid:not([value=""]) {
  border-color: var(--color-error);
}

.field-error {
  font-size: var(--text-sm);
  color: var(--color-error);
  min-height: 1.2em;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

.cf-turnstile {
  margin-bottom: var(--space-4);
}

/* ==========================================================================
   Teams Section
   ========================================================================== */
.teams h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-10);
}

.teams-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
}

.teams-intro p {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
}

.teams-features {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.teams-features li {
  padding-left: var(--space-6);
  position: relative;
  color: var(--color-text-muted);
}

.teams-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: 700;
}

.teams-pricing {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  max-width: none;
}

.teams-form-wrapper {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
}

.contact-form h3 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-6);
}

.contact-confirmation {
  padding: var(--space-8);
  text-align: center;
}

.contact-confirmation h3 {
  color: var(--color-success);
  margin-bottom: var(--space-4);
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq {
  background: var(--color-bg-subtle);
}

.faq h2 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-10);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 80ch;
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background-color var(--transition-fast);
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--color-primary);
  transition: transform var(--transition-base);
  flex-shrink: 0;
  margin-left: var(--space-4);
}

details[open] .faq-question::after {
  content: '−';
}

.faq-question:hover {
  background: var(--color-bg-alt);
}

.faq-answer {
  padding: 0 var(--space-6) var(--space-5);
  color: var(--color-text-muted);
  animation: faq-open var(--transition-base) ease;
}

.faq-answer p {
  max-width: none;
}

@keyframes faq-open {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-8);
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
  text-align: center;
}

.footer-copyright {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: none;
}

.footer-copyright a {
  color: inherit;
}

.footer-credit {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: none;
}

.footer-links {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-primary);
}

/* ==========================================================================
   Spinner
   ========================================================================== */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Responsive — Tablet (768px+)
   ========================================================================== */
@media (min-width: 768px) {
  .problem-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .outcomes-list {
    grid-template-columns: 1fr 1fr;
  }

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

  .dates-intro {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .footer-grid {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .footer-links {
    justify-content: flex-end;
  }

  .nav-toggle {
    display: none;
  }
}

/* ==========================================================================
   Responsive — Desktop (1024px+)
   ========================================================================== */
@media (min-width: 1024px) {
  .about-bio {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-6);
  }

  .about-photo {
    width: 140px;
    height: 140px;
  }
}

/* ==========================================================================
   Mobile nav
   ========================================================================== */
@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: var(--space-4);
    gap: 0;
    box-shadow: var(--shadow-md);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .format-cards {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
