/* ============================================
   Cornell SPS Website - Minimalistic Theme
   Inspired by QCA @ Cornell website
   ============================================ */

/* --- Microgramma Bold Extended Font --- */
@font-face {
  font-family: "Microgramma Bold";
  src: url("https://db.onlinewebfonts.com/t/53062a13ae4416854e325ea9f587cc1a.woff2") format("woff2"),
       url("https://db.onlinewebfonts.com/t/53062a13ae4416854e325ea9f587cc1a.woff") format("woff"),
       url("https://db.onlinewebfonts.com/t/53062a13ae4416854e325ea9f587cc1a.ttf") format("truetype");
  font-display: swap;
}

/* --- Eurostile Bold Font (fallback) --- */
@font-face {
  font-family: "Eurostile Bold";
  src: url("https://db.onlinewebfonts.com/t/b45ccc8571dd5b8fef51a0900814da5d.woff2") format("woff2"),
       url("https://db.onlinewebfonts.com/t/b45ccc8571dd5b8fef51a0900814da5d.woff") format("woff"),
       url("https://db.onlinewebfonts.com/t/b45ccc8571dd5b8fef51a0900814da5d.ttf") format("truetype");
  font-display: swap;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --sps-blue: #1a3a5c;
  --sps-blue-light: #2d6aa0;
  --sps-blue-dark: #0f2440;
  --sps-accent: #b31b1b; /* Cornell red */
  --text-primary: #1a1a1a;
  --text-secondary: #6b7280;
  --bg-white: #ffffff;
  --bg-gray: #f9fafb;
  --border-light: #e5e7eb;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius: 8px;
  --transition: 0.3s ease;
  --max-width: 1200px;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-primary);
  background: url('../images/decorative/Clark.jpg') no-repeat center center fixed;
  background-size: cover;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

a {
  color: var(--sps-blue-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--sps-accent);
}

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

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-light);
  transition: transform var(--transition);
}

.navbar.hidden {
  transform: translateY(-100%);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--sps-blue);
  letter-spacing: -0.02em;
}

.nav-logo:hover {
  color: var(--sps-blue-light);
}

.nav-logo-img {
  height: 32px;
  width: auto;
}

.nav-cornell-img {
  height: 28px;
  width: auto;
}

.nav-logo-text {
  font-size: 1.125rem;
  font-weight: 600;
}

/* --- Desktop Nav Links --- */
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.nav-link {
  padding: 0.4rem 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover {
  color: var(--sps-blue);
  background: var(--bg-gray);
}

/* Hide hamburger on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 60;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Sidebar --- */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: var(--bg-gray);
  z-index: 45;
  transform: translateX(100%);
  transition: transform var(--transition);
  padding-top: 5rem;
}

.sidebar.active {
  transform: translateX(0);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
}

.sidebar-link {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
  transition: background var(--transition);
}

.sidebar-link:hover {
  background: var(--border-light);
  color: var(--sps-blue);
}

/* --- Main Content --- */
.site-main {
  padding-top: 4rem;
  flex: 1;
}

/* --- Page Container --- */
.page-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem;
  background: #ffffff;
  border-radius: var(--radius);
  margin-top: 1rem;
  margin-bottom: 1rem;
}

/* --- Solid white page container (no inner boxes) --- */
.page-container--solid {
  background: #ffffff;
}

.page-container--solid .page-header-box {
  background: none;
  padding-left: 0;
  padding-right: 0;
}

.page-container--solid .link-card {
  background: var(--bg-gray);
}

.page-container--solid .hero-label {
  background: none;
  padding: 0;
  border-radius: 0;
}

.page-container--solid .about-desc-box {
  background: none;
  padding: 0;
}

/* --- Page Title --- */
.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  background: #ffffff;
  padding: 0.35rem 1.25rem;
  border-radius: 6px;
  width: fit-content;
  margin: 0 auto 2rem;
}

/* --- Page Header Box (wraps title + intro text for readability) --- */
.page-header-box {
  background: #ffffff;
  border-radius: 10px;
  padding: 2rem 2.5rem 1.75rem;
  margin-bottom: 2.5rem;
  text-align: center;
}

.page-header-box .page-title {
  background: none;
  padding: 0;
  border-radius: 0;
  margin-bottom: 1rem;
}

.page-header-box .section-subtitle {
  margin-bottom: 0;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
  padding: 4rem 2rem;
  background: rgba(255, 255, 255, 0.75);
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  color: var(--sps-blue);
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* --- Interactive Hero (Home Page) --- */
.hero-interactive {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  padding: 2rem;
}

.hero-logo-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

.hero-label {
  font-size: 3rem;
  font-weight: 700;
  color: var(--sps-blue);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin: 0;
}

/* White text block for hero-label on inner pages (e.g. About "Cornell SPS") */
.page-container .hero-label {
  background: #ffffff;
  display: inline-block;
  padding: 0.3rem 1.25rem;
  border-radius: 6px;
}

.hero-org-name {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--sps-blue);
  letter-spacing: 0.02em;
  margin: 0;
}

