:root {
  --font-body: "Manrope", sans-serif;
  --font-heading: "Outfit", sans-serif;
  --bg: #f3f5f8;
  --text: #0c1220;
  --muted: #39445b;
  --surface: #ffffff;
  --surface-alt: #e9eef8;
  --border: #0f1f3d;
  --accent: #153dff;
  --accent-soft: #dfe8ff;
  --shadow: 6px 6px 0 rgba(15, 31, 61, 0.14);
}

body[data-theme="dark"] {
  --bg: #070b14;
  --text: #f5f8ff;
  --muted: #b7c2dc;
  --surface: #101827;
  --surface-alt: #162238;
  --border: #9ab0ff;
  --accent: #7d98ff;
  --accent-soft: #223057;
  --shadow: 6px 6px 0 rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.58;
}

a {
  color: inherit;
}

.container {
  width: min(1120px, calc(100% - 2.6rem));
  margin: 0 auto;
}

.page-glow {
  display: none;
}

.page-glow-left {
  display: none;
}

.page-glow-right {
  display: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface);
  border-bottom: 2px solid var(--border);
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 1.26rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.1rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  font-weight: 700;
  color: var(--text);
  opacity: 0.72;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 0.25rem 0.5rem;
  transition: opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
  background: var(--accent-soft);
  border-color: var(--accent);
}

.nav-toggle {
  display: none;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  padding: 0.5rem 0.82rem;
  font-weight: 700;
}

.hero {
  min-height: calc(100vh - 74px);
  padding: 3.2rem 0 2.4rem;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
}

.kicker {
  margin: 0 0 0.55rem;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-heading);
  line-height: 1.18;
}

h1 {
  font-size: clamp(2.15rem, 5.2vw, 4.25rem);
  max-width: 760px;
  letter-spacing: -0.01em;
}

.lead {
  margin: 1rem 0 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 1.02rem;
}

.quick-points {
  margin: 0.85rem 0 0;
  padding-left: 1.15rem;
  max-width: 600px;
  color: var(--muted);
  display: grid;
  gap: 0.22rem;
}

.quick-points li {
  line-height: 1.42;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 0.66rem 1.06rem;
  border: 2px solid var(--border);
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-solid {
  background: var(--accent);
  color: #ffffff;
  border-color: color-mix(in srgb, var(--accent), black 10%);
}

.btn-outline {
  background: var(--surface);
  color: var(--text);
}

.hero-visual {
  display: grid;
  justify-items: center;
  gap: 0.7rem;
}

.portrait-frame {
  position: relative;
  width: min(360px, 100%);
  aspect-ratio: 4 / 5;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--surface-alt);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.portrait-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portrait-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-size: clamp(3rem, 13vw, 6rem);
  font-weight: 800;
  color: color-mix(in srgb, var(--accent), #ffffff 10%);
}

.section {
  padding: 2.15rem 0 2.45rem;
}

.section-head {
  margin-bottom: 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--border);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.3rem);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.panel,
.timeline-card,
.project-card,
.publication-card,
.contact-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.panel,
.timeline-card,
.project-card,
.publication-card,
.contact-card {
  padding: 1rem 1.05rem;
}

.timeline-card:hover,
.project-card:hover,
.panel:hover,
.publication-card:hover {
  transform: translate(-2px, -2px);
}

.panel ul,
.timeline-card ul {
  margin: 0.55rem 0 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.25rem;
}

.meta {
  margin: 0.25rem 0 0.5rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.compact-text {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.timeline {
  display: grid;
  gap: 0.85rem;
}

.project-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.publication-card {
  background: var(--surface-alt);
}

.research-figure {
  margin: 0.85rem 0 0;
  border: 2px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-alt);
}

.research-image {
  width: 100%;
  height: auto;
  max-height: 440px;
  object-fit: contain;
  display: block;
  background: var(--surface);
}

.research-figure figcaption {
  padding: 0.55rem 0.7rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.research-fallback {
  display: none;
  padding: 0.65rem 0.7rem 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.publication-figure {
  margin-top: 1rem;
}

.publication-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chips span {
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 0.38rem 0.72rem;
  font-weight: 600;
  font-size: 0.86rem;
}

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

.contact-links {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}

.contact-links a {
  text-decoration: none;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--surface-alt);
  padding: 0.42rem 0.75rem;
  font-weight: 600;
}

.theme-toggle {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 0.55rem 0.88rem;
  font-weight: 700;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.site-footer {
  text-align: center;
  padding: 0.8rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.34s ease, transform 0.34s ease;
}

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

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

  .hero-visual {
    justify-items: start;
  }

  .portrait-frame {
    width: min(330px, 80vw);
  }
}

@media (max-width: 900px) {
  .project-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 4.1rem;
    right: 1.2rem;
    width: min(280px, calc(100% - 2.4rem));
    padding: 0.85rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 0.7rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .container {
    width: min(1120px, calc(100% - 1.4rem));
  }

  .hero {
    padding-top: 2.1rem;
  }

  .section {
    padding: 2rem 0 2.4rem;
  }

  .panel,
  .timeline-card,
  .project-card,
  .publication-card,
  .contact-card {
    border-radius: 10px;
    padding: 0.92rem;
  }
}
