/* Oliver Helmstadt — site styles
   Plain Helvetica, black on white, one link colour. */

:root {
  --ink: #000;
  --paper: #fff;
  --link: #378c05;
  --muted: #8f8f8f;
  --size: 12.6667px;
  --leading: 21.3333px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: helvetica, arial, sans-serif;
  font-size: var(--size);
  line-height: var(--leading);
}

@media (prefers-reduced-motion: no-preference) {
  body { animation: fade-in .6s ease-out; }
  @keyframes fade-in { from { opacity: 0; } }
}

h1, h2, p, ul, figure { margin: 0; }
h1, h2 { font-size: inherit; font-weight: 700; }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--muted); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

/* Two columns: menu on the left, content on the right */
.site {
  display: grid;
  grid-template-columns: 400px minmax(0, 524px);
  column-gap: 30px;
  padding: 40px;
  max-width: 1034px;
}

/* ---------- Sidebar ---------- */
.site-title { font-weight: 700; margin-bottom: 42px; }

.menu, .sub { list-style: none; padding: 0; }
.menu { font-weight: 700; }
.menu a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 3px;
}

.menu button {
  all: unset;
  cursor: pointer;
  font-weight: 700;
}
.menu button:hover { color: var(--muted); }

.sub {
  margin-left: 8px;
  font-weight: 400;
}
.sub a[aria-current="page"] { font-weight: 700; }

/* Collapse closed groups only when JS is running, so the menu still works without it */
.js .has-sub:not(.open) > .sub { display: none; }

/* ---------- Content ---------- */
.content h1 { margin-bottom: 21px; }
.content p + p,
.content figure + p,
.content p + figure,
.content figure + figure { margin-top: 21px; }
.content h2 { margin-top: 32px; }
.content h1 + h2 { margin-top: 0; }

.content a { color: var(--link); font-weight: 700; }
.content a:hover { color: var(--muted); }

.meta { font-weight: 700; }

figure img {
  display: block;
  width: 100%;
  height: auto;
  background: #f2f2f2;
}
/* Line drawings: no loading placeholder, and narrower than photos so their labels stay readable on phones */
figure img.plan {
  max-width: 420px;
  background: none;
}
figcaption {
  font-size: 10px;
  line-height: 16px;
  margin-top: 6px;
}

.dots {
  font-weight: 700;
  letter-spacing: -1px;
  overflow: hidden;
  white-space: nowrap;
  line-height: 12px;
  margin-bottom: 21px;
}

.cv { list-style: none; padding: 0; }
.cv li { display: grid; grid-template-columns: 88px 1fr; }
.cv .year { font-variant-numeric: tabular-nums; }

/* ---------- Small screens: stack the columns ---------- */
@media (max-width: 760px) {
  .site {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 42px;
    padding: 24px 16px 48px;
  }
  .site-title { margin-bottom: 21px; }
  .sidebar { border-bottom: 1px dotted var(--ink); padding-bottom: 21px; }
  .cv li { grid-template-columns: 76px 1fr; }
}
