/*
 * CAISH - Cambridge AI Safety Hub
 * Stylesheet v1.0
 *
 * Table of Contents:
 * 1. Variables
 * 2. Reset & Base
 * 3. Typography
 * 4. Layout Utilities
 * 5. Navigation
 * 6. Components
 * 7. Page-specific Sections
 * 8. Footer
 * 9. Responsive
 */

/* ==========================================================================
   1. Variables
   ========================================================================== */
   :root {
    /* Colors */
    --black: #1a1a1a;
    --dark-grey: #4a4a4a;
    --mid-grey: #8a8a8a;
    --light-grey: #e0e0e0;
    --off-white: #f8f7f4;
    --cream: #f4f3ef;
    --white: #fefefe;
    --cambridge: #7e4233;

    /* Layout */
    --max-width: 1000px;

    /* Typography */
    --font-serif: 'Libre Baskerville', Georgia, serif;
    --font-mono: 'Space Mono', monospace;

    /* Spacing Scale (base: 4px / 0.25rem) */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-24: 6rem;     /* 96px */
    --space-32: 8rem;     /* 128px */
    --space-36: 9rem;     /* 144px */
  }
  
  /* ==========================================================================
     2. Reset & Base
     ========================================================================== */
  *, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  body {
    font-family: var(--font-mono);
    font-weight: 400;
    background: #ffffff;
    color: var(--black);
    line-height: 1.8;
    letter-spacing: -0.01em;
  }
  
  /* Paper grain texture overlay */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 1000;
  }
  
  /* ==========================================================================
     3. Typography
     ========================================================================== */
  h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 400;
    letter-spacing: -0.02em;
  }
  
  h1 {
    font-size: clamp(2.4rem, 5.5vw, 3.8rem);
    line-height: 1.2;
  }
  
  h2 {
    font-size: clamp(1.4rem, 2.8vw, 1.85rem);
    line-height: 1.35;
  }
  
  h3 {
    font-size: 1.05rem;
    line-height: 1.4;
  }
  
  p {
    font-size: 0.95rem;
    max-width: 52ch;
    color: var(--dark-grey);
  }
  
  a {
    color: inherit;
    text-decoration: none;
  }

  em { font-style: italic; }

  /* Keyboard Focus Indicators */
  *:focus {
    outline: none;
  }

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

  a:focus-visible,
  button:focus-visible {
    outline: 2px solid var(--black);
    outline-offset: 3px;
  }

  /* Skip to Main Content Link */
  .skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--black);
    color: var(--white);
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
    border-radius: 0 0 4px 0;
  }

  .skip-link:focus {
    top: 0;
    outline: 2px solid var(--black);
    outline-offset: 2px;
  }

  /* ==========================================================================
     4. Layout Utilities
     ========================================================================== */
  .label {
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--dark-grey);
    margin-bottom: var(--space-6);
    display: block;
  }

  /* Hero label styling - bold techy font for organization name */
  .hero .label {
    font-family: 'Space Mono', 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--black);
  }

  section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-10);
  }

  .divider {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-10);
  }
  
  .divider-line {
    height: 1px;
    background: var(--light-grey);
  }
  
  /* ==========================================================================
     5. Announcement Banner
     ========================================================================== */
  .announcement-banner {
    background: var(--black);
    color: var(--white);
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 101;
  }

  .announcement-banner p {
    margin: 0;
    color: var(--white);
    font-size: 0.8rem;
    max-width: none;
  }

  .announcement-banner a {
    color: var(--white);
    text-decoration: none;
    border-bottom: 0;
    transition: opacity 0.2s ease;
  }

  .announcement-banner a:hover {
    opacity: 0.8;
    text-decoration: none;
  }

  /* Adjust nav position when banner is present */
  body.has-banner nav {
    top: 2.2rem;
  }

  body.has-banner .skip-link:focus {
    top: 2.2rem;
  }

  /* Adjust page content when banner is present */
  body.has-banner .hero {
    padding-top: calc(var(--space-8) + 2.2rem);
  }

  body.has-banner .page-header {
    padding-top: calc(var(--space-36) + 2.2rem);
  }

  /* ==========================================================================
     6. Navigation
     ========================================================================== */
  nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(224, 224, 224, 0.7);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03);
  }
  
  .nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-10);
    max-width: var(--max-width);
    margin: 0 auto;
  }
  
  .logo {
    height: 32px;
    opacity: 0.9;
    transition: opacity 0.2s ease-out;
  }

  .logo:hover {
    opacity: 1;
  }
  
  .nav-links {
    display: flex;
    gap: var(--space-10);
    list-style: none;
  }
  
  .nav-links a {
    position: relative;
    font-size: 0.75rem;
    letter-spacing: 0.03em;
    color: var(--dark-grey);
    transition: color 0.2s ease-out;
  }

  .nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.4rem;
    height: 1px;
    background: var(--black);
    opacity: 0;
    transform: scaleX(0.6);
    transform-origin: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .nav-links a:hover { color: var(--black); }

  .nav-links a:hover::after {
    opacity: 0.6;
    transform: scaleX(1);
  }
  
  /* Mobile Navigation */
  .nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
  }
  
  .nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--black);
    margin: 5px 0;
    transition: all 0.3s ease-out;
  }
  
  .mobile-nav {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--off-white);
    z-index: 200;
    padding: var(--space-24) var(--space-10);
  }
  
  .mobile-nav.active { display: block; }
  
  .mobile-nav-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--black);
    line-height: 1;
  }
  
  .mobile-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
  }
  
  .mobile-nav a {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--black);
  }
  
  .mobile-nav a:hover { opacity: 0.6; }
  
  /* ==========================================================================
     6. Components
     ========================================================================== */
  
  /* Buttons */
  .btn {
    display: inline-block;
    padding: 0.8rem 1.6rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--cream);
    color: var(--black);
    border: none;
    cursor: pointer;
    border-radius: 999px;
    box-shadow:
      0 1px 2px rgba(0, 0, 0, 0.04),
      0 4px 8px rgba(0, 0, 0, 0.04),
      0 12px 20px rgba(0, 0, 0, 0.06);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out, box-shadow 0.2s ease-out;
  }

  .btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow:
      0 2px 4px rgba(0, 0, 0, 0.04),
      0 8px 16px rgba(0, 0, 0, 0.06),
      0 16px 32px rgba(0, 0, 0, 0.08);
  }
  
  /* Easter Egg */
  .easter-egg {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
  }
  
  .easter-egg-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
  }
  
  /* ==========================================================================
     7. Page-specific Sections
     ========================================================================== */
  
  /* Hero */
  .hero {
    padding-top: var(--space-8);
    padding-bottom: var(--space-10);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
  }
  
  .hero h1 {
    margin-bottom: 1.75rem;
    max-width: 18ch;
  }
  
  .hero h1 em {
    display: block;
    color: var(--cambridge);
  }
  
  .hero p {
    max-width: 44ch;
    font-size: 1rem;
  }
  
  .hero-image {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
  }
  
  .hero-image img,
  .hero-hourglass {
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
  }

  .hero-hourglass {
    max-width: 240px;
  }

  .hourglass-path {
    fill: none;
    stroke: #111;
    stroke-width: 7;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: url(#roughen);
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: hourglass-draw 12s ease-in-out infinite;
  }

  .hourglass-path.path-2 { animation-delay: 0.3s; }
  .hourglass-path.path-3 { animation-delay: 0.6s; }
  .hourglass-path.path-4 { animation-delay: 0.9s; }

  @keyframes hourglass-draw {
    0% {
      stroke-dashoffset: 100;
    }
    50% {
      stroke-dashoffset: 0;
    }
    95% {
      stroke-dashoffset: 0;
    }
    100% {
      stroke-dashoffset: 100;
    }
  }
  
  /* Mission */
  .mission {
    padding-top: var(--space-12);
    padding-bottom: var(--space-10);
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-16);
  }
  
  .mission-text h2 {
    margin-bottom: var(--space-6);
    max-width: 18ch;
  }

  .mission-text p { margin-bottom: var(--space-4); }
  
  .mission-image {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
  }
  
  .mission-image img {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: contain;
  }
  
  /* Initiatives */
  .initiatives {
    padding-top: var(--space-12);
    padding-bottom: var(--space-10);
  }

  .initiatives h2 { margin-bottom: var(--space-12); }
  
  .initiatives-list {
    display: flex;
    flex-direction: column;
  }
  
  .initiative-item {
    display: grid;
    grid-template-columns: var(--space-10) 1fr;
    gap: var(--space-8);
    padding: var(--space-6);
    border: 1px solid rgba(224, 224, 224, 0.9);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.06);
  }

  .initiative-item:last-child {
    border-bottom: 1px solid rgba(224, 224, 224, 0.9);
  }

  .initiative-item + .initiative-item {
    margin-top: var(--space-4);
  }
  
  .initiative-num {
    font-size: 0.7rem;
    color: var(--mid-grey);
    padding-top: 0.2rem;
  }
  
  .initiative-content h3 { margin-bottom: var(--space-2); }

  .initiative-content h3 a {
    color: var(--black);
    border-bottom: 1px solid var(--cambridge);
    transition: border-color 0.2s ease, color 0.2s ease;
  }

  .initiative-content h3 a:hover,
  .initiative-content h3 a:focus-visible {
    color: var(--black);
    border-color: var(--cambridge);
  }
  
  .initiative-content p {
    font-size: 0.92rem;
    max-width: none;
  }
  
  /* Events */
  .events {
    padding-top: var(--space-12);
    padding-bottom: var(--space-4);
  }

  .events-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: var(--space-4);
  }
  
  .events-header h2 { margin-bottom: 0; }
  
  .events-link {
    font-size: 0.7rem;
    color: var(--mid-grey);
    border-bottom: 1px solid var(--light-grey);
    padding-bottom: 2px;
    transition: all 0.2s ease-out;
  }
  
  .events-link:hover {
    color: var(--black);
    border-color: var(--black);
  }
  
