:root {
  color-scheme: light dark;

  --bg: #f6f5f1;
  --surface: #ffffff;
  --fg: #121316;
  --muted: #555a64;
  --faint: #8a8f99;
  --rule: #e2e0da;
  --line: #d6d3cb;
  --dot: rgba(18, 19, 22, 0.09);
  --accent: #3355ff;
  --accent-soft: rgba(51, 85, 255, 0.09);
  --on-accent: #ffffff;
  --live: #16a34a;
  --live-ink: #15803d;
  --live-soft: rgba(22, 163, 74, 0.1);

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 74rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 18px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0d10;
    --surface: #14161b;
    --fg: #ececef;
    --muted: #a3a8b3;
    --faint: #737985;
    --rule: #22252c;
    --line: #2e323a;
    --dot: rgba(236, 236, 239, 0.08);
    --accent: #8c9dff;
    --accent-soft: rgba(140, 157, 255, 0.12);
    --live: #4ade80;
    --live-ink: #4ade80;
    --live-soft: rgba(74, 222, 128, 0.12);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

a {
  color: inherit;
}

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
}

.skip:focus {
  top: 1rem;
}

/* Nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 70%, transparent);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.nav nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 3vw, 1.75rem);
  font-size: 0.9375rem;
}

.nav nav a {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 150ms ease;
}

.nav nav a:hover {
  color: var(--fg);
}

.nav nav .nav-cta {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg);
  transition: border-color 150ms ease;
}

.nav nav .nav-cta:hover {
  border-color: var(--fg);
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 7vw, 5.5rem);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--dot) 1.1px, transparent 1.1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 72% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 72% 40%, #000 20%, transparent 75%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.85rem 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.pulse {
  position: relative;
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--live);
}

.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--live);
  animation: pulse 2.4s ease-out infinite;
}

h1 {
  margin-top: 1.5rem;
  font-size: clamp(3.25rem, 9vw, 6.25rem);
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.lede {
  margin-top: 1.75rem;
  max-width: 34rem;
  font-size: clamp(1.25rem, 2.3vw, 1.5rem);
  line-height: 1.42;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

.lede em {
  font-style: normal;
  font-weight: 550;
  color: var(--accent);
}

.sublede {
  margin-top: 1.1rem;
  max-width: 32rem;
  color: var(--muted);
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: transform 180ms var(--ease), border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--fg);
}

.btn-primary {
  border-color: var(--fg);
  background: var(--fg);
  color: var(--bg);
}

.btn-primary:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

/* Status card */

.status-card {
  justify-self: end;
  width: 100%;
  max-width: 25rem;
  padding: 1.25rem 1.4rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 30px 70px -45px rgba(18, 19, 22, 0.4);
}

.status-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
}

.status-title {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--faint);
}

.status-ok {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.7rem 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--live-soft);
  color: var(--live-ink);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

.status-list {
  padding: 0;
  list-style: none;
}

.status-list li {
  padding-block: 0.85rem;
}

.status-list li + li {
  border-top: 1px solid var(--rule);
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.15rem 1rem;
}

.status-name {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.status-sub {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
  white-space: nowrap;
}

.bars {
  display: block;
  height: 1rem;
  margin-top: 0.55rem;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--live) 0 4px, transparent 4px 7px);
  opacity: 0.78;
  animation: fill 1300ms var(--ease) both;
}

.status-list li:nth-child(1) .bars { animation-delay: 350ms; }
.status-list li:nth-child(2) .bars { animation-delay: 500ms; }
.status-list li:nth-child(3) .bars { animation-delay: 650ms; }
.status-list li:nth-child(4) .bars { animation-delay: 800ms; }

/* Stats */

.stats {
  border-block: 1px solid var(--rule);
  background: var(--surface);
}

.stats-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1rem, 2vw, 1.75rem);
}

.stat + .stat {
  border-left: 1px solid var(--rule);
}

.stat:first-child {
  padding-left: 0;
}

.stats-title {
  padding-top: 1.75rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.stats .stat {
  padding-top: 1rem;
}

.stat-title {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.label {
  margin-top: 0.5rem;
  max-width: 16rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--muted);
  text-wrap: pretty;
}

/* Sections */

.section {
  padding-block: clamp(4rem, 9vw, 7rem) 0;
}

.section-inner {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: 2.5rem;
}

.section-head {
  align-self: start;
  position: sticky;
  top: 6rem;
}

.kicker {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--accent);
}

.section-head h2 {
  margin-top: 0.4rem;
  font-size: 1.6rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-wrap: balance;
}

