:root {
  --bg: #ffffff;
  --text: #15171a;
  --muted: #4a4f57;
  --subtle: #6b7079;
  --line: #e4e6e9;
  --link: #1f4fb8;
  --link-hover: #163a88;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111315;
    --text: #e8eaed;
    --muted: #b3b8bf;
    --subtle: #959ba3;
    --line: #2a2e33;
    --link: #8ab0ff;
    --link-hover: #b3ccff;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); }
a:hover { color: var(--link-hover); }

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

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 36px 0;
}
.site-header .name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 15px;
}
.site-header nav a {
  color: var(--muted);
  text-decoration: none;
}
.site-header nav a:hover { color: var(--text); }

/* Hero */
.hero {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 88px 0 104px;
}
.hero h1 {
  max-width: 720px;
  font-size: 44px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.lead {
  max-width: 640px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--muted);
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 15px;
  font-weight: 500;
}
.hero .links { padding-top: 4px; }

/* Sections */
section { padding-bottom: 96px; }
.section-title {
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--subtle);
}
.section-title--spaced { margin: 24px 0 16px; }
#experience > .section-title:first-child { margin-bottom: 24px; }

.meta {
  font-size: 14px;
  color: var(--subtle);
}

/* Work */
.work-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.work-item h3 {
  font-size: 22px;
  line-height: 1.3;
  font-weight: 600;
}
.work-item p:not(.meta) {
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
}

/* Experience */
.entry {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 32px;
  padding-bottom: 28px;
}
.entry .when {
  flex: 0 0 140px;
  font-size: 15px;
  color: var(--subtle);
}
.entry > div {
  flex: 999 1 400px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.entry h3 {
  font-size: 17px;
  font-weight: 600;
}
.entry p:not(.when):not(.meta) {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}
.section-title--spaced-lg { margin: 56px 0 16px; }
.work-item > a {
  font-size: 15px;
  font-weight: 500;
}
.plain {
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
}

/* Footer */
.site-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 48px 0 64px;
  border-top: 1px solid var(--line);
}
.site-footer > p:first-child {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

@media (max-width: 600px) {
  .page { padding: 0 20px; }
  .hero { padding: 48px 0 72px; }
  .hero h1 { font-size: 32px; }
  .lead { font-size: 17px; }
  section { padding-bottom: 72px; }
}