.events-empty {
  padding: var(--space-10) 0;
  color: var(--mid-grey);
  font-size: 0.8rem;
  font-style: italic;
  font-family: var(--font-serif);
}

.events-loading {
  padding: var(--space-10) 0;
  color: var(--mid-grey);
  font-size: 0.8rem;
  font-style: italic;
  font-family: var(--font-serif);
}

/* Home Page Events List */
.home-events-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--light-grey);
}

.home-event-item {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: var(--space-6);
  align-items: center;
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--light-grey);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}

.home-event-item:hover {
  background: rgba(255, 255, 255, 0.5);
  margin: 0 -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

.home-event-date {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.home-event-day {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--black);
}

.home-event-time {
  font-size: 0.75rem;
  color: var(--mid-grey);
}

.home-event-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.home-event-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--black);
  margin: 0;
}

.home-event-location {
  font-size: 0.75rem;
  color: var(--mid-grey);
}

.home-event-arrow {
  font-size: 1.25rem;
  color: var(--light-grey);
  transition: color 0.2s, transform 0.2s;
}

.home-event-item:hover .home-event-arrow {
  color: var(--dark-grey);
  transform: translateX(4px);
}

/* Socials Page Styles */
.socials-section {
  padding-top: 0.75rem;
  padding-bottom: 1rem;
}

.socials-section .events-empty,
.socials-section .events-loading {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.socials-content h2 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--dark-grey);
}

.events-rsvp {
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--mid-grey);
  max-width: 36rem;
}

.past-events-heading {
  margin-top: 3rem;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.events-grid.past-events {
  opacity: 0.7;
}

.event-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(224, 224, 224, 0.9);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.04);
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.08);
}

.event-card.past {
  opacity: 0.8;
}

.event-cover {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: var(--cream);
}

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

.event-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.event-date {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.event-day {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dark-grey);
}

.event-time {
  font-size: 0.75rem;
  color: var(--mid-grey);
}

.event-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--black);
  margin: 0;
}

.event-description {
  font-size: 0.8rem;
  color: var(--dark-grey);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

.event-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--light-grey);
  margin-top: auto;
}

.event-location {
  font-size: 0.7rem;
  color: var(--mid-grey);
}

.event-link {
  font-size: 0.7rem;
  color: var(--mid-grey);
  border-bottom: 1px solid var(--light-grey);
  transition: all 0.2s;
}

.event-card:hover .event-link {
  color: var(--dark-grey);
  border-color: var(--dark-grey);
}

