:root {
  color-scheme: light;
  --paper: #f9f8f5;
  --card: #ffffff;
  --ink: #242320;
  --muted: #65625d;
  --line: #dcd9d2;
  --accent: #6d28d9;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
::selection { background: #e5d8fa; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.skip-link { position: absolute; left: 16px; top: -48px; padding: 10px 14px; background: var(--ink); color: var(--paper); font-size: 14px; font-weight: 600; z-index: 1; }
.skip-link:focus { top: 16px; }

.site-shell {
  width: min(100% - 112px, 1120px);
  min-height: 100svh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.site-header, .site-footer { display: flex; align-items: center; justify-content: space-between; }
.site-header { padding: 34px 0; border-bottom: 1px solid var(--line); }
.wordmark { font-size: 32px; font-weight: 750; letter-spacing: -2px; line-height: 1; }
.wordmark span, .accent { color: var(--accent); }
.site-nav { display: flex; gap: 28px; font-size: 14px; font-weight: 600; color: var(--muted); }
.site-nav a:hover { color: var(--accent); }
main { flex: 1; padding: 78px 0 64px; }

.eyebrow, h2, .project-meta { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.eyebrow { margin-bottom: 22px; }
h1 { margin: 0; font-size: clamp(72px, 10vw, 140px); font-weight: 650; line-height: .98; letter-spacing: -.065em; }

.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; }
.intro-copy { max-width: 620px; margin: 28px 0 0; font-size: clamp(19px, 2.2vw, 24px); line-height: 1.5; color: var(--muted); }
.intro-copy a, .about-copy a, .contact a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.intro-copy a:hover, .about-copy a:hover, .contact a:hover { color: var(--accent); text-decoration-color: currentColor; }
.portrait { flex: none; width: 200px; height: 200px; border-radius: 24px; object-fit: cover; background: var(--line); }

section + section { margin-top: 96px; }
h2 { margin-bottom: 20px; }

.work .project { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 32px; }
.project h3 { margin: 10px 0 10px; font-size: 24px; font-weight: 650; letter-spacing: -.02em; }
.project h3 a:hover { color: var(--accent); }
.project h3 span { color: var(--accent); font-weight: 500; }
.project p:not(.project-meta) { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.project-head { max-width: 680px; }
.project--lead h3 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -.035em; }

.product-list { list-style: none; margin: 28px 0 24px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); column-gap: 40px; }
.product-list li { display: flex; flex-direction: column; gap: 4px; padding: 16px 0; border-top: 1px solid var(--line); }
.product-list a { font-size: 17px; font-weight: 600; }
.product-list a:hover { color: var(--accent); }
.product-list span { color: var(--muted); font-size: 14px; line-height: 1.5; }

.text-link { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; padding: 5px 0; color: var(--accent); }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.repo-list { list-style: none; margin: 0; padding: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.repo-list li + li { margin-top: 10px; }
.repo-list a { display: block; color: var(--ink); font-weight: 600; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 14px; }
.repo-list a:hover { color: var(--accent); }

.about-copy { max-width: 680px; }
.about-copy p { margin: 0 0 18px; font-size: 18px; line-height: 1.65; }
.about-copy p:last-child { margin-bottom: 0; }

.link-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.link-list li { border-bottom: 1px solid var(--line); }
.link-list a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 18px 24px 18px 0; font-weight: 600; font-size: 16px; }
.link-list a span { color: var(--muted); font-weight: 400; font-size: 14px; }
.link-list a:hover, .link-list a:hover span { color: var(--accent); }
.contact { margin: 28px 0 0; color: var(--muted); font-size: 16px; line-height: 1.6; }

.site-footer { gap: 20px; padding: 24px 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

@media (max-width: 860px) {
  .project-grid, .link-list { grid-template-columns: 1fr; }
  .link-list a { padding-right: 0; }
}

@media (max-width: 600px) {
  .site-shell { width: calc(100% - 40px); }
  .site-header { padding: 22px 0; }
  .site-nav { gap: 18px; font-size: 13px; }
  main { padding: 48px 0 48px; }
  .intro { flex-direction: column-reverse; align-items: flex-start; gap: 28px; }
  .portrait { width: 96px; height: 96px; border-radius: 18px; }
  h1 { font-size: clamp(60px, 17vw, 100px); }
  .eyebrow { margin-bottom: 18px; }
  .intro-copy { margin-top: 22px; }
  section + section { margin-top: 72px; }
  .work .project { padding: 22px; border-radius: 14px; }
  .product-list { grid-template-columns: 1fr; }
  .about-copy p { font-size: 17px; }
  .site-footer { font-size: 11px; flex-wrap: wrap; gap: 10px; }
}
