/* ── Design System ─────────────────────────────────────────── */
:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --bg-deep: #060608;
  --surface: #111114;
  --surface-hover: #16161a;
  --text: #f2f2ea;
  --muted: #b8b8ae;
  --accent: #7fe0c8;
  --accent-dim: rgba(127, 224, 200, 0.35);
  --accent-bright: rgba(127, 224, 200, 0.8);
  --accent-glow: rgba(127, 224, 200, 0.12);
  --violet: #A78BFA;
  --violet-dim: rgba(167, 139, 250, 0.25);
  --violet-glow: rgba(167, 139, 250, 0.15);
  --rule: #1f2329;
  --max-width: 900px;
  --nav-height: 56px;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", "Helvetica Neue", sans-serif;
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: 0.1px;
  overflow-x: hidden;
}

/* Subtle noise texture overlay for depth */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-video { transition: none; }
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-dim);
  transition: border-color 0.3s, color 0.3s;
}

a:hover, a:focus {
  border-bottom-color: var(--accent-bright);
}

img { max-width: 100%; height: auto; display: block; }

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3 {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  font-weight: 400;
}

h1 {
  font-family: "Jost", "Futura", "IBM Plex Sans", sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0 0 16px;
}

h2 {
  font-family: "Jost", "Futura", "IBM Plex Sans", sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--muted);
  margin: 32px 0 12px;
  position: relative;
  display: inline-block;
}

/* Decorative accent line after section headings */
h2::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

h3 {
  font-size: 1.1rem;
  color: var(--text);
  margin: 24px 0 8px;
}

p { margin: 0 0 16px; }

ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

li { margin: 8px 0; }

em, i { font-style: italic; }

/* ── Fade-in Animations ───────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px var(--violet-glow), 0 0 60px rgba(167, 139, 250, 0.06); }
  50% { box-shadow: 0 0 28px var(--violet-dim), 0 0 80px rgba(167, 139, 250, 0.1); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Skip Link (a11y) ────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--accent);
  color: var(--bg);
  padding: 8px 16px;
  border-radius: 4px;
  border-bottom: none;
  z-index: 200;
  font-size: 0.85rem;
}

.skip-link:focus {
  top: 8px;
  border-bottom: none;
}

/* ── Layout ───────────────────────────────────────────────── */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 32px) 24px 24px;
  position: relative;
}

.section {
  margin-bottom: 16px;
}

/* ── Navigation ───────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid var(--rule);
  height: var(--nav-height);
}

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

.nav-brand {
  font-family: "Jost", "Futura", sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--text);
  border-bottom: none;
  transition: color 0.3s;
}

.nav-brand:hover { color: var(--accent); border-bottom: none; }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: color 0.3s, border-color 0.3s;
}

.nav-links a:hover {
  color: var(--text);
  border-bottom-color: var(--accent-dim);
}

.nav-links a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--rule);
    padding: 16px 24px;
    gap: 4px;
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    font-size: 1rem;
    padding: 12px 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 40px;
  text-align: center;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.hero-video.loaded {
  opacity: 1;
}

/* Gradient overlays to blend video edges into page background */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, var(--bg) 0%, transparent 18%, transparent 75%, var(--bg) 100%),
    linear-gradient(to right, var(--bg) 0%, transparent 15%, transparent 85%, var(--bg) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero h1 {
  position: relative;
  z-index: 2;
  font-family: "Jost", "Futura", sans-serif;
  font-size: clamp(2.2rem, 7vw, 3.6rem);
  font-weight: 300;
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--text) 0%, var(--violet) 50%, var(--accent) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both,
             gradientShift 8s ease-in-out infinite;
}

