:root {
  --bg: #0b0b0f;
  --surface: rgba(15, 15, 23, 0.72);
  --text: #f5f5f7;
  --muted: #b6b6c0;
  --accent: #8b5cf6;
  --accent-soft: rgba(139, 92, 246, 0.2);
  --border: rgba(255, 255, 255, 0.14);
}

body[data-theme='light'] {
  --bg: #f6f6f6;
  --surface: rgba(255, 255, 255, 0.9);
  --text: #111;
  --muted: #555;
  --accent: #1f1f1f;
  --accent-soft: rgba(20, 20, 20, 0.12);
  --border: rgba(0, 0, 0, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 75% 10%, var(--accent-soft), transparent 35%);
  z-index: -1;
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 5vw;
  background: var(--surface);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.logo {
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.05em;
}
.logo span { color: var(--accent); }

.primary-nav {
  display: flex;
  gap: 1.4rem;
  align-items: center;
}

.primary-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.primary-nav a:hover { color: var(--text); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.theme-btn,
.menu-toggle {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.22rem;
}

.menu-toggle span {
  width: 1.15rem;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.2s ease;
}

body.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

main { width: min(1060px, 92vw); margin: 0 auto; }
.section { padding: 4rem 0; }

.hero {
  min-height: 62vh;
  display: grid;
  align-content: center;
  gap: 0.8rem;
}

.hero-top {
  position: relative;
  padding-bottom: 3.4rem;
}

.hero-banner {
  width: 100%;
  height: 240px;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

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

.profile-avatar-wrap {
  position: absolute;
  left: 1.2rem;
  bottom: 0;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--bg);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25);
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.eyebrow { margin: 0; color: var(--accent); font-weight: 700; }
h1 { margin: 0; font-size: clamp(2rem, 4.5vw, 3.8rem); line-height: 1.1; }
h1 span { color: var(--accent); }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.1rem); margin: 0 0 0.6rem; }
.lead, .section-intro { color: var(--muted); max-width: 70ch; margin: 0; }

.hero-actions, .contact-links { margin-top: 1rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.16rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  text-decoration: none;
  font-weight: 600;
}
.btn-primary { background: var(--accent); color: #fff; border-color: transparent; }
.btn-outline { color: var(--text); }

.info-grid, .metrics {
  margin-top: 1.2rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.info-grid article,
.metrics article,
.timeline-item,
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
}

.info-grid a { color: var(--text); }
.timeline { display: grid; gap: 1rem; margin-top: 1rem; }
.date { color: var(--accent); font-size: 0.88rem; font-weight: 700; }
.timeline-item h3 { margin: 0.3rem 0 0.4rem; }
.timeline-item ul { margin: 0.35rem 0 0; padding-left: 1rem; color: var(--muted); }
.metrics strong { color: var(--accent); font-size: 2rem; }

.carousel-wrap {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
}

.carousel-btn {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.3rem;
}

.carousel-track::-webkit-scrollbar { height: 8px; }
.carousel-track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
.card { scroll-snap-align: start; min-height: 155px; }
.card h3 { margin: 0 0 0.5rem; }
.card p { margin: 0; color: var(--muted); }

footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2rem 5vw;
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero-banner { height: 210px; }
  .profile-avatar-wrap {
    width: 106px;
    height: 106px;
  }
}

@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }

  .primary-nav {
    position: fixed;
    left: 5vw;
    right: 5vw;
    top: 76px;
    display: grid;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  }

  .primary-nav a {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
  }
  .primary-nav a:last-child { border-bottom: 0; }

  body.menu-open .primary-nav {
    max-height: 320px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .hero-top { padding-bottom: 3rem; }
  .hero-banner { height: 180px; }
  .profile-avatar-wrap {
    width: 92px;
    height: 92px;
    left: 0.9rem;
  }

  .carousel-wrap { grid-template-columns: 1fr; }
  .carousel-btn { display: none; }
}