/* CTA */
  .cta {
    background: var(--black);
    color: var(--white);
    padding: var(--space-16) var(--space-10);
    max-width: none;
  }


  .cta-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
  }
  
  .cta .label { color: var(--mid-grey); }
  
  .cta h2 {
    color: var(--cream);
    margin-bottom: var(--space-5);
  }

  .cta p {
    color: #a0a0a0;
    margin-bottom: var(--space-8);
  }

  
  .cta-image {
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }
  
  .cta-image img {
    width: 100%;
    max-width: 280px;
    height: auto;
    max-height: 280px;
    object-fit: contain;
    opacity: 0.15;
  }

  
  /* Page Header (About page) */
  .page-header {
    padding-top: var(--space-36);
    padding-bottom: var(--space-4);
  }

.page-header h1 {
  margin-bottom: var(--space-4);
  font-size: clamp(2rem, 4vw, 3rem);
}

.page-header p { max-width: 50ch; }

.page-header--socials {
  padding-bottom: 0;
  margin-bottom: -1rem;
}

.page-header--socials p { margin: 0; }

.page-header--socials + .divider {
  margin-top: -0.5rem;
}
  
  /* About Section */
  .about-section {
    padding-top: var(--space-12);
    padding-bottom: var(--space-10);
  }

  .about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
  }

  .about-text h2 { margin-bottom: var(--space-6); }

  .about-text p {
    margin-bottom: var(--space-4);
    max-width: 100%;
  }

  .about-text p:last-child {
    margin-bottom: 0;
  }
  
  .about-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
    object-fit: cover;
  }
  
  /* Team Section */
  .team-section {
    padding-top: var(--space-12);
    padding-bottom: var(--space-4);
  }

  .team-section h2 { margin-bottom: var(--space-10); }

  /* Directors */
  .directors {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    margin-bottom: var(--space-4);
  }
  
  .director {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .director-photo {
    width: 100%;
    aspect-ratio: 1;
    max-width: 280px;
    margin-bottom: var(--space-6);
    overflow: hidden;
    position: relative;
  }
  
  .director-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
  }
  
  .director-photo img.full {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
  }
  
  .director-photo:hover img.outline { opacity: 0; }
  .director-photo:hover img.full { opacity: 1; }
  
  .director h3 { margin-bottom: var(--space-2); }

  .director-role {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--mid-grey);
    margin-bottom: var(--space-4);
  }
  
  .director p { font-size: 0.85rem; }
  
  /* Team Groups */
  .team-group { margin-bottom: var(--space-12); }

  .team-group:last-child { margin-bottom: 0; }

  .team-group h2 {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--light-grey);
  }

  .team-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
  }
  
  .team-member {
    display: flex;
    flex-direction: column;
  }
  
  .team-member-photo {
    width: 100%;
    aspect-ratio: 1;
    max-width: 180px;
    background: var(--cream);
    margin-bottom: var(--space-4);
    overflow: hidden;
  }
  
  .team-member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .team-member h4 {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    font-weight: 400;
    margin-bottom: var(--space-1);
  }
  
  .team-member span {
    font-size: 0.7rem;
    color: var(--mid-grey);
  }
  
  /* Fellowship Page */
  .fellowship-tagline {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--dark-grey);
    max-width: none;
  }
  
  .page-header.fellowship-header {
    padding-bottom: 2rem;
  }
  
  .fellowship-section {
    padding-top: 2.5rem;
    padding-bottom: 1rem;
  }
  
  .fellowship-content {
    max-width: 100%;
  }
  
  .fellowship-content p {
    margin-bottom: 1rem;
    max-width: 100%;
  }
  
  .fellowship-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
  }
  
  .fellowship-content h2:first-of-type {
    margin-top: 1.5rem;
  }

  .meridian-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0 1.5rem;
    clear: both;
  }

  .meridian-gallery img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
  }
  
  .fellowship-image {
    float: right;
    width: 55%;
    max-width: 550px;
    margin-left: 2.5rem;
    margin-bottom: 1.5rem;
  }
  
  .fellowship-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
  }
  
  .image-credit {
    font-size: 0.65rem;
    color: var(--mid-grey);
    margin-top: 0.5rem;
    max-width: none;
    text-align: center;
  }
  
  .image-credit a {
    color: var(--mid-grey);
    border-bottom: 1px solid var(--light-grey);
    margin-right: 0.25rem;
  }
  
  .image-credit a:hover {
    color: var(--dark-grey);
  }
  
  /* Marker highlight effect - wavy yellow, covers full text */
  .highlight {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0,20 Q10,10 20,20 T40,20 T60,20 T80,20 T100,20 L100,85 Q90,95 80,85 T60,85 T40,85 T20,85 T0,85 Z' fill='%23f7e87a' opacity='0.45'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
    padding: 0.15em 0.3em;
    margin: 0 -0.1em;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
  }
  
  /* Application section */
  .fellowship-application {
    margin-top: 3rem;
    margin-bottom: 3rem;
    padding: 2rem 2.5rem 2.25rem;
    border: 1px solid var(--light-grey);
    clear: both;
    text-align: center;
    background: var(--white);
    border-radius: 12px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }

  .fellowship-application h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--black);
  }

  .fellowship-application p {
    margin-bottom: 0.5rem;
    max-width: 100%;
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--dark-grey);
  }

  .fellowship-application .btn-wrapper {
    text-align: center;
    margin-top: 1.5rem;
  }

  .application-deadline {
    display: block;
    font-weight: 600;
    color: var(--cambridge);
    margin-top: 1rem;
    margin-bottom: 0;
    text-align: center;
    font-size: 0.85rem;
  }
  
  .btn-primary {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--black);
    color: var(--white);
    border: 1px solid transparent;
    border-radius: 999px;
    box-shadow:
      0 2px 4px rgba(0, 0, 0, 0.08),
      0 8px 16px rgba(0, 0, 0, 0.1),
      0 16px 28px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    text-decoration: none;
  }

  .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow:
      0 4px 8px rgba(0, 0, 0, 0.08),
      0 12px 24px rgba(0, 0, 0, 0.12),
      0 24px 40px rgba(0, 0, 0, 0.14);
  }
  
  .fellowship-block h2 {
    margin-bottom: 1rem;
  }
  
  .fellowship-block p {
    margin-bottom: 1rem;
    max-width: 100%;
  }
  
  .fellowship-tracks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 1.5rem 0;
    clear: both;
  }
  
  .track {
    padding: 1.5rem;
    background: var(--cream);
    border-radius: 12px;
    border: 1px solid rgba(224, 224, 224, 0.8);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.05);
  }
  
  .track h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
  }
  
  .track-note {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--mid-grey);
    margin-bottom: 1.25rem;
    line-height: 1.5;
  }
  
  .track > p {
    margin-bottom: 1rem;
    font-size: 0.85rem;
    max-width: 100%;
  }
  
  .track > p:last-of-type {
    margin-bottom: 0.75rem;
    font-weight: 600;
  }
  
  .track ul {
    list-style: disc;
    margin: 0;
    padding-left: 1.25rem;
  }
  
  .track ul li {
    font-size: 0.8rem;
    color: var(--dark-grey);
    margin-bottom: 0.6rem;
    padding-left: 0.25rem;
    line-height: 1.5;
  }
  
  .track ul li:last-child {
    margin-bottom: 0;
  }
  
  .fellowship-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 1.5rem 0;
  }
  
  .feature {
    padding: 1.25rem;
    border-left: 3px solid var(--light-grey);
    background: rgba(255, 255, 255, 0.65);
    border-radius: 12px;
    border: 1px solid rgba(224, 224, 224, 0.8);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.04);
  }
  
  .feature h4 {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
  }
  
  .feature p {
    margin-bottom: 0;
    font-size: 0.8rem;
  }
  
  .fellowship-content > h3 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .expectations-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 1.5rem 0;
  }
  
  .expectation {
    padding: 1.25rem;
    border-left: 3px solid var(--light-grey);
    background: rgba(255, 255, 255, 0.65);
    border-radius: 12px;
    border: 1px solid rgba(224, 224, 224, 0.8);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.04);
  }
  
  .expectation h4 {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
  }
  
  .expectation p {
    margin-bottom: 0;
    font-size: 0.8rem;
  }

  .fellowship-faq {
    margin: 2.5rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(244, 243, 239, 0.85), rgba(255, 255, 255, 0.92));
    border: 1px solid rgba(224, 224, 224, 0.9);
    border-radius: 16px;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.06);
  }

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

  .faq-title {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    letter-spacing: -0.03em;
  }

  .faq-accordion {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .faq-card {
    position: relative;
    padding: 0;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(224, 224, 224, 0.8);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.05);
    overflow: hidden;
  }

  .faq-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 6px;
    background: linear-gradient(120deg,
      rgba(126, 66, 51, 0.6),
      rgba(126, 66, 51, 0.15));
  }

  .faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: none;
    border: none;
    padding: 1.25rem 1.5rem;
    text-align: left;
    font-size: 0.95rem;
    color: var(--black);
    -webkit-appearance: none;
    appearance: none;
  }

  .faq-question:focus-visible {
    outline: 2px solid rgba(126, 66, 51, 0.35);
    outline-offset: 4px;
  }

  .faq-question span:first-child {
    flex: 1;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    line-height: 1.4;
  }

  .faq-icon {
    width: 2.1rem;
    height: 2.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(126, 66, 51, 0.25);
    background: rgba(126, 66, 51, 0.08);
    font-size: 1.2rem;
    color: #7e4233;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  }

  .faq-card.open .faq-icon {
    transform: rotate(45deg);
    background: rgba(126, 66, 51, 0.12);
    border-color: rgba(126, 66, 51, 0.5);
  }

  .faq-answer {
    padding: 0.35rem 1.5rem 1.4rem;
    border-top: 1px solid rgba(224, 224, 224, 0.8);
  }

  .faq-answer p {
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
    max-width: none;
    color: var(--dark-grey);
  }

  .faq-answer p:last-child {
    margin-bottom: 0;
  }

  .faq-footer {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--mid-grey);
    max-width: none;
  }

  .expectation ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
  }

  .expectation ul li {
    position: relative;
    padding-left: 1rem;
    font-size: 0.8rem;
    color: var(--dark-grey);
    line-height: 1.6;
  }

  .expectation ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--mid-grey);
  }

