/* ============================================================
   Jonjoe1001 - personal site
   Dark arcade. One stylesheet, no build step, no dependencies.

   Everything is driven by the custom properties in :root below.
   Change a value there and it updates everywhere, on every page.
   ============================================================ */

:root {
  /* --- Surfaces: near-black, layered so cards lift off the page --- */
  --bg:          #07070C;
  --bg-2:        #0B0C13;
  --surface:     #11121C;
  --surface-2:   #171927;
  --line:        #23263A;
  --line-bright: #343A55;

  /* --- Text --- */
  --text:        #ECEEF6;
  --text-dim:    #9AA1BC;
  --text-faint:  #6B7392;

  /* --- Accents, lifted from the Timeless title art --- */
  --hot:         #FF2D78;   /* hot pink   - primary, calls to action */
  --cyan:        #35D6F5;   /* electric   - secondary, links, data   */
  --amber:       #FFC93C;   /* amber      - highlights, "live" flags */
  --green:       #3DF5A0;   /* phosphor   - status dot only          */
  --hot-dim:     rgba(255,  45, 120, .14);

  /* --- Type --- */
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body:    "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", "Cascadia Code", Consolas, monospace;

  /* --- Spacing rhythm --- */
  --gap:       1rem;
  --gap-lg:    2rem;
  --gap-xl:    4rem;
  --radius:    14px;
  --radius-sm: 8px;

  /* --- Page widths --- */
  --wide:   1180px;
  --narrow: 720px;   /* comfortable reading width for posts */
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 700;
}

/* Visible for keyboard users, invisible for mouse clicks. */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Screen-reader-only text. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   BACKGROUND ATMOSPHERE
   A fixed grid plus two colour blooms behind everything.
   pointer-events:none so it never eats a click.
   ============================================================ */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(58rem 40rem at 12% -8%, rgba(255, 45, 120, .13), transparent 65%),
    radial-gradient(52rem 38rem at 92%  4%, rgba( 53, 214, 245, .10), transparent 62%),
    linear-gradient(var(--bg-2), var(--bg));
}

/* The faint graph-paper grid. */
.backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 56px 56px;
  /* Fade the grid out down the page so it never fights the content. */
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
          mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
}

/* The sprite canvas, injected into .backdrop by site.js.

   It sits between the graph-paper grid (::before) and the scanlines
   (::after), because pseudo-elements paint around an element's real
   children in tree order - so the sprites land on top of the grid
   and under the scanlines, which is exactly where they belong.

   image-rendering keeps the pixel art sharp instead of letting the
   browser smear it with bilinear filtering when it scales up. */
.sprite-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* CRT scanlines. Very subtle - raise the alpha if you want more. */
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg, rgba(255, 255, 255, .017) 0 1px, transparent 1px 3px
  );
}

/* ============================================================
   LAYOUT
   ============================================================ */
.wrap {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

section { padding-block: var(--gap-xl); }

/* Section heading: a mono kicker over a display title. */
.section-head { margin-bottom: var(--gap-lg); }

.kicker {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--hot);
  margin: 0 0 .6rem;
  display: flex;
  align-items: center;
  gap: .7rem;
}

/* The little line that trails off after a kicker. */
.kicker::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, var(--line-bright), transparent);
}

.section-head h1,
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin: 0; }
.section-head p  { color: var(--text-dim); max-width: 60ch; margin: .6rem 0 0; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 7, 12, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  height: 64px;
  position: relative;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; }

/* The blinking arcade cursor beside the name. */
.brand-mark {
  width: 12px;
  height: 20px;
  background: var(--hot);
  box-shadow: 0 0 14px var(--hot);
  animation: blink 1.3s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: .25; } }

.nav-links { display: flex; gap: .35rem; align-items: center; }

.nav-links a {
  color: var(--text-dim);
  font-size: .92rem;
  padding: .45rem .8rem;
  border-radius: var(--radius-sm);
  transition: color .16s, background .16s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }

/* aria-current="page" marks the page you are on - set it in the HTML. */
.nav-links a[aria-current="page"] { color: var(--hot); background: var(--hot-dim); }

/* Hamburger - hidden until the layout gets narrow. */
.nav-toggle {
  display: none;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: .45rem .7rem;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .93rem;
  padding: .72rem 1.3rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-bright);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  transition: transform .16s, box-shadow .16s, background .16s, border-color .16s;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: var(--text-faint);
}

