:root {
  --bg: #f3f2ee;
  --ink: #111;
  --muted: #6b6a66;
  --rule: #d4d3ce;
  --serif: "EB Garamond", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
section { scroll-margin-top: 100vh; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--mono); overflow-wrap: anywhere; }
.wrap { max-width: 780px; margin: 0 auto; padding: 48px 24px 96px; }
header { margin: 0 0 30px; }
h1 { font: 400 44px/1.1 var(--serif); margin: 0; letter-spacing: -0.01em; }
h2 { font: 400 26px/1.2 var(--serif); margin: 36px 0 10px; }
h3 { font: 400 20px/1.2 var(--serif); margin: 26px 0 8px; }
a  { color: inherit; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }

.sublinks { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; }
.sublink { font-size: 13px; color: var(--muted); text-decoration: underline;
           text-decoration-color: var(--rule); text-underline-offset: 3px; }
.sublink:hover { color: var(--ink); text-decoration-color: var(--ink); }

nav { display: flex; gap: 8px 22px; flex-wrap: wrap; margin: 0 0 30px; }
nav a { font: 400 21px/1.2 var(--serif); color: var(--muted); text-decoration: none; }
nav a:hover, nav a[aria-current="true"] { color: var(--ink); text-decoration: underline;
                                          text-underline-offset: 5px; text-decoration-thickness: 1px; }

main > section { display: none; }
main > section:target { display: block; }
main:not(:has(section:target)) > #career { display: block; }
.wrap:has(#works:target) nav a[href="#works"], .wrap:has(#blog:target) nav a[href="#blog"],
.wrap:has(#personal:target) nav a[href="#personal"],
.wrap:not(:has(section:target)) nav a[href="#career"], .wrap:has(#career:target) nav a[href="#career"] {
  color: var(--ink); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px;
}
section > h2:first-child { margin-top: 0; }

ol.rail { list-style: none; margin: 0; padding: 0 0 0 44px; position: relative; }
ol.rail::before { content: ""; position: absolute; left: 11px; top: 0; bottom: 0; width: 1px; background: var(--rule); }
ol.rail > li { position: relative; padding: 12px 0; }
ol.rail > li::before { content: ""; position: absolute; left: -37px; top: 20px; width: 8px; height: 8px;
                       background: var(--ink); border-radius: 1px; }
.line1 { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.title { font-weight: 600; font-size: 15px; }
.meta  { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.line2 { color: var(--muted); font-size: 14px; margin-top: 4px; }
.highlights { list-style: none; margin: 6px 0 0; padding: 0; color: var(--muted); font-size: 14px; }
.highlights li { position: relative; margin: 2px 0; padding-left: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.highlights li::before { content: "\25E6"; position: absolute; left: 2px; }
.modules { display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; margin: 8px 0 0 18px; font-size: 13px; color: var(--muted); }
.modules dt, .modules dd { margin: 0; }
.empty { color: var(--muted); font-size: 14px; margin-left: 44px; }

.facts { border-collapse: collapse; width: 100%; font-size: 14px; }
.facts td { border-bottom: 1px solid var(--rule); padding: 8px 12px 8px 0; vertical-align: top; }
.facts td.label { color: var(--muted); white-space: nowrap; padding-right: 24px; width: 1%; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink);
       border: 1px solid var(--ink); padding: 2px 7px; text-decoration: none; white-space: nowrap; }
.tag:hover { background: var(--ink); color: var(--bg); }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 28px 0; }
.photos figure { margin: 0; }
.photos img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--rule); border-radius: 4px; }
.photos figcaption { color: var(--muted); font-size: 13px; text-align: center; margin-top: 6px; }

.prose { max-width: 68ch; font-size: 14px; }
.prose p { margin: 0 0 12px; }
.prose h1 { margin-bottom: 6px; }
.post-meta { color: var(--muted); font-size: 13px; margin: 0 0 28px; }

@media (max-width: 600px) {
  .wrap { padding: 32px 16px 64px; }
  h1 { font-size: 36px; }
  ol.rail { padding-left: 28px; }
  ol.rail::before { left: 5px; }
  ol.rail > li::before { left: -27px; }
  .line1 { flex-direction: column; gap: 0; }
  .empty { margin-left: 28px; }
  .highlights li { white-space: normal; }
  .modules { grid-template-columns: 1fr; gap: 0; }
  .photos { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .facts td.label { padding-right: 14px; }
  .modules dd { margin-bottom: 4px; }
}