.expectations-section {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.expectations-section p {
  max-width: 100%;
}

.expectations-note {
  white-space: nowrap;
}

  .expectations-section h2 {
    margin-bottom: 1.5rem;
  }

  .expectations-list--three {
    grid-template-columns: repeat(3, 1fr);
  }

  .expectations-list--single {
    grid-template-columns: minmax(0, 1fr);
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
  }

  .expectations-list--single .expectation {
    border-left: none;
    padding: 1.75rem 2rem;
    text-align: center;
  }

  .expectations-list--single .expectation h4 {
    font-size: 1rem;
  }

  .expectations-list--single .expectation ul li {
    font-size: 0.9rem;
    padding-left: 0;
  }

  .expectations-list--single .expectation ul li::before {
    content: none;
  }

  .expectations-footer {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .expectations-footer p {
    max-width: none;
  }

  .expectations-footer a {
    color: var(--black);
    border-bottom: 1px solid rgba(74, 74, 74, 0.35);
    transition: border-color 0.2s ease, color 0.2s ease;
  }

  .expectations-footer a:hover {
    color: var(--black);
    border-color: rgba(26, 26, 26, 0.6);
  }

  .text-link {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--dark-grey);
    border-bottom: 1px solid rgba(74, 74, 74, 0.35);
    width: fit-content;
    transition: border-color 0.2s ease, color 0.2s ease;
  }

  .text-link:hover {
    color: var(--black);
    border-color: rgba(26, 26, 26, 0.6);
  }

  .inline-link {
    color: var(--black);
    border-bottom: 1px solid rgba(74, 74, 74, 0.35);
    transition: border-color 0.2s ease, color 0.2s ease;
  }

  .inline-link:hover,
  .inline-link:focus-visible {
    color: var(--black);
    border-color: rgba(26, 26, 26, 0.6);
  }

.socials-image {
  max-width: var(--max-width);
  padding: 0 2.5rem 2rem;
  margin: 0 auto;
}

.socials-image img {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: block;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
}
  
  .fellowship-list {
    list-style: none;
    margin: 1rem 0;
    padding-left: 1rem;
    border-left: 3px solid var(--light-grey);
    clear: none;
  }
  
  .fellowship-list li {
    font-size: 0.85rem;
    color: var(--dark-grey);
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
  }
  
  .fellowship-list li:last-child {
    margin-bottom: 0;
  }
  
  /* MARS Page */
  .mars-hero-image {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 5rem 2.5rem 0 2.5rem;
  }
  
  .mars-hero-image img {
    width: 100%;
    max-width: var(--max-width);
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    border-radius: 0;
  }
  
  .mars-header {
    padding-top: 1rem;
    padding-bottom: 0;
  }
  
  .mars-header h1 {
    margin-bottom: 0.25rem;
  }
  
  .mars-tagline {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--dark-grey);
    max-width: none;
    margin-bottom: 0;
  }
  
  .mars-section {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
  
  .mars-content {
    max-width: 100%;
  }
  
  .mars-content > p {
    margin-bottom: 1rem;
    max-width: 100%;
  }

  .mars-content > p:first-of-type {
    font-size: 0.95rem;
    color: var(--dark-grey);
  }
  
  .mars-content h2 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
  }

  .mars-content h2:first-of-type {
    margin-top: 1.5rem;
  }
  
  /* MARS Interactive Timeline */
  .timeline-container {
    margin: 2rem 0;
  }

  .timeline-detail {
    background: var(--cream);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-top: 1rem;
    min-height: 100px;
    border: 1px solid rgba(141, 141, 141, 0.2);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
  }

  .timeline-detail--hidden {
    display: none;
  }

  .timeline-hint {
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    color: var(--mid-grey);
    text-align: center;
    letter-spacing: 0.02em;
  }

  .timeline-detail h4 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
    color: var(--black);
  }

  .timeline-detail p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
    color: var(--dark-grey);
    max-width: none;
  }

  .timeline-scroll {
    overflow-x: auto;
    padding: 1rem 0 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(126, 66, 51, 0.3) transparent;
  }

  .timeline-scroll::-webkit-scrollbar {
    height: 6px;
  }

  .timeline-scroll::-webkit-scrollbar-track {
    background: transparent;
  }

  .timeline-scroll::-webkit-scrollbar-thumb {
    background: rgba(126, 66, 51, 0.3);
    border-radius: 3px;
  }

  .timeline-track {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-width: max-content;
    padding: 0 0.5rem;
  }

  .timeline-connector {
    height: 2px;
    background: rgba(126, 66, 51, 0.35);
    position: relative;
    margin: 1.25rem 0.35rem 0;
    flex-shrink: 0;
    width: 2.5rem;
  }

  .timeline-connector[data-duration="1 week"] {
    width: 2.5rem;
  }

  .timeline-connector[data-duration="8-12 weeks"] {
    width: 12rem;
  }

  .timeline-connector[data-duration]::before {
    content: attr(data-duration);
    position: absolute;
    top: -1.6rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--mid-grey);
    white-space: nowrap;
  }

  .timeline-connector[data-duration]::after {
    content: '↓';
    position: absolute;
    top: -0.9rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.55rem;
    color: var(--mid-grey);
    line-height: 1;
  }

  .timeline-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
  }

  .timeline-point:hover .timeline-number {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(126, 66, 51, 0.3);
  }

  .timeline-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--white);
    border: 2px solid rgba(126, 66, 51, 0.4);
    color: var(--dark-grey);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    border-radius: 50%;
    transition: all 0.2s ease;
  }

  .timeline-point.active .timeline-number {
    background: #7e4233;
    border-color: #7e4233;
    color: var(--white);
    box-shadow: 0 4px 12px rgba(126, 66, 51, 0.35);
  }

  .timeline-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.3;
    color: var(--mid-grey);
    transition: color 0.2s ease;
    text-align: center;
  }

  .timeline-point.active .timeline-label {
    color: #7e4233;
    font-weight: 600;
  }

  .timeline-point:hover .timeline-label {
    color: var(--dark-grey);
  }
  
  .mars-working-image {
    margin: 1.5rem 0;
    text-align: center;
  }
  
  .mars-working-image img {
    width: 60%;
    min-width: 300px;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
  }

  .mars-feature {
    padding: 1.25rem;
    border-left: 3px solid var(--light-grey);
  }
  
  .mars-feature h4 {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
  }
  
  .mars-feature p {
    margin-bottom: 0;
    font-size: 0.8rem;
  }
  
  /* Mentors Grid */
  .mentors-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
    margin: 1.5rem 0;
  }
  
  .mentor {
    text-align: center;
    padding: 1rem 0.75rem;
    background: rgba(250, 246, 240, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(141, 141, 141, 0.15);
  }
  
  .mentor-photo {
    width: 100px;
    height: 100px;
    object-fit: cover;
    background: var(--cream);
    border-radius: 50%;
    margin-bottom: 0.75rem;
    border: 2px solid rgba(126, 66, 51, 0.2);
  }
  
  .mentor h4 {
    font-family: var(--font-serif);
    font-size: 0.85rem;
    font-weight: 400;
    margin-bottom: 0.25rem;
  }
  
  .mentor-org {
    font-size: 0.7rem;
    color: var(--mid-grey);
    margin-bottom: 0.15rem;
  }
  
  .mentor-area {
    font-size: 0.65rem;
    color: var(--mid-grey);
    font-style: italic;
    margin-bottom: 0;
  }
  
  /* Research Grid */
  .research-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 1.5rem 0;
  }
  
  .research-card {
    display: block;
    padding: 1.5rem;
    background: var(--cream);
    border-radius: 12px;
    border: 1px solid rgba(141, 141, 141, 0.2);
    border-top: 4px solid rgba(126, 66, 51, 0.6);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
  }
  
  .research-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  }
  
  .research-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
  }
  
  .research-cohort {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #7e4233;
    padding: 0.35rem 0.6rem;
    border: 1px solid rgba(126, 66, 51, 0.35);
    border-radius: 4px;
    background: rgba(126, 66, 51, 0.08);
  }
  
  .research-type {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--mid-grey);
  }
  
  .research-card h4 {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 0.75rem;
  }
  
  .research-authors {
    font-size: 0.8rem;
    color: var(--dark-grey);
    line-height: 1.5;
    margin-bottom: 0;
  }

  .research-status {
    font-size: 0.75rem;
    color: var(--mid-grey);
    font-style: italic;
    margin-top: 0.5rem;
    margin-bottom: 0;
  }
  
  .author-highlight {
    background: rgba(126, 66, 51, 0.2);
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
  }
  
  .view-all-link {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--dark-grey);
    border-bottom: 1px solid var(--light-grey);
    margin-top: 0.5rem;
    transition: all 0.2s ease-out;
  }
  
  .view-all-link:hover {
    color: var(--black);
    border-color: var(--black);
  }
  
  /* Alumni */
  .alumni-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 1.5rem 0;
  }
  
  .alumni {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--cream);
    border-radius: 12px;
  }
  
  .alumni-photo {
    width: 100%;
    aspect-ratio: 1;
    background: var(--light-grey);
    border-radius: 4px;
    margin-bottom: 1.25rem;
  }
  
  .alumni-content {
    flex: 1;
  }
  
  .alumni-content h4 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0.25rem;
  }
  
  .alumni-role {
    font-size: 0.8rem;
    color: var(--mid-grey);
    margin-bottom: 1rem;
  }
  
  .alumni-quote {
    font-size: 0.85rem;
    font-style: italic;
    margin-bottom: 1rem;
    max-width: 100%;
  }
  
  .alumni-cohort {
    font-size: 0.7rem;
    color: var(--mid-grey);
    margin-bottom: 0;
  }
  
  /* MARS Application */
  .mars-application {
    margin-top: 3rem;
    padding: 2.5rem 2rem;
    border-top: 1px solid var(--light-grey);
    clear: both;
    text-align: center;
    background: rgba(250, 246, 240, 0.7);
    border-radius: 12px;
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.06);
  }
  
  .mars-application h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
  }
  
  .application-notice {
    font-size: 1rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 1rem;
  }
  
  .mars-application p {
    margin-bottom: 1.5rem;
    max-width: 100%;
  }

  .modal-open {
    overflow: hidden;
  }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
  }

  .modal-overlay.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
  }

  .modal {
    width: min(600px, 92vw);
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e6e6e6;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    height: 90vh;
    min-height: 0;
  }

  .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #ededed;
    background: #ffffff;
  }

  .modal-header h3 {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--black);
    margin: 0;
  }

  .modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--dark-grey);
  }

  .modal-close:hover {
    color: var(--black);
  }

  .modal-body {
    position: relative;
    flex: 1 1 auto;
    background: #ffffff;
    min-height: 0;
    padding: 0;
    display: flex;
    overflow: hidden;
  }

  .modal-body iframe {
    width: 100%;
    height: 100%;
    min-height: 500px;
    border: none;
    background: #ffffff;
  }
  
  /* ==========================================================================
     8. Footer
     ========================================================================== */
  footer {
    padding: var(--space-10);
    max-width: var(--max-width);
    margin: 0 auto;
    margin-top: var(--space-2);
    background: rgba(255, 255, 255, 0.5);
  }

  .footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--space-12);
  }
  
  .footer-legal {
    font-size: 0.68rem;
    color: var(--mid-grey);
    line-height: 1.7;
    max-width: 50ch;
  }
  
  .footer-legal a {
    border-bottom: 1px solid var(--light-grey);
  }
  
  .footer-legal a:hover { color: var(--black); }
  
  .footer-copy {
    font-size: 0.68rem;
    color: var(--mid-grey);
    white-space: nowrap;
    align-self: flex-end;
    margin-bottom: -0.15rem;
  }
  
  /* ==========================================================================
     9. Responsive
     ========================================================================== */
  @media (max-width: 800px) {
    .hero,
    .mission,
    .cta-inner,
    .about-grid {
      grid-template-columns: 1fr;
      gap: var(--space-8);
    }

    .fellowship-image {
      float: none;
      width: 100%;
      max-width: 300px;
      margin: 0 auto 2rem auto;
    }

    .fellowship-tracks {
      grid-template-columns: 1fr;
    }

    .fellowship-features {
      grid-template-columns: 1fr;
    }

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

    .expectations-note {
      white-space: normal;
    }

    .mars-hero-image {
      padding: 4rem 1.5rem 0 1.5rem;
    }


    .mars-hero-image img {
      max-height: 250px;
    }

    .mars-header {
      padding-top: 0.75rem;
      padding-bottom: 0;
    }

    .mars-header h1 {
      margin-bottom: 0.25rem;
      font-size: 2rem;
    }

    .mars-section {
      padding-top: 0.75rem;
    }

    .timeline-point {
      padding: 0.5rem 1rem;
    }

    .timeline-number {
      width: 2rem;
      height: 2rem;
      font-size: 0.75rem;
    }

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

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

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

    .hero-image,
    .mission-image,
    .cta-image {
      justify-content: center;
    }

    .hero-image img,
    .mission-image img {
      max-height: 280px;
    }

    .cta-image img {
      max-width: 180px;
      max-height: 180px;
    }

    .initiative-item {
      grid-template-columns: 1fr;
      gap: 0.5rem;
    }

    .directors {
      grid-template-columns: 1fr;
      gap: var(--space-10);
    }

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

    .footer-inner {
      flex-direction: column;
      align-items: flex-start;
      gap: var(--space-4);
    }

    .footer-copy {
      align-self: flex-start;
    }

    .team-section {
      padding-bottom: 2rem;
    }

    .team-group {
      margin-bottom: var(--space-6);
    }

    .socials-image {
      padding: 0 1.5rem 1.5rem;
    }

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

    .home-event-item {
      grid-template-columns: 120px 1fr auto;
      gap: var(--space-4);
    }
  }

  @media (max-width: 600px) {
    .nav-links { display: none; }
    .nav-toggle { display: block; }

    .announcement-banner {
      padding: 0.5rem 0.75rem;
      font-size: 0.7rem;
    }

    .announcement-banner p {
      font-size: 0.7rem;
      line-height: 1.4;
    }

    body.has-banner nav {
      top: 2.5rem;
    }

    body.has-banner .hero {
      padding-top: calc(var(--space-24) + 2.5rem);
    }

    body.has-banner .page-header {
      padding-top: calc(var(--space-24) + 2.5rem);
    }

    .hero { padding-top: var(--space-24); padding-bottom: var(--space-12); }
    .page-header { padding-top: var(--space-24); padding-bottom: var(--space-4); }

    section,
    .divider { padding-left: var(--space-6); padding-right: var(--space-6); }

    .cta { padding-left: var(--space-6); padding-right: var(--space-6); }

    footer { padding: var(--space-8) var(--space-6); }

    .hero-image,
    .mission-image {
      justify-content: center;
    }

    .hero-image img,
    .mission-image img {
      max-height: 240px;
    }

    .cta-inner > div:first-child {
      text-align: center;
    }

    .cta-image {
      justify-content: center;
      margin-top: var(--space-6);
    }

    .cta-image img {
      max-width: 150px;
      max-height: 150px;
      opacity: 0.25;
    }

    .modal {
      width: 100vw;
      max-width: 100vw;
      max-height: 100vh;
      height: 100vh;
      border-radius: 0;
      border: none;
    }

    .modal-overlay {
      padding: 0;
    }

    .modal-header {
      padding: 0.75rem 1rem;
      border-bottom: 1px solid #e6e6e6;
    }

    .modal-body {
      padding: 0;
      flex: 1;
    }

    .modal-body iframe {
      min-height: unset;
      height: 100%;
    }

    .team-list {
      grid-template-columns: 1fr 1fr;
      gap: var(--space-4);
    }

    .team-section {
      padding-top: var(--space-8);
      padding-bottom: var(--space-6);
    }

    .directors {
      margin-bottom: var(--space-8);
    }

    .team-group {
      margin-bottom: var(--space-4);
    }

    .team-group h2 {
      margin-bottom: var(--space-4);
    }

    .socials-image {
      padding: 0 1.5rem 1.5rem;
    }

    .socials-image img {
      max-width: none;
    }

    .fellowship-faq {
      padding: var(--space-6);
    }

    .faq-header {
      align-items: flex-start;
    }

    .faq-intro {
      max-width: none;
    }
  
    .mentors-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: var(--space-4);
    }
  
    .mars-header {
      padding-top: 1.25rem !important;
      padding-bottom: 0 !important;
    }
  
    .mars-header h1 {
      margin-bottom: 0.5rem;
      font-size: 1.75rem;
    }
  
    .mars-tagline {
      margin-bottom: 0.75rem;
    }
  
    .mars-section {
      padding-top: 1rem;
    }

    .mars-content h2 {
      margin-top: 1.75rem;
      margin-bottom: 0.75rem;
    }

    .mars-working-image {
      margin: 1.25rem 0;
    }

    .mentors-grid,
    .research-grid {
      margin: 1.25rem 0;
    }

    .mars-application {
      padding: 2rem 2.5rem;
    }

    .timeline-detail {
      padding: 1rem 1.25rem;
      min-height: 80px;
    }

    .timeline-detail h4 {
      font-size: 1rem;
    }

    .timeline-detail p {
      font-size: 0.9rem;
    }

    .timeline-scroll {
      scroll-snap-type: x mandatory;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
    }

    .timeline-scroll::-webkit-scrollbar {
      display: none;
    }

    .timeline-track {
      justify-content: flex-start;
      padding: 0 calc(50% - 4rem);
    }

    .timeline-point {
      scroll-snap-align: center;
      padding: 0;
      min-width: 3.5rem;
    }

    .timeline-number {
      width: 2.25rem;
      height: 2.25rem;
      font-size: 0.8rem;
    }

    .timeline-label {
      font-size: 0.7rem;
    }

    .timeline-connector {
      margin: 1.125rem 0 0;
      width: 1rem;
    }

    .timeline-connector[data-duration="8-12 weeks"] {
      width: 5rem;
    }

    .timeline-connector[data-duration]::before {
      font-size: 0.4rem;
      top: -1.4rem;
    }

    .timeline-connector[data-duration]::after {
      font-size: 0.45rem;
      top: -0.8rem;
    }

    .home-event-item {
      grid-template-columns: 1fr;
      gap: var(--space-2);
    }

    .home-event-arrow {
      display: none;
    }

    .events-header {
      flex-wrap: wrap;
      align-items: center;
      gap: var(--space-2);
    }

    .events-header h2 {
      display: flex;
      align-items: center;
      gap: var(--space-3);
    }

    .easter-egg-img {
      width: 40px;
      height: 40px;
    }

    .events-link {
      margin-left: auto;
    }

    .event-cover {
      height: 140px;
    }

    /* Center headings on mobile */
    .page-header {
      text-align: center;
    }

    .page-header h1,
    .page-header p {
      margin-left: auto;
      margin-right: auto;
    }

    .mars-header {
      text-align: center;
    }

    .mars-header h1,
    .mars-tagline {
      margin-left: auto;
      margin-right: auto;
    }

    .fellowship-content h2,
    .fellowship-block h2,
    .fellowship-application h2,
    .socials-content h2,
    .expectations-section h2 {
      text-align: center;
    }

    .fellowship-application {
      padding: 1.5rem 1.25rem 1.75rem;
      text-align: center;
      margin-top: 2rem;
      margin-bottom: 2rem;
    }

    .fellowship-application p {
      font-size: 0.85rem;
    }

    .fellowship-application h2 {
      font-size: 1.35rem;
    }

    .application-deadline {
      font-size: 0.8rem;
    }
  }

