:root {
  --bg: #f4f5f8;
  --bg-elev: #ffffff;
  --text: #12131a;
  --muted: #5a5d6b;
  --primary: #2f5bff;
  --primary-soft: rgba(47, 91, 255, 0.1);
  --accent: #12131a;
  --card: #ffffff;
  --card-soft: #f8f9fc;
  --border: rgba(18, 19, 26, 0.1);
  --border-strong: rgba(18, 19, 26, 0.2);
  --shadow: 0 18px 50px rgba(30, 40, 90, 0.08);
  --shadow-sm: 0 6px 18px rgba(30, 40, 90, 0.06);
  --grad: linear-gradient(135deg, #2f5bff 0%, #6f4bff 100%);
  --on-primary: #ffffff;
  --radius: 18px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 600px at 88% -8%, rgba(111, 75, 255, 0.08), transparent 60%),
    radial-gradient(760px 500px at -5% 2%, rgba(47, 91, 255, 0.07), transparent 55%),
    var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.section {
  padding: 92px 0;
  position: relative;
}

.hero.section {
  padding-top: 52px;
  padding-bottom: 40px;
}

.stats-section {
  padding: 20px 0 44px;
}

.section-alt {
  background: linear-gradient(180deg, rgba(47, 91, 255, 0.035), transparent 72%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ——— Header ——— */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
}

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

.logo {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: 0.2px;
  font-size: clamp(19px, 2vw, 23px);
}

.logo span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-links > a {
  color: var(--muted);
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s ease;
}

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

.menu-toggle {
  display: none;
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: 12px;
  padding: 13px 22px;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  color: var(--on-primary);
  background: var(--grad);
  box-shadow: 0 12px 28px rgba(47, 91, 255, 0.28);
}

.btn-secondary {
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ——— Typography ——— */
h1, h2, h3, h4 {
  margin: 0 0 12px;
  line-height: 1.12;
  font-family: "Space Grotesk", "Inter", sans-serif;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(33px, 5vw, 58px);
  font-weight: 700;
}

h1 span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 10px;
  font-family: var(--mono);
}

.subtitle,
.section-head > p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 17px;
}

/* ——— Hero ——— */
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  border: 1px solid rgba(47, 91, 255, 0.28);
  background: var(--primary-soft);
  margin-bottom: 20px;
}

.hero-content h1 {
  margin-bottom: 20px;
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-links {
  margin-top: 22px;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 14.5px;
  color: var(--muted);
  align-items: center;
}

.hero-links a {
  transition: color 0.2s ease;
}

.hero-links a:hover {
  color: var(--primary);
}

.hero-loc {
  color: var(--muted);
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-photo {
  position: relative;
  width: min(468px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  background: var(--card);
}

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

.hero-photo-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

/* ——— Section head ——— */
.section-head {
  max-width: 720px;
  margin-bottom: 42px;
}

.section-head h2 {
  font-size: clamp(28px, 3.8vw, 44px);
  font-weight: 700;
}

/* ——— About ——— */
.about-columns {
  display: block;
}

.about-highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.about-highlights li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  padding: 14px 16px;
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
  box-shadow: var(--shadow-sm);
}

.about-highlights li span {
  font-size: 18px;
  line-height: 1.4;
}

/* ——— Experience / Timeline ——— */
.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 22px 24px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.timeline-item:hover {
  transform: translateY(-3px);
  border-color: rgba(47, 91, 255, 0.35);
  box-shadow: var(--shadow);
}

.timeline-marker {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--on-primary);
  background: var(--grad);
}

.timeline-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}

.timeline-head h4 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
}

.timeline-org {
  color: var(--primary);
  font-weight: 600;
  font-size: 15px;
}

.timeline-date {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.timeline-role {
  margin: 2px 0 8px;
  font-weight: 600;
  color: var(--text);
  font-size: 14.5px;
}

.timeline-body > p:last-child,
.timeline-body > p.timeline-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 15px;
}

.timeline-points {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}

.timeline-points li { margin-bottom: 6px; }
.timeline-points li:last-child { margin-bottom: 0; }
.timeline-points strong,
.timeline-body strong { color: var(--text); }

.inline-link {
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
}

.inline-link:hover { text-decoration: underline; }

/* ——— Projects ——— */
.project-group {
  margin-bottom: 48px;
}

.project-group:last-child {
  margin-bottom: 0;
}