.hero .tagline {
  position: relative;
  z-index: 2;
  font-size: clamp(1.02rem, 2.5vw, 1.2rem);
  color: var(--muted);
  font-weight: 300;
  max-width: 580px;
  margin: 0 auto 36px;
  line-height: 1.6;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

/* Thin decorative line under hero */
.hero::after {
  content: "";
  display: block;
  width: 80px;
  height: 1px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  background: linear-gradient(90deg, transparent, var(--violet), var(--accent), transparent);
}

@media (max-width: 600px) {
  .hero {
    min-height: 320px;
    padding: 60px 0 48px;
  }

  .hero h1 {
    letter-spacing: 3px;
  }

  .welcome p {
    max-width: 100%;
  }
}

/* ── Cards ────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s, transform 0.3s, box-shadow 0.4s;
}

/* Top accent bar on cards */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--accent));
  opacity: 0;
  transition: opacity 0.4s;
}

.card:hover {
  border-color: rgba(127, 224, 200, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 24px var(--accent-glow);
}

.card:hover::before {
  opacity: 1;
}

.card h3 {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 1rem;
}

.card p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
  line-height: 1.55;
}

/* Stagger card entrance */
.card-grid .card:nth-child(1) { animation-delay: 0s; }
.card-grid .card:nth-child(2) { animation-delay: 0.1s; }
.card-grid .card:nth-child(3) { animation-delay: 0.2s; }
.card-grid .card:nth-child(4) { animation-delay: 0.3s; }

/* ── Welcome Section (index) ──────────────────────────────── */
.welcome {
  position: relative;
  /* Break out of main's max-width to go full-bleed */
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-bottom: 16px;
  padding: 40px 24px;
  text-align: center;
  overflow: hidden;
}

.welcome-bg {
  position: absolute;
  inset: 0;
  background: url("../images/welcome-bg.jpg") center / cover no-repeat;
  opacity: 0.35;
  z-index: 0;
}

/* Soft fade at top and bottom edges only */
.welcome::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, var(--bg) 0%, transparent 8%, transparent 92%, var(--bg) 100%);
}

.welcome-content {
  position: relative;
  z-index: 2;
}

.welcome h2 {
  font-size: 1.3rem;
  letter-spacing: 6px;
  color: var(--text);
  margin-top: 0;
  margin-bottom: 20px;
}

.welcome h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.welcome p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.welcome-lab {
  margin-top: 8px;
  color: var(--text);
}

/* ── Press Section (index) ───────────────────────────────── */
.press-section {
  text-align: center;
  padding: 12px 0;
  margin-bottom: 12px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.press-label {
  font-family: "Jost", "Futura", sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--muted);
  opacity: 0.6;
  display: block;
  margin-bottom: 10px;
}

.press-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  align-items: center;
}

.press-row a {
  font-family: "Jost", "Futura", sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  transition: color 0.3s, border-color 0.3s;
}

.press-row a:hover {
  color: var(--text);
  border-bottom-color: var(--accent-dim);
}

/* ── CTA Button ───────────────────────────────────────────── */
.cta {
  display: inline-block;
  background: var(--violet);
  color: var(--bg);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 14px 32px;
  border-radius: 6px;
  border-bottom: none;
  transition: background 0.3s, transform 0.15s, box-shadow 0.4s;
  letter-spacing: 0.5px;
  position: relative;
}

.cta:hover {
  background: #b99dfc;
  border-bottom: none;
  transform: translateY(-2px);
  box-shadow: 0 0 32px var(--violet-dim), 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: glowPulse 2s ease-in-out infinite;
}

.cta:active {
  transform: translateY(0);
}

/* ── People Grid ──────────────────────────────────────────── */
.pi-section {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 40px;
}

.pi-photo {
  width: 220px;
  min-width: 220px;
  border-radius: 6px;
  border: 1px solid var(--rule);
  transition: border-color 0.4s, box-shadow 0.4s;
}

.pi-photo:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 0 24px var(--accent-glow);
}

.pi-info h3 {
  margin-top: 0;
  font-size: 1.3rem;
}

.pi-info .role {
  color: var(--violet);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  margin: 24px 0;
}

.person-card {
  text-align: center;
}

.person-card img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--rule);
  margin: 0 auto 12px;
  transition: border-color 0.4s, box-shadow 0.4s;
}

