/* ============================================================
   CHANDAN CHAUDHARY PORTFOLIO — GLOBAL STYLES & ANIMATIONS
   Light Theme — Navy on White / Scientific Precision
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --bg-base:          #f6f8fc;
  --bg-alt:           #eef2f8;
  --surface-card:     #ffffff;
  --surface-elevated: #f0f5ff;

  --border-subtle:    rgba(0, 130, 200, 0.10);
  --border-medium:    rgba(0, 130, 200, 0.20);
  --border-bright:    rgba(0, 130, 200, 0.45);

  --cyan:             #0090c0;
  --cyan-light:       #00aad4;
  --cyan-dim:         #006688;

  --gold:             #b8862a;
  --gold-light:       #d4a030;

  --glow-cyan:        rgba(0, 144, 192, 0.10);
  --glow-gold:        rgba(184, 134, 42, 0.10);

  --text-primary:     #0a1628;
  --text-secondary:   #4a6080;
  --text-dim:         #8098b0;
}

/* ---------- Base Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--cyan) var(--bg-alt);
  scrollbar-width: thin;
}

body {
  background-color: var(--bg-base);
  background-image: linear-gradient(135deg, #f6f8fc 0%, #eef2f8 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--cyan);
  color: #ffffff;
  font-weight: 700;
  border-radius: 0 0 8px 8px;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ---------- Grid Overlay ---------- */
.grid-overlay {
  background-image:
    linear-gradient(rgba(0,130,200,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,130,200,0.03) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--text-primary);
}

.font-mono { font-family: 'JetBrains Mono', monospace; }

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cyan);
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

/* ---------- Cards ---------- */
.glass-card {
  background: var(--surface-card);
  border: 1px solid var(--border-medium);
  box-shadow: 0 4px 24px rgba(0, 100, 180, 0.08);
  border-radius: 16px;
  backdrop-filter: none;
}

.glass-card:hover {
  border-color: var(--border-bright);
  box-shadow: 0 8px 32px rgba(0, 100, 180, 0.15);
}

/* Hero stat cards — glassmorphism only on the gradient hero backdrop */
.stat-card.glass-card {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 32px rgba(0, 100, 180, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, #0090c0, #006688);
  color: #ffffff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 8px;
  text-decoration: none;
  transition: filter 0.25s, box-shadow 0.25s, transform 0.2s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  filter: brightness(1.12);
  box-shadow: 0 0 24px rgba(0, 144, 192, 0.35);
  transform: translateY(-2px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: transparent;
  color: var(--cyan);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 8px;
  border: 1px solid var(--border-bright);
  text-decoration: none;
  transition: background 0.25s, border-color 0.25s, transform 0.2s, box-shadow 0.25s;
  cursor: pointer;
}
.btn-outline:hover {
  background: rgba(0, 144, 192, 0.06);
  border-color: var(--cyan);
  box-shadow: 0 0 16px var(--glow-cyan);
  transform: translateY(-2px);
}

/* ---------- Navigation ---------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(246, 248, 252, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.35s, box-shadow 0.35s, padding 0.35s;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-nav.scrolled {
  background: rgba(255, 255, 255, 0.98);
  padding: 0.875rem 2rem;
  border-bottom: 1px solid var(--border-medium);
  box-shadow: 0 2px 20px rgba(0, 100, 180, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--text-primary);
  text-transform: uppercase;
}
.nav-logo span { color: var(--cyan); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-secondary);
  transition: color 0.15s;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--cyan);
  transition: width 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--cyan); }

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-primary);
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(246, 248, 252, 0.98);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  border: none;
}
.mobile-menu.open { opacity: 1; pointer-events: all; }

.mobile-menu a {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-secondary);
  transition: color 0.2s, transform 0.2s;
  opacity: 0;
  transform: translateY(-20px);
}
.mobile-menu.open a { opacity: 1; transform: translateY(0); }
.mobile-menu a:hover { color: var(--cyan); }

/* ---------- Hero Section ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 60% 50%, rgba(0,144,192,0.08) 0%, transparent 65%),
    linear-gradient(135deg, #f6f8fc 0%, #eef2f8 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 55% 45%;
  align-items: center;
  gap: 3rem;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.25rem;
}

.hero-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.05;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

/* Typewriter */
.typewriter-wrap {
  height: 2rem;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.typewriter-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: block;
  animation: typewriter-cycle 16s infinite;
}

@keyframes typewriter-cycle {
  0%,  18% { transform: translateY(0); }
  25%, 43% { transform: translateY(-2rem); }
  50%, 68% { transform: translateY(-4rem); }
  75%, 93% { transform: translateY(-6rem); }
  100%      { transform: translateY(0); }
}

.typewriter-inner {
  display: flex;
  flex-direction: column;
  line-height: 2rem;
}

.hero-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 48ch;
  margin-bottom: 2.25rem;
}

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

/* Hero photo column — flex column: top cards | photo | bottom cards */
.hero-photo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
}

