/* =========================================================
   Filip Neumann · portfolio
   Look: game-editor / debug HUD. One accent (signal orange).
   ========================================================= */

:root {
  --bg:        #0c0c0d;
  --panel:     #141416;
  --panel-2:   #1a1a1d;
  --line:      #242428;
  --line-2:    #323237;

  --text:      #efebe4;
  --muted:     #a6a29a;
  --dim:       #6e6b65;

  --accent:    #ff6a2a;
  --accent-2:  #ff8c5a;
  --accent-ink:#170700;
  --accent-soft: rgba(255,106,42,.12);
  --ok:        #7ee787;

  --display: 'Big Shoulders Display', 'Arial Narrow', Impact, sans-serif;
  --sans:    'IBM Plex Sans', system-ui, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, Consolas, monospace;

  --max: 1320px;
  --pad: clamp(16px, 3vw, 32px);
  --top: 60px;
  --r: 4px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--top) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  /* faint editor grid */
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 80px 80px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
code { font-family: var(--mono); font-size: .86em; }
kbd {
  font-family: var(--mono); font-size: .9em;
  padding: 0 5px; border: 1px solid var(--line-2); border-bottom-width: 2px;
  border-radius: 3px; color: var(--text); background: var(--panel-2);
}
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 300;
  background: var(--accent); color: var(--accent-ink); padding: 8px 12px; font-weight: 600;
}
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 16px;
  border: 1px solid var(--line-2); border-radius: 3px;
  background: var(--panel); color: var(--text);
  font-family: var(--sans); font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: border-color .15s, background .15s, color .15s, transform .15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-ink); }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn--glass { background: rgba(0,0,0,.55); border-color: rgba(255,255,255,.22); backdrop-filter: blur(6px); }
.btn--block { width: 100%; margin-top: 16px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 3px 8px; border-radius: 2px; border: 1px solid var(--line-2);
}
.pill--ok { color: var(--ok); background: rgba(126,231,135,.1); border-color: rgba(126,231,135,.35); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--top);
  background: rgba(12,12,13,.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  max-width: var(--max); height: 100%; margin: 0 auto; padding: 0 var(--pad);
  display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.brand img { border-radius: 6px; }

.topnav { display: flex; gap: 4px; margin-left: auto; }
.topnav a {
  position: relative; display: flex; align-items: baseline; gap: 6px;
  padding: 8px 12px; font-size: 14px; font-weight: 500; color: var(--muted);
  transition: color .15s;
}
.topnav a span { font-family: var(--mono); font-size: 10px; color: var(--dim); }
.topnav a:hover, .topnav a.is-active { color: var(--text); }
.topnav a.is-active::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: -11px; height: 2px; background: var(--accent);
}

.topbar__right { display: flex; align-items: center; gap: 14px; }
.status {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
}
.status i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 0 rgba(126,231,135,.6); animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(126,231,135,.55); }
  70% { box-shadow: 0 0 0 8px rgba(126,231,135,0); }
  100% { box-shadow: 0 0 0 0 rgba(126,231,135,0); }
}
.menu-btn { display: none; width: 36px; height: 36px; position: relative; }
.menu-btn span {
  position: absolute; left: 8px; right: 8px; height: 2px; background: var(--text); transition: transform .2s, top .2s;
}
.menu-btn span:first-child { top: 13px; }
.menu-btn span:last-child { top: 21px; }
.menu-btn[aria-expanded="true"] span:first-child { top: 17px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { top: 17px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max); margin: 0 auto; padding: 28px var(--pad) 28px;
  display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr); gap: 28px;
  min-height: calc(100svh - var(--top) - 58px);
}
.hero__text { display: flex; flex-direction: column; justify-content: center; padding: 16px 0; }

.kicker {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
}
.kicker .dot { width: 8px; height: 8px; background: var(--accent); }