.section-note {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

/* Cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.25rem;
}

.card {
  padding: 1.75rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 220ms var(--ease), border-color 220ms ease, box-shadow 220ms ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--line);
  box-shadow: 0 18px 40px -24px rgba(18, 19, 22, 0.35);
}

.icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1.4rem;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.icon svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card p {
  margin-top: 0.6rem;
  font-size: 0.97rem;
  color: var(--muted);
  text-wrap: pretty;
}

/* Prose sections */

.prose > p {
  max-width: 42rem;
  font-size: 1.08rem;
  text-wrap: pretty;
}

.prose > p + p {
  margin-top: 1rem;
}

.text-link {
  font-weight: 550;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  transition: border-color 150ms ease;
}

.text-link:hover {
  border-bottom-color: currentColor;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.9rem;
  transition: border-color 150ms ease, color 150ms ease;
}

.chips li:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Contact */

.contact {
  margin-top: clamp(4.5rem, 9vw, 7rem);
}

.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  padding: clamp(1.75rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 2.75rem);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.contact h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.contact p {
  margin-top: 0.35rem;
  max-width: 34rem;
  color: var(--muted);
}

.contact .actions {
  margin-top: 0;
}

/* Footer */

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 2.5rem 3rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--faint);
}

/* Motion */

.hero-copy > * {
  animation: rise 800ms var(--ease) both;
}

.hero-copy > :nth-child(2) { animation-delay: 60ms; }
.hero-copy > :nth-child(3) { animation-delay: 140ms; }
.hero-copy > :nth-child(4) { animation-delay: 220ms; }
.hero-copy > :nth-child(5) { animation-delay: 300ms; }

.status-card {
  animation: rise 900ms var(--ease) 200ms both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes fill {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes pulse {
  from { transform: scale(1); opacity: 0.6; }
  to { transform: scale(3); opacity: 0; }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Layout breakpoints */

@media (max-width: 60rem) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .status-card {
    justify-self: start;
  }

  .section-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
  }

  .section-head {
    position: static;
  }

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

  .stat:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--rule);
  }
}

@media (max-width: 40rem) {
  .brand-name {
    display: none;
  }

  .status-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
  }
}

@media print {
  .nav,
  .status-card,
  .skip {
    display: none;
  }

  .contact-card {
    background: none;
  }
}

/* Inner pages */

.nav nav a[aria-current="page"] {
  color: var(--fg);
}

.nav nav .nav-cta[aria-current="page"] {
  border-color: var(--fg);
}

.page-head {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 8vw, 6rem) clamp(0.5rem, 2vw, 1.5rem);
}

.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--dot) 1.1px, transparent 1.1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 60% 90% at 80% 30%, #000 15%, transparent 70%);
  mask-image: radial-gradient(ellipse 60% 90% at 80% 30%, #000 15%, transparent 70%);
}

.page-head h1 {
  font-size: clamp(2.75rem, 7vw, 4.75rem);
}

.page-head .lede {
  max-width: 40rem;
}

.page-head-solo {
  padding-block: clamp(4rem, 12vw, 9rem);
}

.section-tight {
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
}

.status-warn .pulse,
.status-warn .pulse::after {
  background: #f59e0b;
}

/* Experience */

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.job {
  position: relative;
  padding-left: 2.25rem;
  padding-bottom: 3.5rem;
}

.job::before {
  content: "";
  position: absolute;
  left: 0.3rem;
  top: 0.55rem;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.job:last-child {
  padding-bottom: 0;
}

.job::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3rem;
  width: 0.65rem;
  height: 0.65rem;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
}

.job:first-child::after {
  background: var(--accent);
}

.years {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--faint);
}

.job h3 {
  margin-top: 0.35rem;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.ticker {
  margin-left: 0.4rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--faint);
  vertical-align: middle;
}

.job-role {
  margin-top: 0.15rem;
  font-weight: 500;
}

.job-desc {
  margin-top: 0.6rem;
  max-width: 42rem;
  color: var(--muted);
  text-wrap: pretty;
}

.steps {
  max-width: 30rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.steps li {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.95rem;
}

.step-years {
  padding-top: 0.1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--faint);
}

.steps li:first-child .step-title {
  font-weight: 600;
}

.steps li:not(:first-child) .step-title {
  color: var(--muted);
}

.highlights {
  display: grid;
  gap: 0.65rem;
  max-width: 44rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.highlights li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.98rem;
  color: var(--muted);
  text-wrap: pretty;
}

.highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 0.5rem;
  height: 1.5px;
  border-radius: 1px;
  background: var(--accent);
}

.edu {
  display: grid;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.edu h3 {
  font-size: 1.15rem;
}

.edu p {
  margin-top: 0.2rem;
  color: var(--muted);
}

/* Contact form */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.form-card {
  display: grid;
  gap: 1.4rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--rule);
  border-radius: 22px;
  background: var(--surface);
}

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

.field {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field label,
.field legend {
  padding: 0;
  font-size: 0.9rem;
  font-weight: 550;
}

.field legend {
  margin-bottom: 0.45rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.topic-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.topic {
  position: relative;
}

.topic input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.topic span {
  display: inline-block;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-size: 0.92rem;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.topic input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 550;
}

.topic input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

button.btn {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

.form-note {
  font-size: 0.85rem;
  color: var(--faint);
}

.contact-aside {
  padding-top: 0.5rem;
}

.contact-aside h2 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.contact-aside p {
  margin-top: 0.6rem;
  color: var(--muted);
}

@media (max-width: 60rem) {
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 40rem) {
  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps li {
    grid-template-columns: 4.75rem minmax(0, 1fr);
  }
}
