:root {
  color-scheme: light dark;
  --bg: #f4f5f2;
  --surface: #eaede8;
  --text: #171a18;
  --muted: #626963;
  --line: #cfd4ce;
  --accent: #2456a8;
  --accent-soft: #dbe5f5;
  --focus: #2456a8;
  --radius: 2px;
  --content: 1120px;
  --mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

[data-theme="dark"] {
  --bg: #111311;
  --surface: #1a1d1a;
  --text: #eef0ec;
  --muted: #a8afa8;
  --line: #333833;
  --accent: #89aef0;
  --accent-soft: #1e3150;
  --focus: #a8c2f2;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111311;
    --surface: #1a1d1a;
    --text: #eef0ec;
    --muted: #a8afa8;
    --line: #333833;
    --accent: #89aef0;
    --accent-soft: #1e3150;
    --focus: #a8c2f2;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
}

a:hover {
  text-decoration-style: wavy;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 8px 10px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-180%);
}

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

.site-header,
main,
footer {
  width: min(calc(100% - 40px), var(--content));
  margin-inline: auto;
}

.site-header {
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  justify-self: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 4vw, 42px);
}

.site-header nav a,
.theme-toggle {
  color: var(--muted);
  text-decoration: none;
  font: inherit;
  font-size: 13px;
}

.site-header nav a:hover,
.theme-toggle:hover {
  color: var(--text);
}

.theme-toggle {
  justify-self: end;
  border: 0;
  padding: 8px 0 8px 12px;
  background: transparent;
  cursor: pointer;
}

.hero {
  min-height: min(760px, calc(100dvh - 72px));
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: clamp(48px, 9vw, 120px);
  padding-block: clamp(64px, 9vw, 96px);
}

.hero-copy {
  align-self: center;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 7ch;
  margin-bottom: 26px;
  font-size: clamp(54px, 8vw, 104px);
  line-height: 0.9;
  letter-spacing: -0.08em;
}

.lede {
  max-width: 49ch;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.55;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
}

.hero-visual {
  position: relative;
  margin: 0;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hero-visual img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  filter: saturate(0.86) contrast(0.98);
}

.section {
  display: grid;
  grid-template-columns: minmax(150px, 0.34fr) minmax(0, 1fr);
  gap: clamp(32px, 7vw, 88px);
  padding-block: clamp(72px, 9vw, 118px);
  border-top: 1px solid var(--line);
}

.section-label h2 {
  position: sticky;
  top: 28px;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.section-body {
  min-width: 0;
}

.about-copy {
  max-width: 68ch;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.55;
  letter-spacing: -0.025em;
}

.about-copy p:last-child,
.project:last-child,
.experience-item:last-child {
  margin-bottom: 0;
}

.work-list,
.experience-list {
  display: grid;
  gap: 0;
}

.project,
.experience-item {
  padding: 28px 0 32px;
  border-bottom: 1px solid var(--line);
}

.project:first-child,
.experience-item:first-child {
  padding-top: 0;
}

.project-heading,
.experience-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 24px;
}

.project h3,
.experience-item h3 {
  margin-bottom: 4px;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.project p {
  max-width: 62ch;
  margin-bottom: 12px;
  color: var(--muted);
}

.project .meta,
.experience-item div p {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
}

.experience-item > p {
  max-width: 38ch;
  margin: 2px 0 0;
  color: var(--muted);
  text-align: right;
}

.contact {
  padding-block: clamp(96px, 14vw, 170px);
  border-top: 1px solid var(--line);
}

.contact h2 {
  max-width: 13ch;
  margin-bottom: 22px;
  font-size: clamp(36px, 5.8vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.065em;
}

.contact p {
  margin-bottom: 26px;
  color: var(--muted);
}

.contact-link {
  display: inline-block;
  padding: 11px 15px;
  border: 1px solid var(--text);
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  transition: transform 140ms ease, background 140ms ease, color 140ms ease;
}

.contact-link:hover {
  background: transparent;
  color: var(--text);
  text-decoration: none;
}

.contact-link:active {
  transform: translateY(1px);
}

footer {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

footer p {
  margin: 0;
}

@media (max-width: 767px) {
  .site-header,
  main,
  footer {
    width: min(calc(100% - 32px), var(--content));
  }

  .site-header {
    grid-template-columns: auto 1fr auto;
    gap: 18px;
  }

  .site-header nav {
    justify-content: center;
    gap: 14px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 52px;
    padding-block: 64px 86px;
  }

  h1 {
    font-size: clamp(52px, 18vw, 78px);
  }

  .hero-visual {
    width: min(84vw, 460px);
    justify-self: end;
  }

  .hero-visual::before {
    inset: 12px -12px -12px 12px;
  }

  .section {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-block: 74px;
  }

  .section-label h2 {
    position: static;
  }

  .about-copy {
    font-size: 18px;
  }

  .experience-item {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .experience-item > p {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .site-header nav a:nth-child(2) {
    display: none;
  }

  .theme-toggle span {
    font-size: 0;
  }

  .theme-toggle span::after {
    content: "◐";
    font-size: 18px;
  }

  .project-heading {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

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

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