:root {
  --bg: #10151F;
  --bg-deep: #0C1119;
  --card: #1B2636;
  --card-top: #1F2C3F;
  --line: #2A3A52;
  --line-hi: #3D5878;
  --text: #E8EEF6;
  --muted: #AAB7C8;
  --faint: #8C99AE;
  --accent: #7DD3E8;
  --accent-hi: #A9E8F5;
  --accent-ink: #072029;
  --ok: #8EE0B4;
  --warn: #F0C46A;
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 40px);
  --header: 64px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
}

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

html {
  color-scheme: dark;
  scroll-padding-top: calc(var(--header) + 16px);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--accent-hi); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: rgba(125, 211, 232, 0.3); }

.vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap {
  width: min(1120px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 12px; }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(16, 21, 31, 0.85);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  min-height: var(--header);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand img { width: 32px; height: 32px; image-rendering: pixelated; }
.brand__labs {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.95em;
  font-weight: 600;
}

.site-nav ul {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* A JRPG menu cursor marks the link under the pointer or keyboard focus. */
.site-nav a {
  position: relative;
  display: block;
  padding: 8px 12px 8px 22px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.15s;
}
.site-nav a::before {
  content: "▸";
  position: absolute;
  left: 8px;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s, transform 0.15s;
}
.site-nav a:hover,
.site-nav a:focus-visible { color: var(--text); }
.site-nav a:hover::before,
.site-nav a:focus-visible::before { opacity: 1; transform: none; }

.ext { margin-left: 4px; font-size: 0.85em; opacity: 0.75; }

/* Quick links to the timers, breathing between the in-development yellow and released green. */
.quick { margin-left: auto; }
.quick ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.quick__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid rgba(240, 196, 106, 0.5);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--warn);
  font: 600 0.78rem var(--mono);
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  animation: breathe 4s ease-in-out infinite;
}
.quick__link::before { content: ""; width: 6px; height: 6px; background: currentColor; }
.quick__link:hover { background: rgba(255, 255, 255, 0.07); }
.quick__tag { font-weight: 500; opacity: 0.75; }
.quick__tag::before { content: "· "; }

@keyframes breathe {
  0%, 100% {
    color: var(--warn);
    border-color: rgba(240, 196, 106, 0.5);
    box-shadow: 0 0 10px -3px rgba(240, 196, 106, 0.45);
  }
  50% {
    color: var(--ok);
    border-color: rgba(142, 224, 180, 0.55);
    box-shadow: 0 0 14px -2px rgba(142, 224, 180, 0.55);
  }
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line-hi);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: 600 0.9rem var(--mono);
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--accent); }
.nav-toggle[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }

@media (max-width: 719px) {
  html { scroll-padding-top: calc(var(--header) + 60px); }
  /* The quick links drop to a second row under the brand and menu button. */
  .site-nav, .nav-toggle { order: 1; }
  .quick { order: 2; flex-basis: 100%; min-width: 0; margin-left: 0; padding-bottom: 8px; }
  /* One swipeable row, so the pinned header stays short however many links there are. */
  .quick ul { flex-wrap: nowrap; overflow-x: auto; padding: 4px 2px; scrollbar-width: none; }
  .quick ul::-webkit-scrollbar { display: none; }
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px -16px rgba(0, 0, 0, 0.6);
  }
  .js .site-nav[data-open="true"] { display: block; }
  .js .site-nav ul {
    flex-direction: column;
    width: min(1120px, 100% - 2 * var(--gutter));
    margin-inline: auto;
    padding: 8px 0 16px;
  }
  .js .site-nav a { padding: 12px 12px 12px 26px; font-size: 1.05rem; }
  .js .site-nav a::before { left: 10px; }
  /* Without JavaScript the links stay visible under the brand. */
  .site-nav a { padding: 6px 10px 6px 20px; }
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 11vw, 136px) 0 clamp(16px, 3vw, 40px);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(125, 211, 232, 0.18) 1px, transparent 1.5px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(60% 75% at 78% 18%, #000 0%, transparent 75%);
  mask-image: radial-gradient(60% 75% at 78% 18%, #000 0%, transparent 75%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  top: -220px;
  right: -160px;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(125, 211, 232, 0.13), transparent 65%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }

.eyebrow {
  margin: 0 0 20px;
  color: var(--accent);
  font: 600 0.78rem var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 24px;
  text-wrap: balance;
  font-size: clamp(2.4rem, 1.1rem + 4.8vw, 4.6rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.accent { color: var(--accent); }

.lede {
  max-width: 42ch;
  margin: 0 0 36px;
  color: var(--muted);
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.55;
}

/* Buttons */

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn--lg { padding: 13px 22px; font-size: 1rem; }

.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary::before {
  content: "▸";
  font-size: 0.9em;
  transition: transform 0.15s;
}
.btn--primary:hover { background: var(--accent-hi); color: var(--accent-ink); }
.btn--primary:hover::before { transform: translateX(2px); }

.btn--ghost {
  border-color: var(--line-hi);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-hi); }

.btn__ext { font-size: 0.85em; opacity: 0.8; }

/* Sections */

.section { padding-top: clamp(56px, 8vw, 104px); }

.section h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 28px;
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.idx {
  padding: 3px 8px;
  border: 1px solid rgba(125, 211, 232, 0.35);
  border-radius: 6px;
  color: var(--accent);
  font: 600 0.78rem var(--mono);
  letter-spacing: 0.1em;
}

/* Shared card parts */

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.74rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.status::before { content: ""; width: 6px; height: 6px; background: currentColor; }
.status--released {
  border-color: rgba(142, 224, 180, 0.32);
  background: rgba(142, 224, 180, 0.08);
  color: var(--ok);
}
.status--dev {
  border-color: rgba(240, 196, 106, 0.32);
  background: rgba(240, 196, 106, 0.08);
  color: var(--warn);
}

.kind { color: var(--faint); letter-spacing: 0.05em; text-transform: uppercase; }

.summary { margin: 0 0 16px; color: var(--muted); }
.note { margin: -4px 0 16px; color: var(--muted); font-size: 0.93rem; }

.fine { margin: 18px 0 0; color: var(--faint); font-size: 0.85rem; }
.fine a { color: var(--muted); }
.fine a:hover { color: var(--accent-hi); }

/* Featured project */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(24px, 4vw, 52px);
  padding: clamp(20px, 3.6vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card-top), var(--card));
  transition: border-color 0.2s;
}
.feature:hover { border-color: var(--line-hi); }

