/* Hallmark · redesign: minimal single column, user asked for small type and no big headline · fonts: Hanken Grotesk + Geist Mono (Google) · accent: rust from the portrait · modes: light+dark */
/* Minimal single column. Hanken Grotesk for text, Geist Mono for dates.
 * Small type throughout; the only colour is a rust accent taken from the photo's jacket. */

:root {
  --font-body: "Hanken Grotesk", ui-sans-serif, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;

  --paper: #fafaf8;
  --ink: #1b1b1a;
  --ink-2: #3d3d3a;
  --muted: #74746f;
  --rule: #e6e5e1;
  --soft: #f0efeb;
  --accent: #b5482f;
  --focus: #b5482f;

  --text: 0.9375rem;
  --text-sm: 0.8125rem;
  --measure: 34rem;
  --dur: 160ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121211;
    --ink: #ededea;
    --ink-2: #c4c4bf;
    --muted: #8c8c86;
    --rule: #262624;
    --soft: #1c1c1a;
    --accent: #e0805f;
    --focus: #e0805f;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: var(--paper); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3 { margin: 0; font-size: inherit; font-weight: 500; color: var(--ink); line-height: 1.4; overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
img { max-width: 100%; height: auto; display: block; }
svg { display: block; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: text-decoration-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
a:hover { text-decoration-color: var(--accent); }
a:active { color: var(--accent); }

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

.skip { position: absolute; left: 1rem; top: -3rem; padding: 0.25rem 0.5rem; background: var(--ink); color: var(--paper); }
.skip:focus-visible { top: 1rem; }

/* ------------------------------------------------------------ frame */

.wrap {
  max-width: calc(var(--measure) + 2rem);
  margin-inline: auto;
  padding: clamp(3rem, 12vh, 7rem) 1rem 3rem;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}
main { display: grid; gap: 3rem; }
main > section, main > article { display: grid; gap: 1rem; }
h2 { color: var(--muted); font-weight: 400; }

.top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 3.5rem; }
.top a { text-decoration: none; color: var(--muted); }
.top a.top__home { color: var(--ink); font-weight: 500; }
.top a:hover, .top a[aria-current="page"] { color: var(--ink); }

.foot {
  margin-top: auto;
  padding-top: 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: var(--text-sm);
  color: var(--muted);
}
.foot__links { display: flex; gap: 1.25rem; list-style: none; margin: 0 0 0 auto; padding: 0; }
.foot__links a { color: var(--muted); text-decoration: none; }
.foot__links a:hover { color: var(--ink); }
.foot small { font-size: inherit; }

/* ------------------------------------------------------------ home */

.intro { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.875rem; }
.me { width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--soft); outline: 1px solid var(--rule); outline-offset: -1px; }

.social { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.social a { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; color: var(--muted); transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease); }
.social a:hover { color: var(--ink); background: var(--soft); }
.social a:active { background: var(--rule); }
.social svg { width: 1rem; height: 1rem; }
.foot .social { margin-left: -0.5rem; }

.about { gap: 0.75rem; }
.about p { max-width: 60ch; }

/* ------------------------------------------------------------ rows (writing, experience) */

.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; padding-block: 0.375rem; }
.rows li > :first-child { min-width: 0; }
.rows a { text-decoration-color: transparent; }
.rows a:hover { text-decoration-color: var(--accent); }
.rows time, .rows .when { flex: none; font-family: var(--font-mono); font-size: var(--text-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.rows .muted { margin-left: 0.375rem; }

/* ------------------------------------------------------------ post */

.post { gap: 2rem; }
.post__head { display: grid; gap: 0.25rem; }
.post__head h1 { font-size: 1.0625rem; font-weight: 600; }
.post__head p { font-size: var(--text-sm); }

.prose { font-size: 1rem; line-height: 1.7; }
.prose > * { margin: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4 { margin-top: 2em; color: var(--ink); font-weight: 600; font-size: inherit; }
.prose a { text-decoration-color: var(--muted); }
.prose a:hover { text-decoration-color: var(--accent); }
.prose strong { font-weight: 600; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 0.3em; }
.prose blockquote { margin-inline: 0; padding-left: 1rem; border-left: 1px solid var(--rule); color: var(--muted); }
.prose code { font-family: var(--font-mono); font-size: 0.85em; padding: 0.1em 0.3em; border-radius: 4px; background: var(--soft); }
.prose pre { overflow-x: auto; padding: 1rem; border-radius: 6px; background: var(--soft); line-height: 1.55; }
.prose pre code { padding: 0; background: none; }
.prose img { border-radius: 6px; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin-block: 2em; }
.prose mark { background: var(--soft); color: var(--ink); padding: 0 0.15em; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.prose th, .prose td { padding: 0.375rem 0.5rem; border-bottom: 1px solid var(--rule); text-align: left; }
.prose th { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------ small screens */

@media (max-width: 30rem) {
  .intro { grid-template-columns: auto minmax(0, 1fr); }
  .social { grid-column: 2; margin-left: -0.5rem; }
  .rows li:not(.item) { flex-direction: column; gap: 0; }
  .rows .item .item__text > .muted { display: block; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* projects and experience: icon, name, optional one-liner, years */
.rows .item { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr) minmax(2.5rem, auto); align-items: start; gap: 0 0.75rem; padding-block: 0.5rem; }
.item__icon { width: 1.25rem; height: 1.25rem; margin-top: 0.125rem; border-radius: 5px; object-fit: contain; }
span.item__icon { background: var(--soft); }
.item__line { display: block; color: var(--muted); font-size: var(--text-sm); }
.item__text > .muted { white-space: nowrap; margin-left: 0.125rem; }
.rows .item .when { padding-top: 0.125rem; text-align: right; }
.rows .item a { text-decoration-color: var(--rule); }
.rows .item a:hover { text-decoration-color: var(--accent); }