/* ==========================================================================
   10. Warmth & Delight Enhancements
   ========================================================================== */

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  z-index: 1001;
  pointer-events: none;
}

.reading-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg,
    rgba(126, 66, 51, 0.6) 0%,
    rgba(126, 66, 51, 0.85) 50%,
    rgba(126, 66, 51, 0.6) 100%
  );
  border-radius: 0 2px 2px 0;
  transition: width 0.1s ease-out;
}

.fellowship-page .reading-progress-fill {
  background: #ffffff;
}

/* Warm text selection */
::selection {
  background: rgba(126, 66, 51, 0.2);
  color: var(--black);
}

::-moz-selection {
  background: rgba(126, 66, 51, 0.2);
  color: var(--black);
}

.dark-bg::selection,
.dark-bg *::selection {
  background: rgba(255, 255, 255, 0.7);
  color: #111111;
}

.dark-bg::-moz-selection,
.dark-bg *::-moz-selection {
  background: rgba(255, 255, 255, 0.7);
  color: #111111;
}

/* Warm focus states */
.initiative-item:focus-within,
.event-card:focus-within,
.timeline-point:focus-within {
  box-shadow: 0 0 0 3px rgba(126, 66, 51, 0.15), 0 16px 30px rgba(0, 0, 0, 0.08);
}

