@font-face { font-family: 'Geist'; src: url('../fonts/Geist-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('../fonts/Geist-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('../fonts/GeistMono-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }

html[data-theme='dark'] {
  color-scheme: dark;
  --canvas: #121514;
  --surface: #191d1b;
  --text: #eef0eb;
  --text-muted: #9da59f;
  --accent: #91a285;
}

html[data-theme='light'] {
  color-scheme: light;
  --canvas: #edf0ec;
  --surface: #e3e7e2;
  --text: #1a1f1b;
  --text-muted: #55605a;
  --accent: #596d4d;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--text); font-family: 'Geist', system-ui, sans-serif; }
a { color: inherit; }
button { font: inherit; }
.site-header { position: relative; display: flex; align-items: center; gap: 1rem; min-height: 72px; padding: .75rem max(1.5rem, 6vw); border-bottom: 1px solid color-mix(in srgb, var(--text) 13%, transparent); }
.wordmark { font-weight: 700; letter-spacing: -.03em; text-decoration: none; }
.site-header nav { display: flex; align-items: center; gap: 1.25rem; margin-left: auto; white-space: nowrap; }
.site-header nav > a:not(.button) { color: var(--text-muted); text-decoration: none; }
.menu-toggle, .theme-toggle { min-height: 44px; padding: .5rem .7rem; border: 1px solid color-mix(in srgb, var(--text) 25%, transparent); border-radius: 2px; background: transparent; color: var(--text); cursor: pointer; }
.menu-toggle { display: none; }
.theme-toggle { order: 2; }
section { min-height: 20rem; padding: 4rem max(1.5rem, 6vw); }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; }
.hero { min-height: calc(100dvh - 72px); display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(220px, .65fr); gap: clamp(2rem, 7vw, 7rem); align-items: center; padding-top: clamp(3rem, 8vh, 6rem); }
.eyebrow { margin: 0 0 1.25rem; color: var(--accent); font: 600 .72rem/1.2 'Geist Mono', ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { max-width: 10ch; margin: 0; font-size: clamp(3.25rem, 7vw, 6.75rem); line-height: .94; letter-spacing: -.06em; }
.hero__intro { max-width: 56ch; margin: 1.5rem 0 0; color: var(--text-muted); font-size: clamp(1rem, 1.5vw, 1.18rem); line-height: 1.6; }
.hero__actions { display: flex; align-items: center; gap: 1rem; margin-top: 1.75rem; }
.hero__portrait { width: min(100%, 260px); margin: 0 0 0 auto; }
.hero__portrait img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.proof { min-height: 0; padding: 0; border-block: 1px solid color-mix(in srgb, var(--text) 13%, transparent); }
.proof ul { display: grid; grid-template-columns: 1.25fr 1fr 1fr; margin: 0; padding: 0; list-style: none; }
.proof li { min-width: 0; padding: clamp(2rem, 4vw, 3.5rem) max(1.5rem, 6vw); border-right: 1px solid color-mix(in srgb, var(--text) 13%, transparent); }
.proof li:last-child { border-right: 0; }
.proof strong, .proof span { display: block; }
.proof strong { font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -.05em; }
.proof span { margin-top: .5rem; color: var(--text-muted); line-height: 1.45; }
.section-heading { max-width: 44rem; margin-bottom: clamp(2rem, 5vw, 4rem); }
.section-heading h2 { margin: 0; font-size: clamp(2.4rem, 5vw, 4.5rem); line-height: 1; letter-spacing: -.05em; }
.section-heading p { color: var(--text-muted); line-height: 1.6; }
.work-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(240px, .72fr); grid-template-rows: 1fr 1fr; gap: 1rem; }
.work-card { min-height: 15rem; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(1.5rem, 3vw, 2.5rem); border: 1px solid color-mix(in srgb, var(--text) 14%, transparent); background: var(--surface); border-radius: 2px; }
.work-card--primary { grid-row: 1 / 3; min-height: 34rem; background: var(--text); color: var(--canvas); }
.work-card h3 { max-width: 17ch; margin: .75rem 0 0; font-size: clamp(1.6rem, 3vw, 3.5rem); line-height: 1.04; letter-spacing: -.045em; }
.work-card p { max-width: 46ch; line-height: 1.6; }
.work-card__type { color: var(--accent); font: 600 .7rem/1.2 'Geist Mono', ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
.work-card--primary .work-card__type { color: var(--canvas); }
.technology-list { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.technology-list li { padding: .45rem .6rem; border: 1px solid currentColor; font: .72rem/1 'Geist Mono', ui-monospace, monospace; opacity: .72; }
.work-card__result strong, .work-card__result span { display: block; }
.work-card__result strong { font-size: clamp(1.75rem, 3vw, 3rem); letter-spacing: -.04em; }
.career-list { max-width: 62rem; margin: 0; padding: 0; list-style: none; }
.career-list li { display: grid; grid-template-columns: 10rem 1fr; gap: 2rem; padding: 1.5rem 0; border-bottom: 1px solid color-mix(in srgb, var(--text) 15%, transparent); }
.career-list li:first-child { border-top: 1px solid color-mix(in srgb, var(--text) 15%, transparent); }
.career-list time { color: var(--text-muted); font: .75rem/1.5 'Geist Mono', ui-monospace, monospace; }
.career-list strong, .career-list span { display: block; }
.career-list span { margin-top: .35rem; color: var(--text-muted); }
.open-source { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(3rem, 9vw, 9rem); }
.open-source h2, .about h2 { margin: 0; font-size: clamp(2.6rem, 5vw, 5rem); line-height: 1; letter-spacing: -.05em; }
.repo-list article { display: flex; justify-content: space-between; gap: 2rem; padding: 1.5rem 0; border-bottom: 1px solid color-mix(in srgb, var(--text) 15%, transparent); }
.repo-list article:first-child { border-top: 1px solid color-mix(in srgb, var(--text) 15%, transparent); }
.repo-list h3, .repo-list p { margin: 0; }
.repo-list div p, .repo-list span { color: var(--text-muted); }
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(3rem, 10vw, 10rem); }
.about p { margin: 0 0 1rem; color: var(--text-muted); line-height: 1.7; }
.contact { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(3rem, 9vw, 9rem); background: var(--surface); }
.contact h2 { max-width: 9ch; margin: 0; font-size: clamp(2.75rem, 6vw, 5.5rem); line-height: .98; letter-spacing: -.055em; }
.contact form { display: grid; gap: 1.25rem; }
.form-field label { display: block; margin-bottom: .5rem; }
.form-field input, .form-field textarea { width: 100%; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--text) 45%, transparent); border-radius: 0; background: transparent; color: var(--text); font: inherit; padding: .75rem 0; }
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--accent); outline-offset: 3px; }
.field-error { min-height: 1.25rem; margin: .35rem 0 0; color: #d99088; font-size: .85rem; }
.form-status { min-height: 1.5rem; margin: 0; color: var(--text-muted); }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.site-footer { display: flex; justify-content: space-between; gap: 2rem; padding: 2rem max(1.5rem, 6vw); border-top: 1px solid color-mix(in srgb, var(--text) 13%, transparent); }
.site-footer nav { display: flex; gap: 1.25rem; }
.button--primary { padding: .7rem 1rem; border: 1px solid var(--accent); border-radius: 999px; color: var(--text); text-decoration: none; }
.button--primary:active { transform: translateY(1px); }
[data-reveal] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal]:not([data-revealed='true']) { opacity: 0; transform: translateY(1.25rem); }
  .js [data-reveal] { transition: opacity .6s cubic-bezier(.16, 1, .3, 1), transform .6s cubic-bezier(.16, 1, .3, 1); }
  body, .button--primary { transition: background-color .2s ease, color .2s ease, transform .2s ease; }
}

