:root {
  --bg: #fbfaf8;
  --fg: #1c1b1a;
  --muted: #6b6762;
  --line: #e6e2dc;
  --accent: #c4501a;
  --serif: 'Iowan Old Style', 'Charter', 'Source Serif Pro', Georgia, serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --mono: ui-monospace, 'JetBrains Mono', Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f10;
    --fg: #e8e6e3;
    --muted: #8f8b86;
    --line: #26252a;
    --accent: #f26822;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent) 50%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
code { font: 0.88em var(--mono); }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 9vw, 96px) clamp(20px, 5vw, 40px) 48px;
  animation: in 0.6s ease-out both;
}

/* header */
.head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding-bottom: 28px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.mark { display: block; width: 44px; height: 44px; }
h1 { margin: 0; font: 600 30px/1.1 var(--serif); letter-spacing: -0.01em; }
.role { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.links { display: flex; gap: 16px; font-size: 15px; }

/* rows: label column + content */
.row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  animation: in 0.6s ease-out both;
}
.row:nth-of-type(2) { animation-delay: 0.05s; }
.row:nth-of-type(3) { animation-delay: 0.1s; }
.row:nth-of-type(4) { animation-delay: 0.15s; }
.row:nth-of-type(5) { animation-delay: 0.2s; }

h2 {
  margin: 3px 0 0;
  font: 600 12px var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.row p { margin: 0; }

.entries { display: grid; gap: 26px; }
.entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
h3 { margin: 0; font: 600 17px var(--sans); }
h3 a { text-decoration: none; }
h3 a::after { content: ' ↗'; color: var(--muted); font-weight: 400; font-size: 0.85em; }
.meta { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.entry p { margin-top: 4px; }
.entry ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 15px; }
.entry li { margin: 3px 0; }
.entry li::marker { color: var(--accent); }

.skills { display: grid; grid-template-columns: 110px 1fr; gap: 6px 16px; margin: 0; }
.skills dt { font-weight: 600; font-size: 15px; }
.skills dd { margin: 0; color: var(--muted); font-size: 15px; }

.foot { padding-top: 24px; color: var(--muted); font-size: 13px; }
.foot p { margin: 0; }

@keyframes in { from { opacity: 0; transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  .page, .row { animation: none; }
}

@media (max-width: 600px) {
  .row { grid-template-columns: 1fr; gap: 10px; }
  .head { grid-template-columns: auto 1fr; }
  .links { grid-column: 1 / -1; }
  .skills { grid-template-columns: 1fr; gap: 0; }
  .skills dd { margin-bottom: 8px; }
}

@media print {
  :root { --bg: #fff; --fg: #000; --muted: #444; --line: #ccc; --accent: #000; }
  body { font-size: 11pt; }
  .page { padding: 0; max-width: none; animation: none; }
  .row { animation: none; padding: 14px 0; break-inside: avoid; }
  a { text-decoration: none; }
  h3 a::after { content: ''; }
  .foot { display: none; }
}
