:root {
  --bg: #08101f;
  --bg-soft: #0d172a;
  --surface: rgba(255,255,255,.055);
  --surface-strong: rgba(255,255,255,.085);
  --text: #edf3ff;
  --muted: #a9b7ce;
  --line: rgba(255,255,255,.12);
  --accent: #80e9c5;
  --accent-2: #8eb7ff;
  --shadow: 0 24px 70px rgba(0,0,0,.28);
  --radius: 22px;
  --shell: min(1120px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 5%, rgba(128,233,197,.12), transparent 26rem),
    radial-gradient(circle at 88% 18%, rgba(142,183,255,.14), transparent 30rem),
    linear-gradient(180deg, #08101f 0%, #07101b 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .92em; }

.shell { width: var(--shell); margin-inline: auto; }
.section { padding: 104px 0; position: relative; }
.skip-link { position: fixed; left: 16px; top: 12px; z-index: 1000; padding: 10px 14px; background: white; color: black; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: rgba(8,16,31,.72);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.nav { height: 72px; display: flex; align-items: center; gap: 28px; }
.brand {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  font-weight: 800;
  letter-spacing: -.04em;
  background: linear-gradient(135deg, rgba(128,233,197,.15), rgba(142,183,255,.08));
}
.nav-links { display: flex; gap: 24px; margin-left: auto; color: var(--muted); font-size: .93rem; }
.nav-links a, .footer a { transition: color .2s ease; }
.nav-links a:hover, .footer a:hover { color: var(--text); }
.nav-cta { margin-left: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 9px 15px; font-weight: 650; }

.hero { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 1.24fr .76fr; align-items: center; gap: 64px; }
.hero h1 {
  margin: 8px 0 20px;
  font-size: clamp(4rem, 10vw, 8.6rem);
  line-height: .88;
  letter-spacing: -.075em;
  max-width: 900px;
  background: linear-gradient(100deg, #fff 8%, #cce8ff 55%, #9df4d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.eyebrow { margin: 0 0 10px; color: var(--accent); text-transform: uppercase; letter-spacing: .18em; font-weight: 800; font-size: .78rem; }
.hero-lede { max-width: 760px; font-size: clamp(1.3rem, 2.2vw, 2rem); line-height: 1.35; letter-spacing: -.025em; color: #dce8f9; margin: 0 0 18px; }
.hero-note { max-width: 720px; color: var(--muted); font-size: 1.02rem; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border-radius: 12px; font-weight: 750; border: 1px solid var(--line); transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button.primary { background: var(--accent); color: #05251d; border-color: transparent; }
.button.secondary { background: rgba(255,255,255,.035); }
.button.secondary:hover { background: rgba(255,255,255,.075); border-color: rgba(255,255,255,.22); }

.hero-panel { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: rgba(10,19,35,.82); }
.terminal-top { height: 42px; padding: 0 15px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.terminal-top span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.3); }
.terminal-body { padding: 24px; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .9rem; }
.prompt { color: var(--accent); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0; }
.stats div { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: rgba(255,255,255,.025); }
.stats dt { color: var(--muted); font-size: .75rem; }
.stats dd { margin: 3px 0 0; font-size: 1.08rem; font-weight: 800; letter-spacing: -.03em; }
.terminal-line { color: var(--muted); margin: 8px 0 0; }

.signal-strip { border-block: 1px solid var(--line); background: rgba(255,255,255,.025); }
.signal-grid { min-height: 76px; display: grid; grid-template-columns: repeat(6, 1fr); align-items: center; gap: 14px; }
.signal-grid span { text-align: center; color: #c7d5e9; font-size: .9rem; }

.section-heading { display: grid; grid-template-columns: .34fr 1fr; gap: 28px; align-items: start; margin-bottom: 44px; }
.section-heading h2 { margin: 0; max-width: 780px; font-size: clamp(2.25rem, 5vw, 4.6rem); line-height: 1.02; letter-spacing: -.055em; }
.about-grid { display: grid; grid-template-columns: 1.28fr .72fr; gap: 32px; align-items: start; }
.prose { font-size: 1.12rem; color: #c7d3e5; }
.prose p:first-child { margin-top: 0; }
.prose strong { color: var(--text); }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 28px; box-shadow: 0 16px 50px rgba(0,0,0,.13); }
.card-kicker { margin: 0 0 14px; color: var(--accent); font-weight: 800; }
.clean-list { list-style: none; padding: 0; margin: 0; }
.clean-list li { position: relative; padding: 13px 0 13px 24px; border-bottom: 1px solid rgba(255,255,255,.07); color: #cbd7e8; }
.clean-list li:last-child { border-bottom: 0; }
.clean-list li::before { content: "↳"; position: absolute; left: 0; color: var(--accent); }

.timeline-item { display: grid; grid-template-columns: .34fr 1fr; gap: 28px; padding: 34px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.timeline-meta { color: var(--muted); }
.timeline-meta p { margin: 0 0 4px; }
.date { color: #b8c5d9; font-size: .88rem; }
.timeline-content h3, .project-card h3, .edu h3 { margin: 0 0 7px; font-size: 1.45rem; letter-spacing: -.025em; }
.timeline-content ul { margin: 18px 0 0; padding-left: 1.25rem; color: #c5d1e2; }
.timeline-content li + li { margin-top: 10px; }
.subtle { color: var(--muted); }

.cards-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.project-card { min-height: 100%; }
.project-card p { color: #c8d4e5; }
.card-row { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 28px; }
.tag { display: inline-flex; color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .025em; }
.metric { margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--line); }
.metric strong { color: var(--text); }

.education-stack { border-top: 1px solid var(--line); }
.edu { display: grid; grid-template-columns: 1fr auto; gap: 28px; padding: 30px 0; border-bottom: 1px solid var(--line); }
.edu p { margin: 5px 0; }
.edu-side { text-align: right; display: flex; flex-direction: column; gap: 6px; color: var(--muted); white-space: nowrap; }
.edu-side strong { color: var(--text); }
.coursework { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.coursework span { border: 1px solid var(--line); background: rgba(255,255,255,.025); color: #c9d6e8; padding: 8px 12px; border-radius: 999px; font-size: .88rem; }

.achievement-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.achievement { min-height: 180px; border-top: 1px solid var(--line); padding: 22px 12px 0 0; display: flex; flex-direction: column; justify-content: space-between; }
.achievement strong { font-size: 2.4rem; letter-spacing: -.06em; color: #e9f3ff; }
.achievement span { color: var(--muted); font-size: .94rem; }

.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.skills-grid div { padding: 24px; min-height: 145px; background: var(--surface); border-right: 1px solid var(--line); }
.skills-grid div:last-child { border-right: 0; }
.skills-grid h3 { margin: 0 0 16px; font-size: .94rem; color: var(--accent); }
.skills-grid p { margin: 0; color: #c8d5e7; }

.contact-section { padding-top: 82px; }
.contact-card { padding: clamp(32px, 7vw, 72px); border: 1px solid var(--line); border-radius: 30px; background: linear-gradient(140deg, rgba(128,233,197,.1), rgba(142,183,255,.06) 55%, rgba(255,255,255,.035)); box-shadow: var(--shadow); }
.contact-card h2 { margin: 6px 0 18px; max-width: 880px; font-size: clamp(2.4rem, 5vw, 4.8rem); line-height: 1.02; letter-spacing: -.055em; }
.contact-card > p:not(.eyebrow) { max-width: 760px; color: var(--muted); font-size: 1.08rem; }
.footer { min-height: 110px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); border-top: 1px solid var(--line); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .button { transition: none; }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 92px; gap: 40px; }
  .hero-panel { max-width: 620px; }
  .signal-grid { grid-template-columns: repeat(3, 1fr); padding: 16px 0; }
  .section-heading, .timeline-item { grid-template-columns: 1fr; gap: 14px; }
  .about-grid, .cards-2 { grid-template-columns: 1fr; }
  .achievement-grid, .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .skills-grid div:nth-child(2) { border-right: 0; }
  .skills-grid div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 620px) {
  :root { --shell: min(100% - 28px, 1120px); }
  .section { padding: 78px 0; }
  .hero { padding-top: 74px; }
  .hero h1 { font-size: clamp(3.5rem, 20vw, 6.1rem); }
  .hero-lede { font-size: 1.22rem; }
  .stats { grid-template-columns: 1fr; }
  .signal-grid { grid-template-columns: repeat(2, 1fr); }
  .edu { grid-template-columns: 1fr; }
  .edu-side { text-align: left; white-space: normal; }
  .achievement-grid, .skills-grid { grid-template-columns: 1fr; }
  .skills-grid div { border-right: 0; border-bottom: 1px solid var(--line); }
  .skills-grid div:last-child { border-bottom: 0; }
  .section-heading h2 { font-size: 2.55rem; }
  .contact-card { border-radius: 22px; }
  .footer { min-height: 130px; align-items: flex-start; padding-top: 36px; }
}

/* Profile and evidence links */
.profile-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px 0;
}
.profile-photo {
  width: 82px;
  height: 82px;
  object-fit: cover;
  object-position: 50% 24%;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
}
.profile-name {
  margin: 0 0 5px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
}
.profile-focus {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}
.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 18px;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  font-weight: 750;
  font-size: .92rem;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.secondary-link { color: #b9c8dc; }
.research-meta {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted) !important;
  font-size: .88rem;
}

@media (max-width: 620px) {
  .profile-strip { padding: 18px 20px 0; }
  .profile-photo { width: 72px; height: 72px; border-radius: 18px; }
}