.person-card img:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.person-card .name {
  font-weight: 500;
  margin-bottom: 4px;
}

.person-card .role {
  font-size: 0.85rem;
  color: var(--muted);
}

.placeholder-card {
  border: 2px dashed var(--rule);
  border-radius: 8px;
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
  transition: border-color 0.4s;
}

.placeholder-card:hover {
  border-color: var(--accent-dim);
}

.placeholder-card p {
  margin: 8px 0;
}

/* ── Mirror Card ──────────────────────────────────────────── */
.mirror-card {
  text-align: center;
  padding: 36px 24px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.mirror-disc {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto 24px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 0 30px rgba(255, 255, 255, 0.05),
    inset 0 0 40px rgba(255, 255, 255, 0.03);
}

.mirror-surface {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 35% 30%, rgba(255, 255, 255, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 65% 70%, rgba(127, 224, 200, 0.08) 0%, transparent 50%),
    conic-gradient(
      from 180deg,
      rgba(167, 139, 250, 0.12),
      rgba(255, 255, 255, 0.06),
      rgba(127, 224, 200, 0.12),
      rgba(255, 255, 255, 0.08),
      rgba(167, 139, 250, 0.12)
    ),
    linear-gradient(145deg, #1a1a1f 0%, #2a2a30 40%, #1a1a1f 60%, #222228 100%);
  animation: mirrorShimmer 6s ease-in-out infinite;
}

@keyframes mirrorShimmer {
  0%, 100% {
    opacity: 1;
    transform: rotate(0deg);
  }
  50% {
    opacity: 0.92;
    transform: rotate(3deg);
  }
}

.mirror-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 2rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
  z-index: 1;
}

.mirror-disc:hover .mirror-surface {
  animation-duration: 2s;
}

.mirror-disc:hover .mirror-text {
  color: var(--accent);
  text-shadow: 0 0 24px var(--accent-glow);
}

.mirror-headline {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 12px;
}

.mirror-card p {
  margin: 8px 0;
  color: var(--muted);
}

.mirror-card p:first-of-type {
  color: var(--text);
}

@media (max-width: 600px) {
  .pi-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .pi-photo { width: 180px; min-width: auto; }
}

/* ── Publications ─────────────────────────────────────────── */
.pub-list {
  margin-top: 24px;
}

.pub-list h3 {
  font-size: 1.6rem;
  color: var(--accent);
  margin: 48px 0 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

.pub {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}

/* ── Publication Index Number ────────────────────────────── */
.pub-thumb-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.pub-thumb-wrap .pub-num {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--muted);
  opacity: 1;
  margin-top: 6px;
  line-height: 1;
}

.pub:last-child {
  border-bottom: none;
}

/* Thumbnail on the left, like a mini PDF preview */
.pub-thumb {
  width: 140px;
  min-width: 140px;
  border-radius: 4px;
  border: 1px solid var(--rule);
  background: var(--surface);
  transition: border-color 0.4s, box-shadow 0.4s;
}

.pub:hover .pub-thumb {
  border-color: var(--accent-dim);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* Legacy full-size images hidden */
.pub-img { display: none; }

.pub-text {
  flex: 1;
}

.pub-text .pub-citation {
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 12px;
}

.pub-text .pub-citation strong {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pub-text .pub-citation .pub-journal {
  font-weight: 700;
  font-style: italic;
}

.pub-text .pub-links {
  margin-top: 8px;
  font-size: 1rem;
  list-style: disc;
  padding-left: 1.4em;
  color: var(--muted);
}

.pub-text .pub-links li {
  margin-bottom: 4px;
}

.pub-text .pub-links a {
  color: var(--accent);
  border-bottom: 1px solid rgba(127, 224, 200, 0.3);
  transition: border-color 0.2s;
}

.pub-text .pub-links a:hover {
  border-bottom-color: var(--accent);
}

.pub-text .pub-links .pub-rawlink {
  word-break: break-all;
}

/* ── Press / In the News ──────────────────────────────────── */
.pub-news {
  margin-top: 12px;
  border-left: 2px solid var(--violet);
  padding: 12px 16px;
  background: var(--violet-glow);
  border-radius: 0 6px 6px 0;
}

.pub-news-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--violet);
  margin-bottom: 8px;
}

.pub-news ul {
  list-style: disc;
  padding-left: 1.4em;
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
}

.pub-news li {
  margin-bottom: 4px;
}

.pub-news a {
  color: var(--violet);
  border-bottom: 1px solid var(--violet-dim);
  transition: border-color 0.2s;
}

.pub-news a:hover {
  border-bottom-color: var(--violet);
}

/* Placeholder thumbnail for papers without images */
.pub-thumb-placeholder {
  width: 140px;
  min-width: 140px;
  height: 182px;
  border-radius: 3px;
  border: 1px solid var(--rule);
  background: var(--surface);
  display: flex;
  align-items: center;
  text-decoration: none;
  justify-content: center;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (max-width: 600px) {
  .pub {
    gap: 16px;
  }
  .pub-thumb, .pub-thumb-placeholder {
    width: 100px;
    min-width: 100px;
  }
  .pub-thumb-placeholder {
    height: 130px;
  }
}

/* ── Join Page ────────────────────────────────────────────── */

/* Section rhythm — breathing room between chapters */
.join-page > h2,
.people-page > h2,
.research-page > h2 {
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px solid var(--rule);
}

.join-intro {
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: none;
  margin-bottom: 28px;
}

/* ── Asymmetric Photo Grid ─────────────────────────────── */
.join-photo-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  grid-template-rows: 200px 240px 200px;
  gap: 12px;
  margin-bottom: 16px;
  position: relative;
}

/* Subtle radial glow behind the grid */
.join-photo-grid::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}


