@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&family=DM+Mono:wght@400;500&display=swap');

:root {
  --navy: #0d1b2a;
  --navy-mid: #1a2f45;
  --navy-light: #243b55;
  --accent: #4a9eff;
  --accent-warm: #f0a500;
  --white: #ffffff;
  --off-white: #f4f7fb;
  --text: #1a1a2e;
  --text-light: #5a6a7a;
  --border: #dde3ea;
  --card-bg: #ffffff;
  --nav-height: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--off-white);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}

/* NAV */
nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(13,27,42,0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(74,158,255,0.18);
  transition: box-shadow 0.3s;
}
nav.scrolled { box-shadow: 0 4px 32px rgba(0,0,0,0.3); }

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.nav-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 0.2rem;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  transition: all 0.2s;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,0.08); }
.nav-links a.active { color: var(--accent); background: rgba(74,158,255,0.12); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.8);
  border-radius: 2px;
  transition: all 0.25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* PAGE HEADER */
.page-header {
  background: var(--navy);
  padding: 2.25rem 2rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 50%, rgba(74,158,255,0.13) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(240,165,0,0.07) 0%, transparent 50%);
}
.page-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--white);
  position: relative;
  z-index: 1;
}
.page-header p {
  color: rgba(255,255,255,0.55);
  margin-top: 0.5rem;
  font-size: 1rem;
  position: relative;
  z-index: 1;
}

/* CONTAINER */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

/* SECTION TITLES */
.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.55rem;
  color: var(--navy);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* CARDS */
.card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(13,27,42,0.07);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 6px 24px rgba(13,27,42,0.12); }

/* PERSON CARD */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.person-card {
  text-align: center;
  background: var(--card-bg);
  border-radius: 14px;
  padding: 1.25rem 1rem 1rem;
  box-shadow: 0 2px 10px rgba(13,27,42,0.07);
  border: 1px solid var(--border);
  transition: transform 0.25s, box-shadow 0.25s;
}
.person-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(13,27,42,0.13); }
.person-card img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.75rem;
  border: 3px solid var(--border);
  transition: border-color 0.2s;
}
.person-card:hover img { border-color: var(--accent); }
.person-card .name { font-weight: 600; font-size: 0.875rem; color: var(--text); margin-bottom: 0.3rem; line-height: 1.3; }
.person-card .email { font-size: 0.72rem; color: var(--accent); text-decoration: none; font-family: 'DM Mono', monospace; word-break: break-all; }
.person-card .email:hover { text-decoration: underline; }

/* PI CARD */
.pi-card {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  background: var(--card-bg);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 2px 16px rgba(13,27,42,0.08);
  border: 1px solid var(--border);
  margin-bottom: 2rem;
  transition: box-shadow 0.25s;
}
.pi-card:hover { box-shadow: 0 8px 32px rgba(13,27,42,0.12); }
.pi-card img {
  width: 190px;
  height: 190px;
  border-radius: 12px;
  object-fit: cover;
  object-position: center 15%;
  flex-shrink: 0;
  border: 3px solid var(--border);
}
.pi-card .pi-info h2 { font-family: 'DM Serif Display', serif; font-size: 1.45rem; color: var(--navy); margin-bottom: 0.25rem; }
.pi-card .pi-info .title { color: var(--accent); font-size: 0.8rem; font-weight: 500; margin-bottom: 0.6rem; letter-spacing: 0.06em; text-transform: uppercase; }
.pi-card .pi-info .email { font-family: 'DM Mono', monospace; font-size: 0.82rem; color: var(--text-light); margin-bottom: 1rem; }
.pi-card .pi-info p { font-size: 0.9rem; color: var(--text-light); line-height: 1.75; }

/* SECTION HEADER */
.section-header { display: flex; align-items: center; gap: 1rem; margin: 2.75rem 0 1.25rem; }
.section-header h2 { font-family: 'DM Serif Display', serif; font-size: 1.25rem; color: var(--navy); white-space: nowrap; }
.section-header .line { flex: 1; height: 1px; background: linear-gradient(to right, var(--border), transparent); }

/* ALUMNI */
.alumni-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.65rem; }
.alumni-item { background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem 1rem; transition: border-color 0.2s; }
.alumni-item:hover { border-color: var(--accent); }
.alumni-item .alumni-name { font-weight: 600; font-size: 0.875rem; color: var(--text); }
.alumni-item .alumni-current { font-size: 0.78rem; color: var(--text-light); margin-top: 0.2rem; }