.btn-primary {
  background: var(--hot);
  border-color: var(--hot);
  color: #fff;
}
.btn-primary:hover { box-shadow: 0 8px 28px rgba(255, 45, 120, .4); }

.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding-block: clamp(3rem, 9vw, 6.5rem) var(--gap-xl); }

.hero h1 {
  font-size: clamp(2.4rem, 7.5vw, 4.6rem);
  margin: 0 0 1rem;
  max-width: 16ch;
}

/* Gradient fill for the highlighted word in the headline. */
.hero h1 .glow {
  background: linear-gradient(96deg, var(--hot), var(--amber) 55%, var(--cyan));
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: clamp(1.02rem, 2.1vw, 1.2rem);
  color: var(--text-dim);
  max-width: 56ch;
  margin: 0 0 2rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Status pill above the headline. */
.status {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: .38rem .9rem;
  margin-bottom: 1.6rem;
}
.status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .35; } }

/* ============================================================
   FEATURED CARD - the big two-column showcase
   ============================================================ */
.featured {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  position: relative;
}

/* Neon rule across the top edge. */
.featured::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--hot), var(--amber), var(--cyan));
}

.featured-body { padding: clamp(1.6rem, 3.6vw, 2.8rem); }
.featured-body h3 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin-bottom: .7rem; }
.featured-body p  { color: var(--text-dim); margin: 0 0 1.4rem; }

.featured-art {
  background:
    radial-gradient(30rem 22rem at 60% 40%, rgba(255, 45, 120, .22), transparent 70%),
    var(--bg-2);
  display: grid;
  place-items: center;
  padding: clamp(1.6rem, 4vw, 3rem);
  border-left: 1px solid var(--line);
}
.featured-art img {
  width: 100%;
  max-width: 400px;
  image-rendering: pixelated;   /* keeps the pixel logo crisp when scaled */
  filter: drop-shadow(0 0 34px rgba(255, 45, 120, .45));
}

/* A row of small stats under the featured copy. */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.8rem;
  margin: 1.6rem 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: .2rem;
}
.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

/* ============================================================
   PROJECT GRID
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.3rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-bright);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .55);
}

.card-art {
  aspect-ratio: 16 / 9;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  position: relative;
  display: grid;
  place-items: center;
}
.card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.card:hover .card-art img { transform: scale(1.045); }

/* Placeholder art for projects with no screenshot yet:
   a grid, a coloured glow, and the project's initials.
   Set --blank-glow inline on the element to recolour it. */
.card-art.is-blank {
  background-image:
    radial-gradient(20rem 14rem at 50% 120%, var(--blank-glow, rgba(53, 214, 245, .20)), transparent 70%),
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 100% 100%, 30px 30px, 30px 30px;
}
.card-art .initials {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.5rem;
  letter-spacing: -.04em;
  color: var(--text);
  opacity: .82;
}

.card-body {
  padding: 1.2rem 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-body h3 { font-size: 1.18rem; margin-bottom: .4rem; }
.card-body h3 a { color: var(--text); }
.card-body h3 a:hover { color: var(--cyan); text-decoration: none; }
.card-body p { color: var(--text-dim); font-size: .93rem; margin: 0 0 1.1rem; flex: 1; }

/* Inline code inside a card blurb. Same treatment as .article code, which
   only applies inside blog posts - without this, a <code> in a card falls
   back to the browser default and looks like a mistake. */
.card-body code {
  font-family: var(--font-mono);
  font-size: .87em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .1em .35em;
  color: var(--cyan);
}

.card-links { display: flex; flex-wrap: wrap; gap: .5rem .9rem; }
.card-links a { font-family: var(--font-mono); font-size: .8rem; }

/* ============================================================
   TAGS + FILTER CHIPS
   ============================================================ */
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }

.tag {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .22rem .55rem;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-dim);
}
.tag.is-live { color: var(--amber); border-color: rgba(255, 201, 60, .35); background: rgba(255, 201, 60, .10); }
.tag.is-game { color: var(--hot);   border-color: rgba(255, 45, 120, .35); background: var(--hot-dim); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: var(--gap-lg);
}
.chip {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .48rem 1rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-dim);
  cursor: pointer;
  transition: .16s;
}
.chip:hover { color: var(--text); border-color: var(--line-bright); }
.chip[aria-pressed="true"] {
  background: var(--hot);
  border-color: var(--hot);
  color: #fff;
}

