/* =======================
   FONTS & RESET
======================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---------------------------------
   Tang Lab Color System
---------------------------------- */
:root {
  --tl-blue-dark: #7dd3fc;  /* Primary blue in dark mode */
  --tl-blue-light: #0ea5e9; /* Primary blue in light mode */

  --bg-dark: radial-gradient(circle at top, #070921 0, #02010b 45%, #02010b 100%);
  --bg-light: #f3f4f6;

  --text-dark-main: #e2e8f0;
  --text-light-main: #0f172a;
}

/* =======================
   BASE
======================= */

html, body {
  background: var(--bg-dark);
  color: var(--text-dark-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  line-height: 1.7;
}

/* The body uses theme-dark by default; theme-light is added/removed via JS */
body.theme-light {
  background: var(--bg-light);
  color: var(--text-light-main);
}

/* Page container */
.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 24px 72px;
}
body.theme-light .page {
  padding-top: 12px; /* In light mode, the video sits closer to the nav */
}

/* =======================
   GLOBAL LINKS (use blue in content area)
======================= */

/* Links in dark mode */
body.theme-dark a {
  color: var(--tl-blue-dark);
  text-decoration: underline;
  text-decoration-color: rgba(125, 211, 252, 0.4);
}
body.theme-dark a:hover {
  color: #a5f3fc;
  text-decoration-color: rgba(165, 243, 252, 0.8);
}

/* Links in light mode */
body.theme-light a {
  color: var(--tl-blue-light);
  text-decoration: underline;
  text-decoration-color: rgba(14, 165, 233, 0.35);
}
body.theme-light a:hover {
  color: #0369a1;
  text-decoration-color: rgba(3, 105, 161, 0.6);
}

/* === Make nav link color consistent with “TANG LAB” === */

/* Dark mode: match nav-title / main text color */
body.theme-dark .nav-links a {
  color: var(--text-dark-main) !important;   /* This is #e2e8f0 */
  text-decoration: none !important;
  text-decoration-color: transparent !important;
}

body.theme-dark .nav-links a:hover {
  color: #ffffff !important;                 /* Slightly brighter on hover; adjust if desired */
}

/* Light mode: same deep color as the TANG LAB text */
body.theme-light .nav-links a {
  color: #0f172a !important;                 /* Matches body.theme-light primary text/headings */
  text-decoration: none !important;
  text-decoration-color: transparent !important;
}

body.theme-light .nav-links a:hover {
  color: #111827 !important;
}


/* =======================
   NAVIGATION
======================= */

nav {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(7, 10, 27, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
  z-index: 50;
}
body.theme-light nav {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e5e7eb;
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
body.theme-light .nav-title {
  color: #0f172a;
}

/* Top tabs */
.nav-links a {
  margin-left: 22px;
  font-size: 13px;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  position: relative;
  text-decoration: none;          /* Prevent global link styling */
}
body.theme-light .nav-links a {
  color: #4b5563;
}

/* Text color on hover */
.nav-links a:hover {
  color: #f9fafb;
}
body.theme-light .nav-links a:hover {
  color: #0f172a;
}

/* Gradient underline (hover + active) */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #22d3ee, #a855f7);
  transition: width 0.18s ease-out;
}

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

/* Ensure nav links are not underlined by global styles */
body.theme-dark .nav-links a,
body.theme-light .nav-links a {
  text-decoration: none !important;
  text-decoration-color: transparent !important;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav-links a.active {
  opacity: 1;
}

.nav-title {
  text-decoration: none !important;
  color: inherit !important;
}
.nav-title:hover {
  text-decoration: none !important;
  color: inherit !important;
}

body.theme-dark .nav-links a.active {
  color: #f9fafb !important;
}

body.theme-light .nav-links a.active {
  color: #111827 !important;
}

/* Theme toggle button */
.theme-toggle {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.theme-toggle:hover {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.7);
}

body.theme-light .theme-toggle {
  border-color: #d1d5db;
  color: #0f172a;
  background: #f9fafb;
}
body.theme-light .theme-toggle:hover {
  background: #e0f2fe;
  border-color: #38bdf8;
}


/* =======================
   HERO
======================= */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.4fr);
  gap: 40px;
  align-items: center;
  margin-top: 40px;
}
@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
}

