/* ============================================================
   RESET & ROOT
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --garnet: #8B1A2B;
  --garnet-dark: #6a1020;
  --garnet-light: #b52236;
  --navy: #0f1e3d;
  --navy-light: #1a3060;
  --white: #ffffff;
  --off-white: #f8f6f7;
  --light-gray: #f0eced;
  --text-dark: #1a1215;
  --text-mid: #4a3a3e;
  --text-light: #7a6a6e;
  --border: #e8dfe1;
  --shadow: 0 4px 24px rgba(139,26,43,0.10);
  --shadow-lg: 0 12px 48px rgba(139,26,43,0.16);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--white);
  color: var(--text-dark);
  overflow-x: hidden;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}
.navbar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.08); }

.nav-logo { display: flex; align-items: center; gap: 0.75rem; }
.nav-logo-mark {
  width: 38px; height: 38px;
  background: var(--garnet);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.nav-logo-text { font-weight: 700; font-size: 0.95rem; color: var(--text-dark); }
.nav-logo-sub { font-size: 0.75rem; color: var(--text-light); font-weight: 400; display: block; }

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { font-size: 0.88rem; font-weight: 500; color: var(--text-mid); transition: color 0.2s; }
.nav-links a:hover { color: var(--garnet); }

.nav-btn {
  padding: 0.5rem 1.25rem;
  background: var(--garnet);
  color: white !important;
  border-radius: 8px;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  transition: background 0.2s, transform 0.2s !important;
}
.nav-btn:hover { background: var(--garnet-dark) !important; transform: translateY(-1px); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  background: var(--navy);
  background-image: url('https://www.arcadia.edu/wp-content/uploads/2022/02/07/default-castle.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7rem 2rem 5rem;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,30,61,0.93) 0%, rgba(139,26,43,0.75) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 860px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.1rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  margin-bottom: 1.75rem;
  letter-spacing: 0.5px;
}
.hero-badge .dot {
  width: 7px; height: 7px;
  background: #ff6b6b;
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.6;transform:scale(1.4)} }

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 900;
  color: white;
  line-height: 1.08;
  margin-bottom: 1.25rem;
}
.hero h1 .accent { color: #ff9aa6; }

.hero-desc {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

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

.btn-white {
  padding: 0.85rem 2.25rem;
  background: white;
  color: var(--garnet);
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  display: inline-block;
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.2); color: var(--garnet); }

.btn-outline-white {
  padding: 0.85rem 2.25rem;
  background: transparent;
  color: white;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
}
.btn-outline-white:hover { border-color: white; background: rgba(255,255,255,0.1); color: white; }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.stat-num { font-size: 2.4rem; font-weight: 800; color: white; }
.stat-lbl { font-size: 0.78rem; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 1px; margin-top: 0.2rem; }

/* ============================================================
   SECTION BASE
   ============================================================ */
section { padding: 6rem 2rem; }
.container { max-width: 1200px; margin: 0 auto; }

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--garnet);
  margin-bottom: 0.75rem;
  display: block;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}
.section-sub {
  font-size: 1rem;
  color: var(--text-light);
  max-width: 560px;
}
.section-header { margin-bottom: 3.5rem; }
.section-header.centered { text-align: center; }
.section-header.centered .section-sub { margin: 0 auto; }

/* ============================================================
   ABOUT
   ============================================================ */
.about { background: var(--off-white); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.feature-card {
  padding: 1.5rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: all 0.3s ease;
}
.feature-card:hover {
  border-color: var(--garnet);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.feature-icon { font-size: 1.8rem; margin-bottom: 0.6rem; }
.feature-card h4 { font-size: 0.9rem; font-weight: 700; color: var(--text-dark); margin-bottom: 0.3rem; }
.feature-card p { font-size: 0.8rem; color: var(--text-light); line-height: 1.5; }

/* ============================================================
   RESEARCHERS
   ============================================================ */
.researchers { background: white; }

.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.filter-btn {
  padding: 0.45rem 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  background: white;
  color: var(--text-mid);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--garnet);
  border-color: var(--garnet);
  color: white;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.student-card {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.23,1,0.32,1);
}
.student-card:hover {
  border-color: var(--garnet);
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.card-photo {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: var(--light-gray);
  position: relative;
}
.card-photo img {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  transition: transform 0.4s ease;
}
.student-card:hover .card-photo img { transform: scale(1.04); }

.card-photo-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--garnet), var(--navy));
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  letter-spacing: 1px;
}
.card-sport-tag {
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  padding: 0.25rem 0.7rem;
  background: var(--garnet);
  color: white;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.card-body { padding: 1.25rem 1.5rem 1rem; }
.card-name { font-size: 1.05rem; font-weight: 700; color: var(--text-dark); margin-bottom: 0.15rem; }
.card-degree { font-size: 0.78rem; color: var(--text-light); margin-bottom: 0.6rem; }
.card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.45;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}
.keyword-tag {
  padding: 0.2rem 0.6rem;
  background: rgba(139,26,43,0.07);
  color: var(--garnet);
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.card-footer {
  padding: 0.85rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-email { font-size: 0.72rem; color: var(--text-light); }
.card-cta {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--garnet);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.85rem;
  border: 1.5px solid var(--garnet);
  border-radius: 50px;
  transition: background 0.2s, color 0.2s;
}
.student-card:hover .card-cta {
  background: var(--garnet);
  color: white;
}

/* Loading state */
.loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-light);
}
.loader {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--garnet);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

