/* ─── Variables ──────────────────────────────────────────── */
:root {
  --navy:     #032033;
  --accent:   #4D90CB;
  --gray:     #6b7280;
  --dark:     #1f2937;
  --white:    #ffffff;
  --bg:       #f9fafb;
  --border:   #e5e7eb;

  --font-head: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;

  --max-width: 1200px;
  --nav-height: 72px;
  --section-v: 5rem;
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--dark);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ─── Container ──────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ─── Navigation ─────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--navy);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  position: relative;
}

.nav-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  color: var(--white);
  flex-shrink: 0;
}
.nav-logo span  { font-family: var(--font-head); font-weight: 500; font-size: 1rem; letter-spacing: 0.02em; }
.nav-logo strong { font-family: var(--font-head); font-weight: 700; font-size: 1rem; letter-spacing: 0.02em; }

/* Hamburger toggle — hidden checkbox */
.nav-toggle-input { display: none; }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

/* Nav links */
.nav-links {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
}
.nav-links a {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  padding: 0.35rem 0.7rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ─── Mobile nav ─────────────────────────────────────────── */
@media (max-width: 767px) {
  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--navy);
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    padding: 0.5rem 0 1rem;
  }
  .nav-links li a {
    display: block;
    padding: 0.85rem 1.5rem;
    font-size: 0.9rem;
    border-bottom: none;
    border-left: 3px solid transparent;
  }
  .nav-links li a.active,
  .nav-links li a:hover {
    border-left-color: var(--accent);
    background: rgba(255,255,255,0.04);
  }

  /* Show menu when toggle checked */
  .nav-toggle-input:checked ~ .nav-links { display: flex; }

  /* Animate to ✕ */
  .nav-toggle-input:checked ~ .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle-input:checked ~ .hamburger span:nth-child(2) { opacity: 0; }
  .nav-toggle-input:checked ~ .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.22s ease;
  white-space: nowrap;
  min-height: 44px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-primary {
  background: var(--accent);
  color: var(--navy);
}
.btn-primary:hover {
  background: #78B0DE;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(77,144,203,0.40);
}
.btn-secondary {
  border: 2px solid var(--accent);
  color: var(--accent);
}
.btn-secondary:hover {
  background: var(--accent);
  color: var(--navy);
  transform: translateY(-2px);
}

/* ─── Home Hero ──────────────────────────────────────────── */
.home-hero {
  min-height: 600px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  position: relative;
}

.home-hero-content {
  position: relative;
  z-index: 1;
  padding: 4rem 1.5rem;
  max-width: min(680px, calc(100% - 3rem));
  margin-left: max(1.5rem, calc((100vw - var(--max-width)) / 2 + 1.5rem));
}

.home-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  font-weight: 600;
  color: var(--accent);
  line-height: 1.25;
  letter-spacing: 0.015em;
  text-transform: capitalize;
  margin-bottom: 2.5rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ─── Home Intro ─────────────────────────────────────────── */
.home-intro {
  background: var(--navy);
  padding: var(--section-v) 1.5rem;
}
.home-intro .container { max-width: var(--max-width); }
.home-intro p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.85;
  color: rgba(255,255,255,0.88);
  text-align: justify;
}

/* ─── Page Hero (inner pages) ────────────────────────────── */
.page-hero {
  min-height: 360px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  position: relative;
}
.page-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}
.page-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.01em;
}

/* ─── Research ───────────────────────────────────────────── */
.research-intro {
  padding: var(--section-v) 1.5rem;
  background: var(--white);
}
.research-intro h2 {
  font-family: var(--font-head);
  font-size: 1.85rem;
  color: var(--navy);
  margin-bottom: 1.5rem;
}
.research-text p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--gray);
  max-width: 780px;
  margin-bottom: 1.1rem;
}

.research-areas {
  background: var(--bg);
  padding: 2rem 1.5rem var(--section-v);
}
.research-areas .container { display: flex; flex-direction: column; gap: 0; }

.research-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
}
.research-area:last-child { border-bottom: none; }
.research-area.reverse .area-image { order: 2; }
.research-area.reverse .area-text  { order: 1; }

.area-image img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}
.area-text h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 0.9rem;
  line-height: 1.3;
}
.area-text p {
  color: var(--gray);
  line-height: 1.85;
}

/* ─── Publications ───────────────────────────────────────── */
.publications-section {
  padding: var(--section-v) 1.5rem;
}
.publications-section h2 {
  font-family: var(--font-head);
  font-size: 1.85rem;
  color: var(--navy);
  margin-bottom: 2.5rem;
}

.pub-list { display: flex; flex-direction: column; }

.pub-card {
  padding: 1.75rem 0 1.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
}
.pub-card:last-child { border-bottom: none; }
.pub-card.featured { border-left-color: var(--accent); }

.badge {
  display: inline-block;
  background: var(--accent);
  color: var(--navy);
  font-family: var(--font-head);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.65rem;
  border-radius: 3px;
  margin-bottom: 0.6rem;
}

.pub-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--dark);
  line-height: 1.45;
  margin-bottom: 0.4rem;
}
.pub-authors {
  font-size: 0.875rem;
  color: var(--gray);
  margin-bottom: 0.25rem;
}
.pub-meta {
  font-size: 0.875rem;
  color: var(--gray);
  margin-bottom: 0.75rem;
}
.pub-links { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.pub-links a {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  padding: 0.25rem 0.75rem;
  border-radius: 3px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  transition: all 0.18s;
}
.pub-links a:hover { background: var(--accent); color: var(--navy); }

/* ─── Team ───────────────────────────────────────────────── */
.team-section {
  padding: var(--section-v) 1.5rem;
}
.team-section h2 {
  font-family: var(--font-head);
  font-size: 1.85rem;
  color: var(--navy);
  margin-bottom: 2.5rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 2rem;
}

.member-card {
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.member-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 32px rgba(0,0,0,0.13);
}

.member-photo {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg);
}
.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.member-info { padding: 1.4rem; }
.member-info h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.2rem;
}
.member-role {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.85rem;
}
.member-bio,
.member-research,
.member-interests {
  font-size: 0.855rem;
  color: var(--gray);
  line-height: 1.65;
  margin-bottom: 0.5rem;
}

