:root {
  --bg: #070a12;
  --panel: #0d1220;
  --panel-2: #11182a;
  --text: #f4f7fb;
  --muted: #a6afbf;
  --line: rgba(255,255,255,.10);
  --line-strong: rgba(255,255,255,.16);
  --accent: #8dc3ff;
  --accent-strong: #63a8ff;
  --max: 1160px;
  --radius: 26px;
  --shadow: 0 24px 80px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
body::selection { background: rgba(141,195,255,.26); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }

.site-bg { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; background: radial-gradient(circle at 50% -15%, rgba(78,120,183,.16), transparent 35%), var(--bg); }
.grid-glow { position: absolute; inset: 0; opacity: .23; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 56px 56px; mask-image: linear-gradient(to bottom, #000 0%, transparent 78%); }
.orb { position: absolute; width: 360px; height: 360px; border-radius: 50%; filter: blur(110px); opacity: .12; }
.orb-a { top: 120px; left: -120px; background: #5e99ff; }
.orb-b { right: -130px; top: 650px; background: #8266ff; }

.nav-wrap { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid rgba(255,255,255,.07); background: rgba(7,10,18,.72); backdrop-filter: blur(18px); }
.nav { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 12px; font-family: "Space Grotesk"; font-weight: 700; font-size: 13px; letter-spacing: .02em; background: rgba(255,255,255,.03); }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a, .nav-cta { color: #c7cfdb; font-size: 14px; transition: color .2s ease, transform .2s ease; }
.nav-links a:hover, .nav-cta:hover { color: var(--text); transform: translateY(-1px); }
.nav-cta { padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.03); }
.nav-cta span { color: var(--accent); }
.menu-btn { display: none; border: 0; background: none; color: var(--text); font-size: 22px; padding: 6px; }

.hero { min-height: calc(100vh - 78px); padding: 90px 0 80px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .72fr); gap: 84px; align-items: center; }
.eyebrow { display: inline-flex; gap: 10px; align-items: center; font-size: 13px; font-weight: 600; color: #ccd6e5; padding: 9px 12px; border: 1px solid var(--line); border-radius: 99px; background: rgba(255,255,255,.025); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #7bd5a0; box-shadow: 0 0 12px rgba(123,213,160,.65); }
.hero h1 { margin: 24px 0 20px; max-width: 850px; font: 700 clamp(3.4rem, 7vw, 6.8rem)/.94 "Space Grotesk", sans-serif; letter-spacing: -.055em; }
.hero h1 em { color: #a9cfff; font-style: normal; }
.hero-text { max-width: 690px; color: var(--muted); font-size: 18px; }
.hero-actions, .contact-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 13px 18px; border-radius: 14px; font-size: 14px; font-weight: 700; transition: transform .22s ease, background .22s ease, border-color .22s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--text); color: #0a0f1d; }
.btn-primary:hover { background: #d9e8fb; }
.btn-secondary { border: 1px solid var(--line-strong); background: rgba(255,255,255,.025); color: var(--text); }
.btn-secondary:hover { border-color: rgba(141,195,255,.42); background: rgba(141,195,255,.06); }
.hero-links { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 30px; color: #8290a5; font-size: 13px; }
.hero-links a:hover { color: var(--text); }
.hero-links span { opacity: .82; }

.hero-card { padding: 14px; border: 1px solid var(--line); border-radius: 30px; background: linear-gradient(145deg, rgba(255,255,255,.065), rgba(255,255,255,.018)); box-shadow: var(--shadow); transform: rotate(1.4deg); }
.hero-image-wrap { aspect-ratio: 1 / 1.08; overflow: hidden; border-radius: 22px; background: #b8c2ce; }
.hero-image-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: center top; filter: saturate(.78) contrast(1.03); }
.hero-card-bottom { margin: 14px 4px 2px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hero-card-bottom div:first-child { display: grid; gap: 2px; }
.hero-card-bottom strong { font-size: 15px; }
.hero-card-bottom span:not(.label) { color: #8792a4; font-size: 12px; }
.label, .project-kicker, .credential-meta, .section-label, .involvement-year { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #77869b; font-weight: 700; }
.mini-arrow { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); }

.section { padding: 110px 0 20px; }
.section-label { margin-bottom: 28px; }
.about-grid, .skills-layout, .split-section { display: grid; grid-template-columns: .72fr 1.28fr; gap: 80px; }
.section h2 { margin: 0 0 18px; font: 600 clamp(2.1rem, 4vw, 4rem)/1.03 "Space Grotesk"; letter-spacing: -.04em; }
.about-grid > div:last-child > .lead { margin-top: 8px; }
.lead { color: #bdc5d2; font-size: 20px; max-width: 730px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.stat { padding-top: 18px; border-top: 1px solid var(--line); }
.stat strong { display: block; font: 600 34px/1 "Space Grotesk"; letter-spacing: -.035em; }
.stat span { display: block; margin-top: 7px; color: #7f8b9f; font-size: 12px; }

.timeline { border-top: 1px solid var(--line); }
.timeline-item { display: grid; grid-template-columns: 220px 1fr; gap: 44px; padding: 34px 0 42px; border-bottom: 1px solid var(--line); }
.time { color: #7f8b9f; font-size: 13px; }
.timeline-main h3, .project-card h3, .credential-card h3, .involvement-grid h3, .award-box h3 { margin: 0; font: 600 24px/1.1 "Space Grotesk"; letter-spacing: -.025em; }
.company, .institution { color: #9ba7b8; margin: 7px 0 16px; }
.timeline-main p, .project-card p, .credential-card p, .involvement-grid span, .award-box p, .skills-layout > div:first-child p { color: #8f9bad; font-size: 14px; }
.tag-row, .tech-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag-row span, .tech-list span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 99px; font-size: 11px; color: #9eabba; background: rgba(255,255,255,.02); }

.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.section-head h2 { margin-bottom: 0; }
.text-link { font-size: 13px; color: #a9cfff; }
.text-link:hover { color: #fff; }
.project-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; margin-top: 34px; }
.project-card { padding: 30px; min-height: 370px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(150deg, rgba(255,255,255,.055), rgba(255,255,255,.02)); transition: transform .28s ease, border-color .28s ease, background .28s ease; }
.project-card:hover { transform: translateY(-5px); border-color: rgba(141,195,255,.28); background: linear-gradient(150deg, rgba(141,195,255,.08), rgba(255,255,255,.025)); }
.project-card.featured { background: radial-gradient(circle at 75% 10%, rgba(92,150,255,.15), transparent 30%), linear-gradient(150deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); }
.project-top { display: flex; justify-content: space-between; align-items: center; }
.project-index { color: #758298; font: 500 12px/1 "Space Grotesk"; }
.icon-link { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); }
.project-kicker { margin-top: 48px; }
.project-card h3 { font-size: 30px; margin-top: 10px; }
.project-card p { max-width: 630px; margin-top: 14px; }

.skills-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.skill-group { padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.018); }
.skill-group h3 { margin: 0 0 10px; font: 600 17px "Space Grotesk"; }
.skill-group p { margin: 0; color: #8894a7; font-size: 13px; }

.credentials-grid { display: grid; grid-template-columns: 1.2fr .9fr .9fr; gap: 16px; }
.credential-card { padding: 25px; min-height: 295px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.018); }
.primary-credential { background: linear-gradient(150deg, rgba(141,195,255,.09), rgba(255,255,255,.02)); }
.credential-card h3 { margin-top: 10px; }
.credential-card .muted { color: #7f8c9f; font-size: 12px; }
.credential-card .text-link { display: inline-block; margin-top: 18px; }

.involvement-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.involvement-grid article { padding: 24px; min-height: 250px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.involvement-year { margin-bottom: 22px; }
.involvement-grid h3 { font-size: 19px; }
.involvement-grid p { color: #a2adbc; font-size: 13px; }
.involvement-grid span { display: block; margin-top: 18px; font-size: 12px; }

.split-section { align-items: start; }
.award-box { display: grid; grid-template-columns: 42px 1fr; gap: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.018); }
.award-mark { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(141,195,255,.08); color: var(--accent); }
.award-box p { margin: 7px 0 0; }
.cert-list { border-top: 1px solid var(--line); }
.cert-item { display: grid; grid-template-columns: 90px 1fr; gap: 6px 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.cert-item span { color: #78869a; font-size: 11px; }
.cert-item strong { font: 600 17px "Space Grotesk"; }
.cert-item em { grid-column: 2; font-style: normal; color: #8693a5; font-size: 12px; }

.contact-section { padding-bottom: 100px; }
.contact-inner { padding: 70px; border: 1px solid var(--line); border-radius: 30px; background: radial-gradient(circle at 80% 10%, rgba(97,157,255,.16), transparent 32%), linear-gradient(140deg, rgba(255,255,255,.06), rgba(255,255,255,.015)); }
.contact-inner h2 { max-width: 640px; font-size: clamp(3rem, 6vw, 5.2rem); }
.contact-inner p { color: #9aa5b7; max-width: 600px; font-size: 16px; }
.footer { padding: 25px 0 55px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; color: #647084; font-size: 12px; }

.reveal { opacity: 1; transform: translateY(0); }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: .10s !important; }
.delay-2 { transition-delay: .18s !important; }

@media (max-width: 980px) {
  .nav-links { display: none; }
  .menu-btn { display: block; }
  .nav { position: relative; }
  .nav-links.open { display: grid; position: absolute; top: 74px; left: 0; right: 0; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: rgba(10,14,24,.96); }
  .hero { grid-template-columns: 1fr; gap: 40px; min-height: auto; padding-top: 70px; }
  .hero-card { width: min(520px, 100%); margin-left: auto; margin-right: auto; }
  .about-grid, .skills-layout, .split-section { grid-template-columns: 1fr; gap: 36px; }
  .credentials-grid { grid-template-columns: 1fr 1fr; }
  .primary-credential { grid-column: 1 / -1; }
  .involvement-grid { grid-template-columns: 1fr 1fr; }
  .project-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { width: min(var(--max), calc(100% - 28px)); }
  .nav-cta { display: none; }
  .hero { padding-top: 52px; }
  .hero h1 { font-size: clamp(3rem, 16vw, 4.4rem); }
  .hero-text { font-size: 16px; }
  .hero-links { gap: 12px 16px; }
  .section { padding-top: 84px; }
  .stat-row, .skills-grid, .credentials-grid, .involvement-grid { grid-template-columns: 1fr; }
  .primary-credential { grid-column: auto; }
  .timeline-item { grid-template-columns: 1fr; gap: 10px; }
  .section-head { display: block; }
  .text-link { display: inline-block; margin-top: 14px; }
  .project-card { min-height: auto; }
  .contact-inner { padding: 34px 24px; }
  .footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { transition: none !important; transform: none !important; opacity: 1 !important; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