/* Two-card rows above and below the photo */
.hero-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  width: 100%;
  max-width: min(420px, 90vw);
}

.hero-photo-outer {
  position: relative;
  width: min(360px, 80vw);
  height: min(360px, 80vw);
  flex-shrink: 0;
}

.hero-photo-glow {
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle, rgba(0, 144, 192, 0.10) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-rings { position: absolute; inset: 0; border-radius: 50%; }

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0, 144, 192, 0.20);
  animation: ring-pulse 2.5s ease-in-out infinite;
}
.ring-1 { inset: -20px; animation-delay: 0s; }
.ring-2 { inset: -40px; animation-delay: 0.6s; border-color: rgba(0,144,192,0.12); }
.ring-3 { inset: -62px; animation-delay: 1.2s; border-color: rgba(0,144,192,0.06); }

@keyframes ring-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.03); }
}

.hero-photo {
  position: relative;
  z-index: 2;
  width: 100%; height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-medium);
}
.hero-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Stat cards — in normal flow inside .hero-stat-row, not absolute */
.stat-card {
  padding: 0.65rem 1rem;
  animation: float-bob 3s ease-in-out infinite;
  border-radius: 12px;
  min-width: 0;
}
.stat-card:nth-child(1) { animation-delay: 0s; }
.stat-card:nth-child(2) { animation-delay: 0.75s; }

@keyframes float-bob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}

.stat-card-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 3px;
}
.stat-card-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

/* Membership pills — gold (academic prestige) */
.membership-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 7px;
}
.membership-pill {
  background: rgba(184, 134, 42, 0.08);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  border-radius: 20px;
  padding: 2px 8px;
  display: inline-block;
  white-space: nowrap;
}

/* Circuit trace SVG */
.circuit-traces {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.22;
  overflow: hidden;
}
.circuit-traces svg { width: 100%; height: 100%; }
/* Fallback for pages without JS-generated network */
.trace-line {
  stroke: var(--cyan);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 60 940;
  stroke-dashoffset: 0;
  animation: trace-signal 5s linear infinite;
}
@keyframes trace-signal {
  to { stroke-dashoffset: -1000; }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  z-index: 2;
  animation: scroll-bounce 2s ease-in-out infinite;
}
@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}
.scroll-arrow {
  width: 20px; height: 20px;
  border-right: 2px solid var(--cyan);
  border-bottom: 2px solid var(--cyan);
  transform: rotate(45deg);
}

/* ---------- About Preview Strip ---------- */
.about-preview {
  padding: 5rem 2rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--border-medium);
  border-bottom: 1px solid var(--border-medium);
}

.about-preview-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.about-preview-text {
  margin-bottom: 3rem;
}

/* Stat cards — horizontal row of 3 */
.stat-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.stat-card {
  background: var(--surface-card);
  border: 1px solid var(--border-medium);
  border-left: 3px solid var(--cyan);
  border-radius: 14px;
  padding: 1.6rem 1.75rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.stat-card:hover {
  box-shadow: 0 6px 24px rgba(0,144,192,0.10);
  transform: translateY(-2px);
}

.stat-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--cyan);
  line-height: 1;
  display: block;
}
.stat-number-suffix { color: var(--gold); }

.stat-card-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  display: block;
}

.stat-card-desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.55;
  margin-top: 0.65rem;
}

/* ---------- Research Areas — CSS Grid (no horizontal scroll) ---------- */
.research-section {
  padding: 6rem 2rem;
  position: relative;
  overflow: hidden;
}

.domain-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}