.feature__title {
  margin: 12px 0 12px;
  font-size: clamp(1.9rem, 1.3rem + 1.9vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.feature__media {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-hi);
  border-radius: 10px;
  box-shadow: 0 28px 64px -28px rgba(0, 0, 0, 0.75), 0 0 0 6px rgba(125, 211, 232, 0.04);
}

.feature__shot { position: relative; display: block; }
.feature__shot img { transition: filter 0.2s; }
.feature__launch {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 0.85rem var(--sans);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
}
.feature__launch::before { content: "▸ "; }
.feature__shot:hover img { filter: brightness(1.08); }
.feature__shot:hover .feature__launch { opacity: 1; transform: none; }
.feature:has(.feature__shot:hover) .feature__media { border-color: var(--accent); }

.note--feature {
  margin: -8px 0 24px;
  padding-left: 12px;
  border-left: 2px solid var(--line-hi);
  color: var(--faint);
  font-size: 0.88rem;
}

.features {
  display: grid;
  gap: 10px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
.features li {
  position: relative;
  padding-left: 22px;
  font-size: 0.97rem;
  line-height: 1.5;
}
/* Pixel bullets */
.features li::before {
  content: "";
  position: absolute;
  top: 0.5em;
  left: 2px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  box-shadow: 2px 2px 0 rgba(125, 211, 232, 0.28);
}

@media (max-width: 959px) {
  .feature { grid-template-columns: 1fr; }
  .feature__media { order: -1; }
}

/* Project cards */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: 24px;
}
.feature + .grid { margin-top: 24px; }

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition: border-color 0.2s;
}
.card:hover { border-color: var(--line-hi); }

.card__media {
  margin: 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg-deep);
}

.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: clamp(20px, 2.4vw, 28px);
}

.card__title {
  margin: 12px 0 10px;
  font-size: 1.4rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.card .fine { margin-top: 0; }
.card .actions { margin-top: auto; padding-top: 20px; }

/* An unreleased project reads as a sketch: dashed edge, planned features as tags. */
.card--dev { border-style: dashed; background: rgba(27, 38, 54, 0.55); }

.planned-label {
  margin: 0 0 10px;
  color: var(--faint);
  font: 600 0.72rem var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 5px 10px;
  border: 1px dashed var(--line-hi);
  border-radius: 6px;
  color: var(--muted);
  font: 0.8rem var(--mono);
}

/* Stands in for a screenshot until there is one; same shape as the share images. */
.card__media--wip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  aspect-ratio: 1200 / 630;
  border-bottom-style: dashed;
  background:
    radial-gradient(rgba(125, 211, 232, 0.14) 1px, transparent 1.5px) 0 0 / 18px 18px,
    var(--bg-deep);
}
.wip__name {
  color: var(--muted);
  font: 700 clamp(1.3rem, 1rem + 1.4vw, 1.9rem) var(--mono);
  letter-spacing: 0.04em;
}
.wip__note {
  color: var(--warn);
  font: 600 0.74rem var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.wip__note::after { content: "_"; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* A card alone in its row (the only one, or the odd one out at the end) spans the row
   and sits beside its image instead of under it. */
@media (min-width: 860px) {
  .grid > .card:last-child:nth-child(odd) {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .grid > .card:last-child:nth-child(odd) .card__media {
    display: flex;
    align-items: center;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }
}

/* About */

.about__text p {
  max-width: 60ch;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 1.08rem;
}

@media (min-width: 860px) {
  .about {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 40px;
    align-items: start;
  }
  .about h2 { margin: 0; }
}

/* Footer */

.site-footer {
  margin-top: clamp(72px, 10vw, 128px);
  padding: 48px 0 36px;
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
}
.footer-brand p { margin: 14px 0 0; color: var(--muted); font-size: 0.95rem; }

.footer-title {
  margin: 0 0 12px;
  color: var(--faint);
  font: 600 0.74rem var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.footer-col ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-col a { color: var(--muted); text-decoration: none; }
.footer-col a:hover { color: var(--text); text-decoration: underline; }

.footer-legal {
  display: grid;
  gap: 8px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.82rem;
  line-height: 1.6;
}
.footer-legal p { max-width: 92ch; margin: 0; }
.footer-legal a { color: var(--muted); }

@media (max-width: 719px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .quick__link { color: var(--ok); border-color: rgba(142, 224, 180, 0.55); }
}
