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

:root {
  --color-bg: #fafaf9;
  --color-bg-alt: #f3f2ee;
  --color-bg-card: #ffffff;
  --color-text: #18181b;
  --color-text-muted: #71717a;
  --color-text-light: #a1a1aa;

  /* Deep navy + teal accent palette */
  --color-accent: #1e3a5f;
  --color-accent-mid: #2d5986;
  --color-accent-light: #3b82c4;
  --color-accent-hover: #16304f;
  --color-teal: #0d9488;
  --color-teal-light: #14b8a6;

  --color-border: #e4e4e7;
  --color-border-strong: #d4d4d8;

  --font-sans: 'Inter', system-ui, sans-serif;
  --font-serif: 'Lora', Georgia, serif;

  --max-width: 900px;
  --nav-height: 64px;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.05);

  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  7rem;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3 {
  font-family: var(--font-serif);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.05rem; font-family: var(--font-sans); font-weight: 600; letter-spacing: 0; }

a {
  color: var(--color-accent-light);
  text-decoration: none;
  transition: color 0.18s ease;
}
a:hover { color: var(--color-teal); text-decoration: underline; }

p { margin-bottom: var(--space-sm); }
p:last-child { margin-bottom: 0; }

/* ============================================================
   Scroll-in animation
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.40s; }
.reveal-delay-6 { transition-delay: 0.48s; }

/* ============================================================
   Layout
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

#research {
  padding-top: 3.5rem;
}

.section-title {
  margin-bottom: 0.4rem;
}

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-teal);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--color-text-muted);
  max-width: 620px;
  margin-bottom: var(--space-md);
  margin-top: 0.5rem;
}

/* Section title with decorative left rule */
.section-title-wrap {
  margin-bottom: var(--space-md);
}

/* ============================================================
   Navigation
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 249, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-height);
  transition: box-shadow 0.2s;
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s;
}
.nav-name:hover { color: var(--color-accent-light); text-decoration: none; }

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-md);
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.18s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-teal);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}
.nav-links a:hover { color: var(--color-text); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active-link { color: var(--color-text); }
.nav-links a.active-link::after { transform: scaleX(1); }

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

@media (max-width: 600px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: var(--space-sm) var(--space-md);
    gap: var(--space-sm);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links a::after { display: none; }
}

/* ============================================================
   Hero / About Section
   ============================================================ */
.section-hero {
  padding-top: 0;
  padding-bottom: 0;
  min-height: calc(100svh - var(--nav-height));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Gradient background orbs */
.section-hero::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(13,148,136,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.section-hero::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(30,58,95,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: var(--space-lg);
  align-items: center;
  padding: var(--space-xl) 0;
  width: 100%;
}

@media (max-width: 680px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-photo-col { order: -1; display: flex; justify-content: center; }
  .about-links { justify-content: center; }
}

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-teal);
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3rem);
  line-height: 1.1;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.hero-role {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  font-weight: 400;
}

.hero-bio {
  font-size: 0.97rem;
  color: var(--color-text);
  line-height: 1.8;
  max-width: 560px;
}

.hero-bio + .hero-bio {
  margin-top: 0.75rem;
}

.hero-divider {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-teal), var(--color-accent-light));
  border-radius: 3px;
  margin: var(--space-md) 0;
}

@media (max-width: 680px) {
  .hero-divider { margin-left: auto; margin-right: auto; }
  .hero-bio { max-width: 100%; }
}

/* Photo */
.hero-photo {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
  background: var(--color-bg-alt);
  border: 3px solid var(--color-bg-card);
  outline: 1px solid var(--color-border);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--color-text-light);
  font-size: 0.8rem;
  background: linear-gradient(135deg, var(--color-bg-alt), #e9e8e3);
}

.photo-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.35;
}

/* About links / buttons */
.about-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--space-md);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.5em 1.2em;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
  box-shadow: 0 2px 8px rgba(30,58,95,0.25);
}
.btn:hover {
  background: var(--color-accent-hover);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(30,58,95,0.3);
}
.btn:active { transform: none; }

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
  box-shadow: none;
}
.btn-outline:hover {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(30,58,95,0.25);
}

.link-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 0.42em 0.8em;
  border: 1.5px solid var(--color-border-strong);
  border-radius: 100px;
  text-decoration: none;
  background: var(--color-bg-card);
  transition: border-color 0.18s, color 0.18s, background 0.18s, box-shadow 0.18s;
}
.link-chip:hover {
  color: var(--color-teal);
  border-color: var(--color-teal-light);
  background: rgba(13,148,136,0.04);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(13,148,136,0.1);
}

/* ============================================================
   Stats Bar
   ============================================================ */
.stats-bar {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-mid) 60%, var(--color-teal) 100%);
  padding: var(--space-md) 0;
  color: #fff;
}

.stats-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1;
  display: block;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-top: 0.2rem;
  display: block;
}

