:root {
  --bg: #07111f;
  --bg-elevated: #0d1929;
  --panel: #101d2f;
  --panel-soft: #0b1727;
  --text: #f2f6fb;
  --muted: #9fb0c4;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #8dd7ff;
  --accent-strong: #c6ecff;
  --max: 1160px;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 80% 0%, rgba(52, 151, 255, 0.1), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: #04101d;
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(calc(100% - 2.5rem), var(--max));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 17, 31, 0.84);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  min-height: 68px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
}

.brand {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 800;
  letter-spacing: -0.04em;
}

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

.nav {
  justify-content: center;
}

.nav a,
.nav-actions a {
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 160ms ease;
}

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

.hero {
  padding: 7.5rem 0 6rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.65fr);
  gap: 4rem;
  align-items: end;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 1.5rem;
  font-size: clamp(3.2rem, 8vw, 6.8rem);
  line-height: 0.96;
  letter-spacing: -0.065em;
}

.hero-lede {
  max-width: 760px;
  margin-bottom: 2rem;
  color: #c5d2df;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.hero-actions,
.contact-actions,
.link-row,
.focus-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.72rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 750;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

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

.button.primary {
  border-color: transparent;
  background: var(--text);
  color: #07111f;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.035);
}

.focus-line {
  margin-top: 2rem;
}

.focus-line span {
  padding: 0.42rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8rem;
}

.hero-card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(141, 215, 255, 0.07), transparent 38%),
    var(--panel);
  box-shadow: var(--shadow);
}

.card-kicker {
  margin-bottom: 0.65rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-card h2 {
  margin-bottom: 0.75rem;
  font-size: 1.6rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero-card > p:not(.card-kicker) {
  color: var(--muted);
}

.quick-facts {
  display: grid;
  gap: 0;
  margin: 1.5rem 0 0;
  border-top: 1px solid var(--line);
}

.quick-facts div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.quick-facts dt {
  color: var(--muted);
}

.quick-facts dd {
  margin: 0;
  font-weight: 700;
}

.section {
  padding: 6rem 0;
}

.section-muted {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 2.5rem;
}

.section-heading h2,
.contact-card h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4.5vw, 3.7rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.section-heading > p:last-child,
.contact-card p {
  color: var(--muted);
}

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

.feature-card,
.project-card,
.lab-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.feature-card {
  padding: 1.6rem;
}

.feature-large {
  grid-column: 1 / -1;
  padding: 2rem;
}

.feature-meta,
.project-topline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.3rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.feature-card h3,
.project-card h3 {
  margin-bottom: 0.8rem;
  font-size: 1.55rem;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.feature-card p,
.project-card p,
.timeline-item p,
.lab-card span {
  color: var(--muted);
}

.compact-list {
  display: grid;
  gap: 0.55rem;
  margin: 1.2rem 0 0;
  padding-left: 1.15rem;
  color: #c5d2df;
}

.project-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}

.project-card {
  padding: 1.8rem;
}

.project-highlight {
  background:
    radial-gradient(circle at 100% 0%, rgba(141, 215, 255, 0.11), transparent 18rem),
    var(--panel-soft);
}

.project-status {
  color: var(--accent);
  font-weight: 800;
}

.project-subtitle {
  margin-top: -0.35rem;
  font-size: 0.95rem;
}

.project-proof {
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(141, 215, 255, 0.055);
  color: #d5e8f4 !important;
}

.link-row {
  margin-top: 1.2rem;
}

.link-row a {
  color: var(--accent-strong);
  font-weight: 750;
}

.experience-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: 4rem;
  align-items: start;
}

.sticky-heading {
  position: sticky;
  top: 110px;
}

.timeline {
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 115px 1fr;
  gap: 1.4rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.timeline-date {
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 750;
}

.timeline-item h3 {
  margin-bottom: 0.45rem;
  font-size: 1.1rem;
}

.timeline-item p {
  margin-bottom: 0;
}

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

.lab-card {
  display: grid;
  gap: 0.35rem;
  padding: 1.2rem;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.lab-card:hover {
  transform: translateY(-3px);
  border-color: rgba(141, 215, 255, 0.35);
  background: var(--panel);
}

.lab-card strong {
  font-size: 1rem;
}

.lab-card span {
  font-size: 0.86rem;
}

.contact-section {
  padding: 6rem 0;
}

.contact-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: end;
  padding: 2.4rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background:
    linear-gradient(140deg, rgba(141, 215, 255, 0.08), transparent 40%),
    var(--panel);
  box-shadow: var(--shadow);
}

.contact-card h2 {
  max-width: 760px;
}

.contact-card p {
  max-width: 680px;
  margin-bottom: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-inner {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.86rem;
}

.footer-inner p {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .nav-wrap {
    grid-template-columns: auto 1fr;
  }

  .nav {
    display: none;
  }

  .nav-actions {
    justify-content: flex-end;
  }

  .hero {
    padding-top: 5.5rem;
  }

  .hero-grid,
  .experience-layout,
  .project-grid,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .hero-grid,
  .experience-layout {
    gap: 2.5rem;
  }

  .sticky-heading {
    position: static;
  }

  .lab-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(calc(100% - 1.4rem), var(--max));
  }

  .nav-actions {
    gap: 0.8rem;
  }

  .nav-actions a {
    font-size: 0.82rem;
  }

  .hero {
    padding: 4.5rem 0 4rem;
  }

  h1 {
    font-size: clamp(3rem, 17vw, 4.6rem);
  }

  .section,
  .contact-section {
    padding: 4.2rem 0;
  }

  .work-grid,
  .lab-grid {
    grid-template-columns: 1fr;
  }

  .feature-large {
    padding: 1.6rem;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .contact-card {
    padding: 1.5rem;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
