:root {
  /* ED IITM-inspired palette */
  --bg: #faf7f2;
  --bg-soft: #f0ead8;
  --surface: #ffffff;
  --ink: #1a1a2a;
  --ink-muted: #3a3a52;
  --line: #ddd5c0;
  --brand: #0c1a2e;
  --brand-deep: #152640;
  --accent: #c8903a;
  --accent-light: #f0ead8;
  --accent-soft: rgba(200, 144, 58, 0.12);
  --ok: #2a7a4a;
  --header-bg: #ffffff;
  --header-border: #ddd5c0;
  --header-shadow: rgba(12, 26, 46, 0.08);
  --nav-text: #3a3a52;
  --nav-hover-bg: #f0ead8;
  --footer-bg: linear-gradient(180deg, #0c1a2e 0%, #152640 100%);
  --footer-text: #e5b060;
  --cta-bg: var(--surface);
  --cta-text: var(--ink);
  --cta-p-color: var(--ink-muted);
  --cta-border: var(--line);
  --page-title-bg: linear-gradient(135deg, #060e1a 0%, #0c1a2e 55%, #1e3355 100%);
  --page-title-h1: #ffffff;
  --page-title-p: rgba(255, 255, 255, 0.85);
  --news-date-bg: linear-gradient(135deg, #c8903a, #e5b060);
  --news-date-strong: #1a1a2a;
  --news-date-span: rgba(26, 26, 42, 0.65);
  --news-type-bg: rgba(12, 26, 46, 0.1);
  --news-type-color: #0c1a2e;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 16px rgba(12, 26, 46, 0.07);
  --shadow-md: 0 8px 24px rgba(12, 26, 46, 0.12);
  --shadow-lg: 0 12px 32px rgba(12, 26, 46, 0.16);
}

[data-theme="dark"] {
  /* Dark theme - ED IITM navy-based */
  --bg: #0c1a2e;
  --bg-soft: #152640;
  --surface: #1e3355;
  --ink: #faf7f2;
  --ink-muted: rgba(210, 228, 255, 0.78);
  --line: rgba(200, 144, 58, 0.25);
  --brand: #e5b060;
  --brand-deep: #c8903a;
  --accent: #c8903a;
  --accent-light: #3a2a10;
  --accent-soft: rgba(200, 144, 58, 0.15);
  --ok: #4ade80;
  --header-bg: #0c1a2e;
  --header-border: rgba(200, 144, 58, 0.25);
  --header-shadow: rgba(0, 0, 0, 0.4);
  --nav-text: #dce8f8;
  --nav-hover-bg: rgba(220, 232, 255, 0.1);
  --footer-bg: linear-gradient(180deg, #060e1a 0%, #0c1a2e 100%);
  --footer-text: rgba(255, 255, 255, 0.75);
  --cta-bg: linear-gradient(135deg, #0c1a2e 0%, #152640 50%, #1e3355 100%);
  --cta-text: #ffffff;
  --cta-p-color: rgba(255, 255, 255, 0.82);
  --cta-border: rgba(200, 144, 58, 0.25);
  --page-title-bg: linear-gradient(135deg, #060e1a 0%, #0c1a2e 55%, #1e3355 100%);
  --page-title-h1: #ffffff;
  --page-title-p: rgba(255, 255, 255, 0.85);
  --news-date-bg: linear-gradient(135deg, #0c1a2e, #1e3355);
  --news-date-strong: #faf7f2;
  --news-date-span: rgba(250, 247, 242, 0.75);
  --news-type-bg: #0c1a2e;
  --news-type-color: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-weight: 400;
  font-size: 16px;
  transition: color 0.3s ease, background 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

/* Modern single-row navbar: brand left, nav right */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  box-shadow: 0 2px 12px var(--header-shadow);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logos {
  display: flex;
  align-items: center;
  gap: 0;
}

.brand-logos img {
  height: 44px;
  width: auto;
  object-fit: contain;
  background: var(--surface);
  border-radius: 6px;
  padding: 4px 6px;
  transition: transform 0.2s ease;
}

.brand-logos img:first-child {
  border-radius: 6px 0 0 6px;
}

.brand-logos img:last-child {
  border-radius: 0 6px 6px 0;
}

.brand-logos .logo-divider {
  width: 1px;
  height: 34px;
  background: rgba(15, 45, 88, 0.2);
  align-self: center;
  flex-shrink: 0;
}

.brand:hover .brand-logos img {
  transform: translateY(-1px);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand strong {
  font-family: "Roboto Slab", Georgia, serif;
  font-size: 1.07rem;
  font-weight: 700;
  letter-spacing: 0.85px;
  color: var(--ink);
  text-transform: uppercase;
  line-height: 1.1;
}

.brand span {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.3px;
}

.nav-wrap {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 0;
  order: 3;
}

.menu-toggle {
  display: none;
  border: 1px solid #0c1a2e;
  background: #0c1a2e;
  color: #ffffff;
  padding: 7px 14px;
  border-radius: 7px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--nav-text);
  padding: 8px 11px 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.35px;
  transition: all 0.2s ease;
  margin-left: 8px;
}

.theme-toggle:hover {
  color: var(--brand);
  background: var(--accent-soft);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  fill: none;
  stroke: currentColor;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1px;
  flex-wrap: nowrap;
  margin-left: auto;
  order: 2;
}

.site-nav a {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--nav-text);
  padding: 8px 11px;
  border-bottom: 2px solid transparent;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.35px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--brand);
  border-bottom-color: var(--accent);
  background: var(--accent-soft);
}

.site-nav a.active {
  color: var(--brand);
  border-bottom-color: var(--accent);
  font-weight: 700;
  background: var(--accent-soft);
}

/* ── Full-width photo hero ─────────────────────────────────── */
.hero-photo {
  position: relative;
  width: 100%;
  height: 88vh;
  min-height: 540px;
  background-size: cover;
  background-position: center;
  background-color: #060e1a;
  display: flex;
  align-items: center;
  overflow: hidden;
}
/* ── Team photo mosaic hero background ─────────────────────── */
.hero-mosaic {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-mosaic-cell {
  position: absolute;
  perspective: 900px;
}
.mc-flipper {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.mc-face {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
/* Slide & Fade mode overrides */
.hero-mosaic--slide .hero-mosaic-cell { perspective: none; }
.hero-mosaic--slide .mc-flipper { transform-style: flat; overflow: hidden; }
.hero-mosaic--slide .mc-face {
  backface-visibility: visible;
  -webkit-backface-visibility: visible;
}

.hero-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(6,14,26,0.52) 0%,
    rgba(6,14,26,0.38) 50%,
    rgba(6,14,26,0.48) 100%
  );
  opacity: var(--hero-overlay-opacity, 1);
}

.hero-photo-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  align-items: stretch;
  padding: 3rem 0;
}
/* Panels — nearly transparent; overlay handles readability, no blur */
.hero-photo-content,
.hero-photo-side {
  background: var(--hero-panel-bg, rgba(6,14,26,0.08));
  border: 1px solid var(--hero-panel-border, rgba(255,255,255,0.14));
  border-radius: var(--radius);
  color: var(--hero-text, #fff);
}
.hero-photo-content {
  padding: 48px;
}
.hero-photo-content h1 {
  color: var(--hero-text, #fff);
  font-size: var(--hero-h1-size, clamp(1.95rem, 3vw, 3.25rem));
}
.hero-photo-content p {
  color: var(--hero-text, #fff);
  font-size: var(--hero-body-size, 1rem);
  margin-bottom: 14px;
}
.hero-photo-content .kicker { text-shadow: none; }
.hero-photo-content .hero-actions { margin-top: 1.2rem; }
.hero-photo-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 1.25rem;
}
.hero-photo-side .stat-chips { flex-direction: row; gap: 6px; flex-shrink: 0; }
.hero-photo-side .stat-chip {
  flex: 1; padding: 8px 4px;
  background: var(--hero-chip-bg, rgba(255,255,255,0.10));
  border-color: var(--hero-panel-border, rgba(255,255,255,0.22));
}
.hero-photo-side .stat-chip strong {
  font-size: 1.25rem;
  color: var(--hero-stat-counter, #e5b060);
  -webkit-text-fill-color: var(--hero-stat-counter, #e5b060);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}
.hero-photo-side .stat-chip span { color: var(--hero-stat-label, rgba(255,255,255,0.92)); }
.hero-photo-side .news-ticker-box {
  flex: 1; min-height: 0;
  background: var(--hero-chip-bg, rgba(255,255,255,0.08));
  border-color: var(--hero-panel-border, rgba(255,255,255,0.22));
}
.hero-photo-side .ticker-label {
  background: transparent;
  border-bottom-color: var(--hero-panel-border, rgba(255,255,255,0.22));
  color: var(--hero-text, #fff);
}
.hero-photo-side .ticker-label a { color: #e5b060; }
.hero-photo-side .ticker-item-date  { color: var(--hero-text-muted, rgba(255,255,255,0.55)); }
.hero-photo-side .ticker-item-title { color: var(--hero-text, #fff); }
.hero-photo-side .ticker-sep        { border-color: var(--hero-panel-border, rgba(255,255,255,0.3)); }
.hero-photo-side .openings-callout  {
  flex-shrink: 0;
  background: var(--hero-chip-bg, rgba(255,255,255,0.08));
  border-color: var(--hero-panel-border, rgba(255,255,255,0.22));
}
.hero-photo-side .oc-header { color: var(--hero-text, #fff); }
@media (max-width: 900px) {
  .hero-photo-grid { grid-template-columns: 1fr; padding: 2rem 0; }
}
@media (max-width: 768px) {
  .hero-photo { height: auto; min-height: 0; }
  .hero-photo-content { padding: 1.5rem; }
  .hero-photo-side .news-ticker-box { height: 220px; flex: none; }
}

/* ── Lab Life page ─────────────────────────────────────────── */
.lablife-timeline-nav {
  display: flex;
  align-items: flex-start;
  overflow-x: auto;
  padding: 0.5rem 0.25rem 0.5rem;
  margin-bottom: 2.25rem;
  -webkit-overflow-scrolling: touch;
}
.lablife-tl-segment {
  display: flex;
  align-items: flex-start;
  flex: 0 0 auto;
}
.lablife-tl-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0 0.3rem;
  font-family: inherit;
}
.lablife-tl-dot {
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--line);
  border: 2.5px solid var(--line);
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, transform 0.18s;
}
.lablife-tl-item.active .lablife-tl-dot,
.lablife-tl-item:hover .lablife-tl-dot {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.2);
}
.lablife-tl-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-muted);
  white-space: nowrap;
  margin-top: 0.4rem;
  letter-spacing: 0.03em;
  transition: color 0.18s;
}
.lablife-tl-item.active .lablife-tl-label,
.lablife-tl-item:hover .lablife-tl-label { color: var(--accent); }
.lablife-tl-line {
  flex: 1 1 3rem;
  min-width: 2rem;
  max-width: 6rem;
  height: 2px;
  background: var(--line);
  margin-top: 6.5px;
  align-self: flex-start;
}

/* Mosaic grid */
.lablife-mosaic {
  columns: 4;
  column-gap: 10px;
}
@media (max-width: 900px) { .lablife-mosaic { columns: 3; } }
@media (max-width: 560px) { .lablife-mosaic { columns: 2; } }
.lablife-mosaic-tile {
  break-inside: avoid;
  margin-bottom: 10px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.lablife-mosaic-tile img {
  width: 100%;
  display: block;
  transition: transform 0.3s;
}
.lablife-mosaic-tile:hover img { transform: scale(1.04); }
.lablife-mosaic-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.28) 55%, transparent 100%);
  padding: 2.5rem 0.7rem 0.6rem;
  pointer-events: none;
}
.lablife-mosaic-caption strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}
.lablife-mosaic-caption span {
  font-size: 0.70rem;
  color: rgba(255,255,255,0.75);
}
.lablife-mosaic-empty {
  color: var(--ink-muted);
  padding: 2rem 0;
}
.lablife-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.lablife-lightbox.open { display: flex; }
.lablife-lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 8px; object-fit: contain; }
.lablife-lightbox-close {
  position: fixed;
  top: 1rem; right: 1.25rem;
  background: none; border: none;
  color: #fff; font-size: 2rem;
  cursor: pointer; line-height: 1;
}

.hero {
  padding: 52px 0 30px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  align-items: stretch;
}

.panel {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--line) 76%, white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-main {
  padding: 48px;
  background: var(--surface);
  color: var(--ink);
}

.hero-main h1 {
  margin-bottom: 18px;
}

.hero-main p {
  margin-bottom: 18px;
}

.kicker {
  display: inline-block;
  background: linear-gradient(135deg, #c8903a, #e5b060);
  color: #0c1a2e;
  border: none;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  padding: 6px 12px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(200, 144, 58, 0.4);
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 14px;
  font-weight: 700;
  color: var(--ink);
}

h1 {
  font-family: "Roboto Slab", Georgia, serif;
  font-size: clamp(1.95rem, 3vw, 3.25rem);
  letter-spacing: -0.5px;
}

h2 {
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 700;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

p {
  margin: 0 0 14px;
  color: var(--ink-muted);
  line-height: 1.7;
}

.hero-main p,
.hero-main h1 {
  color: inherit;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 11px 20px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #c8903a 0%, #b87c28 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(200, 144, 58, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(200, 144, 58, 0.55);
}

.btn-secondary {
  border: 1.5px solid var(--line);
  color: var(--ink);
  background: var(--surface);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--brand);
  background: var(--accent-soft);
}

.hero-side {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
}

/* Stat chips row */
.stat-chips {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.stat-chip {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 6px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-chip strong {
  display: block;
  font-size: 1.3rem;
  background: linear-gradient(135deg, #c8903a, #b83232);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  line-height: 1.2;
}

.stat-chip span {
  font-size: 0.66rem;
  color: var(--ink-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* News ticker */
.news-ticker-box {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.ticker-label {
  padding: 8px 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink);
  border-bottom: 2px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.ticker-label a {
  font-size: 0.65rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.ticker-wrap {
  overflow: hidden;
  position: relative;
  flex: 1;
  min-height: 0;
}

.ticker-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: linear-gradient(to bottom, transparent, var(--surface));
  pointer-events: none;
  z-index: 1;
}

.ticker-inner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.ticker-item {
  padding: 9px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}

.ticker-item:hover {
  background: var(--accent-soft);
}

/* Social links bar inside ticker box */
.social-links-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.social-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 0.67rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.social-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.social-chip svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

/* Openings callout card */
.openings-callout {
  display: none;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.oc-header {
  padding: 7px 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink);
  border-bottom: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.oc-header a {
  font-size: 0.65rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.oc-item {
  padding: 9px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.oc-item:last-child { border-bottom: none; }

.oc-item:hover { background: var(--accent-soft); }

.oc-item-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(12,26,46,0.08);
  color: var(--ink-muted);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 3px;
}

.oc-item-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

.ticker-item-date {
  font-size: 0.67rem;
  color: var(--ink-muted);
  white-space: nowrap;
  margin-top: 3px;
  flex-shrink: 0;
  min-width: 52px;
}

.ticker-item-body { flex: 1; min-width: 0; }

.ticker-item-type {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 4px;
  margin-bottom: 3px;
}

/* Shared type-pill colors for both ticker and news page */
.ticker-item-type.result,      .news-type.result      { color: #fff; background: #9a3412; }
.ticker-item-type.open,        .news-type.open        { color: #fff; background: #166534; }
.ticker-item-type.notice,      .news-type.notice      { color: #fff; background: #1e40af; }
.ticker-item-type.publication, .news-type.publication { color: #fff; background: #5b21b6; }
.ticker-item-type.member,      .news-type.member      { color: #fff; background: #0f766e; }
.ticker-item-type.general,     .news-type.general     { color: #fff; background: #374151; }

[data-theme="dark"] .ticker-item-type.result,      [data-theme="dark"] .news-type.result      { color: #fff; background: #c2410c; }
[data-theme="dark"] .ticker-item-type.open,        [data-theme="dark"] .news-type.open        { color: #fff; background: #15803d; }
[data-theme="dark"] .ticker-item-type.notice,      [data-theme="dark"] .news-type.notice      { color: #fff; background: #1d4ed8; }
[data-theme="dark"] .ticker-item-type.publication, [data-theme="dark"] .news-type.publication { color: #fff; background: #6d28d9; }
[data-theme="dark"] .ticker-item-type.member,      [data-theme="dark"] .news-type.member      { color: #fff; background: #0d9488; }
[data-theme="dark"] .ticker-item-type.general,     [data-theme="dark"] .news-type.general     { color: #fff; background: #4b5563; }

.ticker-item-title {
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  white-space: normal;
  overflow: hidden;
}

.ticker-sep {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: var(--ink-muted);
}
.ticker-sep span {
  flex: 1;
  height: 2px;
  background: var(--accent);
  opacity: 0.5;
  border-radius: 1px;
}
.ticker-sep em {
  font-style: normal;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.75;
  white-space: nowrap;
}


.metrics {
  display: grid;
  gap: 12px;
}

.metric {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric strong {
  font-size: 1.6rem;
  background: linear-gradient(135deg, #c8903a, #b83232);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.metric span {
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.section {
  padding: 48px 0;
}

.section:nth-child(odd) {
  background: var(--bg);
}

.section-head {
  margin-bottom: 28px;
  text-align: center;
}

.section-head h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}

.section-head h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #c8903a, #b83232);
  border-radius: 2px;
}

.section-head p {
  margin-top: 8px;
  font-size: 1.05rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.project-list {
  display: grid;
  gap: 20px;
}

.prior-section-divider {
  padding: 2.5rem 0 0.5rem;
  border-top: 2px solid var(--accent);
}
.prior-section-divider h2 {
  font-size: 1.55rem;
  margin: 0 0 0.35rem;
  color: var(--ink);
}
.prior-section-divider p {
  color: var(--ink-muted);
  font-size: 0.93rem;
  margin: 0;
}

.prior-era-header {
  padding: 1.6rem 0 0.2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.25rem;
}
.prior-era-header h3 {
  font-size: 1.1rem;
  margin: 0 0 0.2rem;
  color: var(--ink);
}
.prior-era-header p {
  color: var(--ink-muted);
  font-size: 0.87rem;
  margin: 0;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 24px;
  align-items: start;
}

.project-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.project-media img {
  width: 100%;
  height: 240px;
  object-fit: contain;
  object-position: center;
  padding: 8px;
}

.project-body h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.pub-list {
  display: grid;
  gap: 18px;
}

.pub-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  align-items: start;
}

.pub-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #ffffff;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-shadow: var(--shadow);
}

.pub-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Email image — swaps between light/dark variants */
.email-img {
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}
.email-img img.email-light { display: inline; }
.email-img img.email-dark  { display: none; }
[data-theme="dark"] .email-img img.email-light { display: none; }
[data-theme="dark"] .email-img img.email-dark  { display: inline; }

.pub-title-link {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.team-section {
  margin-bottom: 22px;
}

.team-section h2 {
  margin-bottom: 12px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.team-card {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  align-items: start;
}

.team-media {
  width: 130px;
  height: 130px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

.team-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-role {
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin-bottom: 6px;
  line-height: 1.5;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.card:hover {
  border-color: #c8903a;
  box-shadow: 0 8px 24px rgba(200, 144, 58, 0.2);
  transform: translateY(-2px);
}

.card h3 {
  font-size: 1.07rem;
  margin-bottom: 8px;
}

.card p a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.card p a:hover {
  opacity: 0.8;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, #b83232, #8a1f1f);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 5px 11px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  box-shadow: 0 2px 6px rgba(184, 50, 50, 0.35);
}

.list {
  margin: 0;
  padding-left: 0;
  color: var(--ink-muted);
  list-style: none;
}

.list li {
  margin-bottom: 10px;
  padding-left: 20px;
  position: relative;
  line-height: 1.6;
}

.list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.timeline {
  display: grid;
  gap: 12px;
}

.news-list {
  display: grid;
  gap: 18px;
}

.news-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 18px;
  align-items: start;
}

.news-date {
  border: none;
  background: var(--news-date-bg);
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
  line-height: 1.2;
  box-shadow: 0 4px 12px rgba(12, 26, 46, 0.2);
}

.news-date strong {
  display: block;
  font-size: 1.25rem;
  color: var(--news-date-strong);
  font-weight: 700;
}

.news-date span {
  display: block;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  color: var(--news-date-span);
  margin-top: 2px;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 5px;
}

.news-meta .badge {
  margin-bottom: 0;
  display: inline-flex;
  align-items: center;
}

.news-type {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 4px 10px;
  border: none;
  color: var(--news-type-color);
  background: var(--news-type-bg);
}


.news-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.news-link {
  font-size: 0.76rem;
  font-weight: 600;
  border: 1.5px solid #c8903a;
  background: #faf7f2;
  color: #0c1a2e;
  border-radius: 6px;
  padding: 5px 9px;
}

.news-link:hover {
  background: #c8903a;
  color: #ffffff;
}

.timeline-item {
  border-left: 3px solid var(--accent);
  padding: 0 0 20px 18px;
  margin-bottom: 8px;
}

.timeline-item span {
  font-size: 0.85rem;
  color: var(--brand);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timeline-item p {
  margin: 6px 0 0;
  font-size: 0.95rem;
}

.cta {
  background: var(--cta-bg);
  color: var(--cta-text);
  border-radius: var(--radius);
  padding: 48px;
  border: 1px solid var(--cta-border);
  box-shadow: 0 12px 32px rgba(12, 26, 46, 0.2);
}

.cta h1,
.cta h2,
.cta h3 {
  color: var(--cta-text);
}

.cta p {
  color: var(--cta-p-color);
  font-size: 1.05rem;
}

.page-title {
  padding: 64px 0 28px;
  background: var(--page-title-bg);
  position: relative;
  overflow: hidden;
}

.page-title::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: rgba(200, 144, 58, 0.07);
  border-radius: 50%;
}

.page-title h1 {
  margin-bottom: 16px;
  color: var(--page-title-h1);
  position: relative;
  z-index: 1;
}

.page-title p {
  color: var(--page-title-p);
  position: relative;
  z-index: 1;
  font-size: 1.05rem;
}

.site-footer {
  padding: 56px 0 28px;
  color: var(--footer-text);
  background: linear-gradient(135deg, #060e1a 0%, #0c1a2e 60%, #152640 100%);
  margin-top: 64px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
}

.footer-grid span {
  font-size: 0.95rem;
  line-height: 1.6;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: revealIn 0.8s ease forwards;
}

.reveal:nth-child(2) {
  animation-delay: 0.1s;
}

.reveal:nth-child(3) {
  animation-delay: 0.2s;
}

.reveal:nth-child(4) {
  animation-delay: 0.3s;
}

@keyframes revealIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1000px) {
  .hero-grid,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .project-card,
  .pub-item,
  .team-card {
    grid-template-columns: 1fr;
  }

  .project-media img {
    height: 200px;
  }

  .news-item {
    grid-template-columns: 78px 1fr;
    gap: 12px;
  }

  .team-media {
    width: 100%;
    max-width: 170px;
    height: 170px;
  }

  .hero-main,
  .hero-side {
    padding: 24px;
  }
}

@media (max-width: 840px) {
  .nav-controls {
    order: 2;
    margin-left: auto;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    padding: 6px 0 10px;
    border-top: 1px solid #e4e9f0;
    order: 3;
  }

  .site-nav.open {
    display: flex;
  }

  .nav-wrap {
    flex-wrap: wrap;
    padding-top: 8px;
    min-height: 68px;
  }

  .site-nav a {
    padding: 10px 14px;
    border-bottom: none;
    border-left: 3px solid transparent;
    width: 100%;
  }

  .site-nav a:hover,
  .site-nav a.active {
    border-bottom: none;
    border-left-color: var(--accent);
    background: var(--accent-soft);
  }

  .brand-logos img {
    height: 34px;
  }

  .brand span {
    display: none;
  }

  .brand strong {
    font-size: 0.95rem;
  }

  .news-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .news-date {
    width: 92px;
  }

  .hero-main,
  .hero-side {
    padding: 28px;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 28px 0;
  }
}