/* L-shaped layout: photo 1 tall left, 2+3 stacked right, 4 full-width bottom */
.join-photo:nth-child(1) {
  grid-column: 1;
  grid-row: 1 / 3;
}
.join-photo:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}
.join-photo:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}
.join-photo:nth-child(4) {
  grid-column: 1 / -1;
  grid-row: 3;
}

.join-photo {
  margin: 0;
  overflow: hidden;
  border-radius: 6px;
  position: relative;
  border: 1px solid transparent;
  transition: border-color 0.4s, box-shadow 0.4s;
}

.join-photo:hover {
  border-color: rgba(167, 139, 250, 0.2);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25), 0 0 20px var(--violet-glow);
}

.join-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.join-photo:hover img {
  transform: scale(1.03);
}

.join-photo figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 12px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.3px;
}

/* Staggered reveal — vary translateY per photo for organic cascade */
.join-photo.reveal:nth-child(1) { transform: translateY(32px); }
.join-photo.reveal:nth-child(2) { transform: translateY(20px); }
.join-photo.reveal:nth-child(3) { transform: translateY(28px); }
.join-photo.reveal:nth-child(4) { transform: translateY(18px); }
.join-photo.reveal.visible { transform: translateY(0); }

@media (max-width: 600px) {
  .join-photo-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .join-photo:nth-child(1),
  .join-photo:nth-child(2),
  .join-photo:nth-child(3),
  .join-photo:nth-child(4) {
    grid-column: 1;
    grid-row: auto;
  }

  .join-photo img {
    max-height: 220px;
  }
}

/* ── Vision Section ───────────────────────────────────── */
.vision-section {
  margin-bottom: 8px;
  background: linear-gradient(135deg, rgba(127, 224, 200, 0.03) 0%, rgba(167, 139, 250, 0.04) 100%);
  padding: 28px 24px;
  border-radius: 8px;
}

.vision-section p {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--muted);
}

.vision-section ul {
  margin: 12px 0 16px 18px;
  padding: 0;
}

.vision-section li {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 8px;
}

.vision-section li strong {
  color: var(--text);
  font-weight: 500;
}

/* ── Timeline ────────────────────────────────────────── */
.timeline {
  margin: 20px 0;
  padding-left: 20px;
  border-left: 2px solid var(--rule);
}