.hero-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #38bdf8;
  margin-bottom: 12px;
}
body.theme-light .hero-kicker {
  color: #0369a1;
}

.page-title {
  font-size: clamp(34px, 4.8vw, 42px);
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 20px;
}
body.theme-light .page-title {
  color: #020617;          /* Slightly darker than #0f172a for stronger headlines */
  letter-spacing: -0.03em; /* Tighter headline spacing, editorial style */
}
/* Two intro paragraphs: slightly larger text with comfortable spacing and width */
body.theme-light .hero-subtitle {
  font-size: 17px;
  line-height: 1.7;
  color: #374151;
  max-width: 640px;
}

.page-title span {
  color: #a855f7;
}

.hero-subtitle {
  font-size: 16px;
  color: #e2e8f0;
  max-width: 520px;
}
.hero-subtitle + .hero-subtitle {
  margin-top: 10px;
  margin-bottom: 20px;
}
body.theme-light .hero-subtitle {
  color: #374151;
}

/* --- Hero subheadline (between H1 and body text) --- */
.hero-subheadline {
  font-size: 19px;           /* Larger than body text, smaller than H1 */
  font-weight: 500;
  color: #1e293b;            /* Deep gray for a professional tone */
  margin-top: 12px;
  margin-bottom: 28px;
  max-width: 700px;
  line-height: 1.55;
}

body.theme-dark .hero-subheadline {
  color: #e2e8f0;            /* Use light gray in dark mode */
}



/* engineer tags */
.hero-tags {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  color: #9ca3af;
  opacity: 0.9;
  line-height: 2.1;
  letter-spacing: 0.03em;
}
body.theme-light .hero-tags {
  color: #6b7280;
}

.hero-tags span::before {
  content: "#";
  margin-right: 4px;
}
body.theme-dark .hero-tags span::before {
  color: var(--tl-blue-dark);
}
body.theme-light .hero-tags span::before {
  color: var(--tl-blue-light);
}

/* hero image */
.hero-img {
  width: 100%;
  border-radius: 12px;
  margin-top: 28px;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* ===== HERO VIDEO BANNER ===== */

.hero-video {
  margin-top: 0;
  margin-bottom: 40px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}
.hero-video-el {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  pointer-events: none;
}
.hero-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 40%, rgba(2, 6, 23, 0.55));
  pointer-events: none;
}
body.theme-light .hero-video {
  border-color: #e5e7eb;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
}

/* =======================
   HERO RIGHT: CODE PANEL
======================= */

.hero-panel {
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,0.22);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), rgba(15, 23, 42, 0.98));
  padding: 18px 18px 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
}
body.theme-light .hero-panel {
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.06), #ffffff);
  border-color: #d1d5db;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.hero-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: #cbd5e1;
}

.dots {
  display: flex;
  gap: 5px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}