/* Subtle warm glow on card hovers */
.initiative-item:hover,
.feature:hover,
.expectation:hover,
.track:hover {
  border-color: rgba(126, 66, 51, 0.25);
}

/* Breathing animation for CTA */
@keyframes gentle-pulse {
  0%, 100% {
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.25);
  }
}

.btn-primary:not(:hover) {
  animation: gentle-pulse 3s ease-in-out infinite;
}

/* Natural easing for all transitions */
.initiative-item,
.event-card,
.timeline-point,
.feature,
.expectation,
.track,
.research-card,
.mentor {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   11. Alignment Desk Page
   ========================================================================== */

/* Reduce top padding for desk page */
.desk-section {
  padding-top: 1.5rem;
}

/* Holden quote blockquote */
.desk-quote {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(244, 243, 239, 0.85), rgba(255, 255, 255, 0.92));
  border-left: 4px solid var(--cambridge);
  border-radius: 0 12px 12px 0;
}

.desk-quote p {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--dark-grey);
  margin: 0 0 0.75rem 0;
  max-width: none;
}

.desk-quote cite {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-style: normal;
  color: var(--mid-grey);
}

.desk-quote cite a {
  color: var(--dark-grey);
  border-bottom: 1px solid var(--light-grey);
  transition: border-color 0.2s ease;
}

