/* Self-hosted so the page makes no third-party requests. Regenerate by
   re-fetching the Google Fonts CSS with a modern UA and downloading the
   woff2 files it points at. */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/geist-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/geist-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/geist-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/geist-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/fonts/geist-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/fonts/geist-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/geist-mono-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/geist-mono-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/geist-mono-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/geist-mono-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/fonts/space-grotesk-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/fonts/space-grotesk-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Palette, fonts and shadow scale taken from the neobrutalism "defolio" template. */
:root {
  --bg: #fff7e8;
  --ink: #000000;
  --card: #ffffff;
  --muted: #efe7d6;
  --muted-ink: #6b6355;
  --line: #000000;
  --shadow-color: #000000;
  --grid: rgba(0, 0, 0, 0.06);

  --primary: #ffdc58;
  --violet: #c4a1ff;
  --teal: #01ffcc;
  --lime: #e7f192;
  --pink: #ff30cd;
  --on-accent: #000000;

  --border: 2px;
  --drop: 4px;
  --drop-lg: 6px;

  --sans: Geist, system-ui, sans-serif;
  --head: "Space Grotesk", var(--sans);
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1815;
    --ink: #f5f0e6;
    --card: #262320;
    --muted: #2e2a24;
    --muted-ink: #b3ac9e;
    --line: #6f675a;
    --shadow-color: #4a443c;
    --grid: rgba(245, 240, 230, 0.05);
  }
}

