/* jmeekerdev.com: one stylesheet for every page. Fonts are self-hosted so no visit reaches a third party. */
@font-face { font-family: "Bricolage Grotesque"; font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; src: url(/fonts/bricolage.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-weight: 400 700; font-display: swap; src: url(/fonts/atkinson.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/atkinson-italic.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400 600; font-display: swap; src: url(/fonts/jetbrains-mono.woff2) format("woff2"); }

/* The site is a workbench: sage paper, dark ink, one warm orange for the things you can press,
   and a yellow marker. Each project then brings its own world's colours. */
:root {
  color-scheme: light;
  --ground: #e8ede3;
  --surface: #f6f8f2;
  --ink: #15201a;
  --muted: #55645b;
  --line: #c6d0c3;
  --dot: #b7c3b4;
  --accent: #d9481f;
  --accent-ink: #fff6f1;
  --mark: #ffd84d;
  --shadow: 0 1px 0 rgba(21, 32, 26, 0.06), 0 14px 32px -18px rgba(21, 32, 26, 0.35);

  /* VoxelHunt's sea is the same in both themes: it is night down there. */
  --sea: #0c1a48;
  --sea-deep: #060f30;
  --sea-edge: #27397f;
  --sea-ink: #e9f0ff;
  --sea-muted: #a5b4e0;
  --pink: #ff5fd2;
  --violet: #9d6bff;
  --cyan: #5ff0ff;
  --green: #7dffb0;

  /* ExpanseOS: a shelf of humble green machines. */
  --x-bg: #d6e3cc;
  --x-ink: #122619;
  --x-muted: #46604f;
  --x-node: #2d6a46;
  --x-face: #3f8a5c;
  --x-led: #c8ff78;
  --x-link: #4f7f5f;

  /* Wayseer: a map in periwinkle with a saffron route. */
  --w-bg: #dcdff5;
  --w-ink: #161a3c;
  --w-muted: #4b5280;
  --w-screen: #1d2254;
  --w-contour: #a3abe8;
  --w-route: #e09d14;
  --w-node: #3a46b4;
  --w-paper: #eef0ff;

  /* webTraffik: a sand-coloured globe with probes arcing in. */
  --t-bg: #f2e1c6;
  --t-ink: #2b160b;
  --t-muted: #7b5238;
  --t-globe: #ead0a8;
  --t-grid: #cfab7e;
  --t-arc: #c2410c;
  --t-hit: #c81e1e;
  --t-you: #2b160b;

  /* IncUX: a plum console with instances listed above a shell. */
  --i-bg: #ecdcea;
  --i-ink: #2a1029;
  --i-muted: #6e4568;
  --i-frame: #6b2a66;
  --i-chrome: #fbf3f9;
  --i-panel: #fbf3f9;
  --i-row: #f0e0ec;
  --i-run: #23894c;
  --i-frozen: #2f7bc4;
  --i-term: #24101f;
  --i-prompt: #f29be4;
  --i-out: #e3cfdf;

  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: clamp(1.9rem, 4.5vw, 2.6rem);
  --step-3: clamp(2.7rem, 9.2vw, 5.4rem);
  --radius: 1.25rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ground: #0f1512;
    --surface: #182019;
    --ink: #e8eee6;
    --muted: #a2b1a7;
    --line: #2a352d;
    --dot: #2e3a31;
    --accent: #ff8d61;
    --accent-ink: #1d0b05;
    --mark: #c79a12;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 14px 32px -18px rgba(0, 0, 0, 0.8);
    --x-bg: #142019;
    --x-ink: #dcebdf;
    --x-muted: #94ad9c;
    --x-node: #2b5d3f;
    --x-face: #3c7c56;
    --x-led: #b4ff5e;
    --x-link: #5f9a73;
    --w-bg: #161a38;
    --w-ink: #e3e6ff;
    --w-muted: #a4abe0;
    --w-screen: #10133a;
    --w-contour: #414a8e;
    --w-route: #ffc53d;
    --w-node: #9ea9ff;
    --w-paper: #1d2254;
    --t-bg: #1e1511;
    --t-ink: #f5e7d8;
    --t-muted: #c59d80;
    --t-globe: #2a1d17;
    --t-grid: #4a3427;
    --t-arc: #ff8a4c;
    --t-hit: #ff5a4f;
    --t-you: #ffd2a8;
    --i-bg: #1f1220;
    --i-ink: #f3e3f0;
    --i-muted: #c39bbb;
    --i-frame: #5a2a55;
    --i-chrome: #f0d6ea;
    --i-panel: #2a1729;
    --i-row: #3a2238;
    --i-run: #5fd38d;
    --i-frozen: #7ab8ff;
    --i-term: #12080f;
    --i-prompt: #f29be4;
    --i-out: #d9c3d5;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: var(--step-0)/1.6 var(--body);
  padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px));
  overflow-x: hidden;
}
.page { max-width: 66rem; margin: 0 auto; padding-block: 0 3rem; }
img { max-width: 100%; height: auto; display: block; }
svg { display: block; }
a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-thickness: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Header: a stamped wordmark and a couple of links. */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.25rem; }
.wordmark { display: inline-flex; align-items: center; gap: 0.6rem; font: 800 1.3rem/1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: -0.03em; }
.wordmark svg { width: 2rem; height: 2rem; transition: transform 0.4s cubic-bezier(0.3, 1.6, 0.5, 1); }
.wordmark:hover svg { transform: rotate(-8deg) scale(1.08); }
.wordmark b { font: inherit; }
.wordmark span { color: var(--accent); }
.site-head nav { display: flex; gap: 0.35rem; }
.site-head nav a { padding: 0.45rem 0.8rem; border-radius: 999px; color: var(--muted); text-decoration: none; font: 500 var(--step--1)/1 var(--mono); }
.site-head nav a:hover { color: var(--ink); background: var(--surface); }
.site-head nav a[aria-current] { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }

/* Type */
h1, h2, h3 { font-family: var(--display); line-height: 1.02; letter-spacing: -0.03em; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-3); font-weight: 800; line-height: 0.96; }
h2 { font-size: var(--step-2); font-weight: 800; }
h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; max-width: 62ch; }
.lede { font-size: var(--step-1); line-height: 1.45; color: var(--muted); max-width: 36ch; text-wrap: pretty; }
.label { font: 700 0.8rem/1 var(--display); font-stretch: 80%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.hl { background: linear-gradient(100deg, transparent 0 3%, var(--mark) 3% 97%, transparent 97%) 0 88% / 100% 48% no-repeat; -webkit-box-decoration-break: clone; box-decoration-break: clone; padding-inline: 0.08em; margin-inline: -0.08em; }

/* Tags: little condensed stickers, a few of them tilted. */
.tag { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.38rem 0.7rem 0.34rem; border-radius: 0.45rem; border: 1.5px solid currentColor; font: 700 0.78rem/1 var(--display); font-stretch: 80%; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); width: max-content; }
.tag.tilt { transform: rotate(-2.5deg); }
.tag.live { border-color: transparent; background: var(--accent); color: var(--accent-ink); }

/* Home hero: the thesis beside a shelf of the machines in question. */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 2rem 3rem; align-items: center; padding-block: clamp(2.5rem, 8vw, 5.5rem) clamp(2.5rem, 8vw, 4.5rem); position: relative; }
.hero::before { content: ""; position: absolute; inset: 0 -50vw; z-index: -1; background: radial-gradient(var(--dot) 1.2px, transparent 1.4px) 0 0 / 22px 22px; -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 92%); mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 92%); }
.hero-copy { display: grid; gap: 1.4rem; justify-items: start; }
.hero .label { color: var(--accent); }
.bench { width: 100%; max-width: 38rem; justify-self: center; }