@media (max-width: 767px) {
  section { padding: 3.5rem 1.25rem; }
  .site-header { flex-wrap: nowrap; }
  .menu-toggle { display: inline-flex; min-width: 44px; min-height: 44px; margin-left: auto; align-items: center; }
  .theme-toggle { order: initial; }
  [data-menu] { position: absolute; inset: 100% 0 auto; flex-direction: column; align-items: stretch; gap: .25rem; margin-left: 0; padding: 1rem 1.25rem 1.5rem; border-bottom: 1px solid color-mix(in srgb, var(--text) 13%, transparent); background: var(--canvas); }
  [data-menu] a { display: flex; min-height: 44px; align-items: center; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 5rem; }
  .hero h1 { max-width: 9ch; font-size: clamp(3rem, 15vw, 4.6rem); }
  .hero__portrait { width: 160px; margin: 1rem 0 0; }
  .hero__actions { align-items: flex-start; flex-direction: column; }
  .proof ul, .work-grid, .open-source, .about, .contact { grid-template-columns: 1fr; }
  .proof li { border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--text) 13%, transparent); }
  .proof li:last-child { border-bottom: 0; }
  .work-card--primary { grid-row: auto; min-height: 28rem; }
  .career-list li { grid-template-columns: 1fr; gap: .5rem; }
  .repo-list article, .site-footer { flex-direction: column; }
}

@media (min-width: 768px) {
  [data-menu-toggle] { display: none; }
  [data-menu] { display: flex !important; align-items: center; gap: 1.25rem; }
}

@media (min-width: 1024px) {
  .hero { grid-template-columns: minmax(0, 1.6fr) minmax(220px, .4fr); gap: clamp(2rem, 5vw, 5rem); }
  .hero h1 { max-width: 16ch; font-size: clamp(3.25rem, 6.25vw, 6.75rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