.logo-wrapper {
  /* Responsive: at least 280px, ideally 50% of viewport height, capped at 520px */
  width: clamp(280px, 50vh, 520px);
  height: clamp(280px, 50vh, 520px);
  flex-shrink: 0;
  margin: 0.5rem 0;
}

#sps-logo {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-interactive .hero-subtitle {
  max-width: 550px;
  margin-bottom: 1.5rem;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  transition: opacity 0.6s ease;
}

.scroll-hint svg {
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* --- About Page Hero --- */
.about-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-light);
}

.about-logo {
  width: 200px;
  height: 200px;
  object-fit: contain;
  margin: 0.75rem 0;
}

.about-hero .about-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--sps-blue);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.about-hero .about-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 650px;
  line-height: 1.7;
  margin: 0 0 0.5rem;
}

/* White box wrapping the "since founding" description */
.about-desc-box {
  background: #ffffff;
  border-radius: 10px;
  padding: 1.75rem 2rem;
  max-width: 700px;
  text-align: center;
  margin-top: 0.5rem;
}

/* --- About Page Timeline --- */
.about-timeline {
  position: relative;
  padding-left: 36px;
  margin-top: 1rem;
}

/* Vertical connecting line */
.about-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--sps-blue);
}

/* Each timeline item */
.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

/* Blue dot bullet – centered on the vertical line
   Line center = left 7px + 1px (half of 2px width) = 8px from container.
   Dot 16px wide → left edge at 8 - 8 = 0px from container.
   Item starts at padding-left 36px → dot left = 0 - 36 = -36px from item. */
.timeline-dot {
  position: absolute;
  left: -36px;
  top: 1.6rem;
  width: 16px;
  height: 16px;
  background: var(--sps-blue);
  border-radius: 50%;
  z-index: 2;
}

/* White card for each block */
.timeline-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--sps-blue);
  overflow: hidden; /* clip child image to card radius */
}

/* Inner flex layout for text + image */
.timeline-content {
  display: flex;
  align-items: stretch;
  min-height: 160px;
}

.timeline-text {
  flex: 1;
  min-width: 0;
  padding: 1.75rem 2rem;
}

.timeline-text h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.timeline-text p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.timeline-text .btn {
  margin-top: 0.25rem;
  margin-right: 0.5rem;
}

/* Decorative image area – fills full card height edge-to-edge */
.timeline-image {
  width: 200px;
  flex-shrink: 0;
}

.timeline-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

/* --- Content Card (reusable white box with border) --- */
.content-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 2rem 2.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  margin-bottom: 2rem;
}

.content-card:last-child {
  margin-bottom: 0;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--sps-blue);
  color: white;
}

.btn-primary:hover {
  background: var(--sps-blue-light);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--sps-blue);
  border: 1.5px solid var(--sps-blue);
}

.btn-outline:hover {
  background: var(--sps-blue);
  color: white;
  transform: translateY(-1px);
}

