/* ============================================================
   Nick van Urk — "Brutalist dark poster"
   Off-black ground · bone type · one electric-magenta accent
   ============================================================ */

/* Self-hosted latin subsets. Glyphs outside latin (→, ★) are absent from these
   faces and fall through to the stack's next family, as they did on the CDN. */
@font-face {
  font-family: "Archivo Black";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ArchivoBlack-400.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/SpaceGrotesk-400.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/SpaceGrotesk-700.woff2") format("woff2");
}
@font-face {
  font-family: "Space Mono";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/SpaceMono-400.woff2") format("woff2");
}
@font-face {
  font-family: "Space Mono";
  font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/SpaceMono-700.woff2") format("woff2");
}

:root {
  --ink:        #0b0b0d;   /* off-black ground */
  --ink-2:      #131317;   /* raised panel */
  --ink-3:      #1b1b20;   /* hover panel */
  --bone:       #ece6d6;   /* primary bone text */
  --bone-dim:   #9a968b;   /* muted */
  --line:       #2c2c31;   /* hairline on dark */
  --line-hard:  #ece6d6;   /* structural bone rules */
  --accent:     #ff2e7e;   /* electric magenta */
  --accent-2:   #ff5c9a;   /* accent hover */
  --focus:      #ff2e7e;

  --edge: 2px;             /* structural border weight */
  --pad: clamp(1.1rem, 4vw, 3.25rem);
  --maxw: 1400px;

  --f-display: "Archivo Black", system-ui, sans-serif;
  --f-body:    "Space Grotesk", system-ui, sans-serif;
  --f-mono:    "Space Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--f-body);
  font-size: clamp(1rem, 0.55vw + 0.9rem, 1.15rem);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

::selection { background: var(--accent); color: #12000a; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #12000a; padding: .7rem 1.1rem;
  font-family: var(--f-mono); font-weight: 700; text-decoration: none;
}
.skip:focus { left: 0; }

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

/* ---------------- shared layout wrappers ---------------- */
.section {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(3rem, 8vw, 6.5rem) var(--pad);
  border-top: var(--edge) solid var(--line-hard);
}
/* the full-width marquee already divides the hero from the work section, so the
   section that directly follows it drops its own (centered, narrower) top border */
.marquee + .section { border-top: none; }

/* ============ HEADER ============ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: stretch; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding: 0 var(--pad);
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: var(--edge) solid var(--line-hard);
}
.wordmark {
  display: flex; align-items: center; gap: .6rem;
  text-decoration: none; padding: .85rem 0;
  font-family: var(--f-display); letter-spacing: .01em;
}
.wordmark__mono {
  background: var(--accent); color: #12000a;
  font-family: var(--f-display);
  padding: .12em .35em; font-size: 1.05rem; line-height: 1;
}
.wordmark__full { font-size: 1.05rem; }
@media (max-width: 560px){ .wordmark__full { display: none; } }

.nav {
  display: flex; align-items: center; gap: clamp(.6rem, 2vw, 1.6rem);
  font-family: var(--f-mono); font-size: .82rem; text-transform: uppercase;
  letter-spacing: .06em; flex-wrap: wrap;
}
.nav a { text-decoration: none; color: var(--bone-dim); padding: .3rem 0; position: relative; }
.nav a:hover { color: var(--bone); }
.nav a:hover::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--accent);
}

.status {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--f-mono); font-size: .74rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--bone-dim); padding: .85rem 0;
}
.status__dot {
  width: .6rem; height: .6rem; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); }
  70%  { box-shadow: 0 0 0 .55rem transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (max-width: 720px){ .status { display: none; } }

/* ============ HERO ============ */
.hero {
  max-width: var(--maxw); margin-inline: auto;
  padding: clamp(2.5rem, 7vw, 5.5rem) var(--pad) clamp(2rem, 5vw, 3.5rem);
  container-type: inline-size;
}
.hero__eyebrow {
  margin: 0 0 clamp(1rem, 3vw, 2rem);
  font-family: var(--f-mono); font-size: clamp(.72rem, 1.6vw, .9rem);
  text-transform: uppercase; letter-spacing: .12em; color: var(--accent);
}
/* Sized off the hero's content box, not the viewport: 16vw ignored the padding
   and scrollbar, so "ENGINEER." ran ~10% past the container and the magenta dot
   was clipped at every width below 1600. 1cqw = 1% of that content box, so the
   longest line lands flush with the rule below it at every size. */
.hero__title {
  margin: 0;
  font-family: var(--f-display);
  font-size: min(16.6cqw, 15rem);
  line-height: .82;
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.hero__line { display: block; }
.hero__line--accent { color: var(--bone); }
.hero__line--accent .dot { color: var(--accent); }

.hero__meta {
  display: grid; grid-template-columns: 1fr 2fr; gap: clamp(1rem, 4vw, 3rem);
  margin-top: clamp(1.6rem, 4vw, 2.6rem);
  padding-top: clamp(1.4rem, 3vw, 2rem);
  border-top: var(--edge) solid var(--line);
}
.hero__name {
  margin: 0; font-family: var(--f-display); font-size: clamp(1.3rem, 3vw, 2rem);
  line-height: 1; align-self: start;
}
.hero__lede {
  margin: 0; max-width: 60ch; font-size: clamp(1.05rem, 1.4vw, 1.4rem);
  color: var(--bone); line-height: 1.5;
}
@media (max-width: 760px){ .hero__meta { grid-template-columns: 1fr; } }

/* ============ MARQUEE ============ */
.marquee {
  overflow: hidden; border-top: var(--edge) solid var(--line-hard);
  border-bottom: var(--edge) solid var(--line-hard);
  background: var(--accent); color: #12000a;
  font-family: var(--f-display); text-transform: uppercase;
}
.marquee__track {
  display: inline-flex; align-items: center; gap: 1.1rem;
  padding: .55rem 0; white-space: nowrap;
  font-size: clamp(1rem, 2.4vw, 1.6rem); letter-spacing: .01em;
  will-change: transform;
  animation: scroll 34s linear infinite;
}
.marquee__track span { display: inline-block; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============ SECTION HEADS ============ */
.section__head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end; gap: .5rem clamp(1rem, 3vw, 2rem);
  margin-bottom: clamp(2rem, 5vw, 3.4rem);
}
.section__num {
  grid-row: span 2;
  font-family: var(--f-mono); font-weight: 700;
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  color: var(--accent);
  -webkit-text-stroke: 0;
  align-self: start;
  padding-top: .35em;
}
/* floor is set by the longest unbreakable word ("PROFESSIONAL"): at a 2.6rem
   floor it measures 349px and clips inside the ~310px available at 360w */
.section__title {
  margin: 0; font-family: var(--f-display); text-transform: uppercase;
  font-size: clamp(2rem, 9vw, 7rem); line-height: .9; letter-spacing: -.02em;
}
.section__note {
  grid-column: 2; margin: .6rem 0 0; max-width: 52ch;
  color: var(--bone-dim); font-size: clamp(.95rem, 1.3vw, 1.1rem);
}

/* ============ FEATURED (Mechacraft) ============ */
.feature {
  display: grid; grid-template-columns: 1.05fr 1.35fr;
  border: var(--edge) solid var(--line-hard);
  margin-bottom: var(--edge); /* collapse into grid below */
  background: var(--ink-2);
}
/* inside the games grid the feature is a full-width cell sharing the grid's
   borders, so it drops its own border/margin (no detached box or seam) */
.games-grid .feature {
  grid-column: 1 / -1;
  border: none;
  margin: 0;
}
.feature__media {
  position: relative; display: block; overflow: hidden;
  border-right: var(--edge) solid var(--line-hard);
  background: #000;
}
.feature__media img {
  width: 100%; height: 100%; object-fit: cover; min-height: 320px;
  transition: transform .5s ease;
}
.feature:hover .feature__media img { transform: scale(1.03); }
.feature__body { padding: clamp(1.4rem, 3.5vw, 3rem); }

.kicker, .panel__role, .card__title {
  font-family: var(--f-mono);
}
.kicker {
  margin: 0 0 .8rem; font-size: .78rem; text-transform: uppercase;
  letter-spacing: .14em; color: var(--accent);
}
/* floor sized so the unbreakable "MECHACRAFT" clears the card at 320w */
.feature__title {
  margin: 0 0 1rem; font-family: var(--f-display); text-transform: uppercase;
  font-size: clamp(1.75rem, 5.5vw, 4.5rem); line-height: .9; letter-spacing: -.02em;
}
.feature__desc { margin: 0 0 1.6rem; max-width: 52ch; }

.badge {
  position: absolute; top: 0; left: 0;
  font-family: var(--f-mono); font-weight: 700; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .08em;
  padding: .5rem .8rem; background: var(--accent); color: #12000a;
}

/* ---- stats ---- */
.stats {
  display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 1.5rem; padding: 0;
  list-style: none; border: var(--edge) solid var(--line-hard);
}
.stats li {
  flex: 1 1 0; min-width: 90px;
  padding: .8rem 1rem; border-right: var(--edge) solid var(--line-hard);
  display: flex; flex-direction: column; gap: .15rem;
}
.stats li:last-child { border-right: 0; }
.stats b {
  font-family: var(--f-display); font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  line-height: 1; color: var(--bone);
}
.stats span {
  font-family: var(--f-mono); font-size: .68rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--bone-dim);
}
.stats--sm { margin-bottom: 1rem; }
.stats--sm li { padding: .55rem .7rem; }
.stats--sm b { font-size: 1.1rem; }

/* ---- tags ---- */
.tags {
  display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.5rem; padding: 0;
  list-style: none;
}
.tags li {
  font-family: var(--f-mono); font-size: .72rem; text-transform: uppercase;
  letter-spacing: .04em; color: var(--bone);
  border: 1px solid var(--line); padding: .28rem .55rem;
}

/* ---- links / buttons ---- */
.links { display: flex; flex-wrap: wrap; gap: 1.2rem; margin: 0; align-items: center; }
.links a {
  font-family: var(--f-mono); font-size: .85rem; text-transform: uppercase;
  letter-spacing: .06em; text-decoration: none; color: var(--bone);
  border-bottom: 2px solid var(--line); padding-bottom: .15rem;
}
.links a:hover { color: var(--accent); border-color: var(--accent); }
.btn {
  border: var(--edge) solid var(--accent) !important; color: #12000a !important;
  background: var(--accent); padding: .6rem 1.1rem !important;
  border-bottom-width: var(--edge) !important; font-weight: 700;
  transition: background .15s, color .15s;
}
.btn:hover { background: transparent; color: var(--accent) !important; }

/* ============ GRIDS ============ */
.grid { display: grid; gap: var(--edge); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

/* Grid items default to min-width:auto (= min-content). An image's max-width:100%
   is a percentage and so doesn't constrain that intrinsic contribution, letting the
   screenshots push their track past the viewport on narrow screens. */
.grid > *, .feature > * { min-width: 0; }

/* frame the grid so cells read as one brutalist block */
.grid--2, .grid--3 { background: var(--line-hard); border: var(--edge) solid var(--line-hard); }

/* ============ SMALL GAME CARDS ============ */
.card { display: flex; flex-direction: column; background: var(--ink-2); }
.card__media {
  display: block; overflow: hidden; background: #000; aspect-ratio: 4 / 3;
  border-bottom: var(--edge) solid var(--line-hard);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__media img { transform: scale(1.04); }
.card__body { padding: clamp(1.1rem, 2vw, 1.6rem); display: flex; flex-direction: column; flex: 1; }
.card__title {
  margin: 0 0 .7rem; font-family: var(--f-display); font-size: 1.6rem;
  text-transform: uppercase; letter-spacing: -.01em;
}
.card__desc { margin: 0 0 1.1rem; font-size: .96rem; color: var(--bone); }
.card .links { margin-top: auto; }

/* ============ APPLIED PANELS ============ */
.panel { background: var(--ink-2); padding: clamp(1.4rem, 3vw, 2.4rem); display: flex; flex-direction: column; }
.panel__top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.4rem;
}
.panel__glyph { width: 46px; height: 46px; flex: none; }
.panel__glyph path, .panel__glyph rect, .panel__glyph circle,
.panel__glyph line, .panel__glyph polyline {
  stroke: var(--accent); stroke-width: 4; fill: none; stroke-linejoin: round; stroke-linecap: round;
}
.panel__glyph [fill]:not([fill="none"]) { fill: var(--accent); stroke: none; }
.panel__place {
  font-family: var(--f-mono); font-size: .7rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--bone-dim); text-align: right;
}
.panel__title {
  margin: 0; font-family: var(--f-display); text-transform: uppercase;
  font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: .95; letter-spacing: -.01em;
}
.panel__role {
  margin: .5rem 0 1rem; font-size: .8rem; text-transform: uppercase;
  letter-spacing: .1em; color: var(--accent);
}
.panel__desc { margin: 0 0 1.5rem; color: var(--bone); }
.panel .tags { margin-top: auto; margin-bottom: 0; }
.panel .links { margin-top: 1.1rem; }

/* ============ GRAPHICS ALGOS ============ */
.algo { background: var(--ink-2); padding: clamp(1.4rem, 3vw, 2.2rem); display: flex; flex-direction: column; }
.algo__idx {
  font-family: var(--f-mono); font-weight: 700; font-size: 1rem;
  color: var(--accent); margin-bottom: 1.2rem;
}
.algo__title {
  margin: 0 0 1rem; font-family: var(--f-display); text-transform: uppercase;
  font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: .95;
}
.algo__desc { margin: 0 0 1.5rem; color: var(--bone); font-size: .96rem; }
.algo .links { margin-top: auto; }

/* ============ ABOUT ============ */
.about {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--edge);
  border: var(--edge) solid var(--line-hard); background: var(--line-hard);
}
.about__bio, .about__exp { background: var(--ink-2); padding: clamp(1.5rem, 3.5vw, 3rem); }
.about__lead {
  margin: 0 0 1.2rem; font-size: clamp(1.15rem, 1.7vw, 1.5rem); line-height: 1.4;
}
.about__bio p { margin: 0 0 1.2rem; }
.about__sub {
  margin: 2rem 0 1rem; font-family: var(--f-mono); font-size: .78rem;
  text-transform: uppercase; letter-spacing: .12em; color: var(--accent);
}
.about__bio .about__sub:first-of-type { margin-top: 2.2rem; }