.project-group-title {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--primary);
  margin: 0 0 28px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
}

.project-group-title:not(:first-of-type) {
  margin-top: 12px;
}

.project {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
  margin-bottom: 44px;
}

.project:last-child { margin-bottom: 0; }
.project-reverse .project-media { order: 2; }

.project-media {
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: #0b0d16;
  box-shadow: var(--shadow);
}

.project-media video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #0b0d16;
}

.project-media img {
  width: 100%;
  display: block;
  background: var(--card-soft);
}

.project-gallery {
  display: grid;
  gap: 10px;
}

.project-gallery video {
  border-radius: 12px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.project-gallery img {
  border-radius: 12px;
  border: 1px solid var(--border);
}

.project-info h3 {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
}

.project-info p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 16px;
}

.project-specs {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-specs li {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card-soft);
  padding: 8px 12px;
  font-size: 13.5px;
  color: var(--muted);
}

.project-specs li strong { color: var(--primary); }

/* ——— Publications ——— */
.pub-list {
  display: grid;
  gap: 18px;
}

.pub-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 26px 28px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.pub-card:hover {
  transform: translateY(-3px);
  border-color: rgba(47, 91, 255, 0.35);
  box-shadow: var(--shadow);
}

.pub-index {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 600;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}

.pub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.pub-tags span {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 6px;
  padding: 3px 9px;
}

.pub-body h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 6px;
}

.pub-venue {
  margin: 0 0 10px;
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}

.pub-body > p:not(.pub-venue) {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 15px;
}

.pub-link {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--primary);
}

.pub-link:hover { text-decoration: underline; }

.section-head-pub {
  margin-top: 56px;
}

.project-nda {
  margin: 40px 0 0;
  padding: 18px 22px;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  background: var(--card-soft);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}

/* ——— Education ——— */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.edu-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
}

.edu-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.edu-school {
  margin: 0 0 4px;
  color: var(--primary);
  font-weight: 600;
  font-size: 15px;
}

.edu-meta {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13.5px;
}

/* ——— Skills ——— */
.skills-wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.skill-group {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.skill-group h4 {
  font-size: 14px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  font-family: var(--mono);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text);
  background: var(--card-soft);
}

/* ——— Contact ——— */
.contact {
  text-align: center;
  max-width: 680px;
}

.contact h2 { font-size: clamp(28px, 4vw, 46px); }

.contact p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 17px;
}

.contact-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ——— Footer ——— */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

/* ——— Background glow ——— */
.bg-glow {
  position: fixed;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
  z-index: -1;
  pointer-events: none;
}

.bg-glow-1 { top: -160px; left: -140px; background: rgba(47, 91, 255, 0.22); }
.bg-glow-2 { right: -160px; bottom: -160px; background: rgba(111, 75, 255, 0.18); }

/* ——— Reveal animation ——— */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ——— Responsive ——— */
@media (max-width: 980px) {
  .hero-grid,
  .project,
  .project-reverse,
  .skills-wrap,
  .about-highlights {
    grid-template-columns: 1fr;
  }

  .project-reverse .project-media { order: 0; }

  .hero-visual {
    order: -1;
    margin-bottom: 8px;
  }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .edu-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .section { padding: 60px 0; }
  .hero.section { padding-top: 32px; }
  .container { width: min(100% - 28px, 1120px); }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    font-size: 18px;
  }

  .nav-links {
    position: absolute;
    right: 14px;
    top: 100%;
    margin-top: 6px;
    flex-direction: column;
    align-items: stretch;
    min-width: 220px;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    background: var(--bg-elev);
    padding: 12px;
    display: none;
    box-shadow: var(--shadow);
  }

  .nav-links.open { display: flex; }

  .nav-links > a {
    display: block;
    padding: 12px 14px;
    min-height: 44px;
  }

  .hero-content { text-align: center; }
  .hero-actions, .hero-links { justify-content: center; }
  .section-head { margin-bottom: 30px; }

  .timeline-item {
    grid-template-columns: 44px 1fr;
    gap: 14px;
    padding: 18px;
  }

  .timeline-marker { width: 44px; height: 44px; font-size: 14px; }
  .timeline-date { margin-left: 0; }

  .pub-card {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 22px;
  }

  .pub-index { font-size: 22px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  h1 { font-size: clamp(26px, 8vw, 36px); }
}
