:root {
  --background: #111310;
  --surface: #181b17;
  --text: #e8eae4;
  --muted: #a4a89f;
  --line: #30342e;
  --accent: #82a8ff;
  --max-width: 1080px;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color-scheme: dark;
}
::selection { background: var(--accent); color: #10140f; }
a { color: inherit; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }
p, h1, h2, h3 { text-wrap: pretty; }

.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 100;
  padding: 0.65rem 0.9rem;
  background: var(--text);
  color: white;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  background: rgba(17, 19, 16, 0.96);
  border-bottom: 1px solid var(--line);
}
.identity { display: flex; align-items: center; gap: 0.65rem; font-weight: 700; text-decoration: none; }
.identity-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  background: var(--text);
  color: white;
  border-radius: 4px;
  font: 700 0.7rem/1 var(--mono);
}
nav { display: flex; align-items: center; gap: 1.5rem; font-size: 0.85rem; }
nav a { text-decoration: none; }
.nav-github { color: var(--accent); font-weight: 650; }

.hero, .section, footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
.hero {
  padding-top: clamp(5rem, 10vw, 8rem);
  padding-bottom: clamp(5rem, 10vw, 8rem);
  border-bottom: 1px solid var(--line);
}
.hero-content { max-width: 820px; }
.eyebrow, .project-kicker, .step-kicker, .mini-meta {
  margin: 0 0 1rem;
  color: var(--accent);
  font: 650 0.72rem/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1;
  letter-spacing: -0.055em;
}
.hero-lede {
  max-width: 690px;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}
.hero-actions { display: flex; align-items: center; gap: 1.5rem; margin-top: 2.25rem; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 650;
}
.button-primary, .button-light { background: var(--accent); color: #10140f; }
.button-primary:hover, .button-light:hover { background: #a5bdff; color: #10140f; }
.text-link { color: var(--muted); font: 0.78rem/1 var(--mono); }

.section { padding-top: clamp(4.5rem, 8vw, 7rem); padding-bottom: clamp(4.5rem, 8vw, 7rem); }
.section + .section { border-top: 1px solid var(--line); }
.about {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.about-heading h2 { font-size: clamp(2.2rem, 4.5vw, 4rem); }
.about-copy { color: var(--muted); font-size: 1.05rem; }
.about-copy p { margin: 0 0 1.25rem; }
.about-copy p:first-child { color: var(--text); font-size: 1.3rem; line-height: 1.5; }
.about-copy p:last-child { margin-bottom: 0; }
.about-copy a { color: var(--text); text-decoration-color: var(--accent); }
.section-intro, .projects-heading {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.section-intro .eyebrow { grid-column: 1; }
.section-intro h2 { grid-column: 1; margin: 0; }
.section-intro > p:last-child {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin: 0;
  color: var(--muted);
  font-size: 1.25rem;
}
h2 { margin: 0; font-size: clamp(2.2rem, 4.5vw, 4rem); line-height: 1.05; letter-spacing: -0.045em; }

.story-steps { margin-top: 4rem; }
.story-step {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1.5rem;
  max-width: 760px;
  margin-left: auto;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}
.story-step:last-child { border-bottom: 1px solid var(--line); }
.step-number, .project-index { color: #777d73; font: 0.72rem/1.5 var(--mono); }
.step-kicker { margin-bottom: 0.5rem; }
.story-step h3 { margin: 0 0 0.6rem; font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.025em; }
.story-step p:last-child { margin: 0; color: var(--muted); }

.projects { max-width: none; background: var(--surface); }
.projects > * { max-width: calc(var(--max-width) - 3rem); margin-left: auto; margin-right: auto; }
.projects-heading { align-items: end; margin-bottom: 3.5rem; }
.projects-heading > p { margin: 0; color: var(--muted); }
.project-list { border-top: 1px solid var(--line); }
.project-card {
  display: grid;
  grid-template-columns: 3rem minmax(240px, 0.8fr) minmax(300px, 1.2fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--line);
}
.project-kicker { margin-bottom: 0.45rem; }
.project-main h3 { margin: 0 0 0.75rem; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1; letter-spacing: -0.045em; }
.project-main h3 a { text-decoration: none; }
.project-main h3 span { color: #7c8277; font-size: 0.8rem; }
.project-summary { margin: 0; font-weight: 600; line-height: 1.5; }
.project-detail > p { margin: 0; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.tags li {
  padding: 0.25rem 0.5rem;
  background: var(--background);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  font: 0.68rem/1.2 var(--mono);
}

.more-heading { margin-bottom: 3rem; }
.more-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.mini-card {
  min-height: 180px;
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  text-decoration: none;
}
.mini-card:hover { border-color: var(--accent); }
.mini-meta { margin-bottom: 2rem; }
.mini-card strong { display: flex; justify-content: space-between; font-size: 1.25rem; }
.mini-card p { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.9rem; }
.all-projects {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-weight: 650;
}

.closing {
  padding: clamp(5rem, 10vw, 8rem) 1.5rem;
  background: #151815;
  border-top: 1px solid var(--line);
  text-align: center;
}
.closing-inner { max-width: 760px; margin: 0 auto; }
.closing h2 { max-width: 700px; margin: 0 auto; }
.closing p:not(.eyebrow) { max-width: 560px; margin: 1.5rem auto; color: var(--muted); }

footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
  color: var(--muted);
  font: 0.72rem/1.5 var(--mono);
}
footer p { margin: 0; }
footer span { margin: 0 0.55rem; }

@media (max-width: 760px) {
  .about, .section-intro, .projects-heading, .project-card { grid-template-columns: 1fr; }
  .section-intro { gap: 1rem; }
  .section-intro > p:last-child { grid-column: 1; grid-row: auto; }
  .project-card { gap: 0.75rem; }
  .project-detail { margin-top: 0.75rem; }
}

@media (max-width: 560px) {
  nav a:not(.nav-github) { display: none; }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .story-step { grid-template-columns: 2rem 1fr; }
  .more-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; }
}

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