:root {
  color-scheme: dark;
  --bg: #0f0f13;
  --surface: #1a1a22;
  --surface-hover: #20202a;
  --border: #2a2a35;
  --text: #e2e2e8;
  --heading: #ffffff;
  --muted: #a1a1aa;
  --quiet: #71717a;
  --faint: #52525b;
  --accent: #7c73ff;
  --accent-soft: rgba(124, 115, 255, 0.12);
  --orange: #e05a00;
  --max-width: 48rem;
  --nav-height: 3.875rem;
  --radius: 0.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 20rem;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 1.5rem);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

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

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.6rem 0.8rem;
  transform: translateY(-180%);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--heading);
  font-size: 0.8rem;
  transition: transform 160ms ease;
}

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

.site-nav {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 15, 19, 0.92);
  backdrop-filter: blur(14px);
}

.nav-inner {
  display: flex;
  min-height: var(--nav-height);
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--heading);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--accent);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  color: var(--quiet);
  font-size: 0.82rem;
}

.nav-links a {
  transition: color 160ms ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--heading);
}

.nav-toggle {
  display: none;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

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

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  color: var(--heading);
  line-height: 1.15;
}

h1 {
  max-width: 11ch;
  margin-bottom: 1.6rem;
  font-size: clamp(3rem, 9vw, 4.15rem);
  font-weight: 850;
  letter-spacing: -0.052em;
}

.hero .lede {
  max-width: 42rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.12rem);
  line-height: 1.7;
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-top: 2rem;
}

.hero .inline-links {
  margin-top: 1.5rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 650;
}

.text-link .arrow {
  color: var(--accent);
  transition: transform 180ms var(--ease);
}

.text-link:hover .arrow {
  transform: translateX(0.25rem);
}

.section {
  padding: 3rem 0 4rem;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-heading .eyebrow {
  margin-bottom: 0;
}

.section-note {
  margin: 0;
  color: var(--faint);
  font-size: 0.75rem;
}

.card-list {
  display: grid;
  gap: 0.75rem;
}

.work-card {
  display: block;
  padding: 1.35rem 1.25rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms var(--ease);
}

.work-card:hover {
  transform: translateY(-2px);
  border-color: #3c3c4c;
  background: var(--surface-hover);
}

.work-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
}

.work-card__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.work-card h2,
.work-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.work-card p {
  margin-bottom: 0;
  color: var(--quiet);
  font-size: 0.84rem;
  line-height: 1.6;
}

.work-card ul {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

.work-card__arrow {
  flex: 0 0 auto;
  margin-top: 0.1rem;
  color: var(--accent);
  font-size: 1.2rem;
  transition: transform 180ms var(--ease);
}

.work-card:hover .work-card__arrow {
  transform: translateX(0.3rem);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 1.3rem;
  padding: 0.15rem 0.45rem;
  border: 1px solid rgba(124, 115, 255, 0.28);
  border-radius: 0.15rem;
  background: var(--accent-soft);
  color: #9a94ff;
  font-size: 0.61rem;
  font-weight: 750;
  letter-spacing: 0.11em;
  line-height: 1;
  text-transform: uppercase;
}

.about-copy {
  max-width: 39rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.about-copy a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(124, 115, 255, 0.55);
  text-underline-offset: 0.25em;
}

.about-copy a:hover {
  color: var(--heading);
  text-decoration-color: var(--accent);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 2rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
}

.hero-stats {
  margin-top: 1.5rem;
}

.stat {
  min-height: 7rem;
  padding: 1rem;
  background: var(--bg);
}

.stat strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--heading);
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.stat span {
  color: var(--quiet);
  font-size: 0.73rem;
  line-height: 1.45;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 0.72rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1.2rem;
}

.footer-links a {
  transition: color 160ms ease;
}

.footer-links a:hover {
  color: var(--heading);
}

.timeline {
  display: grid;
  gap: 3rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 2rem;
}

.timeline-meta {
  color: var(--quiet);
  font-size: 0.75rem;
}

.timeline-content h2 {
  margin-bottom: 0.35rem;
  font-size: 1.12rem;
  letter-spacing: -0.015em;
}

.timeline-role {
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.timeline-content p,
.timeline-content li {
  color: var(--muted);
  font-size: 0.88rem;
}

.timeline-content ul {
  display: grid;
  gap: 0.65rem;
  margin: 1.15rem 0 0;
  padding-left: 1.15rem;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.skill-card {
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.skill-card h3 {
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.skill-card p {
  margin-bottom: 0;
  color: var(--quiet);
  font-size: 0.8rem;
}

.has-motion [data-reveal] {
  opacity: 0;
  transform: translateY(0.8rem);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}

.has-motion [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 44rem) {
  .nav-inner {
    position: relative;
    padding-inline: 1rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
  }

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

  .nav-links a {
    padding: 0.65rem 0;
  }

  .site-shell {
    width: min(calc(100% - 2rem), var(--max-width));
  }

  .hero {
    padding-top: 4.5rem;
  }

  h1 {
    font-size: clamp(2.8rem, 15vw, 3.45rem);
  }

  .stats,
  .skill-grid {
    grid-template-columns: 1fr;
  }

  .stat {
    min-height: auto;
  }

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

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

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

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

@media print {
  :root {
    color-scheme: light;
    --bg: #ffffff;
    --surface: #f6f6f8;
    --surface-hover: #f6f6f8;
    --border: #d8d8df;
    --text: #17171c;
    --heading: #000000;
    --muted: #3f3f46;
    --quiet: #52525b;
    --faint: #71717a;
    --accent: #5046d8;
  }

  @page {
    margin: 0.55in;
  }

  body {
    font-size: 9.5pt;
  }

  .site-nav,
  .skip-link,
  .inline-links,
  .site-footer,
  .section-note,
  .work-card__arrow {
    display: none !important;
  }

  .site-shell {
    width: 100%;
    max-width: none;
  }

  .hero {
    padding: 0 0 1.2rem;
  }

  .hero h1 {
    margin-bottom: 0.6rem;
    font-size: 30pt;
  }

  .hero .lede {
    max-width: none;
    font-size: 10pt;
  }

  .section {
    padding: 1.2rem 0;
    break-inside: avoid;
  }

  .stats,
  .skill-grid {
    break-inside: avoid;
  }

  .timeline {
    gap: 1.3rem;
  }

  .timeline-item {
    grid-template-columns: 7.5rem 1fr;
    gap: 1rem;
    break-inside: avoid;
  }

  .timeline-content p,
  .timeline-content li,
  .work-card p,
  .work-card li,
  .skill-card p {
    font-size: 8.5pt;
  }

  .timeline-content ul {
    gap: 0.3rem;
    margin-top: 0.6rem;
  }

  .work-card,
  .skill-card {
    break-inside: avoid;
  }

  .has-motion [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
