/* peterparker.ca. No JavaScript; everything self-hosted. */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fonts/newsreader-latin.woff2) format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fonts/newsreader-latin-italic.woff2) format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/fonts/inter-latin.woff2) format("woff2");
}

:root {
  color-scheme: light dark;
  --bg: #f5f3ee;
  --surface: #fdfcf9;
  --ink: #16181d;
  --ink-2: #3c4048;
  --muted: #6b7079;
  --line: #e3dfd6;
  --line-2: #cfc9bd;
  --accent: #0f5c6e;
  --accent-ink: #0b4653;
  --accent-soft: #e4eff1;
  --live: #1e7a4c;
  --shipped: #0f5c6e;
  --building: #9a5f08;
  --planned: #7a7f88;
  --code: #eeebe4;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1013;
    --surface: #15181d;
    --ink: #ece9e2;
    --ink-2: #c9c6bf;
    --muted: #969ba5;
    --line: #262a31;
    --line-2: #363b44;
    --accent: #7cc7d6;
    --accent-ink: #a9dde7;
    --accent-soft: #14262b;
    --live: #58c286;
    --shipped: #7cc7d6;
    --building: #e0a447;
    --planned: #8b9098;
    --code: #1c2026;
  }
}

* { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  border-top: 3px solid var(--accent);
  font-feature-settings: "cv11", "ss01";
}
a { color: var(--accent); text-decoration: none; text-underline-offset: .15em; }
a:hover, a:focus-visible { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 66rem; margin: 0 auto; padding: 0 1.5rem; }
.narrow { max-width: 46rem; }

/* Top bar */
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); font-weight: 600; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.mono-mark {
  width: 1.9rem; height: 1.9rem; border-radius: 6px;
  background: var(--accent); color: #fdfcf9;
  font-family: var(--serif); font-weight: 500; font-size: 1.15rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.top nav { display: flex; gap: 1.5rem; font-size: .92rem; }
.top nav a { color: var(--ink-2); }

/* Type */
h1, h2, h3, .num { font-family: var(--serif); font-weight: 500; letter-spacing: -.012em; margin: 0; }
h1 { font-size: clamp(2.4rem, 4.6vw, 3.4rem); line-height: 1.08; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2rem); line-height: 1.2; }
h3 { font-size: 1.42rem; line-height: 1.22; }
.eyebrow {
  font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 .6rem;
}
.lede { color: var(--ink-2); font-size: 1.05rem; max-width: 44rem; margin: .6rem 0 0; }