.hero__name {
  margin: 18px 0 22px;
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(72px, 10.2vw, 156px); line-height: .8; letter-spacing: -.005em;
}
.hero__name span { display: block; }
.caret {
  display: inline-block; width: .13em; height: .66em; margin-left: .06em;
  background: var(--accent); vertical-align: baseline;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero__lede { max-width: 34em; font-size: 18px; line-height: 1.55; color: var(--muted); }
.hero__lede strong { color: var(--text); font-weight: 600; }
.hero__lede em { color: var(--text); }

.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.hero__meta {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
  margin-top: 32px; border-top: 1px solid var(--line);
}
.hero__meta div { padding: 14px 14px 0 0; }
.hero__meta div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.hero__meta dt {
  font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim);
}
.hero__meta dd { font-size: 14px; font-weight: 500; margin-top: 2px; }

/* featured shipped title */
.feature {
  position: relative; display: block; overflow: hidden; isolation: isolate;
  min-height: 520px; border: 1px solid var(--line); border-radius: var(--r);
  background: #0a0a0b;
}
.feature img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 30%;
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1);
  z-index: -2;
}
.feature:hover img { transform: scale(1.04); }
.feature::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(12,12,13,.96) 0%, rgba(12,12,13,.55) 32%, rgba(12,12,13,0) 62%),
    linear-gradient(to bottom, rgba(12,12,13,.55) 0%, rgba(12,12,13,0) 18%);
}
.feature__corners {
  position: absolute; inset: 12px; pointer-events: none;
  --c: var(--accent); --l: 22px; --w: 2px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--w) no-repeat,
    linear-gradient(var(--c), var(--c)) top left / var(--w) var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--w) no-repeat,
    linear-gradient(var(--c), var(--c)) top right / var(--w) var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--w) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / var(--w) var(--l) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--w) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / var(--w) var(--l) no-repeat;
  transition: inset .3s;
}
.feature:hover .feature__corners { inset: 8px; }
.feature__hud {
  position: absolute; top: 24px; display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em;
  padding: 5px 9px; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.12);
}
.feature__hud--tl { left: 26px; }
.feature__hud--tr { right: 26px; color: var(--muted); transition: color .15s; }
.feature:hover .feature__hud--tr { color: var(--accent); }
.rec { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: blink 1.6s steps(1) infinite; }
.feature__caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 30px 30px;
  display: flex; flex-direction: column; gap: 6px;
}
.feature__title {
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(48px, 5.6vw, 84px); line-height: .82;
}
.feature__sub { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.feature__built { font-size: 14px; color: var(--muted); }

/* ---------- Ticker ---------- */
.ticker {
  overflow: hidden; height: 58px; display: flex; align-items: center;
  border-block: 1px solid var(--line); background: var(--panel);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker__track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker ul { display: flex; }
.ticker li {
  display: flex; align-items: center;
  font-family: var(--display); font-weight: 800; font-size: 24px; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}
.ticker li::after { content: ''; width: 6px; height: 6px; background: var(--accent); margin: 0 22px; transform: rotate(45deg); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: 88px var(--pad) 0; }
.section__head {
  display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 18px;
  padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line);
}
.section__idx { font-family: var(--mono); font-size: 13px; color: var(--accent); padding-bottom: 8px; }
.section__head h2 {
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(48px, 6.4vw, 92px); line-height: .8;
}
.section__note {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim);
  padding-bottom: 8px;
}

/* ---------- Work bento ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }

.card {
  grid-column: span var(--span, 6);
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: #4a3428; }
.card:has(.card__open:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.card__media {
  position: relative; height: 300px; overflow: hidden;
  background: #0a0a0b; border-bottom: 1px solid var(--line);
}
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s cubic-bezier(.2,.7,.2,1), filter .3s;
  filter: saturate(.92);
}
.card:hover .card__media img { transform: scale(1.045); filter: saturate(1.05); }
.card__badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  padding: 4px 8px; background: rgba(12,12,13,.82); border: 1px solid var(--line-2); color: var(--text);
}
.card__more {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  padding: 4px 8px; background: var(--accent); color: var(--accent-ink);
  opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s;
}
.card:hover .card__more { opacity: 1; transform: none; }

.card__body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__meta {
  display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim);
}
.card h3 {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: 34px; line-height: .92;
}
.card__open { text-align: left; text-transform: inherit; transition: color .15s; }
.card__open::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.card__open:focus-visible { outline: none; }
.card:hover .card__open { color: var(--accent); }
.card__body > p { font-size: 15px; line-height: 1.55; color: var(--muted); }
.card__body code { background: var(--panel-2); color: var(--text); padding: 1px 5px; border-radius: 3px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.tags li {
  font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 8px; border: 1px solid var(--line-2); border-radius: 2px; color: var(--muted);
}

/* ---------- Live visuals inside cards ---------- */
.viz { position: absolute; inset: 0; overflow: hidden; }
.viz__note {
  position: absolute; right: 12px; bottom: 10px; z-index: 2;
  font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.38);
}
.viz__tag {
  position: absolute; right: 12px; top: 12px; z-index: 2;
  font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  padding: 4px 8px; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.12); color: var(--text);
}

