/* =====================================================================
   SHARED SHELL  --  header / red nav / sub nav / footer
   This block is identical on every page. If you change a shell color
   or spacing, update the same block in every css/*.css file.
   Brand red: #b00c14
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,400;0,600;0,700;1,400&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  --brand-red: #b00c14;
  --brand-red-dark: #8e0a10;
  --ink: #1c1c1c;
  --ink-soft: #444;
  --line: #e2e0d4;
  --paper: #fbfbf3;        /* light parchment page background */
  --panel: #ffffff;
  --link: #2a5b8c;
  --link-hover: #b00c14;
  --serif: 'Spectral', Georgia, 'Times New Roman', serif;
  --sans: 'Source Sans 3', system-ui, -apple-system, sans-serif;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

.shell { max-width: var(--maxw); margin: 0 auto; }

/* ---- University header ---- */
.site-header {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.site-header .shell {
  display: flex;
  align-items: center;
  padding: 22px 24px;
}
.site-header .logo {
  height: 74px;
  width: auto;
  max-width: 100%;
  display: block;
}

/* ---- Top red nav (university-wide) ---- */
.top-nav { background: var(--brand-red); }
.top-nav .shell {
  display: flex;
  flex-wrap: wrap;
}
.top-nav a {
  flex: 1 1 auto;
  text-align: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 16px 14px;
  border-left: 1px solid rgba(255,255,255,0.14);
  transition: background 0.18s ease;
}
.top-nav a:first-child { border-left: none; }
.top-nav a:hover { background: var(--brand-red-dark); text-decoration: none; }
.top-nav a.active { background: var(--brand-red-dark); }

/* ---- Personal sub nav ---- */
.sub-nav {
  background: #f3f1e4;
  border-bottom: 1px solid var(--line);
}
.sub-nav .shell {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 20px;
}
.sub-nav a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 13px 18px;
  border-bottom: 3px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.sub-nav a:hover { color: var(--brand-red); text-decoration: none; }
.sub-nav a.active {
  color: var(--brand-red);
  border-bottom-color: var(--brand-red);
}

/* ---- Generic content shell ---- */
main { padding: 38px 24px 60px; }
.content { max-width: var(--maxw); margin: 0 auto; }

.page-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 2rem;
  color: var(--ink);
  margin: 0 0 6px;
  position: relative;
}
.page-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  background: var(--brand-red);
  margin-top: 12px;
  border-radius: 2px;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.site-footer .shell {
  padding: 20px 24px;
  font-size: 0.82rem;
  color: #8a8a82;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---- Back-to-top ---- */
.to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #6aa39a;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 9px 16px;
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
}
.to-top:hover { background: #588a82; color: #fff; text-decoration: none; }

/* ---- Responsive ---- */
@media (max-width: 760px) {
  .top-nav .shell { flex-direction: column; }
  .top-nav a { border-left: none; border-top: 1px solid rgba(255,255,255,0.14); }
  .top-nav a:first-child { border-top: none; }
  .sub-nav .shell { overflow-x: auto; }
  .sub-nav a { white-space: nowrap; }
  .site-header .logo { height: 54px; }
}

/* =====================================================================
   PAGE-SPECIFIC  --  Lab (carousel / intro / projects / collaboration)
   ===================================================================== */

/* ---- Carousel ---- */
.carousel {
  position: relative;
  background: #1b1b1b;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin: 8px 0 28px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.10);
}
.carousel-track {
  position: relative;
  width: 100%;
  height: 460px;
}
.carousel-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.carousel-slide.active { opacity: 1; pointer-events: auto; }
.carousel-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease;
  z-index: 2;
}
.carousel-arrow:hover { background: var(--brand-red); }
.carousel-arrow.prev { left: 14px; }
.carousel-arrow.next { right: 14px; }

/* dots */
.carousel-dots {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 9px;
  padding: 26px 0 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.45), rgba(0,0,0,0));
  z-index: 2;
}
.carousel-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 0;
  transition: background 0.18s ease, transform 0.18s ease;
}
.carousel-dot:hover { background: rgba(255,255,255,0.8); }
.carousel-dot.active { background: var(--brand-red); transform: scale(1.2); }

/* ---- Text content ---- */
.lab-intro {
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.7;
  margin: 0 0 34px;
}

.lab-section { margin-bottom: 32px; }
.lab-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ink);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--brand-red);
}
.lab-list {
  margin: 0;
  padding-left: 22px;
}
.lab-list li {
  margin: 0 0 9px;
  color: var(--ink-soft);
  font-size: 1.02rem;
}
.lab-collab {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.top-wrap { text-align: right; margin-top: 8px; }

@media (max-width: 680px) {
  .carousel-track { height: 280px; }
  .carousel-arrow { width: 38px; height: 38px; }
}
