/* ============================================================
   YUANXUAN YANG — PERSONAL ACADEMIC WEBSITE
   css/style.css  ·  Design: STRATA-inspired
   ============================================================ */

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

/* === Design Tokens ======================================== */
:root {
  --bg:           #F3F3F3;
  --card:         #FFFFFF;
  --card-dark:    #111111;
  --text:         #1A1A1A;
  --text-2:       #666666;
  --text-3:       #8A8A8A;
  --green:        #4ADE80;
  --border:       rgba(0,0,0,0.06);
  --radius-lg:    32px;
  --radius-md:    16px;
  --radius-pill:  9999px;
  --shadow-soft:  0 10px 40px -10px rgba(0,0,0,0.08);
  --shadow-hover: 0 20px 50px -12px rgba(0,0,0,0.15);
  --max-w:        1200px;
  --nav-h:        72px;
  --font:         'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:         'Space Mono', 'Courier New', monospace;
}

/* === Reset ================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* === Scrollbar ============================================ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 99px; }

/* === Typography =========================================== */
.mono { font-family: var(--mono); }

h1, h2, h3, h4 { font-weight: 500; line-height: 1.1; color: var(--text); letter-spacing: -0.03em; }
h1 { font-size: clamp(2.8rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.02em; }
p  { line-height: 1.65; color: var(--text-2); }

/* === Animations =========================================== */
.fade-in-up {
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(24px);
}
@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

/* === Layout =============================================== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}
section { padding: 5rem 0; }

/* === Cards ================================================ */
.soft-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s ease;
}
.soft-card:hover {
  transform: translateY(-4px) scale(1.003);
  box-shadow: var(--shadow-hover);
}
.card-dark {
  background: var(--card-dark);
  color: white;
}
.card-dark p, .card-dark .text-muted { color: #999; }

/* === Section Label ======================================== */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
  margin-bottom: 3rem;
}
.section-label .num,
.section-label .name {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
}
.section-label .sep { color: #ccc; font-size: 0.7rem; }

/* === Section intro 2-col ================================== */
.section-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
  align-items: end;
}
.section-intro h2 { font-size: clamp(2rem, 3.5vw, 2.8rem); }
.section-intro p { font-size: 1.05rem; line-height: 1.7; }

/* === Navigation =========================================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}
.nav-brand-pill {
  pointer-events: auto;
  background: var(--card);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.05);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text);
}
.nav-links-pill {
  pointer-events: auto;
  background: var(--card);
  padding: 8px 6px;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.05);
  display: flex;
  gap: 2px;
}
.nav-links-pill a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-links-pill a:hover,
.nav-links-pill a.active {
  background: var(--text);
  color: white;
}
.nav-cta {
  pointer-events: auto;
  background: var(--card);
  border: 1px solid rgba(0,0,0,0.1);
  color: var(--text);
  padding: 9px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: all 0.25s;
  cursor: pointer;
  font-family: var(--font);
}
.nav-cta:hover { background: var(--text); color: white; transform: translateY(-1px); }

/* Mobile nav toggle */
.nav-toggle {
  pointer-events: auto;
  display: none;
  flex-direction: column;
  gap: 5px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 10px 14px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s; }

/* === Hero ================================================= */
.hero {
  padding: 0 2rem 3rem;
  padding-top: calc(var(--nav-h) + 1.5rem);
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: stretch;
}

/* Globe canvas wrapper — left column, fills the row height */
.globe-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 440px;
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  overflow: hidden;
}
#hero-canvas {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
}

/* Info column — right side on desktop, stacked vertically */
.hero-info-grid {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
}
/* Profile photo + name identity row */
.hero-identity {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 1.75rem;
}
.hero-identity-text {
  flex: 1;
  min-width: 0;
}
.hero-photo {
  width: 140px;
  height: 210px; /* explicit height = width × 3/2, avoids Safari aspect-ratio bug */
  border-radius: 18px;
  object-fit: cover;
  object-position: center 10%;
  border: 4px solid var(--card);
  box-shadow: 0 6px 24px rgba(0,0,0,0.11);
  flex-shrink: 0;
  display: block;
  min-width: 140px; /* prevent Safari flex shrink */
}

.hero-name {
  font-family: 'Outfit', var(--font);
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 0.95;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.hero-chinese {
  font-size: 1rem;
  color: var(--text-3);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-left: 0.5rem;
}
.hero-meta {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.hero-meta-title {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-3);
  text-transform: uppercase;
}
.hero-meta-affil {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-2);
}
.hero-meta-affil a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(0,0,0,0.2); }
.hero-meta-affil a:hover { text-decoration-color: var(--text); }

.hero-right-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 0.5rem;
}
.hero-bio {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-2);
  font-weight: 400;
}

/* Social links */
.hero-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  background: #F0F0F0;
  border-radius: var(--radius-pill);
  color: var(--text);
  transition: all 0.2s;
  white-space: nowrap;
}
.social-link:hover { background: var(--text); color: white; transform: translateY(-1px); }
.social-link svg { width: 12px; height: 12px; flex-shrink: 0; }