/* Set by the filter script. */
.card[hidden] { display: none; }

/* ============================================================
   POST LIST
   ============================================================ */
.posts { display: flex; flex-direction: column; border-top: 1px solid var(--line); }

.post-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 1.2rem;
  align-items: baseline;
  padding: 1.3rem .4rem;
  border-bottom: 1px solid var(--line);
  transition: background .16s, padding-inline .16s;
}
.post-row:hover { background: var(--surface); padding-inline: .9rem .4rem; }

.post-date {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--text-faint);
  letter-spacing: .04em;
  white-space: nowrap;
}
.post-row h3 { font-size: 1.12rem; margin: 0 0 .25rem; }
.post-row h3 a { color: var(--text); }
.post-row h3 a:hover { color: var(--hot); text-decoration: none; }
.post-row p { margin: 0; color: var(--text-dim); font-size: .92rem; }
.post-arrow { color: var(--text-faint); font-family: var(--font-mono); }
.post-row:hover .post-arrow { color: var(--hot); }

/* ============================================================
   ARTICLE - the reading view for a single dev post
   ============================================================ */
.article {
  max-width: var(--narrow);
  margin-inline: auto;
  padding-block: 3rem var(--gap-xl);
}
.article h1 { font-size: clamp(2rem, 5.5vw, 3rem); margin-bottom: .6rem; }

.article-meta {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--text-faint);
  letter-spacing: .06em;
  margin-bottom: 2.4rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
}

.article p  { margin: 0 0 1.3rem; color: #C9CEE2; }
.article h2 { font-size: 1.6rem;  margin: 2.6rem 0 .8rem; }
.article h3 { font-size: 1.22rem; margin: 2rem 0 .6rem; }
.article ul, .article ol { color: #C9CEE2; padding-left: 1.3rem; margin: 0 0 1.3rem; }
.article li { margin-bottom: .5rem; }
.article img { border-radius: var(--radius); border: 1px solid var(--line); margin: 1.8rem 0; }

.article blockquote {
  margin: 1.8rem 0;
  padding: .3rem 0 .3rem 1.4rem;
  border-left: 3px solid var(--hot);
  color: var(--text-dim);
  font-style: italic;
}

.article figure { margin: 1.8rem 0; }
.article figcaption {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--text-faint);
  text-align: center;
  margin-top: .7rem;
}

.article code {
  font-family: var(--font-mono);
  font-size: .87em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .12em .4em;
  color: var(--cyan);
}
.article pre {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem;
  overflow-x: auto;      /* long lines scroll here, the page never does */
  margin: 0 0 1.5rem;
}
.article pre code { background: none; border: 0; padding: 0; color: #D7DCEF; }

.back-link {
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--text-dim);
  display: inline-block;
  margin-bottom: 2rem;
}

/* ============================================================
   PROSE - about page and other plain text blocks
   ============================================================ */
.prose { max-width: 62ch; }
.prose p  { color: #C9CEE2; margin: 0 0 1.2rem; }
.prose h2 { margin-top: 2.4rem; }
.prose ul { color: #C9CEE2; padding-left: 1.3rem; }
.prose li { margin-bottom: .45rem; }

/* ============================================================
   CALLOUT STRIP
   ============================================================ */
.callout {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(40rem 20rem at 20% 0%, var(--hot-dim), transparent 70%),
    var(--surface);
  padding: clamp(1.8rem, 4vw, 3rem);
  text-align: center;
}
.callout h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); margin-bottom: .6rem; }
.callout p  { color: var(--text-dim); max-width: 50ch; margin: 0 auto 1.6rem; }

/* ============================================================
   TODO MARKER
   Wrap anything you still need to write in <span class="todo">.
   It shows up in amber with a dashed box so you cannot miss it.
   Delete the span (keep the text) when you have filled it in -
   and search the project for "todo" before you publish.
   ============================================================ */
.todo {
  color: var(--amber);
  border: 1px dashed rgba(255, 201, 60, .5);
  background: rgba(255, 201, 60, .08);
  border-radius: 4px;
  padding: .05em .4em;
  font-style: normal;
}
.todo::before {
  content: "✎ ";
  opacity: .7;
}

/* ============================================================
   CONTACT FORM
   ============================================================ */
.form { max-width: 34rem; }

.field { margin-bottom: 1.1rem; }

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: .45rem;
}

.field input,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .75rem .9rem;
  transition: border-color .16s, background .16s;
}
.field textarea { min-height: 9rem; resize: vertical; }