/* Hiring card */
.member-card.hiring {
  border: 2px dashed var(--accent);
  background: rgba(77,144,203,0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.75rem;
  gap: 0.75rem;
  box-shadow: none;
  overflow: visible;
}
.member-card.hiring:hover {
  transform: translateY(-4px);
  background: rgba(77,144,203,0.09);
  box-shadow: 0 6px 24px rgba(77,144,203,0.18);
  border-style: solid;
}
.hiring-icon {
  font-size: 2.25rem;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  width: 56px;
  height: 56px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}
.member-card.hiring h3 {
  font-size: 1.3rem;
  color: var(--accent);
}
.member-card.hiring p {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.65;
  max-width: 220px;
}

/* ─── Gallery ────────────────────────────────────────────── */
.gallery-section {
  padding: var(--section-v) 1.5rem;
}

.gallery-event {
  margin-bottom: 4.5rem;
}

.event-title {
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.event-date {
  font-size: 0.875rem;
  color: var(--gray);
  font-weight: 400;
  font-family: var(--font-body);
}
.event-desc {
  font-size: 0.95rem;
  color: var(--gray);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.625rem;
}

.photo-thumb {
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 6px;
  cursor: zoom-in;
  background: var(--bg);
}
.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease, filter 0.32s ease;
}
.photo-thumb:hover img {
  transform: scale(1.06);
  filter: brightness(1.08);
}

/* CSS Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.92);
  align-items: center;
  justify-content: center;
}
.lightbox:target { display: flex; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  cursor: default;
}

.lightbox-inner {
  position: relative;
  z-index: 1;
  max-width: min(90vw, 1100px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.lightbox-inner img {
  max-width: 90vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 4px;
}
.lightbox-caption {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  text-align: center;
}
.lightbox-close {
  position: absolute;
  top: -2.75rem;
  right: 0;
  color: rgba(255,255,255,0.7);
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover { color: var(--accent); background: rgba(255,255,255,0.1); }

/* ─── Join ───────────────────────────────────────────────── */
.join-section {
  padding: var(--section-v) 1.5rem;
}
.join-section h2 {
  font-family: var(--font-head);
  font-size: 1.85rem;
  color: var(--navy);
  margin-bottom: 0.75rem;
}
.join-intro {
  font-size: 1.07rem;
  color: var(--dark);
  margin-bottom: 2rem;
  max-width: 680px;
  line-height: 1.7;
}

.positions-intro {
  background: var(--bg);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 1.5rem 2rem;
  margin-bottom: 3rem;
  max-width: 860px;
}
.positions-intro p {
  color: var(--gray);
  font-size: 0.97rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}
.positions-intro p:last-child { margin-bottom: 0; }

.join-section h3 {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 1.5rem;
}

.position-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2rem 2.25rem;
  margin-bottom: 1.5rem;
  max-width: 860px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.position-card h4 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 0.85rem;
}
.position-card p {
  color: var(--gray);
  line-height: 1.8;
  font-size: 0.97rem;
  margin-bottom: 1.1rem;
}

.qualifications {
  background: rgba(77,144,203,0.1);
  border-radius: 6px;
  padding: 0.875rem 1.25rem;
  font-size: 0.9rem;
  color: var(--dark);
  line-height: 1.65;
}

/* ─── Contact ────────────────────────────────────────────── */
.contact-section {
  padding: var(--section-v) 1.5rem;
}
.contact-section h2 {
  font-family: var(--font-head);
  font-size: 1.85rem;
  color: var(--navy);
  margin-bottom: 0.75rem;
}
.contact-lead {
  color: var(--gray);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  max-width: 560px;
}

.contact-details {
  display: grid;
  grid-template-columns: auto auto;
  gap: 3rem;
  justify-content: start;
}
.contact-details h3 {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--navy);
  margin-bottom: 0.75rem;
}
.contact-address a {
  color: var(--gray);
  line-height: 1.85;
  font-size: 0.97rem;
  transition: color 0.2s;
}
.contact-address a:hover { color: var(--accent); }

.twitter-link {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: opacity 0.2s;
}
.twitter-link:hover { opacity: 0.75; }

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  padding: 2.75rem 1.5rem;
  text-align: center;
}
.footer-affiliation {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.45rem;
}
.footer-copy {
  color: rgba(255,255,255,0.38);
  font-size: 0.82rem;
}

/* ─── Content (fallback single) ──────────────────────────── */
.content-section {
  padding: var(--section-v) 1.5rem;
}
.content-section .container > * + * { margin-top: 1rem; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 767px) {
  :root { --section-v: 3rem; }

  .home-hero { min-height: 480px; }
  .home-hero-content { padding: 3rem 1.25rem; }
  .home-hero h1 { font-size: 1.6rem; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; text-align: center; justify-content: center; }

  .page-hero { min-height: 220px; }

  .research-area {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2.5rem 0;
  }
  .research-area.reverse .area-image { order: 0; }
  .research-area.reverse .area-text  { order: 0; }

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

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

  .contact-details { grid-template-columns: 1fr; gap: 2rem; }

  .position-card { padding: 1.5rem; }
  .positions-intro { padding: 1.25rem 1.5rem; }

  .pub-card { padding: 1.5rem 0 1.5rem 1rem; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .research-area { gap: 2.5rem; }
}