/* Scroll hint */
.scroll-hint {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-2);
  background: var(--card);
  display: inline-block;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.06);
  letter-spacing: 0.04em;
}

/* === Stats bar ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 0;
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  padding: 1.75rem 1.5rem;
  text-align: center;
}
.stat-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}
.stat-value {
  font-size: 2.4rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1;
  display: block;
  margin-bottom: 0.3rem;
}
.stat-sub {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--text-3);
  letter-spacing: 0.05em;
}

/* === Research interest cards ============================== */
.interests-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.interest-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s ease;
}
.interest-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.interest-num {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.1em;
  background: #F0F0F0;
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.interest-card h3 { font-size: 1.2rem; line-height: 1.2; color: var(--text); }
.interest-card p { font-size: 0.9rem; line-height: 1.65; color: var(--text-2); margin: 0; }
.interest-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; }
.interest-tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  background: #F0F0F0;
  border-radius: var(--radius-pill);
  color: var(--text-2);
}

/* === Publication cards ==================================== */
.pub-list { display: flex; flex-direction: column; gap: 0.75rem; }
.pub-card {
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  padding: 1.75rem 2rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.pub-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.pub-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.pub-venue-badge {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 12px;
  background: #F0F0F0;
  border-radius: var(--radius-pill);
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.pub-year-badge {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-3);
  white-space: nowrap;
  padding-top: 4px;
}
.pub-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}
.pub-title a { color: inherit; transition: color 0.2s; }
.pub-title a:hover { color: #333; text-decoration: underline; }
.pub-authors {
  font-size: 0.85rem;
  color: var(--text-2);
  margin-bottom: 0.3rem;
}
.pub-authors em { font-style: normal; font-weight: 700; color: var(--text); }
.pub-venue-str {
  font-size: 0.83rem;
  color: var(--text-3);
  font-style: italic;
  margin-bottom: 0.75rem;
}
.pub-venue-str strong { font-style: normal; font-weight: 700; color: var(--text-2); }
.pub-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.pub-badge {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: #F0F0F0;
  color: var(--text-2);
}
.pub-badge.green { background: #DCFCE7; color: #166534; }
.pub-badge.blue  { background: #DBEAFE; color: #1e40af; }
.pub-badge.gold  { background: #FEF9C3; color: #854d0e; }
.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--text);
  color: white;
  transition: all 0.2s;
}
.pub-link:hover { background: #333; transform: translateY(-1px); }
.pub-link svg { width: 10px; height: 10px; }

/* Publications page — year groups */
.pub-year-group { margin-bottom: 3rem; }
.pub-year-label {
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--text);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

/* Filter pills */
.pub-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2.5rem; align-items: center; }
.filter-label { font-family: var(--mono); font-size: 0.65rem; font-weight: 700; color: var(--text-3); letter-spacing: 0.05em; }
.filter-btn {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0,0,0,0.1);
  background: var(--card);
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-soft);
}
.filter-btn:hover { border-color: var(--text); color: var(--text); }
.filter-btn.active { background: var(--text); color: white; border-color: var(--text); }
.pub-count { font-family: var(--mono); font-size: 0.65rem; color: var(--text-3); margin-left: auto; }

/* Stats bar on pubs page */
.stats-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}
.stat-pill {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  padding: 1.25rem 2rem;
  text-align: center;
  flex: 1 1 120px;
}
.stat-pill .stat-value { font-size: 2rem; }

/* === Project cards ======================================== */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.project-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.project-card h3 { font-size: 1rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
.project-status {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}
.project-status.active { background: var(--green); color: #000; }
.project-status.past { background: #F0F0F0; color: var(--text-2); }
.project-role-line {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-3);
  letter-spacing: 0.03em;
}
.project-card p { font-size: 0.88rem; line-height: 1.6; color: var(--text-2); margin: 0; }
.project-collab { font-size: 0.78rem; color: var(--text-3); }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.project-tag {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  background: #F0F0F0;
  border-radius: var(--radius-pill);
  color: var(--text-2);
}
/* Compact past-project card (homepage) */
.project-card-sm {
  padding: 1.25rem 1.5rem;
  gap: 0.6rem;
  align-self: start; /* don't stretch to match taller cards in the same row */
}
.project-card-sm h3 {
  font-size: 0.88rem;
  letter-spacing: -0.01em;
}

.project-link-small {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.03em;
  border-bottom: 1px solid rgba(0,0,0,0.2);
  transition: border-color 0.2s;
}
.project-link-small:hover { border-color: var(--text); }

/* === PhD / contact box ==================================== */
.cta-card {
  background: var(--card-dark);
  border-radius: var(--radius-lg);
  padding: 3rem 3.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}
.cta-card h3 { color: white; font-size: 1.6rem; margin-bottom: 0.75rem; }
.cta-card p { color: #999; font-size: 0.92rem; line-height: 1.7; }
.btn-cta {
  background: var(--green);
  color: #000;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
  white-space: nowrap;
  display: inline-block;
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(74,222,128,0.35); }

/* === Contact ============================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.contact-item svg { width: 18px; height: 18px; color: var(--text-3); flex-shrink: 0; margin-top: 2px; }
.contact-item p { font-size: 0.9rem; color: var(--text-2); margin: 0; }
.contact-item a { color: var(--text); font-weight: 500; }
.contact-item a:hover { text-decoration: underline; }
.contact-profiles { display: flex; flex-direction: column; gap: 0.6rem; }
.profile-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: var(--card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s;
}
.profile-link:hover { transform: translateX(4px); border-color: rgba(0,0,0,0.15); }
.profile-link svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-3); }

/* === Page header (inner pages) ============================ */
.page-hero {
  padding: calc(var(--nav-h) + 3rem) 0 3rem;
  background: var(--bg);
}
.page-hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); color: var(--text); margin-bottom: 0.75rem; }
.page-hero p { font-size: 1.05rem; color: var(--text-2); max-width: 520px; line-height: 1.7; }

/* === Teaching / Course cards ============================== */
.course-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  padding: 2.5rem;
  margin-bottom: 1rem;
}
.course-card h3 { font-size: 1.2rem; margin-bottom: 0.75rem; }
.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.course-meta-tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 12px;
  background: #F0F0F0;
  border-radius: var(--radius-pill);
  color: var(--text-2);
}
.course-card p { font-size: 0.9rem; color: var(--text-2); line-height: 1.65; margin-bottom: 0.75rem; }
.course-card ul {
  list-style: disc;
  padding-left: 1.25rem;
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.9;
}