.timeline-item {
  position: relative;
  padding: 0 0 20px 20px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.timeline-date {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.timeline-text {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Position Cards ──────────────────────────────────── */
.positions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* All position cards span full width */
.positions-grid .position-card[data-role="phd"],
.positions-grid .position-card[data-role="postdoc"],
.positions-grid .position-card[data-role="fellowship"],
.positions-grid .position-card[data-role="undergrad"] {
  grid-column: 1 / -1;
}

.position-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s, box-shadow 0.4s;
}

/* Ghost label in top-right corner */
.position-card::after {
  content: attr(data-role);
  position: absolute;
  top: 12px;
  right: 14px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  opacity: 0.3;
  pointer-events: none;
}

.position-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent), var(--violet));
  opacity: 0;
  transition: opacity 0.4s;
}

.position-card:hover {
  border-color: rgba(167, 139, 250, 0.2);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.position-card:hover::before {
  opacity: 1;
}

/* Per-role hover accents */
.position-card[data-role="phd"]:hover {
  border-color: var(--accent-dim);
}
.position-card[data-role="phd"]::before {
  background: var(--accent);
}

.position-card[data-role="postdoc"]:hover {
  border-color: var(--violet-dim);
}
.position-card[data-role="postdoc"]::before {
  background: var(--violet);
}

.position-card[data-role="fellowship"]:hover {
  border-color: rgba(127, 224, 200, 0.2);
}
.position-card[data-role="fellowship"]::before {
  background: linear-gradient(180deg, var(--accent), var(--violet));
}

.position-card[data-role="undergrad"]:hover {
  border-color: rgba(147, 182, 225, 0.25);
}
.position-card[data-role="undergrad"]::before {
  background: linear-gradient(180deg, var(--accent), var(--violet));
}

.position-card h3 {
  color: var(--violet);
  margin-top: 0;
}

/* Touch devices: always-visible left accent bar */
@media (hover: none) {
  .position-card::before {
    opacity: 1;
  }
}

/* Mobile: single column positions */
@media (max-width: 600px) {
  .positions-grid {
    grid-template-columns: 1fr;
  }

  .positions-grid .position-card[data-role="undergrad"] {
    grid-column: 1;
  }

  .position-card {
    padding: 20px 18px;
  }

  .timeline {
    padding-left: 18px;
  }

  .timeline-item::before {
    left: -23px;
  }
}

/* ── Highlight Box ───────────────────────────────────── */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 12px var(--violet-glow); }
  50% { box-shadow: 0 0 24px var(--violet-glow), 0 0 40px rgba(167, 139, 250, 0.08); }
}

.highlight-box {
  background: linear-gradient(135deg, rgba(127, 224, 200, 0.06), var(--violet-glow));
  border-left: 3px solid var(--violet);
  padding: 24px 28px;
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
  position: relative;
  animation: glowPulse 4s ease-in-out infinite;
}

.highlight-box::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(135deg, transparent 60%, var(--violet-glow));
  pointer-events: none;
}

.highlight-box p {
  margin: 0;
  position: relative;
}

@media (max-width: 600px) {
  .highlight-box {
    padding: 18px 20px;
  }
}

/* ── Poster Feature ──────────────────────────────────── */
.poster-feature {
  text-align: center;
  margin: 32px 0 40px;
  padding: 0;
}

.poster-image-link {
  display: inline-block;
  border-bottom: none;
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3),
              0 0 0 1px var(--rule);
}

.poster-image-link:hover {
  border-bottom: none;
  transform: translateY(-5px) scale(1.005);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5),
              0 0 40px var(--violet-glow),
              0 0 0 1px var(--violet-dim);
}

.poster-image {
  max-width: 540px;
  width: 100%;
  border-radius: 6px;
  display: block;
  transition: filter 0.4s;
}

.poster-image-link:hover .poster-image {
  filter: brightness(1.04);
}

.poster-caption {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.5;
  margin: 14px 0 18px;
}

.poster-feature .cta {
  margin-top: 4px;
}