.desk-quote cite a:hover {
  border-color: var(--dark-grey);
}

/* Gallery variations for desk page */
.desk-gallery-small {
  grid-template-columns: repeat(2, 1fr);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.desk-gallery-single {
  grid-template-columns: 1fr;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.desk-gallery-single img {
  border-radius: 12px;
}

/* Two-column centered row */
.expectations-list--two {
  grid-template-columns: repeat(2, 1fr);
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

/* Single expectation row */
.desk-expectations-single {
  grid-template-columns: 1fr;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.desk-expectations-single .expectation {
  text-align: center;
  border-left: none;
  border-top: 3px solid var(--light-grey);
}

/* Project examples grid */
.desk-projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.desk-project {
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 8px;
  border: 1px solid rgba(224, 224, 224, 0.8);
  font-size: 0.85rem;
  color: var(--dark-grey);
  line-height: 1.5;
}

@media (max-width: 800px) {
  .desk-gallery-small {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

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

/* Logistics with image */
.desk-logistics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: stretch;
  margin: 1.5rem 0;
}

.desk-logistics-text {
  display: grid;
  gap: 0.8rem;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  border: 1px solid rgba(224, 224, 224, 0.8);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.04);
}

.desk-logistics-title {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid-grey);
}

.desk-logistics-item {
  display: grid;
  grid-template-columns: minmax(120px, 0.35fr) 1fr;
  gap: 0.75rem;
  align-items: baseline;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(224, 224, 224, 0.6);
}

.desk-logistics-item:last-of-type {
  padding-bottom: 0;
  border-bottom: none;
}

.desk-logistics-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid-grey);
}

.desk-logistics-value {
  font-size: 0.9rem;
  color: var(--dark-grey);
  max-width: none;
}

.desk-logistics-note {
  margin-top: 0.2rem;
  margin-bottom: 0;
  font-style: italic;
  color: var(--mid-grey);
  max-width: none;
}

.desk-logistics-image img {
  width: 100%;
  height: auto;
  max-height: 100%;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.1);
}