/* Supervisor card */
.supervisor-card {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  margin-bottom: 0.75rem;
  align-items: center;
}
.supervisor-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #F0F0F0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.supervisor-info h4 { font-size: 0.95rem; margin-bottom: 2px; }
.supervisor-info p { font-size: 0.82rem; color: var(--text-2); margin: 0; }

/* View all link */
.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
  padding: 8px 20px;
  background: var(--card);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  margin-top: 1.5rem;
  transition: all 0.2s;
}
.view-all-link:hover { background: var(--text); color: white; transform: translateY(-1px); }

/* === Footer =============================================== */
footer {
  padding: 0 2rem 2rem;
  max-width: var(--max-w);
  margin: 0 auto;
}
.footer-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  padding: 3rem 3.5rem;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.footer-brand { font-family: 'Outfit', var(--font); font-size: 2.5rem; font-weight: 500; letter-spacing: -0.02em; color: var(--text); line-height: 1; }
.footer-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--green);
  color: #000;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
  display: inline-block;
  margin-bottom: 1rem;
}
.footer-nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-nav a { font-size: 0.85rem; font-weight: 500; color: var(--text-2); transition: color 0.2s; }
.footer-nav a:hover { color: var(--text); }
/* Footer logos row */
.footer-logos {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.footer-logo-crest {
  height: 52px;
  width: auto;
  opacity: 0.85;
}
.footer-logo-new {
  height: 28px;
  width: auto;
  opacity: 0.75;
}

.footer-bottom {
  background: #F3F3F3;
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-bottom span {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.05em;
}

/* === Fixed bottom accent bar ============================== */
.bottom-accent {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: var(--green);
  z-index: 500;
}

/* === Research themes (research.html) ====================== */
.theme-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  padding: 2.5rem;
  margin-bottom: 1rem;
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.theme-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.theme-num {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  color: #E8E8E8;
  line-height: 1;
  flex-shrink: 0;
  min-width: 48px;
}
.theme-body h3 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.theme-body p { font-size: 0.9rem; color: var(--text-2); line-height: 1.7; margin-bottom: 0.6rem; }
.theme-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }

/* === Utility ============================================== */
.text-center { text-align: center; }
.mt-8 { margin-top: 2rem; }
.hidden { display: none !important; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }

/* === Responsive =========================================== */
@media (max-width: 900px) {
  .nav-links-pill { display: none; }
  .nav-links-pill.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 1rem; right: 1rem;
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hover);
    padding: 1rem;
    gap: 0.25rem;
    z-index: 199;
  }
  .nav-links-pill.open a { padding: 10px 16px; border-radius: var(--radius-md); }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }

  .hero { grid-template-columns: 1fr; }
  .globe-wrap { height: 300px; min-height: 0; }
  .hero-info-grid { flex-direction: column; }
  .hero-photo { width: 110px; height: 165px; min-width: 110px; border-radius: 14px; }
  .hero-identity { gap: 1.25rem; align-items: flex-start; }
  .section-intro { grid-template-columns: 1fr; gap: 1rem; }
  .interests-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-card { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .theme-card { flex-direction: column; gap: 1rem; }
  .theme-num { font-size: 1.2rem; }
}

@media (max-width: 600px) {
  .container { padding: 0 1rem; }
  .hero { padding: 0 1rem 3rem; padding-top: calc(var(--nav-h) + 1rem); }
  .globe-wrap { height: 240px; min-height: 0; }
  .hero-photo { width: 110px; height: 165px; min-width: 110px; border-radius: 12px; }
  .hero-identity { gap: 1rem; align-items: flex-start; }
  section { padding: 3.5rem 0; }
  footer { padding: 0 1rem 2rem; }
  .footer-card { padding: 2rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .cta-card { padding: 2rem; }
}