/* The bench scene's lights and cable. Small, slow, and off when motion is reduced. */
.led { animation: blink 2.6s ease-in-out infinite; }
.led.b { animation-duration: 3.9s; animation-delay: 1.2s; }
.led.c { animation-duration: 3.1s; animation-delay: 0.5s; }
.cable { stroke-dasharray: 5 7; animation: flow 2.4s linear infinite; }
.pulse { animation: pulse 4.5s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }
@keyframes flow { to { stroke-dashoffset: -24; } }
@keyframes pulse { 0%, 100% { opacity: 0.55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.25); } }

/* Projects: each world in its own colours. */
.projects-head { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; padding-block: 1rem; }
.projects { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.world { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 1.5rem 2.5rem; align-items: center; padding: clamp(1.4rem, 4vw, 2.75rem); border-radius: var(--radius); background: var(--world-bg, var(--surface)); color: var(--world-ink, var(--ink)); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.world > * { position: relative; }
.world-copy { display: grid; gap: 0.9rem; justify-items: start; }
.world h3 { font-size: clamp(1.9rem, 4.6vw, 2.75rem); font-weight: 800; letter-spacing: -0.035em; line-height: 0.98; }
.world .spec { font: 400 var(--step--1)/1.5 var(--mono); color: var(--world-muted, var(--muted)); }
.world .spec b { font-weight: 600; color: inherit; }
.world .links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font: 600 var(--step--1)/1.4 var(--mono); padding-top: 0.25rem; }
.world .links a { color: var(--world-link, var(--accent)); }
.world .links a::after { content: " →"; }
.world .tag { color: var(--world-muted, var(--muted)); }
.scene { justify-self: center; width: 100%; max-width: 24rem; }

/* VoxelHunt: a window onto the sea, with the phone and a few glass cubes drifting past. */
.world.voxelhunt { --world-bg: var(--sea); --world-ink: var(--sea-ink); --world-muted: var(--sea-muted); --world-link: var(--cyan); background: radial-gradient(120% 90% at 80% 20%, #1a2d7a 0%, var(--sea) 45%, var(--sea-deep) 100%); }
.world.voxelhunt .tag.live { background: var(--cyan); color: #06102e; }
.world.voxelhunt h3 b { color: var(--cyan); font-weight: inherit; }
.scene.sea { position: relative; aspect-ratio: 6 / 5; max-width: 22rem; }
.scene.sea svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene.sea .shot { position: absolute; left: 50%; top: 50%; width: 42%; transform: translate(-50%, -50%) rotate(-6deg); transition: transform 0.6s cubic-bezier(0.2, 1, 0.3, 1); }
.world.voxelhunt:hover .scene.sea .shot { transform: translate(-50%, -50%) rotate(-2deg) scale(1.03); }
.cube { transition: opacity 0.6s ease; }
.world.voxelhunt:hover .cube.dim { opacity: 1; }
.cube.dim { opacity: 0.55; }
.shot { border-radius: 1.1rem; padding: 0.3rem; background: var(--sea-deep); border: 1px solid rgba(255, 255, 255, 0.16); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.7); }
.shot img { border-radius: 0.85rem; }

/* ExpanseOS: a cluster of humble machines meshing together. */
.world.expanseos { --world-bg: var(--x-bg); --world-ink: var(--x-ink); --world-muted: var(--x-muted); --world-link: var(--x-node); grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); border-radius: 0.6rem; }
.world.expanseos .scene { order: -1; }
.world.expanseos .tag.live { background: var(--x-node); color: #effbe9; }
@media (prefers-color-scheme: dark) { .world.expanseos { --world-link: var(--x-led); } }
.mesh { stroke-dasharray: 4 5; transition: stroke-dashoffset 2.5s linear; }
.world.expanseos:hover .mesh { stroke-dashoffset: -72; }

/* Wayseer: a map of systems with a route between them. */
.world.wayseer { --world-bg: var(--w-bg); --world-ink: var(--w-ink); --world-muted: var(--w-muted); --world-link: var(--w-node); border-radius: 2rem 0.6rem 2rem 0.6rem; }
.route { stroke-dasharray: 520; stroke-dashoffset: 0; transition: stroke-dashoffset 1.6s ease-out; }
.world.wayseer:hover .route { animation: draw 1.8s ease-out; }
@keyframes draw { from { stroke-dashoffset: 520; } to { stroke-dashoffset: 0; } }

/* webTraffik: probes arc in from around the globe to one listening server. */
.world.webtraffik { --world-bg: var(--t-bg); --world-ink: var(--t-ink); --world-muted: var(--t-muted); --world-link: var(--t-arc); grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); border-radius: 0.6rem 2rem 0.6rem 2rem; }
.world.webtraffik .scene { order: -1; }
.arcs { stroke-dasharray: 3 6; transition: stroke-dashoffset 2.5s linear; }
.world.webtraffik:hover .arcs { stroke-dashoffset: -72; }
.you { animation: pulse 3.4s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }

/* IncUX: a dashboard of instances; on hover the frozen one thaws. */
.world.incux { --world-bg: var(--i-bg); --world-ink: var(--i-ink); --world-muted: var(--i-muted); --world-link: var(--i-frame); border-radius: 2rem 2rem 0.6rem 0.6rem; }
.world.incux h3 b { color: var(--i-frame); font-weight: inherit; }
@media (prefers-color-scheme: dark) { .world.incux { --world-link: var(--i-prompt); } .world.incux h3 b { color: var(--i-prompt); } }
.thaw { fill: var(--i-frozen); transition: fill 0.5s ease; }
.world.incux:hover .thaw { fill: var(--i-run); }
.state { transition: opacity 0.5s ease; }
.state.running, .world.incux:hover .state.frozen { opacity: 0; }
.world.incux:hover .state.running { opacity: 1; }
.caret { animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* Contact: a postcard, slightly askew. */
.contact { display: grid; gap: 1rem; padding-block: 4rem 0; justify-items: start; }
.card { display: grid; gap: 0.6rem; padding: 1.5rem 1.75rem; border-radius: 0.5rem; background: var(--surface); box-shadow: var(--shadow); border: 1px dashed var(--line); transform: rotate(-1deg); transition: transform 0.4s cubic-bezier(0.3, 1.5, 0.5, 1); max-width: 100%; }
.card:hover { transform: rotate(0deg); }
.address { font: 700 clamp(1.1rem, 4.6vw, 1.6rem)/1.3 var(--display); letter-spacing: -0.02em; overflow-wrap: anywhere; }

/* App page hero: the sea comes up to meet you. */
.app-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: end; padding: clamp(1.75rem, 5vw, 3.5rem) clamp(1.4rem, 4vw, 3rem); margin-top: 1rem; border-radius: var(--radius); color: var(--sea-ink); background: radial-gradient(110% 100% at 85% 10%, #1b2f80 0%, var(--sea) 40%, var(--sea-deep) 100%); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.app-hero > * { position: relative; }
.app-hero .drift { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.app-hero .label { color: var(--cyan); }
.app-hero-copy { display: grid; gap: 1.2rem; justify-items: start; }
.app-title { font-family: var(--display); font-weight: 800; font-size: clamp(2.6rem, 11vw, 5.6rem); letter-spacing: 0.02em; text-transform: uppercase; line-height: 0.95; margin: 0; }
.app-title b { color: var(--cyan); font-weight: inherit; }
.app-hero .lede { color: var(--sea-muted); max-width: 32ch; }
.app-hero .spec { font: 400 var(--step--1)/1.5 var(--mono); color: var(--sea-muted); }
.app-hero .spec b { color: var(--sea-ink); font-weight: 600; }
.app-icon { width: clamp(5.5rem, 16vw, 8rem); border-radius: 22%; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.12); transform: rotate(4deg); transition: transform 0.5s cubic-bezier(0.3, 1.5, 0.5, 1); }
.app-hero:hover .app-icon { transform: rotate(0deg) scale(1.03); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; padding-top: 0.25rem; }
.button { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.1rem; border-radius: 999px; font: 700 0.85rem/1 var(--display); font-stretch: 85%; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; border: 1.5px solid var(--cyan); color: var(--cyan); }
.button[aria-disabled] { border-style: dashed; }

/* Gallery: a hand of screenshots, each tilted a touch, scrolling on its own. */
.gallery { display: flex; gap: 1.25rem; overflow-x: auto; padding: 2rem 0.5rem 1.5rem; margin-inline: -0.5rem; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.gallery .shot { flex: none; width: clamp(10rem, 24vw, 12.5rem); scroll-snap-align: start; margin: 0; transform: rotate(-1.5deg); transition: transform 0.4s ease; }
.gallery .shot:nth-child(even) { transform: rotate(1.5deg); }
.gallery .shot:hover { transform: rotate(0deg) translateY(-4px); }

/* Field notes: four things to know, numbered like journal entries. */
.notes-head { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; padding-block: 1.5rem 0.5rem; }
.notes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0 2.5rem; counter-reset: note; }
.notes li { display: grid; align-content: start; grid-template-columns: auto minmax(0, 1fr); gap: 0.25rem 1rem; padding-block: 1.5rem; border-top: 1.5px solid var(--line); counter-increment: note; }
.notes li::before { content: counter(note, decimal-leading-zero); grid-row: span 2; font: 800 2.2rem/1 var(--display); letter-spacing: -0.04em; color: var(--accent); }
.notes h3 { margin-top: 0.3rem; }

/* Long-form pages: privacy, support */
.prose { display: grid; gap: 1rem; padding-block: clamp(2.5rem, 8vw, 4rem) 0; }
.prose h1 { font-size: clamp(2.3rem, 8vw, 4rem); }
.prose h2 { font-size: var(--step-1); padding-block: 1.25rem 0; }
.prose ul { margin: 0; padding-left: 1.2em; max-width: 62ch; }
.prose li + li { margin-top: 0.35rem; }
.crumb { font: 500 var(--step--1)/1 var(--mono); }
.crumb a { color: var(--muted); }
.lost { width: min(100%, 18rem); }

.site-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; margin-top: 4rem; padding-block: 1.5rem; border-top: 1.5px solid var(--line); font: 400 var(--step--1)/1.5 var(--mono); color: var(--muted); }
.site-foot a { color: var(--muted); }
.site-foot .github { display: inline-flex; color: var(--muted); transition: color 0.2s; }
.site-foot .github:hover { color: var(--ink); }
.site-foot .github svg { width: 1.4rem; height: 1.4rem; }

/* Phones: everything stacks, scenes sit under their words. */
@media (max-width: 44rem) {
  .hero { grid-template-columns: 1fr; gap: 1.5rem; }
  .world, .world.expanseos, .world.webtraffik { grid-template-columns: 1fr; }
  .world.expanseos .scene, .world.webtraffik .scene { order: 0; }
  .scene { max-width: 20rem; }
  .app-hero { grid-template-columns: 1fr; align-items: start; }
  .app-icon { order: -1; }
  .notes li::before { font-size: 1.8rem; }
}

/* Motion: panels rise into view where the browser can drive it from scroll; nothing moves if asked not to. */
@media (prefers-reduced-motion: no-preference) {
  .gallery { scroll-behavior: smooth; }
  @supports (animation-timeline: view()) {
    .world, .card { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  }
}
@keyframes rise { from { opacity: 0; translate: 0 1.5rem; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) {
  .led, .cable, .pulse, .you, .caret, .world.wayseer:hover .route { animation: none; }
  .mesh, .arcs, .cube, .shot, .card, .app-icon, .wordmark svg, .thaw, .state { transition: none; }
}
