:root {
  color-scheme: light dark;
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --ink: #111111;
  --muted: #515154;
  --subtle: #6e6e73;
  --line: rgba(0, 0, 0, 0.1);
  --soft-line: rgba(0, 0, 0, 0.06);
  --accent: #0066cc;
  --accent-ink: #ffffff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.09);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d12;
    --surface: rgba(28, 28, 30, 0.78);
    --surface-strong: #16171b;
    --ink: #f5f5f7;
    --muted: #c7c7cc;
    --subtle: #98989d;
    --line: rgba(255, 255, 255, 0.14);
    --soft-line: rgba(255, 255, 255, 0.08);
    --accent: #2997ff;
    --accent-ink: #06111f;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
}

body::before {
  background:
    radial-gradient(circle at 14% 0%, rgba(0, 102, 204, 0.14), transparent 28rem),
    radial-gradient(circle at 88% 12%, rgba(48, 209, 88, 0.1), transparent 28rem);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 4px;
}

p,
h1,
h2,
h3,
dl,
dd {
  margin: 0;
}

.skip-link {
  background: var(--ink);
  border-radius: 999px;
  color: var(--bg);
  left: 16px;
  padding: 10px 14px;
  position: fixed;
  top: 16px;
  transform: translateY(-160%);
  transition: transform 160ms ease;
  z-index: 10;
}

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

.site-bar {
  align-items: center;
  backdrop-filter: blur(24px);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-bottom: 1px solid var(--soft-line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 16px max(22px, calc((100vw - 1120px) / 2));
  position: sticky;
  top: 0;
  z-index: 3;
}

.brand {
  font-size: 0.95rem;
  font-weight: 760;
  letter-spacing: -0.02em;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

nav a {
  color: var(--muted);
  font-size: 0.9rem;
}

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

.home-body {
  min-height: 100vh;
}

.home-shell {
  display: grid;
  gap: 22px;
  margin: 0 auto;
  max-width: 760px;
  min-height: 100vh;
  padding: 26vh 24px 80px;
}

.home-shell h1,
.hero-card h1 {
  font-size: clamp(3.4rem, 8vw, 6.9rem);
  letter-spacing: -0.065em;
  line-height: 0.92;
}

.home-lede,
.tagline {
  color: var(--muted);
  font-size: clamp(1.12rem, 2vw, 1.45rem);
  letter-spacing: -0.025em;
  line-height: 1.35;
  max-width: 760px;
}

.home-actions,
.hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  font-weight: 720;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

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

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.button.secondary {
  background: var(--surface);
  color: var(--ink);
}

.resume-page {
  display: grid;
  gap: 22px;
  margin: 0 auto;
  max-width: 1120px;
  padding: 44px 22px 80px;
}

.hero-card,
.section {
  background: var(--surface);
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1fr) 250px;
  overflow: hidden;
  padding: clamp(28px, 6vw, 68px);
}

.hero-copy {
  display: grid;
  gap: 20px;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.quick-facts {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 6px;
}

.quick-facts div {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.quick-facts dt {
  color: var(--subtle);
  font-size: 0.76rem;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quick-facts dd {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 3px;
}

.hero-actions {
  align-content: start;
  justify-content: end;
}

.section {
  padding: clamp(24px, 4vw, 42px);
}

.section h2 {
  font-size: 0.86rem;
  font-weight: 820;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.section > p,
.section-heading p {
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.7;
  max-width: 920px;
}

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

.skill-group,
.project,
.credential,
.todo-note,
.contact-grid > * {
  background: color-mix(in srgb, var(--surface-strong) 82%, transparent);
  border: 1px solid var(--soft-line);
  border-radius: 14px;
}

.skill-group {
  padding: 18px;
}

.skill-group h3,
.role h3,
.project h3,
.credential h3 {
  font-size: 1.06rem;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.skill-group p,
.role p,
.project p,
.credential p,
.todo-note {
  color: var(--muted);
}

.skill-group p,
.project p,
.credential p {
  margin-top: 7px;
}

.timeline {
  display: grid;
  gap: 22px;
}

.role {
  border-left: 2px solid var(--line);
  padding-left: 22px;
}

.role-heading {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 10px;
}

.role-heading p:not(.meta) {
  margin-top: 4px;
}

.meta {
  color: var(--subtle);
  font-size: 0.92rem;
  text-align: right;
  white-space: nowrap;
}

.role ul {
  color: var(--muted);
  margin: 0;
  padding-left: 19px;
}

.role li + li {
  margin-top: 6px;
}

.section-heading {
  margin-bottom: 18px;
}

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

.project {
  padding: 20px;
}

.featured-project {
  grid-column: 1 / -1;
}

.project-kicker {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.architecture-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.architecture-flow span {
  align-items: center;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-strong));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 680;
  min-height: 34px;
  padding: 7px 11px;
}

.architecture-flow span + span::before {
  color: var(--accent);
  content: "->";
  margin-right: 8px;
}

.split-section {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.credential,
.todo-note {
  padding: 18px;
}

.contact-grid {
  display: grid;
  font-style: normal;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.contact-grid > * {
  color: var(--muted);
  min-height: 48px;
  padding: 13px 15px;
}

.contact-grid a:hover {
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (max-width: 860px) {
  .site-bar,
  .hero-card,
  .role-heading,
  .split-section {
    grid-template-columns: 1fr;
  }

  .site-bar {
    align-items: start;
    display: grid;
  }

  .hero-actions {
    justify-content: start;
  }

  .quick-facts,
  .skills-grid,
  .project-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .meta {
    text-align: left;
    white-space: normal;
  }
}

@media (max-width: 560px) {
  .site-bar {
    padding: 14px 18px;
  }

  nav {
    gap: 10px;
  }

  nav a {
    font-size: 0.82rem;
  }

  .resume-page {
    padding: 22px 14px 44px;
  }

  .home-shell {
    padding-top: 18vh;
  }

  .home-shell h1,
  .hero-card h1 {
    font-size: 3.25rem;
  }

  .hero-card,
  .section {
    border-radius: 18px;
  }
}