.no-results {
  text-align: center;
  padding: 3rem;
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ============================================================
   TIMELINE / HISTORY
   ============================================================ */
.timeline-section { background: var(--off-white); }

.timeline {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--garnet), rgba(139,26,43,0.1));
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.75rem;
  position: relative;
}
.timeline-item:nth-child(odd) { flex-direction: row-reverse; }
.timeline-item:nth-child(odd) .timeline-content { margin-right: auto; }

.timeline-dot {
  width: 14px; height: 14px;
  background: var(--garnet);
  border-radius: 50%;
  border: 3px solid white;
  position: absolute;
  left: 50%;
  top: 1.1rem;
  transform: translateX(-50%);
  z-index: 2;
  box-shadow: 0 0 0 3px rgba(139,26,43,0.2);
  flex-shrink: 0;
}

.timeline-content {
  width: 44%;
  padding: 1.25rem 1.5rem;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  transition: all 0.3s;
}
.timeline-content:hover {
  border-color: var(--garnet);
  box-shadow: var(--shadow);
}

.timeline-year { font-size: 1.4rem; font-weight: 800; color: var(--garnet); margin-bottom: 0.2rem; }
.timeline-desc { font-size: 0.82rem; color: var(--text-light); line-height: 1.5; margin-bottom: 0.5rem; }
.timeline-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--garnet);
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.2s;
}
.timeline-link:hover { opacity: 0.75; }
.timeline-restricted {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  background: var(--light-gray);
  color: var(--text-light);
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.timeline-current {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  background: var(--garnet);
  color: white;
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================================
   PROGRAM INFO
   ============================================================ */
.program-section { background: white; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.info-card {
  padding: 2.25rem;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  text-align: center;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.info-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--garnet);
  transform: scaleX(0);
  transition: transform 0.3s;
}
.info-card:hover::before { transform: scaleX(1); }
.info-card:hover {
  border-color: var(--garnet);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}
.info-icon { font-size: 2.2rem; margin-bottom: 1rem; }
.info-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--text-dark); margin-bottom: 0.5rem; }
.info-card p { font-size: 0.85rem; color: var(--text-light); line-height: 1.6; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--navy);
  color: white;
  padding: 3.5rem 2rem 2rem;
  text-align: center;
}
.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}
.footer-logo span { color: #ff9aa6; }
.footer-tagline { font-size: 0.82rem; color: rgba(255,255,255,0.5); margin-bottom: 2rem; }
.footer-links { display: flex; justify-content: center; gap: 2rem; margin-bottom: 2rem; flex-wrap: wrap; }
.footer-links a { font-size: 0.85rem; color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer-links a:hover { color: white; }
.footer-divider { width: 60px; height: 2px; background: var(--garnet); margin: 0 auto 1.5rem; }
.footer-copy { font-size: 0.75rem; color: rgba(255,255,255,0.35); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,30,61,0.7);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.modal-overlay.active { display: flex; }

.modal {
  background: white;
  border-radius: 20px;
  max-width: 620px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  animation: modalIn 0.35s cubic-bezier(0.23,1,0.32,1);
}
@keyframes modalIn { from{opacity:0;transform:scale(0.92) translateY(16px)} to{opacity:1;transform:scale(1) translateY(0)} }

.modal-photo {
  width: 100%; height: 220px;
  overflow: hidden;
  background: var(--light-gray);
  border-radius: 20px 20px 0 0;
  position: relative;
}
.modal-photo img {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center center;
}

.modal-photo-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--garnet), var(--navy));
  font-size: 4rem; font-weight: 800; color: white;
}

.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.9);
  color: var(--text-dark);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  transition: background 0.2s;
  line-height: 1;
}
.modal-close:hover { background: white; }

.modal-body { padding: 1.75rem 2rem 2rem; }

.modal-sport-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(139,26,43,0.1);
  color: var(--garnet);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.modal-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.2rem;
}
.modal-degree { font-size: 0.85rem; color: var(--text-light); margin-bottom: 1rem; }

.modal-project-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.45;
  padding: 1rem 1.25rem;
  background: var(--off-white);
  border-left: 4px solid var(--garnet);
  border-radius: 0 8px 8px 0;
  margin-bottom: 1rem;
}

.modal-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
}

.modal-bio {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--border);
}

.modal-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.modal-btn {
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text-dark);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
}
.modal-btn:hover { border-color: var(--garnet); color: var(--garnet); }
.modal-btn.primary {
  background: var(--garnet);
  color: white;
  border-color: var(--garnet);
}
.modal-btn.primary:hover { background: var(--garnet-dark); color: white; }
.modal-btn.video-btn {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.modal-btn.video-btn:hover { background: var(--navy-light); border-color: var(--navy-light); color: white; }
.modal-btn.disabled, .modal-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.23,1,0.32,1), transform 0.7s cubic-bezier(0.23,1,0.32,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .navbar { padding: 0.75rem 1.5rem; }
  .nav-links { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .info-grid { grid-template-columns: 1fr; }
  .timeline::before { left: 1.5rem; }
  .timeline-item,
  .timeline-item:nth-child(odd) { flex-direction: row; padding-left: 4rem; }
  .timeline-item:nth-child(odd) .timeline-content { margin-right: 0; }
  .timeline-dot { left: 1.5rem; }
  .timeline-content { width: 100%; }
}

@media (max-width: 600px) {
  .hero-stats { gap: 1.5rem; }
  .about-features { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .modal-body { padding: 1.25rem; }
  .modal-actions { flex-direction: column; }
  .modal-btn { width: 100%; text-align: center; }
}

/* ============================================================
   CUSTOM SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--off-white); }
::-webkit-scrollbar-thumb { background: var(--garnet); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--garnet-dark); }