/* GAS hotbar */
.viz--gas {
  background:
    radial-gradient(120% 90% at 20% 0%, #5c1114 0%, #2b080a 45%, #110405 100%);
}
.gas__bg {
  position: absolute; left: 18px; right: 18px; top: 44px;
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: 84px; line-height: .8;
  color: transparent; -webkit-text-stroke: 1px rgba(255,120,100,.22);
}
.gas__hud {
  position: absolute; left: 20px; right: 20px; bottom: 36px;
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 12px 18px; align-items: end;
}
.gas__wave { grid-row: 1 / 3; display: flex; flex-direction: column; }
.gas__wave span { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.gas__wave b { font-family: var(--display); font-weight: 900; font-size: 64px; line-height: .8; color: #fff; }
.gas__bars { display: grid; gap: 5px; }
.gas__bar { height: 7px; background: rgba(255,255,255,.08); border-radius: 1px; overflow: hidden; }
.gas__bar i { display: block; height: 100%; width: 100%; transition: width .35s ease-out; }
.gas__bar--hp i { background: #e5484d; }
.gas__bar--st i { background: #f2c04a; }
.gas__slots { display: flex; gap: 8px; }
.slot {
  --cd: 0;
  position: relative; width: 52px; height: 52px; display: grid; place-items: center;
  background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.2); border-radius: 4px;
  transition: box-shadow .2s, border-color .2s;
}
.slot svg { width: 22px; height: 22px; fill: none; stroke: #f2e6e0; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.slot kbd { position: absolute; right: 3px; bottom: 2px; font-size: 9.5px; padding: 0 3px; border: 0; background: rgba(0,0,0,.6); color: rgba(255,255,255,.7); }
.slot::after {
  content: ''; position: absolute; inset: 0; border-radius: 3px;
  background: conic-gradient(rgba(0,0,0,.74) calc(var(--cd) * 360deg), transparent 0);
}
.slot.is-active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 22px rgba(255,106,42,.55); }

/* Utility AI brain */
.viz--brain {
  display: flex; flex-direction: column; gap: 12px; padding: 12px 20px 30px;
  background: #0f1113;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 20px 20px;
  font-family: var(--mono); font-size: 11px;
}
.brain__top {
  display: flex; justify-content: flex-end; gap: 14px; min-height: 22px; align-items: center;
  text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
}
.brain__clock { color: var(--accent); font-weight: 600; }
.brain__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.brain__label { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); margin-bottom: 8px; }
.meter { display: grid; grid-template-columns: 82px 1fr 34px; align-items: center; gap: 8px; margin-bottom: 7px; color: var(--muted); }
.meter b { height: 7px; background: rgba(255,255,255,.07); overflow: hidden; border-radius: 1px; }
.meter i { display: block; height: 100%; width: calc(var(--v, 0) * 100%); background: #5f6b78; transition: width .3s ease-out, background .2s; }
.meter em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; }
.meter--score i { background: #7d828b; }
.meter--score.is-best { color: var(--text); }
.meter--score.is-best i { background: var(--accent); }
.meter--score.is-best span::before { content: '▶ '; color: var(--accent); }
.brain__state {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-top: 1px solid rgba(255,255,255,.08); padding-top: 10px;
}
.brain__phases { display: flex; gap: 6px; }
.brain__phases span {
  padding: 3px 7px; border: 1px solid var(--line-2); color: var(--dim); text-transform: uppercase; letter-spacing: .06em; font-size: 10px;
  transition: all .2s;
}
.brain__phases span.is-on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.brain__action { font-family: var(--display); font-weight: 800; font-size: 24px; text-transform: uppercase; color: var(--text); }

/* World Partition grid */
.viz--grid { background: #0d100f; }
.viz--grid canvas { width: 100%; height: 100%; display: block; }

/* ---------- Experience ---------- */
.timeline { display: grid; gap: 14px; }
.job { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; }
.job__when {
  position: relative; display: flex; flex-direction: column; gap: 36px; padding-top: 18px;
  font-family: var(--mono); font-size: 13px; color: var(--text);
}
.job__when span:last-child { color: var(--dim); }
.job__when::before {
  content: ''; position: absolute; left: 4px; top: 42px; height: 30px; width: 1px; background: var(--line-2);
}
.job__card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.job__banner { position: relative; height: 150px; overflow: hidden; border-bottom: 1px solid var(--line); }
.job__banner img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 8%; }
.job__banner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(12,12,13,.92) 0%, rgba(12,12,13,.35) 55%, rgba(12,12,13,.2) 100%);
}
.job__banner-text { position: absolute; left: 22px; bottom: 18px; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.job__banner-text strong { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 50px; line-height: .8; }
.job__banner .btn { position: absolute; right: 18px; bottom: 18px; z-index: 1; }
.job__body { padding: 18px 22px 22px; }
.job__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 18px; }
.job__head h3 { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 30px; line-height: 1; }
.job__head h3 span { color: var(--muted); }
.job__stack { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.job__list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; margin-top: 14px; }
.job__list li { position: relative; padding-left: 16px; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.job__list li::before { content: ''; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; background: var(--accent); }
.job__list b { color: var(--text); font-weight: 600; }
.job--edu .job__head h3 { font-size: 26px; }
.job--edu .job__list li::before { background: var(--line-2); }

/* ---------- About ---------- */
.about {
  display: grid; grid-template-columns: 290px minmax(0, 1fr) minmax(0, 1.12fr); gap: 14px; align-items: stretch;
}
.about__photo { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.about__photo img { width: 100%; height: 100%; min-height: 380px; object-fit: cover; object-position: 50% 35%; filter: saturate(.85) contrast(1.04); }
.about__photo figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 12px;
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  background: linear-gradient(to top, rgba(0,0,0,.8), transparent);
}
.about__photo figcaption span:first-child { color: var(--accent); }

.about__bio {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px 24px; display: flex; flex-direction: column; gap: 14px;
}
.about__big { font-size: 21px; line-height: 1.42; font-weight: 500; color: var(--text); }
.about__bio > p:not(.about__big) { color: var(--muted); font-size: 15.5px; }
.langs { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: auto; border-top: 1px solid var(--line); padding-top: 14px; }
.langs dt { font-size: 15px; font-weight: 600; }
.langs dd { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }

.loadout { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.loadout__title {
  display: flex; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--text);
}
.loadout__title span { color: var(--dim); }
.loadout li {
  display: grid; grid-template-columns: 172px minmax(0, 1fr); gap: 12px; align-items: baseline;
  padding: 8px 16px; border-bottom: 1px solid var(--line); transition: background .15s;
}
.loadout li:last-child { border-bottom: 0; }
.loadout li:hover { background: var(--panel-2); }
.loadout li:hover b { color: var(--accent); }
.loadout b { font-size: 14px; font-weight: 600; transition: color .15s; }
.loadout li span { font-size: 13px; color: var(--muted); }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 14px; }
.contact__text {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 26px 26px 24px; display: flex; flex-direction: column;
}
.contact__big {
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(42px, 4.6vw, 70px); line-height: .84;
}
.contact__email {
  margin: 18px 0 22px; font-size: clamp(19px, 2.1vw, 27px); font-weight: 600; color: var(--accent);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; word-break: break-all;
}
.contact__email:hover { color: var(--accent-2); }
.contact__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

/* Blueprint graph */
.bp { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #1b1b1b; display: flex; flex-direction: column; }
.bp__bar {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 7px 10px 7px 14px; background: #232323; border-bottom: 1px solid #000;
  font-family: var(--mono); font-size: 11px; color: #bdbdbd;
}
.bp__run {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  background: #2f2f2f; border: 1px solid #444; border-radius: 3px;
  font-family: var(--mono); font-size: 11px; color: #e8e8e8; transition: border-color .15s;
}
.bp__run svg { width: 10px; height: 10px; fill: #6fe26f; }
.bp__run:hover { border-color: var(--accent); }
.bp__viewport {
  position: relative; flex: 1; min-height: 240px; overflow: hidden;
  background-color: #1b1b1b;
  background-image:
    linear-gradient(rgba(0,0,0,.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.5) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 128px 128px, 128px 128px, 16px 16px, 16px 16px;
}
.bp__graph { position: absolute; left: 0; top: 0; width: 580px; height: 300px; transform-origin: 0 0; }
.bp__wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.bp__wires path { fill: none; stroke-width: 2.2; }
.bp__wires .w-exec { stroke: #f2f2f2; }
.bp__wires .w-string { stroke: #ea52ff; }
.bp.is-running .bp__wires path { stroke-dasharray: 7 6; animation: flow .5s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -13; } }

.node {
  position: absolute; display: block; min-width: 196px; text-align: left;
  background: rgba(14,14,14,.94); border: 1px solid #000; border-radius: 8px;
  box-shadow: 0 8px 22px rgba(0,0,0,.55);
  font-family: var(--sans); font-size: 12px; color: #d6d6d6;
  transition: box-shadow .2s;
}
.node__head {
  display: flex; align-items: center; gap: 7px; padding: 6px 12px;
  border-radius: 7px 7px 0 0; font-weight: 600; color: #fff;
  background: linear-gradient(90deg, var(--hc) 0%, rgba(0,0,0,0) 100%);
}
.node--event { --hc: #962020; }
.node--fn { --hc: #1e5596; }
.node__icon { font-size: 11px; opacity: .9; }
.node__pins { display: flex; justify-content: space-between; gap: 18px; padding: 8px 12px 10px; }
.node .col { display: flex; flex-direction: column; gap: 8px; }
.node .col--out { align-items: flex-end; }
.pin { display: flex; align-items: center; gap: 7px; min-height: 16px; white-space: nowrap; }
.pin > span { flex: none; }
.pin--exec > span { width: 13px; height: 13px; background: #f2f2f2; clip-path: polygon(0 0, 55% 0, 100% 50%, 55% 100%, 0 100%); }
.pin--string > span { width: 10px; height: 10px; border-radius: 50%; background: #ea52ff; box-shadow: 0 0 0 2px rgba(234,82,255,.25); }
.pin em {
  font-style: normal; font-family: var(--mono); font-size: 10.5px; color: #eee;
  background: #0a0a0a; border: 1px solid #333; border-radius: 3px; padding: 1px 6px;
}
.node--send { cursor: pointer; }
.node--send:hover, .node--send:focus-visible { box-shadow: 0 0 0 2px #f7a500, 0 8px 22px rgba(0,0,0,.55); outline: none; }
.node.is-hot { box-shadow: 0 0 0 2px #ffd36b, 0 0 26px rgba(255,200,90,.45); }

/* UE Print String output */
.printstring {
  position: fixed; left: 16px; top: calc(var(--top) + 12px); z-index: 160; pointer-events: none;
  display: flex; flex-direction: column; gap: 2px;
}
.printstring p {
  font-family: 'Segoe UI', Roboto, var(--sans); font-size: 15px; color: #3cb4ff;
  text-shadow: 1px 1px 0 #000; animation: ps 3.4s forwards;
}
@keyframes ps { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- Footer ---------- */
.footer { margin-top: 96px; border-top: 1px solid var(--line); background: var(--panel); }
.footer__inner {
  max-width: var(--max); margin: 0 auto; padding: 20px var(--pad);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
  font-family: var(--mono); font-size: 12px; color: var(--dim);
}
.footer__inner a:hover { color: var(--accent); }

/* ---------- stat fps + console ---------- */
.statfps {
  position: fixed; right: 54px; bottom: 12px; z-index: 150;
  font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--ok);
  background: rgba(0,0,0,.62); border: 1px solid rgba(255,255,255,.08); padding: 5px 8px; border-radius: 3px;
  font-variant-numeric: tabular-nums; pointer-events: none;
}
.statfps__ms { color: var(--dim); margin-left: 6px; }
.statfps.is-hidden { display: none; }
.console-btn {
  position: fixed; right: 12px; bottom: 10px; z-index: 150;
  width: 34px; height: 30px; border-radius: 3px;
  font-family: var(--mono); font-size: 16px; color: var(--muted);
  background: rgba(20,20,22,.9); border: 1px solid var(--line-2);
  transition: color .15s, border-color .15s;
}
.console-btn:hover { color: var(--accent); border-color: var(--accent); }

.console {
  position: fixed; left: 0; right: 0; top: 0; z-index: 250;
  height: min(46vh, 420px); display: flex; flex-direction: column;
  background: rgba(7,7,8,.95); backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--accent);
  font-family: var(--mono); font-size: 13px;
  animation: drop .18s ease-out;
}
.console[hidden] { display: none; }
@keyframes drop { from { transform: translateY(-100%); } }
.console__log { flex: 1; overflow-y: auto; padding: 12px var(--pad); color: #cbc6be; white-space: pre-wrap; line-height: 1.55; }
.console__log .c-cmd { color: var(--text); }
.console__log .c-ok { color: var(--ok); }
.console__log .c-err { color: #ff7b72; }
.console__log .c-dim { color: var(--dim); }
.console__line { display: flex; align-items: center; gap: 10px; padding: 10px var(--pad); border-top: 1px solid var(--line); }
.console__line label { color: var(--accent); }
.console__line input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: none;
  color: var(--text); font: inherit; font-size: 14px; caret-color: var(--accent);
}

/* `viewmode wireframe` */
html.wireframe *:not(.console):not(.console *) {
  outline: 1px solid rgba(255,106,42,.55) !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}
html.wireframe img, html.wireframe canvas { opacity: .08 !important; }
html.wireframe body { background: #050505 !important; }

/* ---------- Project sheet (dialog) ---------- */
.sheet {
  width: min(980px, calc(100vw - 24px)); max-height: calc(100svh - 32px);
  margin: auto; padding: 0; overflow: auto; overscroll-behavior: contain;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.sheet::backdrop { background: rgba(0,0,0,.74); backdrop-filter: blur(4px); }
.sheet[open] { animation: sheetIn .22s cubic-bezier(.2,.8,.2,1); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.sheet__close {
  position: sticky; top: 12px; float: right; margin: 12px 12px -48px 0; z-index: 3;
  width: 36px; height: 36px; display: grid; place-items: center;
  background: rgba(0,0,0,.7); border: 1px solid var(--line-2); border-radius: 3px; font-size: 14px;
}
.sheet__close:hover { border-color: var(--accent); color: var(--accent); }
.sheet__media { aspect-ratio: 21 / 9; max-height: 400px; width: 100%; overflow: hidden; background: #0a0a0b; border-bottom: 1px solid var(--line); }
.sheet__media img { width: 100%; height: 100%; object-fit: cover; }
.sheet__media--diagram { display: grid; place-items: center; padding: 18px; background: #0b0b0c; }
.sheet__media--diagram img { object-fit: contain; filter: invert(1) hue-rotate(180deg) contrast(.92); }
.sheet__media--type {
  display: grid; place-items: center; padding: 20px;
  background: radial-gradient(120% 100% at 20% 0%, #5c1114 0%, #2b080a 45%, #110405 100%);
}
.sheet__media--type span {
  font-family: var(--display); font-weight: 900; text-transform: uppercase; text-align: center;
  font-size: clamp(44px, 9vw, 104px); line-height: .82;
  color: transparent; -webkit-text-stroke: 1.5px rgba(255,130,110,.55);
}
.sheet__media--rpg {
  background-color: #0d100f;
  background-image:
    linear-gradient(rgba(126,231,135,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126,231,135,.08) 1px, transparent 1px);
  background-size: 32px 32px;
}
.sheet__media--rpg span { -webkit-text-stroke-color: rgba(126,231,135,.5); }

.sheet__inner { padding: 24px 30px 32px; }
.sheet__kicker { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.sheet__inner h2 {
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(42px, 6vw, 72px); line-height: .84; margin: 8px 0 22px;
}
.sheet__grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 32px; }
.sheet__main h4 {
  font-family: var(--mono); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em;
  color: var(--dim); margin: 22px 0 8px;
}
.sheet__main h4:first-child { margin-top: 0; }
.sheet__main p, .sheet__main li { font-size: 15.5px; line-height: 1.62; color: var(--muted); }
.sheet__main p + p { margin-top: 10px; }
.sheet__main b, .sheet__main em, .sheet__main i { color: var(--text); }
.sheet__main ul { display: grid; gap: 7px; }
.sheet__main li { position: relative; padding-left: 18px; }
.sheet__main li::before { content: '▸'; position: absolute; left: 0; color: var(--accent); }
.sheet__main code { background: var(--panel-2); color: var(--text); padding: 1px 5px; border-radius: 3px; }
.sheet__main pre {
  margin-top: 4px; padding: 14px 16px; overflow-x: auto;
  background: #0a0a0b; border: 1px solid var(--line); border-radius: var(--r);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.65; color: #ddd8d0;
}
.sheet__main pre code { background: none; padding: 0; font-size: inherit; }
.sheet__main pre .c { color: var(--dim); }
.sheet__main pre .k { color: var(--accent-2); }
.sheet__aside-note { margin-top: 14px; padding: 10px 12px; border-left: 2px solid var(--accent); background: var(--accent-soft); font-size: 14px !important; }

.sheet__aside dl div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.sheet__aside dl div:first-child { padding-top: 0; }
.sheet__aside dt { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); }
.sheet__aside dd { font-size: 14.5px; margin-top: 2px; }
.sheet__label { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); margin: 18px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-family: var(--mono); font-size: 11px; padding: 3px 7px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 2px; }

html.sheet-open { overflow: hidden; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.2,1); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .about { grid-template-columns: 260px minmax(0, 1fr); }
  .loadout { grid-column: 1 / -1; }
}

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero__name { font-size: clamp(72px, 15vw, 156px); }
  .feature { min-height: 440px; }
  .contact { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .card { grid-column: span 6; }
  .card__media { height: 250px; }
  .job__list { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .topnav {
    position: absolute; top: var(--top); left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px var(--pad) 14px;
    background: rgba(12,12,13,.97); border-bottom: 1px solid var(--line);
    display: none;
  }
  .topnav.is-open { display: flex; }
  .topnav a { padding: 12px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
  .topnav a.is-active::after { display: none; }
  .topbar__right { margin-left: auto; }
  .menu-btn { display: block; }
}

@media (max-width: 720px) {
  .section { padding-top: 64px; }
  .section__head { grid-template-columns: auto 1fr; }
  .section__note { display: none; }
  .card { grid-column: 1 / -1; }
  .card__media { height: 230px; }
  .card h3 { font-size: 30px; }
  .gas__bg { font-size: 64px; }
  .job { grid-template-columns: 1fr; gap: 8px; }
  .job__when { flex-direction: row; gap: 10px; padding-top: 0; }
  .job__when::before { display: none; }
  .job__when span + span::before { content: '→ '; }
  .job__banner { height: 170px; }
  .job__banner-text strong { font-size: 40px; }
  .job__banner .btn { top: 14px; bottom: auto; }
  .about { grid-template-columns: 1fr; }
  .about__photo img { min-height: 0; aspect-ratio: 4 / 5; }
  .loadout li { grid-template-columns: 1fr; gap: 0; }
  .sheet__grid { grid-template-columns: 1fr; gap: 20px; }
  .sheet__inner { padding: 20px 18px 26px; }
  .sheet__media { aspect-ratio: 16 / 9; }
  .statfps { display: none; }
}

@media (max-width: 560px) {
  .status { display: none; }
  .hero__meta { grid-template-columns: 1fr 1fr; }
  .hero__meta div:nth-child(3) { padding-left: 0; border-left: 0; }
  .hero__lede { font-size: 16.5px; }
  .feature { min-height: 380px; }
  .feature__caption { padding: 22px 20px 22px; }
  .feature__hud--tl { left: 20px; }
  .feature__hud--tr { right: 20px; }
  .card__media:has(.viz--brain) { height: 270px; }
  .brain__cols { grid-template-columns: 1fr; gap: 6px; }
  .brain__cols > div:first-child { display: none; }
  .viz--brain { padding: 14px 14px 28px; }
  .gas__slots .slot { width: 46px; height: 46px; }
  .langs { grid-template-columns: 1fr 1fr; gap: 10px; }
  .footer__inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .ticker__track { animation: none; }
}
