:root {
  --ink:        #1a1a1a;
  --ink-soft:   #4a4a4a;
  --ink-faint:  #8a8a8a;
  --paper:      #fafaf7;
  --rule:       #e6e3dc;
  --accent:     #7a3b2e;
  --measure:    34rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:       #ececea;
    --ink-soft:  #bcb9b3;
    --ink-faint: #7e7c77;
    --paper:    #131312;
    --rule:     #2a2a28;
    --accent:   #d99b8a;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Iowan Old Style", "Charter", "Cambria", Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.65;
  font-feature-settings: "kern", "liga", "onum";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 6rem 1.5rem 5rem;
}

a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 92%;
  background-repeat: no-repeat;
  background-size: 100% 1px;
  transition: color .15s ease, background-size .15s ease;
}
a:hover { color: var(--accent); }

p { margin: 0 0 1.1rem; }
strong { font-weight: 600; }

/* ── Intro ─────────────────────────────────────────────── */
.intro {
  margin-bottom: 4.5rem;
}
.eyebrow {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.25rem;
}
.intro h1 {
  font-size: clamp(1.85rem, 1.2rem + 2.4vw, 2.6rem);
  line-height: 1.18;
  font-weight: 500;
  letter-spacing: -.012em;
  margin: 0 0 1.5rem;
  max-width: 28ch;
}
.meta {
  color: var(--ink-soft);
  font-size: .98rem;
  margin: 0;
}

/* ── Section rhythm ────────────────────────────────────── */
section {
  margin: 3.5rem 0;
  padding-top: 2.25rem;
  border-top: 1px solid var(--rule);
}
h2 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.5rem;
}

/* ── Lists ─────────────────────────────────────────────── */
ul { margin: 0 0 1.25rem; padding: 0; list-style: none; }
ul li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: .35rem;
}
ul li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--ink-faint);
  font-weight: 700;
}

.cols {
  columns: 2;
  column-gap: 2rem;
}
.cols li { break-inside: avoid; }

/* ── Roles ─────────────────────────────────────────────── */
.role {
  margin-bottom: 2.5rem;
}
.role:last-of-type { margin-bottom: 0; }
.role h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 .25rem;
  letter-spacing: -.005em;
}
.role-meta {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: .88rem;
  color: var(--ink-soft);
  margin: 0;
}
.role-context {
  font-size: .92rem;
  color: var(--ink-faint);
  margin: .15rem 0 .9rem;
  font-style: italic;
}
.role ul { margin-top: .6rem; }

/* ── Projects ──────────────────────────────────────────── */
.projects li {
  padding-left: 0;
  margin-bottom: 1.25rem;
}
.projects li::before { content: ""; }
.projects strong { font-size: 1rem; }
.projects .lang {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: .75rem;
  letter-spacing: .04em;
  color: var(--ink-faint);
  margin-left: .6rem;
}
.projects p {
  margin: .2rem 0 0;
  color: var(--ink-soft);
  font-size: .96rem;
}

.muted { color: var(--ink-soft); }

/* ── Footer / Elsewhere ────────────────────────────────── */
footer {
  margin-top: 5rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--rule);
}
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.5rem;
  margin: 0 0 2rem;
}
.links li { padding-left: 0; }
.links li::before { content: ""; }
.links a {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: .92rem;
  letter-spacing: .01em;
}
.colophon {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: .8rem;
  color: var(--ink-faint);
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Smaller screens ───────────────────────────────────── */
@media (max-width: 640px) {
  main { padding: 3.5rem 1.25rem 3rem; }
  .intro { margin-bottom: 3rem; }
  section { margin: 2.75rem 0; padding-top: 1.75rem; }
  .cols { columns: 1; }
}