.desk-logistics-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Apply section */
.desk-apply {
  margin: 2.5rem 0 2rem;
  text-align: center;
}

.desk-apply .btn-primary {
  padding: 1.1rem 2.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
}

.desk-section .fellowship-faq {
  margin: 2rem 0 1.25rem;
  padding: 1.5rem;
}

.desk-section .faq-header {
  margin-bottom: 0.75rem;
}

.desk-section .faq-accordion {
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.desk-section .faq-question {
  padding: 1rem 1.25rem;
}

.desk-section .faq-answer {
  padding: 0.25rem 1.25rem 1.1rem;
}

@media (max-width: 800px) {
  .desk-logistics {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .desk-logistics-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .desk-logistics-image img {
    height: auto;
  }

  .desk-logistics-image {
    max-width: 500px;
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .desk-projects {
    grid-template-columns: 1fr;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reading-progress {
    display: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ==========================================================================
   12. Polish Enhancements
   ========================================================================== */

/* External Link Indicator */
a[target="_blank"]:not(.btn):not(.btn-primary):not(.event-card):not(.home-event-item):not(.research-card)::after {
  content: " \2197";
  font-size: 0.75em;
  opacity: 0.6;
  margin-left: 0.15em;
  display: inline-block;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

a[target="_blank"]:not(.btn):not(.btn-primary):not(.event-card):not(.home-event-item):not(.research-card):hover::after {
  opacity: 1;
  transform: translate(1px, -1px);
}

/* Don't show on images or buttons */
.cta-image a::after,
.mentor a::after,
.footer-legal a::after {
  content: none !important;
}

/* Skeleton Loading */
.events-loading {
  padding: var(--space-10) 0;
  color: var(--mid-grey);
  font-size: 0.8rem;
  font-style: italic;
  font-family: var(--font-serif);
}

.skeleton-container {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--light-grey);
}

.skeleton-event {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--space-6);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--light-grey);
}

.skeleton-date,
.skeleton-title,
.skeleton-location {
  background: linear-gradient(90deg, var(--cream) 25%, var(--off-white) 50%, var(--cream) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 4px;
}

.skeleton-date {
  height: 40px;
}

.skeleton-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.skeleton-title {
  height: 20px;
  width: 70%;
}

.skeleton-location {
  height: 14px;
  width: 40%;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--white);
  border: 1px solid var(--light-grey);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 99;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.06);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--cream);
  border-color: rgba(126, 66, 51, 0.3);
  transform: translateY(-2px);
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.06),
    0 8px 20px rgba(0, 0, 0, 0.08);
}

.back-to-top svg {
  width: 18px;
  height: 18px;
  stroke: var(--dark-grey);
  transition: stroke 0.2s ease;
}

.back-to-top:hover svg {
  stroke: var(--cambridge);
}

/* Enhanced Card Hover Lift */
.initiative-item,
.event-card,
.feature,
.expectation,
.track,
.research-card,
.faq-card {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.25s ease;
}

.initiative-item:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.04),
    0 12px 24px rgba(0, 0, 0, 0.06),
    0 24px 40px rgba(0, 0, 0, 0.04);
}

.feature:hover,
.expectation:hover,
.track:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.03),
    0 12px 20px rgba(0, 0, 0, 0.05);
}

/* Form Input Focus Glow */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(126, 66, 51, 0.5);
  box-shadow: 0 0 0 3px rgba(126, 66, 51, 0.1);
}

/* Footer year auto styling */
.footer-copy {
  font-size: 0.68rem;
  color: var(--mid-grey);
  white-space: nowrap;
  align-self: flex-end;
  margin-bottom: -0.15rem;
}

@media (max-width: 600px) {
  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
  }

  .skeleton-event {
    grid-template-columns: 100px 1fr;
  }
}