.domain-card {
  padding: 24px;
  border-left: 3px solid transparent;
  cursor: default;
  transition: transform 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.domain-card:hover {
  transform: translateY(-4px);
  border-left-color: var(--cyan);
  background: rgba(0, 144, 192, 0.04);
  box-shadow: 0 8px 32px rgba(0, 100, 180, 0.12);
}

.domain-icon {
  width: 36px; height: 36px;
  margin-bottom: 1rem;
  color: var(--cyan);
}

.domain-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.domain-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-dim);
}

/* ---------- Featured Papers ---------- */
.featured-papers-section {
  padding: 6rem 2rem;
  background: var(--bg-alt);
}

.pub-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1280px;
  margin: 3rem auto 0;
}

.pub-card {
  padding: 2rem;
  cursor: default;
  display: block;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.pub-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 12px 40px rgba(0,100,180,0.12), 0 0 20px var(--glow-gold);
  border-color: rgba(184, 134, 42, 0.4);
}

.pub-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.875rem;
}

.pub-card-type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.pub-card-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(184, 134, 42, 0.08);
  color: var(--gold);
  border: 1px solid rgba(184, 134, 42, 0.3);
  border-radius: 12px;
  padding: 2px 8px;
}

.pub-card-status--review {
  background: rgba(74, 96, 128, 0.06);
  color: var(--text-secondary);
  border-color: rgba(74, 96, 128, 0.2);
}

.pub-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.pub-card-venue {
  font-size: 0.82rem;
  color: var(--gold);
  line-height: 1.5;
  margin-bottom: 1rem;
  font-weight: 500;
}

.pub-card-doi {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--cyan-dim);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.15s;
  display: inline-block;
  word-break: break-all;
}
.pub-card-doi:hover { color: var(--cyan); }

/* ---------- Projects (all-projects page) ---------- */
.projects-section {
  padding: 6rem 2rem;
  background: var(--bg-alt);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1280px;
  margin: 3rem auto 0;
}

.project-card {
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  display: block;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.project-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 12px 40px rgba(0,100,180,0.15);
  border-color: var(--border-bright);
}

.project-card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
  background: var(--bg-alt);
}
.project-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.project-card:hover .project-card-image img { transform: scale(1.05); }

.project-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(246,248,252,0.6) 0%, transparent 60%);
}

.project-card-body { padding: 1.5rem; }

.project-card-type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.5rem;
  display: block;
}

.project-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.project-card-desc {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.project-card-link {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap 0.2s;
}
.project-card:hover .project-card-link { gap: 0.7rem; }

.project-card-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-alt) 0%, var(--surface-elevated) 100%);
}

/* ---------- Testimonials ---------- */
.testimonials-section {
  padding: 6rem 2rem;
  position: relative;
  background: var(--bg-base);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1280px;
  margin: 3rem auto 0;
}

.testimonial-card { padding: 2.5rem; position: relative; }

.testimonial-quote-mark {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 4rem;
  line-height: 1;
  color: var(--cyan);
  opacity: 0.30;
  margin-bottom: 0.5rem;
  display: block;
}

.testimonial-text {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1.75rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-medium);
  flex-shrink: 0;
}
.testimonial-avatar img { width: 100%; height: 100%; object-fit: cover; }

.testimonial-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}
.testimonial-role {
  font-size: 0.78rem;
  color: var(--cyan);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
}
.testimonial-institution {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ---------- CTA Strip ---------- */
.cta-strip {
  padding: 5rem 2rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--border-medium);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-strip::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

.cta-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: var(--text-primary);
}
.cta-title span { color: var(--cyan); }

.cta-sub {
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 5rem 2rem 2rem;
  border-top: 1px solid var(--border-medium);
  background: var(--bg-base);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  max-width: 1280px;
  margin: 0 auto 4rem;
}

.footer-brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}
.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 32ch;
}

.footer-heading {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--cyan); }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.footer-contact-item a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-contact-item a:hover { color: var(--cyan); }
.footer-contact-icon {
  width: 16px; height: 16px;
  color: var(--cyan);
  flex-shrink: 0;
  margin-top: 3px;
}

.social-icons { display: flex; gap: 1rem; margin-top: 0.5rem; }
.social-icon {
  width: 38px; height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, transform 0.2s, background 0.2s;
}
.social-icon:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(0, 144, 192, 0.06);
  transform: scale(1.1);
}
.social-icon svg { width: 18px; height: 18px; }

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  max-width: 1280px;
  margin: 0 auto;
}

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ---------- Section Utilities ---------- */
.section-inner { max-width: 1280px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 1rem; }
.section-divider {
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-medium), transparent);
  margin: 0;
}