/* Hero */
.hero { padding: 4.5rem 0 2rem; }
.hero .tagline {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.35rem, 2.2vw, 1.7rem); line-height: 1.3;
  color: var(--accent-ink); margin: 1rem 0 1.25rem; max-width: 40rem;
}
.hero .intro { font-size: 1.08rem; color: var(--ink-2); max-width: 42rem; margin: 0; }
/* Theme filters: radio buttons as chips, no script. Browsers without :has() show all. */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.4rem 0 0; }
.filters input { position: absolute; opacity: 0; width: 1px; height: 1px; overflow: hidden; pointer-events: none; }
.filters label {
  cursor: pointer; font-size: .82rem; font-weight: 500; line-height: 1;
  padding: .5rem .9rem; border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--ink-2); background: var(--surface);
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.filters label:hover { border-color: var(--accent); color: var(--accent-ink); }
.filters label span { color: var(--muted); margin-left: .35rem; font-variant-numeric: tabular-nums; }
.filters input:checked + label { background: var(--accent); border-color: var(--accent); color: #fdfcf9; }
.filters input:checked + label span { color: rgba(253, 252, 249, .75); }
.filters input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
body:has(#f-t1:checked) .card:not(.t1),
body:has(#f-t2:checked) .card:not(.t2),
body:has(#f-t3:checked) .card:not(.t3),
body:has(#f-t4:checked) .card:not(.t4),
body:has(#f-t5:checked) .card:not(.t5),
body:has(#f-t6:checked) .card:not(.t6),
body:has(#f-t7:checked) .card:not(.t7),
body:has(#f-t8:checked) .card:not(.t8) { display: none; }

/* Sections */
section.block { padding: 3rem 0 1rem; }
section.block > .wrap > header { margin-bottom: 1.5rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(27rem, 1fr)); gap: 1.1rem; }
@media (max-width: 40rem) { .grid { grid-template-columns: 1fr; } }

/* Cards */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--status, var(--planned));
  border-radius: 10px;
  padding: 1.3rem 1.4rem 1.2rem;
  display: flex; flex-direction: column; gap: .7rem;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.card:hover { border-color: var(--line-2); border-left-color: var(--status, var(--planned)); box-shadow: 0 6px 24px -18px rgba(0, 0, 0, .35); transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .card, .card:hover { transition: none; transform: none; } }
.status-live { --status: var(--live); }
.status-shipped { --status: var(--shipped); }
.status-building { --status: var(--building); }
.status-planned { --status: var(--planned); }
.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.num { font-size: 1.35rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.status {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--status, var(--planned));
}
.status::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--accent); text-decoration: none; }
.one-liner { margin: 0; color: var(--ink-2); font-size: .97rem; }
.tags { list-style: none; margin: .1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.tags li {
  font-size: .76rem; color: var(--ink-2); background: var(--code);
  border: 1px solid var(--line); border-radius: 999px; padding: .12rem .6rem; line-height: 1.45;
}
.card, .grid > * { min-width: 0; }
.links { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; margin: .2rem 0 0; font-size: .9rem; font-weight: 500; }
.links .note { color: var(--muted); font-weight: 400; }
.links a::after { content: " \2197"; font-size: .85em; }
.links a[href^="/"]::after { content: ""; }

/* About + footer */
.about { padding: 3rem 0 4rem; }
.about p { color: var(--ink-2); max-width: 46rem; margin: .5rem 0 0; }
footer { border-top: 1px solid var(--line); background: var(--surface); padding: 2.25rem 0 2.5rem; font-size: .9rem; color: var(--muted); }
footer .wrap { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
@media (max-width: 40rem) { footer .wrap { grid-template-columns: 1fr; } }
footer p { margin: 0 0 .6rem; max-width: 40rem; }
footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
footer .fine { font-size: .8rem; }

/* Project page */
.project-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 2.5rem 0 2.25rem; }
.crumbs { font-size: .88rem; margin: 0 0 1.5rem; }
.crumbs a { color: var(--muted); }
.crumbs a::before { content: "\2190  "; }
.project-hero h1 { margin: .35rem 0 1rem; }
.meta { display: flex; flex-wrap: wrap; gap: .75rem 2rem; margin: 1.5rem 0 0; font-size: .92rem; }
.meta div span { display: block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.readme { padding: 2.5rem 0 3rem; }
.readme > p:first-child { font-size: 1.12rem; color: var(--ink-2); }
.readme h2 { font-size: 1.55rem; margin: 2.4rem 0 .8rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.readme h3 { font-size: 1.15rem; margin: 1.6rem 0 .5rem; }
.readme p, .readme li { color: var(--ink-2); }
.readme table { display: block; overflow-x: auto; border-collapse: collapse; font-size: .9rem; max-width: 100%; margin: 1rem 0; }
.readme th, .readme td { border-bottom: 1px solid var(--line); padding: .5rem .75rem; text-align: left; vertical-align: top; }
.readme th { background: var(--code); font-weight: 600; color: var(--ink); border-bottom-color: var(--line-2); }
.readme tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--code) 55%, transparent); }
.readme pre { background: var(--code); padding: .9rem 1.1rem; overflow-x: auto; border-radius: 8px; font-size: .86rem; line-height: 1.5; }
.readme code { font-family: var(--mono); font-size: .92em; }
.readme :not(pre) > code { background: var(--code); padding: .08rem .35rem; border-radius: 4px; }
.readme img { max-width: 100%; border-radius: 6px; }
.readme blockquote { border-left: 3px solid var(--accent); margin: 1.25rem 0; padding: .2rem 1.1rem; color: var(--ink-2); background: var(--accent-soft); border-radius: 0 8px 8px 0; }
.readme hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.fine { font-size: .82rem; color: var(--muted); }

/* "Learn more" on an explainer page: a native disclosure, since the site ships no script */
.more { margin: 2.25rem 0 1.5rem; }
.more > summary {
  cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: .55rem;
  padding: .85rem 1.1rem; border: 1px solid var(--line-2); border-radius: 8px;
  background: var(--surface); color: var(--accent-ink); font-weight: 600; font-size: .96rem;
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary::after {
  content: "\203A"; margin-left: auto; font-size: 1.25em; line-height: 1;
  transform: rotate(90deg); color: var(--muted);
}
.more > summary:hover { border-color: var(--accent); }
.more > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.more[open] > summary {
  border-color: var(--accent); border-bottom-color: var(--line); border-radius: 8px 8px 0 0;
}
.more[open] > summary::after { transform: rotate(270deg); }
.more-body {
  border: 1px solid var(--accent); border-top: 0; border-radius: 0 0 8px 8px;
  padding: .5rem 1.1rem 1.5rem;
}
.more-body h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 1.2rem; }

/* Status log: the page at /log/, the "Latest" strip on the index, a project's history */
.log-page { padding: 3rem 0 4rem; }
.log-page h1 { margin: .35rem 0 .5rem; }
.log { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.log li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; align-items: baseline; padding-left: .9rem; border-left: 3px solid var(--status, var(--planned)); }
@media (max-width: 40rem) { .log li { grid-template-columns: 1fr; gap: .2rem; } }
.log time { font-family: var(--mono); font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.log-head { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem; }
.log-head .num { font-size: 1rem; }
.log-head a { color: var(--ink); font-weight: 600; }
.log-head a:hover { color: var(--accent); }
.log-note { margin: .2rem 0 0; color: var(--ink-2); font-size: .95rem; max-width: 46rem; }
.log.compact { gap: .8rem; }
.history { margin-top: 1.5rem; }
.history .log-note { font-size: .9rem; }
section.latest { padding-top: 1rem; }