.field input:hover,
.field textarea:hover { border-color: var(--line-bright); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--hot);
  background: var(--surface-2);
}

.field input::placeholder,
.field textarea::placeholder { color: var(--text-faint); }

/* The honeypot: a real field, hidden from people, irresistible to bots.
   Anything that fills it in gets its submission dropped. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Status line under the form, shown by the script after a submit. */
.form-status {
  margin-top: 1rem;
  font-size: .92rem;
  padding: .8rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
}
.form-status.is-ok   { color: var(--green); border-color: rgba( 61, 245, 160, .35); }
.form-status.is-bad  { color: var(--hot);   border-color: rgba(255,  45, 120, .35); }

/* The "email it instead" link the script drops into a failed status. Inherits
   the status colour so it does not fight the red. */
.form-status a { color: inherit; text-decoration: underline; }

/* Mid-send the submit button is disabled, so it needs to LOOK unavailable -
   otherwise it reads as an ordinary button that has stopped responding.
   The :hover override matters because .btn:hover lifts by 2px, and a button
   that still springs up under the cursor does not look disabled at all. */
.btn[disabled] {
  opacity: .55;
  cursor: not-allowed;
}
.btn[disabled]:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--line-bright);
}

/* ============================================================
   AVATAR
   The small round photo in the nav, and the big one on the
   home page. Both point at assets/img/pfp.png.
   ============================================================ */
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-bright);
  background: var(--surface-2);
  flex-shrink: 0;
}

/* Home page: photo beside the headline. */
.hero-id {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 1.6rem;
}
.hero-id .avatar-lg {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line-bright);
  background: var(--surface-2);
  box-shadow: 0 0 0 5px rgba(255, 45, 120, .10);
}
.hero-id .who strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.3;
}
.hero-id .who span {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

@media (max-width: 560px) {
  .hero-id .avatar-lg { width: 60px; height: 60px; }
}

/* ============================================================
   STATUS BADGES
   One class per real state, so a project never lies about
   whether you can play it.
   ============================================================ */
.tag.is-dev     { color: var(--cyan);  border-color: rgba( 53, 214, 245, .35); background: rgba( 53, 214, 245, .10); }
.tag.is-out     { color: var(--green); border-color: rgba( 61, 245, 160, .35); background: rgba( 61, 245, 160, .10); }
.tag.is-play    { color: var(--amber); border-color: rgba(255, 201,  60, .35); background: rgba(255, 201,  60, .10); }

/* ============================================================
   FEATURED WORK (projects page, top three)
   Bigger cards than the standard grid, with the art doing more.
   ============================================================ */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  margin-bottom: var(--gap-xl);
}

.feature {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.feature:hover {
  border-color: var(--line-bright);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
  transform: translateY(-3px);
}
.feature::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--hot), var(--amber), var(--cyan));
}

/* Every other one flips, so the page does not read as a list. `order` moves the
   art visually but NOT which track is wider, so the columns must be reversed too
   or the flipped cards hand the wide track to the picture. */
.feature:nth-child(even) { grid-template-columns: 1fr 1.15fr; }
.feature:nth-child(even) .feature-art { order: -1; border-left: 0; border-right: 1px solid var(--line); }

.feature-body { padding: clamp(1.5rem, 3.2vw, 2.4rem); }
.feature-body h3 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: .6rem; }
.feature-body h3 a { color: var(--text); }
.feature-body h3 a:hover { color: var(--hot); text-decoration: none; }
.feature-body > p { color: var(--text-dim); margin: 0 0 1.3rem; }

.feature-art {
  border-left: 1px solid var(--line);
  /* Key art that cannot be cropped will letterbox. Painting the panel in the
     artwork's own background colour makes that letterboxing invisible, instead
     of framing the picture in black. Set --art-bg on the element. */
  background: var(--art-bg, var(--bg-2));
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 240px;
}
.feature-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .5s ease;
}
.feature:hover .feature-art img { transform: scale(1.04); }

/* Art that should sit inside the panel rather than fill it (logos). */
.feature-art.is-logo {
  padding: clamp(1.4rem, 3vw, 2.6rem);
  background:
    radial-gradient(26rem 18rem at 50% 50%, rgba(255, 45, 120, .20), transparent 70%),
    var(--bg-2);
}
.feature-art.is-logo img {
  height: auto;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 28px rgba(255, 45, 120, .40));
}