:root[data-theme="dark"] {
  --bg: #1a1815;
  --ink: #f5f0e6;
  --card: #262320;
  --muted: #2e2a24;
  --muted-ink: #b3ac9e;
  --line: #6f675a;
  --shadow-color: #4a443c;
  --grid: rgba(245, 240, 230, 0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 34px 34px;
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  /* Side padding leaves room for the chips that overhang the portrait. */
  padding: 1.25rem 3rem 3rem;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

::selection { background: var(--primary); color: var(--on-accent); }

main {
  max-width: 62rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

h1, h2, h3 { font-family: var(--head); line-height: 1.05; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 8vw, 4rem); text-transform: uppercase; }
h3 { font-size: 1.4rem; }

h2 {
  font-family: var(--mono);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 1.25rem;
  display: inline-block;
  background: var(--primary);
  color: var(--on-accent);
  border: var(--border) solid var(--line);
  box-shadow: var(--drop) var(--drop) 0 0 var(--shadow-color);
  padding: 0.45rem 0.9rem;
}

a { color: inherit; }

.block {
  background: var(--card);
  border: var(--border) solid var(--line);
  box-shadow: var(--drop) var(--drop) 0 0 var(--shadow-color);
}

/* --- top bar --- */
.topbar {
  max-width: 62rem;
  margin: 0 auto 2.5rem;
  display: flex;
  justify-content: flex-end;
}

.controls {
  display: flex;
  align-items: stretch;
  font: 500 0.8rem/1 var(--mono);
}

.controls button {
  background: var(--card);
  border: 0;
  color: inherit;
  font: inherit;
  padding: 0.7rem 0.8rem;
  cursor: pointer;
}

.controls button + button { border-left: var(--border) solid var(--line); }
.controls button[aria-pressed="true"] { background: var(--primary); color: var(--on-accent); }
.controls button:hover { background: var(--muted); }
.controls button[aria-pressed="true"]:hover { background: var(--primary); }
#theme { border-left-width: var(--border); font-size: 0.95rem; }

.only-dark { display: none; }
:root[data-theme="dark"] .only-dark { display: inline; }
:root[data-theme="dark"] .only-light { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-dark { display: inline; }
  :root:not([data-theme="light"]) .only-light { display: none; }
}

/* --- hero --- */
.hero {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.sprite { display: none; }

.portrait-wrap {
  position: relative;
  flex: 0 0 15rem;
  display: flex;
}

/* Tech marks float around the portrait and overhang its edges. Offsets are
   percentages of the wrapper, so they track the portrait at any size. */
.chip {
  --size: 3.1rem;
  position: absolute;
  width: var(--size);
  height: var(--size);
  display: grid;
  place-items: center;
  transform: rotate(var(--tilt, 0deg));
}

/* Official brand colours. OpenJDK's registered hex is #000000, unusable as a
   chip background, so Java uses its brand orange. Glyph colour is whichever of
   black/white scores higher contrast on that background. */
.chip.b-vue  { background: #28795A; --glyph: #ffffff; }
.chip.b-ts   { background: #3178C6; --glyph: #ffffff; }
.chip.b-java { background: #C74634; --glyph: #ffffff; }
.chip.b-k8s  { background: #326CE5; --glyph: #ffffff; }
.chip.b-rpi  { background: #A22846; --glyph: #ffffff; }

.chip svg { width: 66%; height: 66%; fill: var(--glyph); }

/* Java and Raspberry Pi are outline marks; the others are solid. A stroke
   thickens them to match. Keyed to the mark, not the position, so the chips
   can be reordered without silently losing it. */
.b-java svg, .b-rpi svg { stroke: var(--glyph); stroke-width: 0.5; stroke-linejoin: round; }

.p1 { top: -6%;  left: -14%; --tilt: -8deg; }
.p2 { top: 13%;  left: 84%;  --tilt: 7deg; }
.p3 { top: 45%;  left: -16%; --tilt: -5deg; }
.p4 { top: 67%;  left: 87%;  --tilt: 9deg; }
.p5 { top: 89%;  left: 6%;   --tilt: -6deg; }

.portrait {
  flex: 1 1 auto;
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--primary);
}

/* Absolute so height:100% has a definite containing block - otherwise the image
   keeps its intrinsic aspect and object-fit silently does nothing.
   Swap to `contain` + `center bottom` for a full-body cutout standing in the panel. */
.portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.portrait.empty::after {
  content: "AGM";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 700 2.75rem var(--mono);
  color: var(--on-accent);
}

.hero-text { flex: 1 1 20rem; }

.eyebrow {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  color: var(--muted-ink);
  margin-bottom: 0.75rem;
}

.lead { font-size: 1.15rem; margin: 1.25rem 0; max-width: 34rem; }

.badges, .tags { display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; }

.badges li, .tags li {
  padding: 0.35rem 0.75rem;
  font: 500 0.78rem/1.4 var(--mono);
  --drop: 3px;
}

.badges li:first-child { background: var(--violet); color: var(--on-accent); }

/* A linked badge puts its padding on the anchor so the whole box is clickable. */
.badges li:has(a) { padding: 0; }
.badges a { display: block; padding: 0.35rem 0.75rem; text-decoration: none; }
.badges a:hover { background: var(--muted); }

/* --- cards --- */
.card { padding: 1.5rem; display: block; }
.card.wide p + p { margin-top: 1rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem;
}

a.card {
  text-decoration: none;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

a.card:hover, a.card:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: var(--drop-lg) var(--drop-lg) 0 0 var(--shadow-color);
}

a.card:active {
  transform: translate(var(--drop), var(--drop));
  box-shadow: 0 0 0 0 var(--shadow-color);
}

.c-primary, .c-violet, .c-teal, .c-lime, .c-pink { color: var(--on-accent); }
.c-primary { background: var(--primary); }
.c-violet  { background: var(--violet); }
.c-teal    { background: var(--teal); }
.c-lime    { background: var(--lime); }
.c-pink    { background: var(--pink); }

.meta {
  display: block;
  font: 500 0.72rem/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
}

.project h3 { margin-bottom: 0.6rem; }
.project p { margin-bottom: 1rem; }
.link strong { font-size: 1.1rem; display: block; margin-top: 0.35rem; word-break: break-word; }

.notfound { margin-top: 3rem; }
.notfound h1 { font-size: clamp(5rem, 22vw, 11rem); margin-bottom: 1rem; }
.notfound .lead { margin-bottom: 2rem; }
.notfound a.card { max-width: 22rem; }

footer {
  border-top: var(--border) solid var(--line);
  padding-top: 1.25rem;
  font: 400 0.8rem/1.5 var(--mono);
  color: var(--muted-ink);
}

:focus-visible { outline: var(--border) solid var(--ink); outline-offset: 3px; }

@media (max-width: 40rem) {
  body { padding: 1rem 1rem 2.5rem; font-size: 16px; }
  main, .topbar { max-width: none; }
  main { gap: 2.75rem; }
  /* Full-width band rather than a floating group, so it stays balanced and the
     tap targets get bigger. */
  .topbar { margin-bottom: 2rem; }
  .controls { width: 100%; }
  .controls button { flex: 1; padding-inline: 0; }
  .hero { gap: 1.75rem; }
  /* The portrait goes wide and centred rather than sitting as a small block in
     the corner. Chip offsets are percentages, so the composition scales with it.
     The 78% cap keeps a gutter wide enough for the chips at any phone width. */
  .portrait-wrap { flex-basis: min(17rem, 78%); margin-inline: auto; }
  .p1 { left: -13%; }
  .p3 { left: -14%; }
  .grid { gap: 1.25rem; }
  .card { padding: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