.dot:nth-child(1) { background: #ef4444; }
.dot:nth-child(2) { background: #f97316; }
.dot:nth-child(3) { background: #22c55e; }

.code-block {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.55;
  padding: 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(30, 64, 175, 0.6);
  color: #e5e7eb;
  overflow: hidden;
  height: 390px;
}
body.theme-light .code-block {
  background: #020617;
  color: #e5e7eb;
}

.code-block pre {
  margin: 0;
  white-space: pre-wrap;
}
.code-comment { color: #64748b; }
.code-key     { color: #22d3ee; }
.code-str     { color: #a5b4fc; }

.cursor {
  display: inline-block;
  width: 7px;
  height: 1.1em;
  background: #e5e7eb;
  margin-left: 2px;
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.hero-panel-footer {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: #9ca3af;
}

/* =======================
   SECTION ELEMENTS
======================= */

section {
  margin-top: 16px;
}

/* Align research overview header text with section body text */
p.section-intro {
  font-size: 16px;
  color: #e2e8f0;
  margin-bottom: 20px;
}

body.theme-light p.section-intro {
  color: #374151;   /* Matches .research-text p in light mode */
}


/* JetBrains-style section titles (consistent styling) */
.section-title {
  font-size: 26px;
  font-weight: 650;
  margin-bottom: 20px;
  letter-spacing: 0.015em;
  line-height: 1.25;
  position: relative;
}

/* Dark mode */
body.theme-dark .section-title {
  color: #e5e7eb;
}
body.theme-dark .section-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin-top: 6px;
  background: #38bdf8;
  border-radius: 0;
}

/* Light mode */
body.theme-light .section-title {
  color: #0f172a;
}
body.theme-light .section-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin-top: 6px;
  background: #0ea5e9;
  border-radius: 0;
}

.accent-purple {
  color: #a855f7;
}

/* cards */
.card {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 16px 18px;
  margin-bottom: 14px;
  background: rgba(15, 23, 42, 0.92);
  transition: border 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  border-color: rgba(56, 189, 248, 0.7);
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
}
body.theme-light .card {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

/* footer */
footer {
  margin-top: 72px;
  padding: 32px 0 40px;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
}
body.theme-light footer {
  border-top-color: #e5e7eb;
  color: #6b7280;
}

/* =======================
   TWO-COLUMN LAYOUT (NEWS + FUTURE CONTENT)
======================= */

.twocol {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  margin-top: 64px;
}

.right-placeholder {
  border-left: 1px solid rgba(148, 163, 184, 0.2);
  padding-left: 24px;
  color: #64748b;
  font-size: 14px;
  font-style: italic;
}

/* =======================
   SCROLLABLE NEWS FEED
======================= */

.scroll-box {
  overflow-y: auto;
  max-height: 300px;
  padding-right: 10px;
  margin-top: 18px;
  border-left: 2px solid rgba(56, 189, 248, 0.35);
}
.scroll-box::-webkit-scrollbar {
  width: 4px;
}
.scroll-box::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.35);
  border-radius: 999px;
}
.scroll-box::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.55);
}

.scroll-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 14px;
  padding: 3px 0 5px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  align-items: flex-start;
  cursor: default;
  transition: background 0.18s ease, padding-left 0.18s ease;
}
.scroll-item:hover {
  background: rgba(255, 255, 255, 0.02);
  padding-left: 14px;
}

/* Date column */
.news-date {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #c9e3ff;
  white-space: nowrap;
}

/* Text column */
.news-text {
  font-size: 14.5px;
  line-height: 1.65;
  color: #cbd5e1;
}

/* Align Lab News date color across dark and light modes */
body.theme-dark .news-date,
body.theme-dark .news-clean-date {
  color: var(--tl-blue-dark);
}
body.theme-light .news-date,
body.theme-light .news-clean-date {
  color: var(--tl-blue-light);
}

/* Use the same blue system for news links */
.news-text a {
  text-decoration: underline;
}
body.theme-dark .news-text a {
  color: var(--tl-blue-dark);
}
body.theme-dark .news-text a:hover {
  color: #a5f3fc;
}
body.theme-light .news-text a {
  color: var(--tl-blue-light);
}
body.theme-light .news-text a:hover {
  color: #1e40af;
}
/* Text column */
.news-text {
  font-size: 14.5px;
  line-height: 1.65;
  color: #cbd5e1;   /* Use this in dark mode */
}

/* Light mode: switch to standard body gray text */
body.theme-light .news-text {
  color: #4b5563;   /* Use #6b7280 for a lighter option */
}

/* =======================
   RESEARCH PAGE
======================= */

.research-hero-img {
  width: 100%;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,0.25);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
  margin-bottom: 14px;
}
body.theme-light .research-hero-img {
  border-color: #d1d5db;
  box-shadow: 0 12px 28px rgba(15,23,42,0.18);
}

/* Section spacing */
.research-section {
  margin-top: 16px;
  display: flex;
  gap: 36px;
  align-items: stretch;
  min-height: 300px;
}
.research-figure {
  flex: 1 1 0;
  border-radius: 16px;
  overflow: hidden;
}
.research-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,0.22);
  box-shadow: 0 10px 28px rgba(0,0,0,0.45);
}
.research-text {
  flex: 1.3 1 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Standardize body text style: same brightness/size as homepage */
.research-text p {
  font-size: 16px;
  color: #e2e8f0;
  margin-bottom: 14px;
  max-width: 700px;
}
body.theme-light .research-text p {
  color: #374151;
}

/* keywords: hashtag */
.research-keywords {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-family: 'JetBrains Mono', ui-monospace;
  font-size: 11px;
  color: #9ca3af;
  opacity: 0.9;
}
.research-keywords span::before {
  content: "#";
  margin-right: 4px;
}
body.theme-dark .research-keywords span::before {
  color: var(--tl-blue-dark);
}
body.theme-light .research-keywords {
  color: #6b7280;
}
body.theme-light .research-keywords span::before {
  color: var(--tl-blue-light);
}

/* mobile */
@media (max-width: 900px) {
  .research-section {
    flex-direction: column;
  }
  .research-figure img {
    height: auto;
  }
}


/* =======================
   PEOPLE PAGE
======================= */

.people-section {
  margin-top: 16px;
}

.people-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
}

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