/* Art that is narrower than its panel. Cropping a narrow picture to fill a wide
   slot is exactly what makes a cover look bad, so contain it, centre it, and give
   the width it does not need back to the text column. */
.feature.art-narrow { grid-template-columns: 1.75fr 1fr; }
.feature.art-narrow:nth-child(even) { grid-template-columns: 1fr 1.75fr; }
.feature.art-narrow .feature-art { padding: 0; }
.feature.art-narrow .feature-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Pixel art must not be smoothed when it is scaled. */
.feature-art.is-pixel img { image-rendering: pixelated; }
.feature.art-narrow:hover .feature-art img { transform: scale(1.03); }

@media (max-width: 820px) {
  /* .feature.art-narrow outranks a bare .feature, so it must be named here too
     or the two-column layout survives on phones. */
  .feature,
  .feature.art-narrow,
  .feature:nth-child(even),
  .feature.art-narrow:nth-child(even) { grid-template-columns: 1fr; }
  .feature-art,
  .feature:nth-child(even) .feature-art {
    order: -1;
    border-left: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    min-height: 190px;
  }
}

/* ============================================================
   PROJECT PAGE
   The detail page for one project.
   ============================================================ */
.project-hero { padding-block: 2.6rem 1rem; }

.project-hero h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); margin-bottom: .7rem; }
.project-lead {
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  color: var(--text-dim);
  max-width: 62ch;
  margin: 0 0 1.6rem;
}

/* The big image at the top of a project page. */
.project-cover {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
  margin-bottom: 2.4rem;
}
.project-cover img { width: 100%; }

/* Key facts strip. */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.4rem;
  padding: 1.4rem 0;
  border-block: 1px solid var(--line);
  margin-bottom: 2.4rem;
}
.facts dt {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: .3rem;
}
.facts dd {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

/* Screenshot gallery. */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 1.4rem;
  margin: 2rem 0;
}
.shot {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.shot img { width: 100%; display: block; }
.shot figcaption {
  padding: .85rem 1.1rem;
  font-size: .89rem;
  color: var(--text-dim);
  border-top: 1px solid var(--line);
}
.shot figcaption b {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
}

/* One image on its own, full width of the reading column. */
.shot-wide { grid-column: 1 / -1; }

/* Prose inside a project page reads like an article. */
.project-body { max-width: 68ch; }
.project-body h2 { font-size: 1.55rem; margin: 2.8rem 0 .8rem; }
.project-body h3 { font-size: 1.18rem; margin: 2rem 0 .5rem; }
.project-body p  { color: #C9CEE2; margin: 0 0 1.2rem; }
.project-body ul { color: #C9CEE2; padding-left: 1.3rem; margin: 0 0 1.3rem; }
.project-body li { margin-bottom: .5rem; }
.project-body code {
  font-family: var(--font-mono);
  font-size: .87em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .12em .4em;
  color: var(--cyan);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: var(--gap-xl);
  padding-block: 2.4rem 3rem;
  color: var(--text-faint);
  font-size: .88rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}
.footer-links { display: flex; gap: 1.3rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-dim); }
.site-footer .mono { font-family: var(--font-mono); font-size: .78rem; }

/* Switch for the background sprites, added by site.js. Kept
   deliberately quiet - it should be findable by anyone the motion
   bothers, without becoming a third thing competing in the footer.
   Set SHOW_TOGGLE = false in site.js to remove it entirely. */
.sprite-toggle {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--text-faint);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: .3rem .6rem;
  cursor: pointer;
  transition: color .16s, border-color .16s;
}
.sprite-toggle:hover {
  color: var(--text-dim);
  border-color: var(--line);
}
.sprite-toggle[aria-pressed="false"] { opacity: .6; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .featured { grid-template-columns: 1fr; }
  .featured-art { border-left: 0; border-top: 1px solid var(--line); order: -1; }

  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    padding: .5rem;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: .8rem 1rem; }
}

@media (max-width: 560px) {
  .post-row { grid-template-columns: 1fr; gap: .3rem; }
  .post-arrow { display: none; }
  .grid { grid-template-columns: 1fr; }
  .stat-row { gap: 1.2rem; }
}

/* ============================================================
   MOTION PREFERENCES
   Anyone who asked their OS to reduce motion gets no animation.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .backdrop, .site-header, .site-footer, .filters { display: none; }
  body { background: #fff; color: #000; }
  .article p, .article li { color: #000; }
}