/* PUBLICATIONS */
.pub-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.75rem; align-items: center; }
.pub-filter-label { font-size: 0.8rem; color: var(--text-light); font-weight: 500; margin-right: 0.25rem; }
.pub-filter-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.28rem 0.85rem;
  font-size: 0.78rem;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.18s;
  font-family: 'DM Mono', monospace;
  font-weight: 500;
}
.pub-filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.pub-filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.pub-list { list-style: none; display: flex; flex-direction: column; gap: 0.8rem; }
.pub-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.4rem;
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.pub-item:hover { box-shadow: 0 4px 16px rgba(13,27,42,0.09); border-color: var(--accent); }
.pub-item.hidden { display: none; }
.pub-num { font-family: 'DM Mono', monospace; font-size: 0.78rem; color: var(--accent); font-weight: 500; min-width: 26px; padding-top: 2px; }
.pub-content { flex: 1; }
.pub-authors { font-size: 0.845rem; color: var(--text-light); line-height: 1.5; margin-bottom: 0.2rem; }
.pub-title { font-size: 0.93rem; font-weight: 600; color: var(--text); line-height: 1.5; margin-bottom: 0.25rem; }
.pub-title a { color: var(--text); text-decoration: none; transition: color 0.2s; }
.pub-title a:hover { color: var(--accent); text-decoration: underline; }
.pub-journal { font-size: 0.83rem; color: var(--accent); font-style: italic; }
.pub-year { font-size: 0.83rem; color: var(--text-light); margin-left: 0.4rem; }