.person-card {
  padding: 20px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148,163,184,0.35);
  box-shadow: 0 12px 28px rgba(0,0,0,0.4);
  transition: 0.15s ease;
}
.person-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56,189,248,0.7);
  box-shadow: 0 18px 40px rgba(0,0,0,0.55);
}

body.theme-light .person-card {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}
body.theme-light .person-card:hover {
  border-color: var(--tl-blue-light);
  box-shadow: 0 14px 28px rgba(0,0,0,0.12);
}

.person-img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 14px;
  object-fit: cover;
  border: 1px solid rgba(148,163,184,0.3);
}
/* --- Student card: square avatar with name overlay --- */

/* Image wrapper to control square proportions */
.person-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;          /* Square */
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid rgba(148,163,184,0.3);
}

/* Image fills the entire square container */
.person-photo-wrap .person-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  margin-bottom: 0;             /* Clear the previous margin here */
  border: 0;
}

/* Name and degree overlaid on the image */
.person-overlay {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 10px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
  color: #ffffff;
}

.person-overlay-name {
  font-size: 16px;
  font-weight: 600;
}

.person-overlay-degree {
  font-size: 13px;
  opacity: 0.9;
}

/* Use the same overlay in light mode (it sits on top of the photo) */

.person-name {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 2px;
}

.person-title {
  font-size: 14px;
  color: #94a3b8;
  margin-bottom: 8px;
}
body.theme-light .person-title {
  color: #4b5563;
}

.person-email a {
  font-size: 14px;
  text-decoration: none;
}
.person-email {
  margin-bottom: 12px;
}

.person-label {
  font-size: 12px;
  color: #38bdf8;
  text-transform: uppercase;
  margin-top: 16px;
  margin-bottom: 6px;
  letter-spacing: 0.08em;
}

.person-text {
  font-size: 14px;
  color: #cbd5e1;
  line-height: 1.55;
}
body.theme-light .person-text {
  color: #374151;
}
/* =============================
   PI CARD — LEFT IMAGE + NAME OVERLAY
============================= */

.pi-card-overlay {
  display: flex;
  gap: 36px;
  align-items: center;
  padding: 28px;
  border-radius: 20px;
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(148,163,184,0.35);
  box-shadow: 0 20px 40px rgba(0,0,0,0.45);
}

body.theme-light .pi-card-overlay {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 14px 28px rgba(0,0,0,0.08);
}

/* Left column: image with caption */
.pi-photo-column {
  width: 340px;
  flex-shrink: 0;
}

/* Image and overlay container */
.pi-photo-container {
  position: relative;
  width: 100%;
}

.pi-photo {
  width: 100%;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid rgba(148,163,184,0.25);
}

/* Only name (degree) within the image */
.pi-overlay {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 14px 18px;
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
  border-radius: 0 0 18px 18px;
}

.pi-overlay-name {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

/* Below the image: title and email */
.pi-meta {
  margin-top: 14px;
}

.pi-meta-title {
  font-size: 15px;
  font-weight: 500;
  color: #cbd5e1;
  margin-bottom: 4px;
}
body.theme-light .pi-meta-title {
  color: #4b5563;
}

.pi-meta-email {
  font-size: 14px;
  text-decoration: none;
}

/* Right-side bio area */
.pi-info {
  flex: 1;
}

.pi-block-label {
  font-size: 13px;
  color: #38bdf8;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 10px;
  margin-bottom: 6px;
}

.pi-text {
  font-size: 15px;
  line-height: 1.65;
  color: #e2e8f0;
  margin-bottom: 16px;
}
body.theme-light .pi-text {
  color: #374151;
}

/* Responsive: switch to vertical layout on narrow screens */
@media (max-width: 900px) {
  .pi-card-overlay {
    flex-direction: column;
  }
  .pi-photo-column {
    width: 100%;
  }
}
/* =======================
   JOIN PAGE — TWO-COLUMN WITH RIGHT IMAGE
======================= */

.join-two-col {
  display: grid;
  grid-template-columns: 0.35fr 0.65fr;   /* Left 35% · Right 65% */
  gap: 40px;
  margin-top: 16px;
  align-items: center;
}

.join-text-col p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dark-main);
  margin-bottom: 16px;
}
body.theme-light .join-text-col p {
  color: var(--text-light-main);
}