.stackgrid {
  display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none;
}
.stackgrid li {
  font-family: var(--f-mono); font-size: .74rem; text-transform: uppercase;
  border: 1px solid var(--line); padding: .32rem .55rem; color: var(--bone);
}

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid; grid-template-columns: 4.75rem 1fr; gap: 1rem;
  padding: .9rem 0; border-top: 1px solid var(--line);
}
.timeline li:first-child { border-top: 0; }
.timeline__yr {
  font-family: var(--f-mono); font-size: .82rem; color: var(--accent);
  white-space: nowrap; padding-top: .1rem;
}
.timeline__what { display: flex; flex-direction: column; }
.timeline__what b { font-weight: 700; }
.timeline__what em { font-style: normal; color: var(--bone-dim); font-size: .88rem; margin-top: .1rem; }

@media (max-width: 860px){ .about { grid-template-columns: 1fr; } }

/* ============ CONTACT (inverted accent field) ============ */
.contact {
  position: relative;
  background: var(--accent); color: #12000a;
  padding: clamp(3rem, 9vw, 7rem) var(--pad);
  border-top: var(--edge) solid var(--line-hard);
}
.contact__num { position: absolute; top: clamp(1rem,3vw,2rem); right: var(--pad); color: #12000a; }
.contact__title {
  margin: 0 auto; max-width: var(--maxw);
  font-family: var(--f-display); text-transform: uppercase;
  font-size: clamp(2.6rem, 9vw, 7.5rem); line-height: .88; letter-spacing: -.02em;
}
.contact__links {
  max-width: var(--maxw); margin: clamp(2rem, 5vw, 3.5rem) auto 0;
  padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; gap: .8rem 2.2rem;
  border-top: var(--edge) solid #12000a; padding-top: 1.6rem;
}
.contact__links a, .contact__discord {
  font-family: var(--f-mono); font-size: clamp(.95rem, 1.6vw, 1.15rem);
  text-transform: uppercase; letter-spacing: .04em; text-decoration: none;
  color: #12000a; border-bottom: 2px solid transparent; padding-bottom: .1rem;
}
.contact__links a:hover { border-bottom-color: #12000a; }
.contact__discord { opacity: .8; }
.contact :focus-visible { outline-color: #12000a; }

/* ============ FOOTER ============ */
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem;
  max-width: var(--maxw); margin-inline: auto;
  padding: 1.6rem var(--pad);
  font-family: var(--f-mono); font-size: .76rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--bone-dim);
  border-top: var(--edge) solid var(--line-hard);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px){
  .feature { grid-template-columns: 1fr; }
  .feature__media { border-right: 0; border-bottom: var(--edge) solid var(--line-hard); }
  .feature__media img { min-height: 260px; max-height: 60vh; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px){
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .section__head { grid-template-columns: 1fr; }
  .section__num { grid-row: auto; }
  .section__note { grid-column: 1; }
  .stats { flex-wrap: wrap; }
  .stats li { flex: 1 1 45%; border-bottom: var(--edge) solid var(--line-hard); }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce){
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .marquee__track { transform: none; white-space: normal; flex-wrap: wrap; }
}

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