/* ---------- Page Hero Strip (inner pages) ---------- */
.page-hero {
  padding: 9rem 2rem 5rem;
  position: relative;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(circle, rgba(0,144,192,0.14) 1.5px, transparent 1.5px) 0 0 / 30px 30px,
    radial-gradient(circle, rgba(0,144,192,0.06) 1px, transparent 1px) 15px 15px / 30px 30px,
    radial-gradient(ellipse at 50% 60%, rgba(0,144,192,0.08) 0%, transparent 65%),
    linear-gradient(135deg, #f6f8fc 0%, #eef2f8 100%);
}
.page-hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}
.page-hero-subtitle {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ---------- Poster Page ---------- */
/* Filter pills retained for potential reuse on other pages */
.poster-filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 2.5rem 0;
}

.filter-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 1.2rem;
  border-radius: 24px;
  border: 1px solid var(--border-medium);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filter-pill:hover,
.filter-pill.active {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #ffffff;
}

/* Poster grid — uniform fixed-height cards */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  max-width: 1280px;
  margin: 0 auto;
}

.poster-card {
  height: 280px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.poster-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,100,180,0.15), 0 0 16px var(--glow-cyan);
  border-color: var(--border-bright);
}

.poster-thumb {
  height: 160px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  position: relative;
}
.poster-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.poster-card-body {
  height: 120px;
  flex-shrink: 0;
  padding: 0.5rem 0.875rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.poster-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-shrink: 0;
}

.poster-card-venue {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.02em;
  margin-bottom: 2px;
  line-height: 1.3;
  overflow: hidden;
}

.poster-card-meta {
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.3;
}

.poster-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan-dim);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color 0.15s;
}
.poster-card-btn:hover { color: var(--cyan); }

/* Lightbox PDF viewer */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(246, 248, 252, 0.97);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lightbox.open { opacity: 1; pointer-events: all; }