@media (max-width: 600px) {
  .poster-image {
    max-width: 100%;
  }
}

/* ── Fellowship List ─────────────────────────────────── */
.fellowship-list {
  margin: 12px 0 16px 18px;
  padding: 0;
}

.fellowship-list li {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 8px;
}

.fellowship-list li strong {
  color: var(--accent);
  font-weight: 500;
}

/* ── Fellowship Tags ─────────────────────────────────── */
.fellowship-tag {
  display: inline-block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 3px;
  margin-left: 8px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.tag-biomed {
  background: rgba(167, 139, 250, 0.15);
  color: var(--violet);
  border: 1px solid rgba(167, 139, 250, 0.25);
}

.tag-us {
  background: rgba(127, 224, 200, 0.1);
  color: var(--accent);
  border: 1px solid rgba(127, 224, 200, 0.2);
}

/* ── Position Badge (e.g. "Now Hiring") ──────────────── */
.position-badge {
  display: inline-block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--bg);
  background: var(--violet);
  padding: 4px 12px;
  border-radius: 3px;
  margin-bottom: 12px;
}

/* ── Contact CTA ─────────────────────────────────────── */
.contact-cta {
  text-align: center;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
  padding: 32px 28px 36px;
  margin: 8px auto 0;
  max-width: 560px;
}

.contact-cta h2 {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
  display: block;
}

.contact-cta h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.contact-cta p {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.contact-links a {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  transition: color 0.3s, border-color 0.3s;
}

.contact-links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent-dim);
}

/* ── Section Spacing (Join page) ─────────────────────── */
.join-page .join-photo-grid {
  margin-bottom: 32px;
}

.join-page .join-intro {
  margin-bottom: 36px;
}

.join-page .vision-section {
  margin-bottom: 24px;
}

.join-page .positions-grid {
  margin-bottom: 32px;
}

@media (max-width: 600px) {
  .contact-cta {
    padding: 24px 20px 28px;
    max-width: none;
  }

  .fellowship-tag {
    display: block;
    margin-left: 0;
    margin-top: 4px;
    width: fit-content;
  }
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 12px;
  padding: 36px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  background: var(--bg-deep);
  position: relative;
}

/* Subtle gradient fade at top of footer */
.site-footer::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--bg-deep));
  pointer-events: none;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-bottom: 28px;
}

.footer-logo-link {
  border-bottom: none;
  transition: opacity 0.3s;
}

.footer-logo-link:hover {
  border-bottom: none;
  opacity: 0.8;
}

.footer-logo {
  height: 52px;
  width: auto;
  opacity: 0.85;
  transition: opacity 0.3s;
}

.footer-logo-link:hover .footer-logo {
  opacity: 1;
}

.footer-logo-lehigh {
  height: 40px;
}

.footer-logo-sep {
  width: 1px;
  height: 40px;
  background: var(--rule);
}

.footer-address {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 20px;
}

.footer-address strong {
  color: var(--text);
  font-weight: 500;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.85rem;
  border-bottom-color: var(--rule);
  transition: color 0.3s, border-bottom-color 0.3s;
}

.footer-links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent-dim);
}

/* ── Join CTA Card (index) ────────────────────────────────── */
.join-cta {
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
  padding: 24px 24px 28px;
  margin: 24px auto 0;
  max-width: 520px;
}

/* ── PI CV List + Links (people) ─────────────────────────── */
.people-page .pi-info ul {
  margin-left: 0;
}

.people-page .pi-info li {
  margin-bottom: 10px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

.people-page .pi-info li strong {
  color: var(--text);
}

.pi-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 12px;
}

.pi-links a {
  font-size: 0.85rem;
  color: var(--muted);
  border-bottom-color: var(--rule);
  transition: color 0.3s, border-bottom-color 0.3s;
}

.pi-links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent-dim);
}

/* ── Publication Legend (research) ────────────────────────── */
.pub-legend {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 16px 20px;
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ── Utilities ────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-center h2 { display: inline-block; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