/* ============================================================
   Research Projects
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.project-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent-light), var(--color-teal));
  opacity: 0;
  transition: opacity 0.22s;
}

.project-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--color-border-strong);
}
.project-card:hover::before {
  opacity: 1;
}

.project-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-teal);
  background: rgba(13,148,136,0.09);
  padding: 0.22em 0.65em;
  border-radius: 100px;
  align-self: flex-start;
  margin-bottom: 0.1rem;
}

.project-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-teal);
  flex-shrink: 0;
  animation: pulse-dot 2s infinite;
}

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

.project-tag--past {
  color: var(--color-text-light);
  background: var(--color-bg-alt);
}
.project-tag--past::before {
  background: var(--color-text-light);
  animation: none;
}

.project-card h3 {
  margin-bottom: 0.2rem;
  color: var(--color-text);
  font-size: 1rem;
}

.project-card p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  flex: 1;
  line-height: 1.65;
}

.project-links {
  display: flex;
  gap: var(--space-sm);
  margin-top: 0.75rem;
  font-size: 0.83rem;
  font-weight: 600;
  flex-wrap: wrap;
}

.project-links a {
  color: var(--color-accent-light);
  text-decoration: none;
  transition: color 0.15s;
}
.project-links a:hover { color: var(--color-teal); text-decoration: none; }

/* ============================================================
   Publications
   ============================================================ */
.pub-filter {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.filter-btn {
  padding: 0.38em 1em;
  border: 1.5px solid var(--color-border-strong);
  border-radius: 100px;
  background: var(--color-bg-card);
  font-size: 0.83rem;
  font-family: var(--font-sans);
  cursor: pointer;
  color: var(--color-text-muted);
  font-weight: 500;
  transition: all 0.18s;
}
.filter-btn:hover {
  border-color: var(--color-teal-light);
  color: var(--color-teal);
  background: rgba(13,148,136,0.04);
}
.filter-btn.active {
  background: linear-gradient(135deg, var(--color-accent), var(--color-teal));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 10px rgba(30,58,95,0.2);
}

.pub-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pub-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-sm);
  align-items: start;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.15s;
}
.pub-item:first-child { border-top: 1px solid var(--color-border); }
.pub-item:hover { background: rgba(30,58,95,0.02); }

.pub-item.hidden { display: none; }

.pub-year {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text-light);
  padding-top: 0.2rem;
  letter-spacing: 0.02em;
}

.pub-title {
  font-weight: 600;
  font-size: 0.93rem;
  margin-bottom: 0.2rem;
  line-height: 1.4;
  color: var(--color-text);
}

.pub-title a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.15s;
}
.pub-title a:hover { color: var(--color-accent-light); text-decoration: none; }

.pub-authors {
  font-size: 0.845rem;
  color: var(--color-text-muted);
  margin-bottom: 0.12rem;
  line-height: 1.5;
}

.pub-venue {
  font-size: 0.845rem;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}

.pub-links {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.pub-link {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent-light);
  border: 1px solid rgba(59,130,196,0.3);
  padding: 0.18em 0.55em;
  border-radius: 4px;
  text-decoration: none;
  background: rgba(59,130,196,0.04);
  transition: all 0.15s;
}
.pub-link:hover {
  background: var(--color-accent-light);
  border-color: var(--color-accent-light);
  color: #fff;
  text-decoration: none;
}

@media (max-width: 480px) {
  .pub-item { grid-template-columns: 1fr; gap: 0.2rem; }
  .pub-year { font-size: 0.75rem; }
}

/* ============================================================
   Contact
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: var(--space-lg);
  align-items: start;
}

@media (max-width: 620px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-list {
  list-style: none;
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.contact-list li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: var(--space-sm);
  font-size: 0.93rem;
  align-items: start;
}

.contact-label {
  font-weight: 700;
  color: var(--color-text-light);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-top: 0.2rem;
}

.contact-links-col h3 {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.72rem;
}

.profile-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.profile-links li {
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.profile-links a {
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}
.profile-links a::after {
  content: '↗';
  font-size: 0.75em;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  transform: translate(-2px, 2px);
}
.profile-links a:hover { color: var(--color-teal); }
.profile-links a:hover::after { opacity: 1; transform: none; }

.awards-list {
  list-style: none;
  margin-top: 1.5rem;
}
.awards-list h3 { margin-bottom: 0.75rem; }
.awards-list li {
  font-size: 0.84rem;
  color: var(--color-text-muted);
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: baseline;
  gap: 0.4em;
}
.awards-list li::before {
  content: '★';
  font-size: 0.65em;
  color: var(--color-teal);
  flex-shrink: 0;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.5);
  padding: var(--space-md) 0;
}

.site-footer p {
  font-size: 0.82rem;
  text-align: center;
  margin: 0;
}

.site-footer a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}
.site-footer a:hover { color: var(--color-teal-light); }

/* ============================================================
   Section divider
   ============================================================ */
.section-rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: var(--space-md);
}
.section-rule h2 { flex-shrink: 0; }
.section-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}