.lightbox-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close {
  position: absolute;
  top: -3rem; right: 0;
  background: none; border: none;
  color: var(--text-primary);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s;
}
.lightbox-close:hover { color: var(--cyan); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,100,180,0.10);
  transition: background 0.2s, border-color 0.2s;
}
.lightbox-nav:hover { background: var(--surface-elevated); border-color: var(--cyan); }
.lightbox-prev { right: calc(100% + 1.5rem); }
.lightbox-next { left: calc(100% + 1.5rem); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) and (min-width: 769px) {
  /* Domain grid: 6-virtual-col trick so bottom 2 cards center under the top 3 */
  .domain-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .domain-card:nth-child(1) { grid-column: 1 / 3; }
  .domain-card:nth-child(2) { grid-column: 3 / 5; }
  .domain-card:nth-child(3) { grid-column: 5 / 7; }
  .domain-card:nth-child(4) { grid-column: 2 / 4; }
  .domain-card:nth-child(5) { grid-column: 4 / 6; }
}

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-cta { justify-content: center; }
  .hero-desc { max-width: none; }

  /* Move photo above text — must use the direct grid child */
  .hero-photo-wrap { order: -1; }
  /* Reset inline negative margin and add room for the rings (ring-3 extends 62px) */
  .hero-photo-outer { width: 260px; height: 260px; margin-top: 0 !important; margin-bottom: 4.5rem; }

  .hero-stat-row { max-width: 100%; grid-template-columns: 1fr 1fr; }
  .stat-cards-row { grid-template-columns: 1fr 1fr; }
  .pub-card-grid { grid-template-columns: 1fr 1fr; }
  .project-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero { padding: 7rem 1.5rem 4rem; }
  .stat-cards-row { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .pub-card-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .section-title { font-size: 1.75rem; }
  .domain-grid { grid-template-columns: 1fr; }
  /* Stat rows: side-by-side still on mobile */
  .hero-stat-row { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .stat-card-value { font-size: 0.75rem; }
  .membership-pill { font-size: 9px; padding: 1px 5px; }
}

/* ---------- Power Grid Network Background ---------- */
.power-grid-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.power-grid-bg svg { width: 100%; height: 100%; }

@keyframes node-pulse {
  0%, 100% { opacity: 0.20; transform: scale(1); filter: none; }
  45%, 55%  { opacity: 0.55; transform: scale(1.9); filter: drop-shadow(0 0 5px rgba(0,144,192,0.55)); }
}
@keyframes line-glow {
  0%, 100% { opacity: 0.10; }
  45%, 55%  { opacity: 0.32; }
}
.grid-node-pulse {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0.20;
  animation: node-pulse ease-in-out infinite;
}
.grid-line-glow {
  opacity: 0.10;
  animation: line-glow ease-in-out infinite;
}
/* Node timing — 14 nodes */
.gn1  { animation-duration: 3.0s; animation-delay: 0.0s; }
.gn2  { animation-duration: 4.2s; animation-delay: 0.7s; }
.gn3  { animation-duration: 3.6s; animation-delay: 1.5s; }
.gn4  { animation-duration: 4.0s; animation-delay: 0.3s; }
.gn5  { animation-duration: 3.2s; animation-delay: 2.1s; }
.gn6  { animation-duration: 3.5s; animation-delay: 1.0s; }
.gn7  { animation-duration: 4.4s; animation-delay: 1.8s; }
.gn8  { animation-duration: 3.1s; animation-delay: 0.5s; }
.gn9  { animation-duration: 3.8s; animation-delay: 2.5s; }
.gn10 { animation-duration: 4.1s; animation-delay: 1.2s; }
.gn11 { animation-duration: 3.3s; animation-delay: 0.8s; }
.gn12 { animation-duration: 4.6s; animation-delay: 2.0s; }
.gn13 { animation-duration: 3.7s; animation-delay: 1.6s; }
.gn14 { animation-duration: 4.3s; animation-delay: 0.2s; }
/* Line timing — 10 classes distributed across 23 connections */
.gl1  { animation-duration: 3.0s; animation-delay: 0.0s; }
.gl2  { animation-duration: 3.5s; animation-delay: 0.4s; }
.gl3  { animation-duration: 3.5s; animation-delay: 1.0s; }
.gl4  { animation-duration: 3.1s; animation-delay: 0.5s; }
.gl5  { animation-duration: 4.2s; animation-delay: 1.3s; }
.gl6  { animation-duration: 3.2s; animation-delay: 2.2s; }
.gl7  { animation-duration: 4.0s; animation-delay: 0.8s; }
.gl8  { animation-duration: 3.6s; animation-delay: 1.6s; }
.gl9  { animation-duration: 4.4s; animation-delay: 2.8s; }
.gl10 { animation-duration: 3.0s; animation-delay: 1.1s; }

/* ---------- Particles ---------- */
.particles { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.particle {
  position: absolute;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0.20;
  animation: particle-drift linear infinite;
}
@keyframes particle-drift {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 0.20; }
  90%  { opacity: 0.20; }
  100% { transform: translateY(-100vh) translateX(30px); opacity: 0; }
}

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-medium);
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.theme-toggle:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: var(--glow-cyan);
}
/* Light mode: show moon, hide sun */
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
/* Dark mode: show sun, hide moon */
html[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ============================================================
   SMOOTH THEME TRANSITION
   ============================================================ */
html.theme-transitioning,
html.theme-transitioning * {
  transition:
    background-color 0.28s ease,
    background 0.28s ease,
    color 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease !important;
}

/* ============================================================
   DARK MODE — html[data-theme="dark"]
   Deep blue-black base · brighter cyan · warm gold · clean contrast
   ============================================================ */
html[data-theme="dark"] {
  color-scheme: dark;
  scrollbar-color: #00c8e8 #0e1422;

  /* Background layers */
  --bg-base:          #0b0f18;
  --bg-alt:           #0e1422;
  --surface-card:     #131c30;
  --surface-elevated: #1a2540;

  /* Borders — blue-tinted whites */
  --border-subtle:    rgba(100, 160, 220, 0.08);
  --border-medium:    rgba(100, 160, 220, 0.16);
  --border-bright:    rgba(0, 210, 235, 0.44);

  /* Accent — brighter cyan reads on dark */
  --cyan:             #00c8e8;
  --cyan-light:       #00daf4;
  --cyan-dim:         #0094b8;

  /* Gold — slightly lifted for dark surfaces */
  --gold:             #d4a83c;
  --gold-light:       #e8bc50;

  /* Glows */
  --glow-cyan:        rgba(0, 200, 232, 0.18);
  --glow-gold:        rgba(212, 168, 60, 0.15);

  /* Text — cool near-white, no harsh #fff */
  --text-primary:     #dce8f8;
  --text-secondary:   #7a9cc0;
  --text-dim:         #4a6882;
}

/* ---------- Body gradient ---------- */
html[data-theme="dark"] body {
  background-image: linear-gradient(135deg, #0b0f18 0%, #0e1422 100%);
}

/* ---------- Navigation ---------- */
html[data-theme="dark"] .site-nav {
  background: rgba(11, 15, 24, 0.92);
  border-bottom-color: rgba(100, 160, 220, 0.08);
}
html[data-theme="dark"] .site-nav.scrolled {
  background: rgba(11, 15, 24, 0.98);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.50);
  border-bottom-color: rgba(100, 160, 220, 0.14);
}

/* ---------- Mobile menu ---------- */
html[data-theme="dark"] .mobile-menu {
  background: rgba(11, 15, 24, 0.98);
}

/* ---------- Hero ---------- */
html[data-theme="dark"] .hero {
  background:
    radial-gradient(ellipse at 60% 50%, rgba(0, 200, 232, 0.11) 0%, transparent 65%),
    linear-gradient(135deg, #0b0f18 0%, #0e1422 100%);
}

/* ---------- Hero stat cards ---------- */
html[data-theme="dark"] .stat-card.glass-card {
  background: rgba(19, 28, 48, 0.90);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

/* ---------- Glass cards ---------- */
html[data-theme="dark"] .glass-card {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .glass-card:hover {
  box-shadow: 0 8px 32px rgba(0, 200, 232, 0.14);
}

/* ---------- Buttons ---------- */
html[data-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, #00c8e8, #0094b8);
}
html[data-theme="dark"] .btn-primary:hover {
  box-shadow: 0 0 24px rgba(0, 200, 232, 0.42);
}

/* ---------- Project card overlay ---------- */
html[data-theme="dark"] .project-card-overlay {
  background: linear-gradient(to top, rgba(11, 15, 24, 0.72) 0%, transparent 60%);
}
html[data-theme="dark"] .project-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

/* ---------- Domain card hover ---------- */
html[data-theme="dark"] .domain-card:hover {
  background: rgba(0, 200, 232, 0.07);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* ---------- Pub card hover ---------- */
html[data-theme="dark"] .pub-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.40), 0 0 20px var(--glow-gold);
}
html[data-theme="dark"] .pub-card-status--review {
  background: rgba(122, 156, 192, 0.10);
  border-color: rgba(122, 156, 192, 0.24);
  color: var(--text-secondary);
}

/* ---------- Poster card hover ---------- */
html[data-theme="dark"] .poster-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 16px var(--glow-cyan);
}

/* ---------- Page hero (inner pages) ---------- */
html[data-theme="dark"] .page-hero {
  background:
    radial-gradient(circle, rgba(0, 200, 232, 0.18) 1.5px, transparent 1.5px) 0 0 / 30px 30px,
    radial-gradient(circle, rgba(0, 200, 232, 0.08) 1px, transparent 1px) 15px 15px / 30px 30px,
    radial-gradient(ellipse at 50% 60%, rgba(0, 200, 232, 0.10) 0%, transparent 65%),
    linear-gradient(135deg, #0b0f18 0%, #0e1422 100%);
}

/* ---------- Grid overlay — slightly more visible on dark ---------- */
html[data-theme="dark"] .grid-overlay {
  background-image:
    linear-gradient(rgba(0, 200, 232, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 200, 232, 0.045) 1px, transparent 1px);
}

/* ---------- Power grid SVG lines (presentational attr → CSS wins) ---------- */
html[data-theme="dark"] .power-grid-bg line {
  stroke: #00c8e8;
}

/* ---------- Lightbox ---------- */
html[data-theme="dark"] .lightbox {
  background: rgba(11, 15, 24, 0.97);
}
html[data-theme="dark"] .lightbox-nav {
  background: rgba(19, 28, 48, 0.94);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.50);
}

/* ---------- Membership pills ---------- */
html[data-theme="dark"] .membership-pill {
  background: rgba(212, 168, 60, 0.13);
}

/* ---------- CTA strip top line ---------- */
html[data-theme="dark"] .cta-strip::before {
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}
