:root {
  --paper: #f7f6f2;
  --ink: #171613;
  --ink-dim: #45423b;
  --muted: #6b6860;
  --line: rgba(23, 22, 19, 0.13);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.4rem 0.7rem;
  text-decoration: none;
  z-index: 10;
}

.skip:focus {
  top: 0.75rem;
}

/* ---- single narrow column ---- */

.shell {
  width: min(41.25rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 4.5rem 0 5rem;
}

/* ---- identity ---- */

.identity h1 {
  margin: 0;
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.identity .role {
  margin: 0.15rem 0 0;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
}

.identity nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin-top: 1.5rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.identity nav a {
  color: var(--muted);
  text-decoration: none;
}

.identity nav a:hover {
  color: var(--ink);
}

.identity nav a[aria-current="page"] {
  color: var(--ink);
}

/* ---- prose ---- */

.lede {
  margin: 2.75rem 0 0;
  font-size: 1.125rem;
  line-height: 1.55;
  letter-spacing: -0.005em;
}

.prose {
  margin-top: 1.1rem;
}

.prose p {
  margin: 0 0 0.9rem;
  color: var(--ink-dim);
}

.prose p:last-child {
  margin-bottom: 0;
}

/* ---- sections ---- */

.section {
  margin-top: 3.75rem;
}

.section h2 {
  margin: 0 0 1.5rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--muted);
}

/* ---- rows ---- */

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rows > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 1.5rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}

.rows > li:last-child {
  border-bottom: 1px solid var(--line);
}

.rows h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
}

.when {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  line-height: 1.75;
}

.rows p {
  grid-column: 1 / -1;
  margin: 0.4rem 0 0;
  color: var(--ink-dim);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.shot {
  grid-column: 1 / -1;
  margin: 1rem 0 0.2rem;
}

.shot img {
  display: block;
  width: 100%;
  max-height: 21rem;
  object-fit: contain;
  object-position: left center;
}

.shot-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.shot-2 img {
  max-height: 14rem;
}

.rows .meta {
  grid-column: 1 / -1;
  margin: 0.5rem 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.rows .meta a {
  color: var(--muted);
}

.rows .meta a:hover {
  color: var(--ink);
}

/* ---- plain link list (elsewhere) ---- */

.links {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.875rem;
}

.links li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.3rem 0;
}

.links .key {
  color: var(--muted);
}

/* ---- resume blocks ---- */

.cv-block {
  margin-top: 2.5rem;
}

.cv-block > h3 {
  margin: 0 0 0.9rem;
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 500;
}

.cv-block p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 0.9375rem;
}

.cv-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9375rem;
  color: var(--ink-dim);
}

.cv-list > li {
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  line-height: 1.6;
}

.cv-list > li:last-child {
  border-bottom: 1px solid var(--line);
}

.cv-list strong {
  display: block;
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
}

.cv-list .when {
  display: block;
  margin-top: 0.1rem;
}

/* ---- actions / footer ---- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  margin: 2.5rem 0 0;
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.btn {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.1rem;
}

.btn:hover {
  border-bottom-color: var(--ink);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  margin-top: 4.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

/* ---- 404 ---- */

.print-contact {
  display: none;
}

.notfound h1 {
  margin: 0;
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
}

@media (max-width: 640px) {
  .shell {
    padding: 2.75rem 0 3.5rem;
  }

  .rows > li {
    grid-template-columns: 1fr;
  }

  .when {
    line-height: 1.5;
  }

  .links li {
    grid-template-columns: 4.5rem minmax(0, 1fr);
  }

  .shot-2 {
    grid-template-columns: 1fr;
  }

  .shot img,
  .shot-2 img {
    max-height: 15rem;
  }
}

@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 10.5pt;
    line-height: 1.4;
  }

  .shell {
    width: 100%;
    padding: 0;
  }

  .identity nav,
  .actions,
  .skip,
  .shot {
    display: none !important;
  }

  .print-contact {
    display: block;
    margin: 0.35rem 0 0;
    font-family: var(--mono);
    font-size: 8.5pt;
    color: #000;
  }

  .print-contact a + a::before {
    content: " · ";
    color: #666;
  }

  .foot {
    margin-top: 1.5rem;
    color: #444;
  }

  .section {
    margin-top: 1.5rem;
  }

  .cv-block {
    margin-top: 1.2rem;
    break-inside: avoid;
  }

  .cv-list > li,
  .rows > li {
    break-inside: avoid;
    padding: 0.45rem 0;
  }

  .prose p,
  .rows p,
  .cv-list,
  .cv-block p {
    color: #000;
  }

  .when {
    color: #444;
  }

  a {
    color: #000;
    text-decoration: none;
  }
}