/* --- Sections --- */
.section {
  padding: 4rem 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-alt {
  background: rgba(249, 250, 251, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.section-alt .section {
  padding: 4rem 2rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

/* --- Card Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 1px solid var(--border-light);
}

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

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-body {
  padding: 1.25rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card-text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- People Grid (E-Board) --- */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  justify-items: center;
}

.person-card {
  width: 220px;
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  text-align: center;
  border: 1px solid var(--border-light);
}

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

.person-card a {
  color: inherit;
}

.person-image {
  width: 220px;
  height: 220px;
  object-fit: cover;
}

.person-info {
  padding: 1rem;
}

.person-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.person-role {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* --- Tabs --- */
.tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.tab-btn {
  padding: 0.5rem 1.25rem;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  border-bottom: 2px solid transparent;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--sps-blue);
  border-bottom-color: var(--sps-blue);
}

/* --- Info Blocks --- */
.info-block {
  margin-bottom: 3rem;
}

.info-block h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.info-block p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  max-width: 800px;
}

.info-block .btn {
  margin-top: 0.5rem;
}

/* --- Link Cards --- */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.link-card {
  display: block;
  padding: 1.5rem;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.link-card:hover {
  border-color: var(--sps-blue-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.link-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.link-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- Event Tabs (QCA-style toggle) --- */
.event-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 2.5rem;
}

.event-tab-btn {
  padding: 0.65rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid var(--sps-blue);
  background: transparent;
  color: var(--text-primary);
}

.event-tab-btn:first-child {
  border-radius: var(--radius) 0 0 var(--radius);
  border-right: 1px solid var(--sps-blue);
}

.event-tab-btn:last-child {
  border-radius: 0 var(--radius) var(--radius) 0;
  border-left: 1px solid var(--sps-blue);
}

.event-tab-btn.active {
  background: var(--sps-blue);
  color: #fff;
}

.event-tab-btn:not(.active):hover {
  background: rgba(26, 58, 92, 0.08);
}

/* --- Event Cards (QCA-style block layout) --- */
.event-cards {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.event-card {
  display: flex;
  background: var(--bg-gray);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

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

.event-card.hidden {
  display: none;
}

.event-card-image {
  width: 280px;
  min-height: 200px;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sps-blue) 0%, var(--sps-blue-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.event-card-image--placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.event-card-image--placeholder svg {
  width: 56px;
  height: 56px;
}

.event-card-body {
  flex: 1;
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.event-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.event-card-title a {
  color: var(--text-primary);
}

.event-card-title a:hover {
  color: var(--sps-blue);
}

.event-card-meta {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
  display: flex;
  gap: 0.75rem;
}

.event-card-label {
  font-weight: 600;
  color: var(--text-primary);
  min-width: 70px;
}

.event-card-desc {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.event-empty {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1rem;
  margin-top: 2rem;
}

/* --- Wiki Section --- */
.wiki-hero {
  text-align: center;
  padding: 3rem 0;
}

.wiki-hero p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

/* --- Contact Form --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 900px;
  margin: 0 auto;
}

.contact-info h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
}

.contact-link:hover {
  color: var(--sps-blue);
}

.contact-form-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* --- News Section (Homepage) --- */
.news-list {
  max-width: 800px;
  margin: 0 auto;
}

/* --- Two-Column Feature --- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
}

.feature-row.reverse {
  direction: rtl;
}

.feature-row.reverse > * {
  direction: ltr;
}

.feature-image {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.feature-content h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.feature-content p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* --- Footer --- */
.site-footer {
  background: rgba(249, 250, 251, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-light);
  padding: 3rem 2rem;
  margin-top: auto;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.footer-address {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  transition: color var(--transition);
}

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

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.footer-eeo {
  font-size: 0.8125rem;
}

.footer-eeo a {
  color: var(--text-secondary);
}

.footer-eeo a:hover {
  color: var(--sps-blue);
}

/* --- Responsive --- */

/* Mid-size screens: shrink timeline images gracefully */
@media (max-width: 960px) {
  .timeline-image {
    width: 160px;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .page-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

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

  .people-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .person-card {
    width: 160px;
  }

  .person-image {
    width: 160px;
    height: 160px;
  }

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

  .feature-row,
  .feature-row.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }

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

  /* Event cards stack vertically on mobile */
  .event-card {
    flex-direction: column;
  }

  .event-card-image {
    width: 100%;
    min-height: 160px;
    max-height: 200px;
  }

  .event-card-body {
    padding: 1.25rem 1.5rem;
  }

  .event-tab-btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
  }

  .logo-wrapper {
    width: clamp(200px, 40vh, 340px);
    height: clamp(200px, 40vh, 340px);
  }

  .hero-org-name {
    font-size: 1.75rem;
  }

  .hero-label {
    font-size: 2.25rem;
  }

  .about-logo {
    width: 160px;
    height: 160px;
  }

  /* Timeline responsive */
  .about-timeline {
    padding-left: 28px;
  }

  /* Line center = 5 + 1 = 6px. Dot 12px wide → left = 6-6 = 0 from container. Item at 28px → 0-28 = -28px */
  .timeline-dot {
    left: -28px;
    width: 12px;
    height: 12px;
  }

  .about-timeline::before {
    left: 5px;
  }

  .timeline-content {
    flex-direction: column;
    gap: 1rem;
  }

  /* On mobile, image always goes below text regardless of left/right */
  .timeline-image--left {
    order: 1;
  }

  .timeline-image {
    width: 100%;
    height: 180px;
  }

  .timeline-text {
    padding: 1.25rem 1.5rem;
  }

  .about-desc-box {
    padding: 1.25rem 1.25rem;
  }

  .content-card {
    padding: 1.5rem 1.25rem;
  }

  /* Adjust main padding to match shorter mobile navbar */
  .site-main {
    padding-top: 3.25rem;
  }

  /* Switch to hamburger mode on compact screens */
  .navbar {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
  }

  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .section {
    padding: 3rem 1rem;
  }

  .page-container {
    padding: 2rem 1rem;
  }

  .page-header-box {
    padding: 1.5rem 1.25rem 1.25rem;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 60vh;
    padding: 3rem 1rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .logo-wrapper {
    width: clamp(180px, 38vh, 280px);
    height: clamp(180px, 38vh, 280px);
  }

  .hero-label {
    font-size: 1.75rem;
  }

  .hero-org-name {
    font-size: 1.35rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

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

  .tabs {
    flex-wrap: wrap;
  }
}