/* HOME HERO */
.hero {
  background: var(--navy);
  padding: 3rem 2rem 2.75rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 30%, rgba(74,158,255,0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 10% 90%, rgba(240,165,0,0.09) 0%, transparent 50%);
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(74,158,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74,158,255,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 65% 50%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 65% 50%, black 20%, transparent 75%);
}
.hero-inner { max-width: 1140px; margin: 0 auto; position: relative; z-index: 1; }
.hero h1 { font-family: 'DM Serif Display', serif; font-size: clamp(2.2rem, 4.5vw, 3.2rem); color: var(--white); line-height: 1.12; margin-bottom: 0.75rem; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p { font-size: 1rem; color: rgba(255,255,255,0.62); max-width: 780px; line-height: 1.75; margin-bottom: 2rem; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(74,158,255,0.1);
  border: 1px solid rgba(74,158,255,0.28);
  color: var(--accent);
  padding: 0.35rem 1rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-stats { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.stat-item { display: flex; flex-direction: column; }
.stat-number { font-family: 'DM Serif Display', serif; font-size: 2rem; color: var(--white); line-height: 1; }
.stat-number span { color: var(--accent); }
.stat-label { font-size: 0.72rem; color: rgba(255,255,255,0.42); letter-spacing: 0.07em; text-transform: uppercase; margin-top: 0.3rem; }

/* HIGHLIGHTS */
.highlights-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.highlight-card {
  background: var(--card-bg);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(13,27,42,0.07);
  border: 1px solid var(--border);
  transition: transform 0.28s cubic-bezier(0.34,1.4,0.64,1), box-shadow 0.28s;
}
.highlight-card:hover { transform: translateY(-5px); box-shadow: 0 12px 36px rgba(13,27,42,0.13); }
.highlight-card img { width: 100%; height: 175px; object-fit: cover; transition: transform 0.4s; display: block; }
.highlight-card:hover img { transform: scale(1.04); }
.highlight-card .hc-body { padding: 1.2rem; }
.highlight-card .hc-title { font-weight: 600; font-size: 0.92rem; color: var(--text); margin-bottom: 0.45rem; line-height: 1.45; }
.highlight-card .hc-authors { font-size: 0.78rem; color: var(--text-light); line-height: 1.5; margin-bottom: 0.4rem; }
.highlight-card .hc-journal { font-size: 0.8rem; color: var(--accent); font-style: italic; }

/* JOIN BANNER */
.join-banner {
  background: linear-gradient(135deg, var(--navy-mid) 0%, var(--navy) 60%);
  border: 1px solid rgba(74,158,255,0.22);
  border-radius: 20px;
  padding: 2.5rem;
  margin-top: 3.5rem;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.join-banner::before {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74,158,255,0.12) 0%, transparent 70%);
}
.join-banner-text { position: relative; z-index: 1; }
.join-banner-text h3 { font-family: 'DM Serif Display', serif; font-size: 1.5rem; color: var(--white); margin-bottom: 0.5rem; }
.join-banner-text p { font-size: 0.9rem; color: rgba(255,255,255,0.6); max-width: 500px; line-height: 1.65; }
.join-btn {
  position: relative; z-index: 1;
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 0.75rem 1.75rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 4px 18px rgba(74,158,255,0.35);
  flex-shrink: 0;
}
.join-btn:hover { background: #3a8ef0; box-shadow: 0 6px 24px rgba(74,158,255,0.5); transform: translateY(-1px); }

/* CONTACT */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.contact-block {
  background: var(--card-bg);
  border-radius: 14px;
  padding: 1.75rem;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(13,27,42,0.06);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-block:hover { border-color: var(--accent); box-shadow: 0 6px 20px rgba(13,27,42,0.1); }
.contact-block h3 { font-family: 'DM Serif Display', serif; font-size: 1.1rem; color: var(--navy); margin-bottom: 0.75rem; }
.contact-block p { font-size: 0.9rem; color: var(--text-light); line-height: 1.85; }
.contact-block a { color: var(--accent); text-decoration: none; }
.contact-block a:hover { text-decoration: underline; }

/* TEACHING */
.course-list { display: flex; flex-direction: column; gap: 0.65rem; }
.course-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.course-item:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(13,27,42,0.08); }
.course-code {
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent);
  min-width: 72px;
  background: rgba(74,158,255,0.08);
  padding: 0.2rem 0.6rem;
  border-radius: 5px;
  text-align: center;
}
.course-name { font-size: 0.92rem; color: var(--text); font-weight: 500; }

/* FOOTER */
footer { background: var(--navy); padding: 2.5rem 2rem; margin-top: 4rem; }
.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-logo { font-family: 'DM Serif Display', serif; font-size: 1rem; color: var(--white); margin-bottom: 0.3rem; }
.footer-logo span { color: var(--accent); }
.footer-copy { font-size: 0.78rem; color: rgba(255,255,255,0.35); margin-top: 0.3rem; }
.footer-links { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.footer-links a { font-size: 0.82rem; color: rgba(255,255,255,0.45); text-decoration: none; padding: 0.3rem 0.7rem; border-radius: 6px; transition: all 0.18s; }
.footer-links a:hover { color: var(--white); background: rgba(255,255,255,0.07); }

/* YEAR BADGES */
.year-badge { display: inline-block; background: rgba(74,158,255,0.1); color: var(--accent); border-radius: 4px; padding: 0.1rem 0.5rem; font-family: 'DM Mono', monospace; font-size: 0.78rem; margin-left: 0.5rem; }

/* SCROLL REVEAL */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 0.07s; }
.reveal.delay-2 { transition-delay: 0.15s; }
.reveal.delay-3 { transition-delay: 0.22s; }
.reveal.delay-4 { transition-delay: 0.29s; }

/* Facilities */
.facilities-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; margin-top: 1.5rem; }
.facility-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: 0 2px 16px rgba(13,27,42,0.08); transition: transform 0.2s, box-shadow 0.2s; }
.facility-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(13,27,42,0.14); }
.facility-card img { width: 100%; height: 240px; object-fit: cover; display: block; }
.facility-card-body { padding: 1.5rem; }
.facility-card-title { font-family: 'DM Serif Display', serif; font-size: 1.2rem; color: var(--navy); margin-bottom: 0.6rem; }
.facility-card-desc { font-size: 0.9rem; color: var(--text-light); line-height: 1.7; }

/* RESPONSIVE */
@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: rgba(13,27,42,0.98);
    backdrop-filter: blur(14px);
    flex-direction: column;
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(74,158,255,0.15);
    gap: 0.3rem;
    z-index: 300;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.6rem 1rem; font-size: 0.95rem; }
  nav { position: sticky; }
  .hero-stats { gap: 1.75rem; }
  .join-banner { flex-direction: column; text-align: center; }
}

@media (max-width: 660px) {
  .pi-card { flex-direction: column; }
  .pi-card img { width: 100%; height: 220px; border-radius: 10px; object-position: center 20%; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .highlights-grid { grid-template-columns: 1fr; }
}
