/* jonburga.com, 2027. Low-res, dithered, saturated. Three faces: Unbounded (wide heavy caps),
   UnifrakturMaguntia (blackletter), ATI 8x16 (a 1990s bitmap PC font) for everything else. */
@font-face { font-family: "Unbounded"; src: url("/assets/fonts/Unbounded.ttf") format("truetype"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Unifraktur"; src: url("/assets/fonts/Unifraktur.ttf") format("truetype"); font-display: swap; }
/* ATI 8x16: Oldschool PC Font Pack by VileR, int10h.org, CC BY-SA 4.0 (see /assets/CREDITS.txt). */
@font-face { font-family: "ATI"; src: url("/assets/fonts/ATI_8x16.woff") format("woff"); font-display: swap; }

:root {
  --ink: #f0e8ff; --dim: #c8b0ff; --faint: #8a68d8;
  --violet: #a070ff; --red: #ff3858; --line: #2a0f5a; --strong: #5a28b8;
  --osd: rgb(28 6 64 / .82);
  --dither: repeating-conic-gradient(#6a28e8 0 25%, #b0287c 0 50%) 0 0 / 2px 2px;
}
* { box-sizing: border-box; }
html { background: #000; }
body { margin: 0; background: #000; color: var(--dim); font: 16px/24px "ATI", ui-monospace, monospace;
  -webkit-font-smoothing: none; font-smooth: never; }
a { color: var(--violet); text-decoration: none; border-bottom: 2px dotted var(--strong); }
a:hover { color: #fff; background: var(--red); border-bottom-color: var(--red); }
::selection { background: var(--red); color: #fff; }
.wrap { max-width: 46rem; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: var(--red); color: #fff; padding: 4px 8px; z-index: 10; }

h1, h2, h3 { font-family: "Unbounded", sans-serif; font-weight: 900; text-transform: uppercase; color: var(--violet); margin: 0 0 16px; }
h2 { font-size: clamp(1.5rem, 1rem + 2vw, 2.3rem); line-height: 1.05; }
h3 { font-size: 1rem; color: var(--ink); margin-top: 32px; }
.eyebrow { font-family: "Unifraktur", serif; font-size: 1.7rem; line-height: 1; color: var(--red); margin: 0 0 8px; }
p { margin: 0 0 16px; }
strong, b { color: var(--ink); font-weight: 400; }
em { color: var(--ink); font-style: normal; border-bottom: 1px solid var(--strong); }

section { padding: 72px 0; border-top: 2px solid var(--line); }
.osd { background: var(--osd); padding: 16px 20px; }
.osd + .osd { margin-top: 12px; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; column-gap: 1ch; row-gap: 4px; margin: 0; }
dl.kv dt { color: var(--faint); }
dl.kv dd { margin: 0; color: var(--ink); }

/* ---- Front page: the cassette, with the OSD and links laid over it. */
.cassette { position: relative; border: 0; padding: 0; overflow: hidden; background: #000; }
.cassette canvas { display: block; width: 100%; height: auto; max-height: 100vh; object-fit: contain; object-position: left top;
  image-rendering: pixelated; image-rendering: crisp-edges; }
.cassette .hud { position: absolute; left: 1.2%; top: 5.5%; width: 66%; padding: 1.2% 2.4%; background: var(--osd); }
.cassette .hud dt, .cassette .hud dd { color: #f4eeff; font-size: 16px; line-height: 16px; white-space: nowrap; }
.cassette .hud dt { color: #f4eeff; }
.cassette .hud a { color: inherit; border: 0; }
.cassette nav { position: absolute; left: 3.6%; bottom: 20%; display: grid; gap: 10px; }
.cassette nav a { font-size: 16px; line-height: 16px; color: #fff; background: var(--osd); padding: 6px 10px; border: 0; width: max-content; }
.cassette nav a::before { content: "> "; color: var(--violet); }
.cassette nav a:hover { background: var(--red); }
.cassette nav a:hover::before { color: #fff; }
.cassette .caption { position: absolute; left: 50%; bottom: 3.5%; transform: translateX(-50%); margin: 0; padding: 2px 6px;
  background: rgb(0 0 0 / .78); color: #fff; font-size: 16px; line-height: 16px; white-space: nowrap; }
@media (min-width: 1000px) {
  .cassette .hud dt, .cassette .hud dd, .cassette nav a, .cassette .caption { font-size: 32px; line-height: 32px; }
  .cassette nav { gap: 16px; }
  .cassette nav a { padding: 8px 14px; }
}
@media (max-width: 700px) {
  .cassette .hud { position: static; width: auto; }
  .cassette nav { position: static; padding: 16px; }
  .cassette .caption { position: static; transform: none; display: block; text-align: center; }
}

/* ---- Lists and posts. */
.posts { list-style: none; margin: 0; padding: 0; }
.posts li { display: grid; grid-template-columns: 11ch 1fr; gap: 1ch; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.posts time { color: var(--faint); }
.help li { margin-bottom: 12px; }
.help { padding-left: 2ch; }
.help li::marker { content: "■ "; color: var(--red); }

.page-head { padding: 48px 0 24px; border: 0; }
.bar { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 2px solid var(--line); }
.bar .name { font-family: "Unbounded"; font-weight: 900; text-transform: uppercase; color: var(--ink); border: 0; }
.bar nav a { margin-left: 2ch; border: 0; }

article { padding-bottom: 72px; }
article h2 { margin-top: 8px; }
article h3 { color: var(--violet); }
blockquote { margin: 0 0 16px; padding: 12px 16px; background: var(--osd); border-left: 4px solid var(--red); color: var(--ink); }
blockquote p { margin: 0; }
hr { border: 0; height: 4px; background: var(--dither); margin: 32px 0; }

.fallacy { padding: 16px 0; border-bottom: 1px dashed var(--line); }
.fallacy h3 { margin: 0 0 8px; color: var(--violet); }
.fallacy .kind { color: var(--red); font-family: "Unifraktur", serif; font-size: 1.2rem; }

footer { padding: 32px 20px 48px; border-top: 2px solid var(--line); color: var(--faint); }
footer p { margin: 0 0 4px; }

/* ---- Work: one card per project, with its picture redrawn by genesis.js. */
.work { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .work { grid-template-columns: 1fr; } }
.work__item { display: grid; gap: 6px; padding: 12px; background: var(--osd); border: 0; color: var(--dim); }
.work__item:hover { background: var(--red); color: #fff; }
.work__item img, .genesis-img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover;
  image-rendering: pixelated; image-rendering: crisp-edges; margin-bottom: 6px; }
.work__name { font-family: "Unbounded"; font-weight: 900; text-transform: uppercase; color: var(--ink); font-size: 1.1rem; }
.work__url { color: var(--violet); }
.work__item:hover .work__url { color: #fff; }

/* ---- Section scenes (genesis.js): full-width pixel pictures at the top of a section. */
section.has-scene { padding-top: 0; }
.scene { display: block; width: 100%; height: auto; margin: 0 0 56px; image-rendering: pixelated; image-rendering: crisp-edges; }

/* ---- Commercial and Open source: each a full screen. The words and the two cards on one side, the section's
   scene filling the other side from top to bottom and darkening into black towards the words. Commercial has its
   diamond on the right; Open source is mirrored, its gnu on the left. */
section.proj { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); min-height: 100vh; padding: 0; }
section.proj--mirror { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
.proj__text { display: flex; flex-direction: column; justify-content: center; gap: 24px;
  padding: 64px 24px 64px clamp(20px, 4vw, 64px); }
.proj--mirror .proj__text { padding: 64px clamp(20px, 4vw, 64px) 64px 24px; }
.proj__head h2 { margin: 0; }
.proj__art { display: block; width: 100%; height: 100%; object-fit: cover;
  image-rendering: pixelated; image-rendering: crisp-edges; }
@media (max-width: 960px) {
  section.proj, section.proj--mirror { grid-template-columns: 1fr; min-height: 0; }
  .proj__art { order: -1; height: auto; aspect-ratio: 2 / 1; }
  .proj__text, .proj--mirror .proj__text { padding: 32px 20px 64px; }
}
.work { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .work { grid-template-columns: 1fr; } }
.work__item { grid-template-columns: 1fr; align-content: start; gap: 10px; }
.work__item img, .work__item .genesis-img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; margin: 0; }

/* Open source colours: blue and green. */
.split--sea { --violet: #3ad89a; --red: #2a9cff; --osd: rgb(4 32 44 / .85); --strong: #0e6a6a; }
.split--sea h2 { color: var(--violet); }
.split--sea .eyebrow { color: var(--red); }
.split--sea .work__item:hover { background: #0e6a6a; }
.stars { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--ink); }
.stars canvas { width: 48px; height: 48px; image-rendering: pixelated; image-rendering: crisp-edges; flex: none; }
.stars [data-github-stars] { color: #ffd23a; }
/* Cards in a row are equal height; the star count sits at the bottom of each. */
.work__item { grid-template-rows: auto 1fr; }
.work__body { display: flex; flex-direction: column; gap: 4px; }
.work__body .stars { margin-top: auto; padding-top: 8px; }

/* ---- Contact: the destroyed tape. Full screen like the hero, mirrored: the box sits on the right, and it is
   the same plain box as the hero's: white text on a translucent panel, nothing else. */
.tape { position: relative; padding: 0; overflow: hidden; background: #000; border-top: 2px solid #0a3a0a; }
/* Pinned right: when the window is wider than the tape, the spare space falls on the left, mirroring the hero. */
/* The frame is the tape's own box: as wide as fits the screen's height, pushed right so the spare space falls on
   the left (mirroring the hero). Everything on it is placed relative to the tape, not the window. */
.tape__frame { position: relative; width: min(100%, calc(100vh * 320 / 224)); margin-left: auto; }
.tape canvas { display: block; width: 100%; height: auto;
  image-rendering: pixelated; image-rendering: crisp-edges; }
.tape .hud { position: absolute; right: 1.6%; top: 7%; width: 50%; padding: 1.2% 2.4%; background: rgb(4 26 6 / .85); }
.tape .hud dt, .tape .hud dd { color: #f4f8e8; font-size: 16px; line-height: 16px; white-space: nowrap; }
.tape .hud a { color: inherit; border: 0; }
.tape .hud a:hover { background: #6ac000; color: #000; }
.tape .caption { position: absolute; right: 4%; top: 40%; margin: 0; padding: 2px 6px;
  background: rgb(0 0 0 / .78); color: #fff; font-size: 16px; line-height: 16px; white-space: nowrap; }
@media (min-width: 1000px) {
  .tape .hud dt, .tape .hud dd, .tape .caption { font-size: 32px; line-height: 32px; }
}
@media (max-width: 700px) {
  .tape .hud { position: static; width: auto; }
  .tape .caption { position: static; display: block; text-align: center; }
}
/* The page's footer, on the Contact tape: just the copyright line. */
.tape__foot { position: absolute; right: 4%; bottom: 9%; margin: 0; padding: 2px 6px; background: rgb(0 0 0 / .78);
  color: #f4f8e8; font-size: 16px; line-height: 16px; white-space: nowrap; border: 0; }
.tape__foot a { color: inherit; border: 0; }
.tape__foot a:hover { background: #6ac000; color: #000; }
@media (min-width: 1000px) { .tape__foot { font-size: 32px; line-height: 32px; } }
@media (max-width: 700px) { .tape__foot { position: static; display: block; text-align: center; padding: 16px; } }
/* ---- The bottom tape's boxes: the hero's boxes exactly (same purple, same type and spacing), mirrored. */
.tape .hud, .tape__foot { background: rgb(28 6 64 / .82); }
.tape .hud { left: auto; right: 1.2%; top: 5.5%; width: 66%; padding: 1.2% 2.4%; }
.tape .hud dt, .tape .hud dd, .tape__foot { color: #f4eeff; }
.tape .hud a:hover, .tape__foot a:hover { background: var(--red); color: #fff; }
.tape__foot { right: 1.2%; bottom: 9%; padding: 6px 10px; }
@media (min-width: 1000px) {
    .tape__foot { padding: 8px 14px; }
}
@media (max-width: 700px) { .tape .hud { width: auto; } }
/* project icons, in the same spot as the GitHub stars */
.stars .proj-icon { width: 48px; height: 48px; image-rendering: pixelated; image-rendering: crisp-edges; flex: none; border-radius: 10px; }
.stars .proj-label { color: var(--ink); }

/* ---- About on the bottom tape: subtitles. One short cue at a time, each line on its own black strip, centred
   under the contact box (the space right of the cover), like the hero's caption. */
.subs { position: absolute; right: 1.2%; width: 66%; bottom: 20%; margin: 0; text-align: center; }
.subs .sub { display: block; }
.subs.cued .sub { display: none; }
.subs.cued .sub.on { display: block; }
.subs .sub + .sub { margin-top: 16px; }
.subs.cued .sub + .sub { margin-top: 0; }
.subs span span { display: inline-block; margin: 0 0 4px; padding: 2px 6px; background: rgb(0 0 0 / .78); color: #fff;
  font-size: 16px; line-height: 16px; white-space: nowrap; }
@media (min-width: 1000px) { .subs span span { font-size: 32px; line-height: 32px; } }
@media (max-width: 700px) { .subs { position: static; width: auto; padding: 16px; } .subs span span { white-space: normal; } }

/* ---- Commercial: holographic foil, nothing like the hero's violet and red. Pink and yellow type, a foil heading
   that shimmers, and a foil edge on each card. */
.proj--holo { --violet: #ffe96e; --red: #ff8ad8; --osd: rgb(10 10 34 / .86); --strong: #4a5cff; --ink: #f2f6ff; --dim: #c6d4ff; }
.proj--holo .eyebrow { color: var(--red); }
.proj--holo h2 { background: linear-gradient(100deg, #7a6cff, #ff8ad8, #ffe96e, #8affb0, #ffe96e, #ff8ad8, #7a6cff) 0 0 / 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: foil 9s linear infinite; }
.proj--holo .work__item { border: 2px solid transparent;
  background: linear-gradient(var(--osd), var(--osd)) padding-box,
              linear-gradient(120deg, #7a6cff, #ff8ad8, #ffe96e, #8affb0, #ffe96e, #ff8ad8, #7a6cff) 0 0 / 300% 100% border-box;
  animation: foil 9s linear infinite; }
.proj--holo .work__item:hover { background: linear-gradient(120deg, #7a6cff, #ff8ad8, #ffe96e, #8affb0, #ffe96e, #ff8ad8, #7a6cff) 0 0 / 300% 100%;
  color: #0a0820; }
.proj--holo .work__item:hover .work__name, .proj--holo .work__item:hover .work__url { color: #0a0820; }
@keyframes foil { to { background-position: 300% 0; } }
@media (prefers-reduced-motion: reduce) { .proj--holo h2, .proj--holo .work__item { animation: none; } }
