:root {
  color-scheme: dark;
  --bg: #000000;
  --bg-elevated: #050505;
  --panel: #0b0b0b;
  --panel-strong: #111111;
  --panel-soft: #121212;
  --text: #f5f5f5;
  --muted: #b4b4b4;
  --muted-strong: #d3d3d3;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
  --accent: #e0e0e0;
  --accent-strong: #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.06);
  --accent-glow: rgba(255, 255, 255, 0.08);
  --hero-glow: rgba(255, 255, 255, 0.04);
  --max-width: 1120px;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent-strong);
  text-underline-offset: 0.18em;
}

img,
object {
  max-width: 100%;
}

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

code {
  padding: 0.15rem 0.35rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

.background-orbit {
  display: none;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(var(--max-width), calc(100% - 1rem));
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

.site-header,
.hero,
.page-intro,
.section,
.site-footer,
.card,
.project-card,
.project-feature,
.contact-card,
.callout,
.article-shell,
.resume-frame,
.timeline-item,
.hero-panel,
.interest-block {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.site-header,
.site-footer,
.hero,
.page-intro,
.section {
  padding: clamp(1rem, 2vw, 1.5rem);
}

.site-header {
  position: sticky;
  top: 0.75rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.brand-copy strong {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.brand-copy span,
.site-footer p,
.card p,
.project-card p,
.project-feature p,
.contact-card p,
.callout p,
.timeline-item p,
.lede,
.interest-block p,
.post-meta,
.resume-mobile-note p {
  color: var(--muted);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted-strong);
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  border-color: rgba(255, 255, 255, 0.14);
  background: var(--accent-soft);
  color: var(--text);
  transform: translateY(-1px);
}

main {
  display: grid;
  gap: 1.25rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(18rem, 0.95fr);
  gap: 1.25rem;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--panel);
}

.hero-copy,
.hero-panel {
  min-width: 0;
}

.hero-panel,
.card,
.project-card,
.project-feature,
.contact-card,
.callout,
.article-shell,
.resume-frame,
.timeline-item,
.interest-block {
  padding: clamp(1rem, 2vw, 1.35rem);
  border-radius: var(--radius-lg);
}

.hero-copy {
  display: grid;
  align-content: center;
  gap: 1rem;
  padding-right: 0.5rem;
}

.hero-panel {
  align-self: stretch;
  background: var(--panel-strong);
}

.eyebrow,
.kicker,
.panel-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-strong);
}

.hero h1,
.page-intro h1,
.article-shell h1 {
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  max-width: 12ch;
}

.hero h1 {
  margin-top: 0.15rem;
}

.section-heading h2,
.page-intro h1 {
  max-width: 16ch;
}

.lede {
  max-width: 60ch;
  font-size: clamp(1rem, 1.5vw, 1.08rem);
}

.hero-metrics,
.interest-stack,
.project-stack,
.post-list,
.timeline,
.article-content,
.card-grid {
  display: grid;
  gap: 1rem;
}

.hero-metrics,
.interest-stack,
.card-grid {
  margin-top: 1rem;
}

.hero-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-soft);
}

.metric strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.05rem;
  color: var(--text);
}

.metric span {
  color: var(--muted);
  font-size: 0.95rem;
}

.actions,
.callout-actions,
.link-row,
.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.actions {
  margin-top: 0.5rem;
}

.button,
.project-card a,
.project-feature a,
.contact-card a,
.post-card a,
.resume-mobile-note a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #141414;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.button:hover,
.button:focus-visible,
.project-card a:hover,
.project-card a:focus-visible,
.project-feature a:hover,
.project-feature a:focus-visible,
.contact-card a:hover,
.contact-card a:focus-visible,
.resume-mobile-note a:hover,
.resume-mobile-note a:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

.button-primary {
  background: #1a1a1a;
  border-color: rgba(255, 255, 255, 0.14);
}

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

.section,
.page-intro {
  border-radius: var(--radius-xl);
}

.page-intro {
  background: var(--panel);
}

.section-heading {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1.15rem;
}

.section-heading h2 {
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.card,
.project-card,
.project-feature,
.contact-card {
  display: flex;
  flex-direction: column;
}

.card h2,
.card h3,
.project-card h3,
.project-feature h2,
.contact-card h2,
.callout h3,
.timeline-item h3,
.interest-block h2,
.article-content h2 {
  font-size: 1.2rem;
  line-height: 1.2;
}

.contact-card h2 {
  overflow-wrap: anywhere;
}

.card p,
.project-card p,
.project-feature p,
.contact-card p,
.callout p,
.timeline-item p,
.interest-block p,
.article-content p {
  margin-top: 0.8rem;
}

.card > a,
.project-card > a,
.project-feature > a,
.contact-card > a,
.post-card > a {
  margin-top: auto;
  width: fit-content;
}

.project-card,
.project-feature,
.contact-card,
.callout,
.interest-block,
.resume-frame {
  background: var(--panel-strong);
}

.callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.callout > * {
  min-width: min(100%, 18rem);
}

.project-meta {
  display: grid;
  gap: 0.35rem;
}

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

.timeline-mark {
  width: 0.8rem;
  height: 0.8rem;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08);
}

.resume-frame {
  overflow: hidden;
}

.resume-frame object {
  display: block;
  width: 100%;
  min-height: 76dvh;
  border: 0;
  border-radius: calc(var(--radius-lg) - 2px);
  background: #ffffff;
}

.resume-mobile-note {
  display: none;
  gap: 0.9rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #111111;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-top: 1.25rem;
  border-radius: var(--radius-xl);
}

.reveal {
  animation: fade-up 0.7s ease both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding-right: 0;
  }

  .hero h1,
  .page-intro h1,
  .article-shell h1 {
    max-width: 13ch;
  }

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

@media (max-width: 760px) {
  .site-shell {
    width: min(var(--max-width), calc(100% - 0.5rem));
    padding-top: 0.5rem;
  }

  .site-header {
    top: 0.5rem;
    flex-direction: column;
    align-items: stretch;
    padding: 0.9rem;
  }

  .brand {
    width: 100%;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .site-nav a {
    width: 100%;
  }

  .hero,
  .section,
  .page-intro,
  .site-footer {
    border-radius: 22px;
  }

  .hero h1,
  .page-intro h1,
  .article-shell h1 {
    font-size: clamp(2rem, 10vw, 3rem);
    max-width: 12ch;
  }

  .hero-metrics,
  .three-up,
  .two-up {
    grid-template-columns: 1fr;
  }

  .actions,
  .callout-actions {
    flex-direction: column;
  }

  .actions > *,
  .callout-actions > *,
  .resume-mobile-note a,
  .project-card > a,
  .project-feature > a,
  .contact-card > a {
    width: 100%;
  }

  .resume-frame object {
    display: none;
  }

  .resume-mobile-note {
    display: grid;
  }

  .callout {
    align-items: stretch;
  }

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

@media (max-width: 520px) {
  body {
    line-height: 1.6;
  }

  .site-shell {
    width: calc(100% - 0.25rem);
  }

  .site-header,
  .site-footer,
  .hero,
  .page-intro,
  .section {
    padding: 0.95rem;
  }

  .site-nav {
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
  }

  .brand-copy span {
    font-size: 0.92rem;
  }

  .metric,
  .hero-panel,
  .card,
  .project-card,
  .project-feature,
  .contact-card,
  .callout,
  .resume-frame,
  .interest-block {
    padding: 1rem;
  }

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

  .timeline-mark {
    display: none;
  }
}

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

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