.join-img-col img {
  width: 100%;
  height: 100%;
  max-height: 800px;           /* Limit maximum height for better aesthetics */
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,0.28);
  box-shadow: 0 14px 32px rgba(0,0,0,0.4);
}

body.theme-light .join-img-col img {
  border-color: #d1d5db;
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

/* Mobile layout */
@media (max-width: 900px) {
  .join-two-col {
    grid-template-columns: 1fr;
  }
  .join-img-col img {
    max-height: none;
  }
}

/* =======================
   PUBLICATIONS
======================= */

.pub-section {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.pub-item {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-dark-main);
}
body.theme-light .pub-item {
  color: var(--text-light-main);
}

/* Tang Lab purple name highlight */
.name-highlight {
  background: rgba(168, 85, 247, 0.28); /* Tang Lab purple #a855f7 with alpha */
  padding: 2px 6px;
  border-radius: 0;
  font-weight: 600;
  color: #f5f3ff;
}

/* =======================
   TEACHING PAGE
======================= */

/* Banner course cover image */
.teaching-hero-banner {
  margin-top: 24px;
}

.teaching-hero-img {
  display: block;
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,0.32);
  box-shadow: 0 18px 40px rgba(0,0,0,0.55);
}

body.theme-light .teaching-hero-img {
  border-color: #e5e7eb;
  box-shadow: 0 14px 30px rgba(15,23,42,0.12);
}

/* Course block fine-tuning */
.course-section {
  margin-top: 32px;
}

/* Collapsible syllabus */
.syllabus-details {
  margin-top: 18px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.45);
  background: rgba(15,23,42,0.9);
  padding: 10px 14px;
}

body.theme-light .syllabus-details {
  background: #ffffff;
  border-color: #e5e7eb;
}

/* Summary button styling */
.syllabus-details > summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #e5e7eb;
  list-style: none;
}

body.theme-light .syllabus-details > summary {
  color: #111827;
}

/* Remove the default disclosure triangle (browser differences may apply) */
.syllabus-details > summary::-webkit-details-marker {
  display: none;
}

/* Expanded content body */
.syllabus-body {
  margin-top: 10px;
  font-size: 14px;
  color: #cbd5e1;
}

body.theme-light .syllabus-body {
  color: #374151;
}

/* Embedded PDF frame */
.syllabus-frame-wrap {
  margin-top: 10px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,0.4);
  max-height: 480px;
}

.syllabus-frame-wrap iframe {
  display: block;
  width: 100%;
  height: 480px;
  border: 0;
}

/* Small screens: slightly reduce iframe height */
@media (max-width: 768px) {
  .syllabus-frame-wrap iframe {
    height: 360px;
  }
}

/* =======================
   CONTACT PAGE
======================= */

.contact-two-col {
  display: grid;
  grid-template-columns: 0.45fr 0.55fr;
  gap: 40px;
  margin-top: 32px;
  align-items: flex-start;
}

.contact-text .contact-line {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.contact-img-col img {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid rgba(148,163,184,0.28);
  box-shadow: 0 16px 32px rgba(0,0,0,0.45);
}

body.theme-light .contact-img-col img {
  border-color: #e5e7eb;
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

/* Mobile */
@media (max-width: 900px) {
  .contact-two-col {
    grid-template-columns: 1fr;
  }
}
/* Contact page: map iframe styling */
.contact-img-col iframe {
  width: 100%;
  height: 100%;
  min-height: 400px;           /* Increase if needed, e.g., to 380px */
  border: 0;
  border-radius: 16px;
  box-shadow: 0 16px 32px rgba(0,0,0,0.45);
}

body.theme-light .contact-img-col iframe {
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}
.page > section:first-of-type {
  margin-top: 24px;
}
