/* ==========================================================================
   wolfgang-linz.de - concept "Runtime"
   Editorial layout, developer soul: terminal, code, a living glyph field.
   ========================================================================== */

:root {
  --bg: #05080f;
  --bg-2: #0a0f1a;
  --bg-3: #0f1726;
  --panel: rgba(13, 20, 33, 0.82);
  --fg: #e6edf3;
  --fg-2: #b3c0cf;
  --mute: #7b8a9d;
  --accent: #00ff9c;
  --accent-dim: #00c97b;
  --accent-glow: rgba(0, 255, 156, 0.18);
  --cyan: #00d1ff;
  --purple: #b48cff;
  --orange: #ffb454;
  --red: #ff5c57;
  --yellow: #f3f99d;
  --rule: rgba(230, 237, 243, 0.09);
  --rule-accent: rgba(0, 255, 156, 0.18);

  --display: "JetBrains Mono", ui-monospace, monospace;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Geist", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 3.2vw, 48px);
  --ease: cubic-bezier(0.7, 0, 0.2, 1);
}

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

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html.lenis,
html.lenis body {
  height: auto;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  cursor: none;
}

body.is-loading {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  cursor: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
  cursor: none;
}

/* text fields keep the native I-beam so it's obvious you can type */
input,
textarea {
  cursor: text;
  caret-color: var(--accent);
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* Grain + scanlines over everything */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 89;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px);
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.upper {
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.accent { color: var(--accent); }
.c-purple { color: var(--purple); }
.c-cyan { color: var(--cyan); }
.c-orange { color: var(--orange); }
.c-mute { color: var(--mute); }
.c-yellow { color: var(--yellow); }

em.s {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}

.dot--pulse {
  box-shadow: 0 0 0 0 rgba(0, 255, 156, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgba(0, 255, 156, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 255, 156, 0); }
}

.caret {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  background: var(--accent);
  vertical-align: -0.12em;
  animation: blink 1s steps(1) infinite;
  box-shadow: 0 0 18px var(--accent-glow);
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ---------- Cursor ---------------------------------------------------- */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  pointer-events: none;
  mix-blend-mode: difference;
  color: #fff;
}

.cursor__cross {
  position: absolute;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  transition: width 0.35s var(--ease), height 0.35s var(--ease);
}

.cursor__cross::before,
.cursor__cross::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.cursor__cross::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.cursor__cross::after { top: 50%; left: 0; right: 0; height: 1px; }

.cursor__ring {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid currentColor;
  transform: translate(-50%, -50%);
  transition: width 0.4s var(--ease), height 0.4s var(--ease), background 0.3s, border-radius 0.4s;
}

.cursor__coords {
  position: absolute;
  left: 18px;
  top: 14px;
  font-family: var(--mono);
  font-size: 9px;
  white-space: nowrap;
  opacity: 0.8;
}

.cursor.is-hover .cursor__ring {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #fff;
}

.cursor.is-hover .cursor__cross { width: 0; height: 0; }

.cursor__label {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: var(--mono);
  font-size: 10px;
  color: #000;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.cursor.is-hover .cursor__label { opacity: 1; }

@media (hover: none) {
  body, a, button, input, textarea { cursor: auto; }
  .cursor { display: none; }
}

/* ---------- Loader: fake build ---------------------------------------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--bg);
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: var(--gutter);
  font-family: var(--mono);
}

.loader__top,
.loader__bottom {
  display: flex;
  justify-content: space-between;
  color: var(--mute);
  font-size: 12px;
}

.loader__log {
  list-style: none;
  align-self: center;
  font-size: 13px;
  line-height: 2;
  color: var(--fg-2);
}

.loader__log li { opacity: 0; }
.loader__log li b { color: var(--accent); font-weight: 400; margin-right: 10px; }
.loader__log li i { color: var(--mute); font-style: normal; margin-left: 10px; }

.loader__center {
  display: flex;
  align-items: flex-end;
  gap: 0.2em;
}

.loader__num {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(90px, 20vw, 320px);
  line-height: 0.8;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
}

.loader__unit {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(40px, 7vw, 110px);
  line-height: 1;
  color: var(--accent);
  padding-bottom: 0.25em;
}

.loader__bar {
  height: 1px;
  background: var(--rule);
  margin: 1.5rem 0;
  position: relative;
}

.loader__bar span {
  position: absolute;
  inset: 0;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  transform-origin: left;
  transform: scaleX(0);
}

/* ---------- Header ---------------------------------------------------- */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px var(--gutter);
  font-family: var(--mono);
  background: linear-gradient(to bottom, rgba(5, 8, 15, 0.96) 0%, rgba(5, 8, 15, 0.8) 60%, rgba(5, 8, 15, 0));
  backdrop-filter: blur(6px);
  -webkit-mask: linear-gradient(to bottom, #000 70%, transparent);
  mask: linear-gradient(to bottom, #000 70%, transparent);
  padding-bottom: 30px;
}

.brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand .accent { font-weight: 800; }
.brand .c-mute { font-weight: 400; }

.header__status {
  display: flex;
  gap: 18px;
  color: var(--mute);
}

.nav {
  justify-self: end;
  display: flex;
  gap: 26px;
  align-items: center;
  font-size: 12px;
}

.nav a {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  height: 16px;
  line-height: 16px;
  color: var(--fg-2);
}

.nav a::before {
  content: "•";
  color: var(--accent);
  margin-right: 6px;
  opacity: 0.5;
}

.nav a .roll {
  position: relative;
  display: inline-block;
}

.nav a .roll span {
  display: block;
  transition: transform 0.5s var(--ease);
}

.nav a .roll span:last-child {
  position: absolute;
  top: 100%;
  left: 0;
  color: var(--accent);
}

.nav a:hover .roll span { transform: translateY(-100%); }

.kbd {
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 11px;
  color: var(--mute);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.3s, color 0.3s;
}

.kbd:hover {
  border-color: var(--rule-accent);
  color: var(--accent);
}

@media (max-width: 1000px) {
  .header { grid-template-columns: 1fr auto; }
  .header__status,
  .nav a { display: none; }
  .hero__meta span:nth-child(2) { display: none; }
}

/* ---------- Line meter (fixed right) ---------------------------------- */

.meter {
  position: fixed;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  height: 50vh;
  width: 26px;
  color: var(--mute);
  pointer-events: none;
  font-family: var(--mono);
}

.meter__scale {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background-image: repeating-linear-gradient(to bottom, currentColor 0 1px, transparent 1px 8px);
  opacity: 0.45;
}

.meter__fill {
  position: absolute;
  right: 0;
  top: 0;
  width: 1px;
  height: 0;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.meter__marker {
  position: absolute;
  right: 10px;
  top: 0;
  transform: translateY(-100%);
  color: var(--accent);
}

.meter__value {
  display: block;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 10px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.meter__file { display: none; }

@media (max-width: 1000px) {
  .meter { display: none; }
}

/* ---------- Hero ------------------------------------------------------ */

.hero {
  position: relative;
  height: 100svh;
  min-height: 680px;
  overflow: hidden;
  background: radial-gradient(120% 80% at 70% 110%, rgba(0, 255, 156, 0.08), transparent 60%);
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__inner {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 100px var(--gutter) var(--gutter);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto 1fr auto;
  column-gap: 20px;
  pointer-events: none;
}

.hero__inner a,
.hero__inner .term { pointer-events: auto; }

.hero__meta {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  color: var(--mute);
}

.hero__meta b {
  color: var(--accent);
  font-weight: 400;
}

.hero__copy {
  grid-column: 1 / 9;
  grid-row: 3;
  align-self: end;
}

.hero__echo {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--fg-2);
  margin-bottom: 18px;
}

.hero__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(64px, 11.2vw, 208px);
  line-height: 0.86;
  letter-spacing: -0.065em;
  text-shadow: 0 0 60px rgba(0, 255, 156, 0.08);
}

.hero__title .line {
  display: block;
  overflow: hidden;
  /* room for descenders (g) inside the reveal mask, spacing kept via negative margin */
  padding-bottom: 0.22em;
  margin-bottom: -0.18em;
}

.hero__title .line--2 {
  padding-left: 1.1em;
}

.hero__title .char { display: inline-block; }

/* RGB-split glitch from the original site: cyan and red copies flash for a
   split second every 6s, shifted apart and sliced into bands */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  padding: inherit;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.glitch::before {
  color: var(--cyan);
  animation: glitch-a 6s infinite steps(1);
}

.glitch::after {
  color: var(--red);
  animation: glitch-b 6s infinite steps(1);
}

@keyframes glitch-a {
  0%, 93%, 100% { opacity: 0; transform: none; clip-path: none; }
  94% { opacity: 0.8; transform: translate(-0.035em, 0.01em); clip-path: inset(15% 0 60% 0); }
  95% { opacity: 0.8; transform: translate(0.025em, -0.01em); clip-path: inset(60% 0 10% 0); }
  96% { opacity: 0; }
}

@keyframes glitch-b {
  0%, 93%, 100% { opacity: 0; transform: none; clip-path: none; }
  94% { opacity: 0.8; transform: translate(0.035em, -0.01em); clip-path: inset(50% 0 25% 0); }
  95% { opacity: 0.8; transform: translate(-0.025em, 0.02em); clip-path: inset(5% 0 75% 0); }
  96% { opacity: 0; }
}

@media (max-width: 700px) {
  .glitch::before,
  .glitch::after { display: none; }
}

.hero__title .caret {
  width: 0.5em;
  height: 0.78em;
  vertical-align: -0.02em;
  margin-left: 0.08em;
}

.hero__role {
  margin-top: 22px;
  font-family: var(--mono);
  font-size: clamp(16px, 1.6vw, 22px);
  color: var(--accent);
  min-height: 1.5em;
}

.hero__role .c-mute { margin-right: 10px; }

/* Terminal window */

.term {
  grid-column: 9 / 13;
  grid-row: 2 / 4;
  align-self: end;
  justify-self: end;
  /* wide enough for the longest help line (shell ...) without wrapping */
  min-width: calc(63ch + 38px);
  margin-bottom: 8px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 255, 156, 0.04);
  font-family: var(--mono);
  font-size: 13px;
  overflow: hidden;
}

.term__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
  color: var(--mute);
  font-size: 12px;
}

.term__dot {
  width: 12px;
  height: 12px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--red);
  position: relative;
  transition: filter 0.2s, transform 0.2s;
}

.term__dot[data-dot="min"] { background: var(--orange); }
.term__dot[data-dot="max"] { background: #27c93f; margin-right: 10px; }
.term__dot:hover { filter: brightness(1.25); transform: scale(1.15); }

.term__title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.term__badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid var(--rule);
  color: var(--mute);
  opacity: 0;
  transition: opacity 0.4s, color 0.3s, border-color 0.3s;
}

.term.is-interactive .term__badge { opacity: 1; }
.term.is-focused .term__badge { color: var(--accent); border-color: var(--rule-accent); }

.term {
  position: relative;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.term.is-focused {
  border-color: var(--rule-accent);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 255, 156, 0.12), 0 0 60px -10px var(--accent-glow);
}

.term__body {
  padding: 16px 18px 20px;
  height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
  line-height: 1.75;
  cursor: text;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 255, 156, 0.25) transparent;
}

.term__body .ln { white-space: pre-wrap; word-break: break-word; }
.term__body .ln .p { color: var(--accent); }
.term__body .out { color: var(--fg-2); }
.term__body .err { color: var(--red); }
.term__body .p-user { color: var(--accent); }
.term__body .p-sep { color: var(--mute); }
.term__body .p-path { color: var(--cyan); }
.term__body .dir { color: var(--cyan); font-weight: 700; }
.term__body .exe { color: var(--accent); }
.term__body .bin { color: var(--purple); }
.term__body .ls-item { white-space: nowrap; }

/* neofetch */
.term__body .nf {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 4px 0;
  white-space: normal;
}

.term__body .nf__logo {
  width: 86px;
  flex: none;
  margin-top: 6px;
  filter: drop-shadow(0 0 10px rgba(0, 255, 156, 0.35));
}

.term__body .nf__info {
  flex: 1;
  min-width: 0;
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
}

.term__body .nf__rule {
  display: inline-block;
  width: 12ch;
  height: 1px;
  vertical-align: middle;
  background: var(--mute);
}

.term__body .nf__swatches {
  display: inline-flex;
  margin-top: 4px;
}

.term__body .nf__swatches i {
  width: 2ch;
  height: 1em;
}
.term__body .ln.top { white-space: pre; color: var(--fg-2); }
.term__body .top__head { background: var(--accent); color: var(--bg); }

/* block cursor of the input line: blinks when focused, hollow when not */
.term__body .blk {
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}

.term.is-focused .term__body .blk {
  background: var(--accent);
  color: var(--bg);
  outline: 0;
  animation: blink 1s steps(1) infinite;
}

.term.is-busy .ln.prompt { display: none; }

.term__input {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* maximized: the window is moved to <body> and centered */
.term.is-max {
  position: fixed;
  z-index: 96;
  inset: 7vh 8vw;
  margin: 0;
  /* the grid placement uses align-self: end, which would shrink a fixed box to its content */
  align-self: stretch;
  justify-self: stretch;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  opacity: 1 !important;
  transform: none !important;
}

.term.is-max .term__body {
  height: auto;
  flex: 1;
}

.term-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(3, 5, 10, 0.7);
  backdrop-filter: blur(6px);
  animation: fade-in 0.3s ease;
}

@keyframes fade-in { from { opacity: 0; } }

.term__avatar {
  width: 128px;
  height: 128px;
  margin: 6px 0 4px;
  border-radius: 8px;
  border: 1px solid var(--rule-accent);
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 30px var(--accent-glow);
}

.term__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.2) contrast(1.05);
}

.term__avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(0, 255, 156, 0.08) 0 1px, transparent 1px 3px);
  mix-blend-mode: screen;
}

@media (max-width: 1000px) {
  .hero__inner { padding-right: var(--gutter); }
  .hero__copy { grid-column: 1 / -1; }
  .term { display: none; }
}

/* ---------- Ticker ---------------------------------------------------- */

.ticker {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--bg-2);
  overflow: hidden;
  white-space: nowrap;
  padding: 20px 0;
  position: relative;
  z-index: 3;
}

.ticker__track {
  display: inline-flex;
  gap: 44px;
  padding-right: 44px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 3vw, 46px);
  letter-spacing: -0.04em;
  line-height: 1;
}

.ticker__track span {
  display: inline-flex;
  align-items: center;
  gap: 44px;
}

.ticker__track em {
  color: var(--accent);
  font-style: normal;
  font-weight: 400;
  font-size: 0.6em;
}

/* ---------- Section scaffolding -------------------------------------- */

.section {
  position: relative;
  padding: clamp(96px, 14vw, 200px) var(--gutter);
}

.stage {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 20px;
  align-items: end;
  padding-bottom: 22px;
  margin-bottom: clamp(48px, 7vw, 110px);
  border-bottom: 1px solid var(--rule);
}

.stage__num {
  grid-column: 1 / 3;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(44px, 5.4vw, 88px);
  line-height: 0.8;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1px var(--fg-2);
}

.stage__label {
  grid-column: 3 / 7;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--mono);
}

.stage__label span {
  color: var(--mute);
  font-size: 12px;
}

.stage__label b {
  font-weight: 500;
  font-size: 18px;
  color: var(--accent);
}

.stage__graph {
  grid-column: 8 / 13;
  height: 48px;
  width: 100%;
  overflow: visible;
}

.stage__graph .line {
  fill: none;
  stroke: var(--mute);
  stroke-width: 1;
  opacity: 0.45;
}

.stage__graph .branch {
  fill: none;
  stroke: var(--purple);
  stroke-width: 1;
  opacity: 0.5;
}

.stage__graph .done {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
}

.stage__graph circle {
  fill: var(--bg);
  stroke: var(--mute);
  stroke-width: 1.2;
}

.stage__graph circle.is-done {
  fill: var(--accent);
  stroke: var(--accent);
}

.stage__graph text {
  font-family: var(--mono);
  font-size: 9px;
  fill: var(--mute);
}

@media (max-width: 900px) {
  .stage__num { grid-column: 1 / 5; }
  .stage__label { grid-column: 5 / -1; }
  .stage__graph { display: none; }
}

/* ---------- About ----------------------------------------------------- */

.about__statement {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(36px, 5.2vw, 90px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  max-width: 18ch;
  margin-bottom: clamp(64px, 9vw, 140px);
}

.about__statement .word {
  display: inline-block;
  opacity: 0.14;
}

.about__statement em.s {
  font-size: 1.08em;
}

.about__statement code {
  font-family: var(--mono);
  font-size: 0.62em;
  font-weight: 500;
  letter-spacing: -0.02em;
  padding: 0.05em 0.3em;
  border: 1px solid var(--rule-accent);
  border-radius: 0.2em;
  color: var(--accent);
  background: rgba(0, 255, 156, 0.05);
  vertical-align: 0.18em;
}

.about__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 20px;
  row-gap: 70px;
}

.about__copy {
  grid-column: 1 / 6;
  font-size: 18px;
  line-height: 1.65;
  color: var(--fg-2);
  display: flex;
  flex-direction: column;
  gap: 1.2em;
}

.about__copy p:first-child::first-letter {
  font-family: var(--display);
  font-weight: 800;
  float: left;
  font-size: 4.6em;
  line-height: 0.8;
  padding: 0.04em 0.06em 0 0;
  color: var(--accent);
}

/* developer.js editor */

.editor {
  grid-column: 7 / 13;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--bg-2);
  font-family: var(--mono);
  font-size: 15px;
  overflow: hidden;
}

.editor__tabs {
  display: flex;
  border-bottom: 1px solid var(--rule);
  font-size: 12px;
  color: var(--mute);
}

.editor__tabs button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border: 0;
  border-right: 1px solid var(--rule);
  background: none;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mute);
  transition: color 0.25s, background 0.25s, box-shadow 0.25s;
}

.editor__tabs button::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--tab-color, var(--mute));
  opacity: 0.8;
}

.editor__tabs button:hover {
  color: var(--fg-2);
  background: rgba(255, 255, 255, 0.02);
}

.editor__tabs button.is-active {
  color: var(--fg);
  background: var(--bg-3);
  box-shadow: inset 0 -1px 0 var(--accent);
}

.editor__tabs button:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}

.editor__code {
  min-height: 336px;
  padding: 18px 0;
  counter-reset: ln;
}

.editor__code .l {
  display: grid;
  grid-template-columns: 52px 1fr;
  padding: 3px 18px 3px 0;
  transition: background 0.3s;
}

.editor__code .l::before {
  counter-increment: ln;
  content: counter(ln);
  color: #3a4657;
  text-align: right;
  padding-right: 20px;
}

.editor__code .l:hover {
  background: rgba(0, 255, 156, 0.05);
}

.editor__code .l:hover::before { color: var(--accent); }

.editor__code .in { padding-left: 2ch; }

.counters {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
}

.counter {
  padding: 26px 20px 0 0;
  border-right: 1px solid var(--rule);
  margin-right: 20px;
}

.counter:last-child { border-right: 0; }

.counter__num {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(56px, 7vw, 120px);
  line-height: 0.9;
  letter-spacing: -0.07em;
  font-variant-numeric: tabular-nums;
}

.counter__num sup {
  font-size: 0.35em;
  color: var(--accent);
  vertical-align: top;
  margin-left: 4px;
}

.counter .mono {
  color: var(--mute);
  margin-top: 12px;
  display: block;
}

@media (max-width: 900px) {
  .about__copy,
  .editor { grid-column: 1 / -1; }
  .editor { font-size: 13px; }
  .counters { grid-template-columns: repeat(2, 1fr); row-gap: 30px; }
  .counter:nth-child(2) { border-right: 0; }
}

/* ---------- Skills / stack layers ------------------------------------ */

.skills { padding-bottom: 0; }

.skills__intro,
.projects__head {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 20px;
  margin-bottom: 60px;
}

.h2 {
  grid-column: 1 / 9;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(40px, 5.4vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.h2 em.s { font-size: 1.12em; }

.skills__intro p {
  grid-column: 9 / 13;
  align-self: end;
  color: var(--fg-2);
  max-width: 340px;
}

/* the wrapper carries the full-bleed margins; the pinned element must have none */
.strata-wrap {
  margin: 0 calc(var(--gutter) * -1);
}

.strata {
  position: relative;
  height: 100svh;
  overflow: hidden;
  background: #000;
}

.stratum {
  position: absolute;
  inset: 0;
  padding: 110px var(--gutter) var(--gutter);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto 1fr auto;
  column-gap: 20px;
  overflow: hidden;
  border-top: 1px solid var(--rule);
  transform-origin: 50% 0;
  background: var(--bg-2);
  --shade: 0;
}

/* black veil, driven by --shade while the next layer covers this one */
.stratum::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #000;
  opacity: var(--shade);
  pointer-events: none;
}

.stratum:nth-child(2) { background: var(--bg-3); }
.stratum:nth-child(3) {
  background: radial-gradient(90% 70% at 85% 20%, rgba(0, 209, 255, 0.12), transparent 60%), #060b12;
  color: var(--fg);
}
.stratum:nth-child(4) { background: var(--accent); color: var(--bg); }

.stratum:nth-child(3) em.s { color: var(--cyan); }
.stratum:nth-child(4) em.s { color: var(--bg); }

.stratum:nth-child(3) .stratum__head .accent { color: var(--cyan); }
.stratum:nth-child(3) .stratum__tools { border-top-color: rgba(0, 209, 255, 0.35); }
.stratum:nth-child(4) .stratum__head .accent { color: var(--bg); }

.stratum__pattern {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 48%;
  pointer-events: none;
  -webkit-mask: linear-gradient(to left, #000 30%, transparent);
  mask: linear-gradient(to left, #000 30%, transparent);
}

.stratum__head {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  font-family: var(--mono);
  font-size: 12px;
}

.stratum__head > span:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stratum__head .right {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
  opacity: 0.7;
}

.stratum__title {
  grid-column: 1 / 10;
  grid-row: 2;
  align-self: center;
  position: relative;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(56px, 9.4vw, 172px);
  line-height: 0.84;
  letter-spacing: -0.07em;
}

.stratum__title em.s {
  display: block;
  padding-left: 0.8em;
  font-size: 1.1em;
  letter-spacing: -0.02em;
}

.stratum__tools {
  grid-column: 1 / -1;
  grid-row: 3;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid currentColor;
  position: relative;
}

.stratum__tools li {
  list-style: none;
  padding: 16px 12px 4px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 18px;
  font-weight: 500;
}

.stratum__tools li .mono { opacity: 0.55; }

@media (max-width: 900px) {
  .h2,
  .skills__intro p { grid-column: 1 / -1; }
  .skills__intro p { margin-top: 20px; }
  .stratum__title { grid-column: 1 / -1; }
  .stratum__tools { grid-template-columns: repeat(2, 1fr); }
  .stratum__pattern { width: 100%; opacity: 0.3; }
}

/* ---------- Projects -------------------------------------------------- */

.projects {
  background:
    linear-gradient(var(--rule) 1px, transparent 1px) 0 0 / 80px 80px,
    linear-gradient(90deg, var(--rule) 1px, transparent 1px) 0 0 / 80px 80px,
    #070b14;
  padding-bottom: 0;
}

.projects__head .hint {
  grid-column: 10 / 13;
  align-self: end;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--mute);
}

/* the wrapper carries the full-bleed margins; the pinned element must have none */
.hscroll-wrap {
  margin: 0 calc(var(--gutter) * -1);
}

.hscroll {
  position: relative;
  height: 100svh;
  overflow: hidden;
}

.hscroll__track {
  display: flex;
  gap: 3vw;
  height: 100%;
  align-items: center;
  padding: 0 var(--gutter);
  will-change: transform;
}

.feat {
  flex: none;
  width: min(78vw, 1180px);
  height: min(74svh, 700px);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
}

.feat__art {
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--rule);
  background: #04070d;
}

.feat__art svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.feat__art .tag-corner {
  position: absolute;
  left: 16px;
  top: 14px;
  z-index: 2;
  color: var(--mute);
}

.feat__body {
  padding: clamp(20px, 3vw, 44px);
  display: flex;
  flex-direction: column;
}

.feat__top {
  display: flex;
  justify-content: space-between;
  color: var(--mute);
}

.feat__shot {
  flex: 1 1 0;
  min-height: 0;
  margin: 24px 0;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  background: #0a0f1a;
}

.feat__shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

.feat__name {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(48px, 5.6vw, 104px);
  line-height: 0.86;
  letter-spacing: -0.07em;
}

.feat__desc {
  margin-top: 22px;
  color: var(--fg-2);
  max-width: 40ch;
  font-size: 16px;
}

.feat__foot {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tags span {
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 9px;
  border: 1px solid var(--rule-accent);
  border-radius: 6px;
  color: var(--accent-dim);
}

.visit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
}

.visit svg {
  width: 14px;
  height: 14px;
  transition: transform 0.4s var(--ease);
}

.visit:hover { color: var(--accent); }
.visit:hover svg { transform: rotate(45deg); }

.feat--end {
  width: min(40vw, 520px);
  grid-template-columns: 1fr;
  background: transparent;
  border-style: dashed;
  place-items: center;
  text-align: center;
}

.feat__down {
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  vertical-align: -0.05em;
  color: var(--accent);
  animation: nudge 1.6s var(--ease) infinite;
}

@keyframes nudge {
  50% { transform: translateY(0.15em); }
}

.feat--end p {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(32px, 3.4vw, 56px);
  line-height: 1;
  letter-spacing: -0.06em;
}

@media (max-width: 900px) {
  .projects__head .hint { display: none; }
  .hscroll { height: auto; overflow: visible; }
  .hscroll__track {
    flex-direction: column;
    height: auto;
    gap: 20px;
    transform: none !important;
  }
  .feat,
  .feat--end {
    width: 100%;
    height: auto;
    grid-template-columns: 1fr;
  }
  .feat__art { aspect-ratio: 4 / 3; border-right: 0; border-bottom: 1px solid var(--rule); }
  .feat__shot { flex: none; aspect-ratio: 16 / 9; }
}

/* Index list */

.index {
  padding: clamp(80px, 10vw, 160px) 0 clamp(96px, 12vw, 180px);
}

.index__bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--fg);
}

.index__bar h3 {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(20px, 2vw, 28px);
}

.filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filters button {
  background: none;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-2);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.filters button sup { opacity: 0.5; margin-left: 3px; }
.filters button:hover { border-color: var(--rule-accent); color: var(--accent); }

.filters button.is-active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.row {
  display: grid;
  grid-template-columns: 60px 1.1fr 1.4fr 180px 40px;
  gap: 20px;
  align-items: center;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}

.row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.55s var(--ease);
  z-index: 0;
}

.row > * {
  position: relative;
  z-index: 1;
  transition: color 0.4s var(--ease), transform 0.55s var(--ease), border-color 0.4s;
}

.row:hover::before { transform: scaleY(1); }
.row:hover > *,
.row:hover .tags span { color: var(--bg); border-color: rgba(5, 8, 15, 0.3); }
.row:hover .row__name { transform: translateX(18px); }

.row__num { color: var(--mute); }

.row__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 2.8vw, 46px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.row__desc {
  color: var(--fg-2);
  font-size: 15px;
  max-width: 50ch;
}

.row__arrow {
  width: 22px;
  height: 22px;
  justify-self: end;
}

.row:hover .row__arrow { transform: rotate(-45deg); }
.row.is-hidden { display: none; }

@media (max-width: 900px) {
  .row { grid-template-columns: 36px 1fr 24px; }
  .row__desc,
  .row .tags { display: none; }
}

/* Floating screenshot preview */
.preview {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 45;
  width: 380px;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  background: var(--bg-2);
  border: 1px solid var(--rule-accent);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.9), 0 0 40px var(--accent-glow);
}

.preview__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--mute);
}

.preview__bar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rule);
}

.preview__bar span {
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  flex: 1;
}

.preview img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  background: var(--bg-3);
}

/* ---------- Contact --------------------------------------------------- */

.contact { overflow: hidden; }

.summit {
  margin-bottom: clamp(60px, 8vw, 120px);
}

.summit__flag {
  font-family: var(--mono);
  font-size: 15px;
  margin-bottom: 26px;
  color: var(--fg-2);
}

.summit__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(60px, 11vw, 204px);
  line-height: 0.86;
  letter-spacing: -0.07em;
}

.summit__title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.22em;
  margin-bottom: -0.17em;
}

.summit__title .line > span { display: inline-block; }
.summit__title .line--2 { padding-left: 1.2em; }
.summit__title em.s { font-size: 1.1em; letter-spacing: -0.02em; }

.contact__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 20px;
  row-gap: 60px;
}

.madlib {
  grid-column: 1 / 9;
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(26px, 3vw, 48px);
  line-height: 1.4;
  letter-spacing: -0.035em;
  color: var(--fg-2);
}

.madlib label {
  position: relative;
  display: inline-block;
}

.madlib input,
.madlib textarea {
  font-family: var(--mono);
  font-size: 0.8em;
  letter-spacing: -0.02em;
  background: none;
  border: 0;
  border-bottom: 1px dashed var(--mute);
  outline: 0;
  padding: 0 4px;
  color: var(--accent);
  width: 8em;
  transition: border-color 0.3s;
}

.madlib input.wide { width: 11em; }

.madlib textarea {
  display: block;
  width: 100%;
  resize: none;
  height: 2.8em;
  margin-top: 0.3em;
}

.madlib input::placeholder,
.madlib textarea::placeholder { color: #3a4657; }

.madlib input:focus,
.madlib textarea:focus {
  border-bottom: 1px solid var(--accent);
}

.madlib__submit {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.magnetic {
  position: relative;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  box-shadow: 0 0 60px var(--accent-glow);
}

.magnetic::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--fg);
  border-radius: 50%;
  transform: translateY(101%);
  transition: transform 0.6s var(--ease);
}

.magnetic:hover::before { transform: translateY(0); }
.magnetic span { position: relative; }

.madlib__submit .mono {
  color: var(--mute);
  max-width: 240px;
  line-height: 1.7;
  letter-spacing: 0;
}

.elsewhere {
  grid-column: 10 / 13;
  align-self: end;
}

.elsewhere h4 {
  font-weight: 400;
  color: var(--mute);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--fg);
}

.elsewhere a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.05em;
  line-height: 1;
  transition: padding 0.4s var(--ease), color 0.3s;
}

.elsewhere a:hover {
  padding-left: 12px;
  color: var(--accent);
}

.elsewhere a svg {
  width: 18px;
  height: 18px;
  transition: transform 0.4s var(--ease);
}

.elsewhere a:hover svg { transform: rotate(-45deg); }

@media (max-width: 900px) {
  .madlib,
  .elsewhere { grid-column: 1 / -1; }
  .magnetic { width: 130px; height: 130px; }
}

/* ---------- Footer ---------------------------------------------------- */

.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--rule);
  padding: 48px var(--gutter) 0;
  overflow: hidden;
  position: relative;
}

.footer__top {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
}

.footer__top div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer__top .mono:first-child {
  color: var(--mute);
  margin-bottom: 6px;
}

.footer__top a:hover { color: var(--accent); }

.footer__giant {
  font-family: var(--display);
  font-weight: 800;
  font-size: 29vw;
  line-height: 0.8;
  letter-spacing: -0.09em;
  white-space: nowrap;
  margin: 30px 0 0 -0.05em;
  display: flex;
  justify-content: center;
}

.footer__giant span { display: inline-block; }
.footer__giant .accent { text-shadow: 0 0 80px rgba(0, 255, 156, 0.35); }
.footer__giant .c-mute { color: #2a3444; }

.statusbar {
  margin: 30px calc(var(--gutter) * -1) 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 7px var(--gutter);
  background: #04070d;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--mute);
  flex-wrap: wrap;
}

.statusbar > div {
  display: flex;
  gap: 18px;
  align-items: center;
}

.statusbar .branch {
  color: var(--bg);
  background: var(--accent);
  padding: 1px 8px;
  margin-left: -8px;
}

@media (max-width: 900px) {
  .footer__top { grid-template-columns: repeat(2, 1fr); row-gap: 30px; }
}

/* ---------- Command palette ------------------------------------------ */

.palette {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: start center;
  padding-top: 16vh;
  background: rgba(3, 5, 10, 0.6);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.palette.is-open {
  opacity: 1;
  visibility: visible;
}

.palette__box {
  width: min(620px, calc(100vw - 32px));
  background: var(--bg-2);
  border: 1px solid var(--rule-accent);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.9), 0 0 60px var(--accent-glow);
  font-family: var(--mono);
  transform: translateY(-10px) scale(0.98);
  transition: transform 0.35s var(--ease);
}

.palette.is-open .palette__box { transform: none; }

.palette__input {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--rule);
  color: var(--accent);
}

.palette__input input {
  flex: 1;
  background: none;
  border: 0;
  outline: 0;
  font-family: var(--mono);
  font-size: 16px;
  color: var(--fg);
}

.palette__list {
  list-style: none;
  max-height: 50vh;
  overflow: auto;
  padding: 6px;
}

.palette__list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--fg-2);
}

.palette__list li span:last-child { color: var(--mute); font-size: 11px; }

.palette__list li.is-active {
  background: rgba(0, 255, 156, 0.08);
  color: var(--accent);
}

.palette__foot {
  display: flex;
  gap: 16px;
  padding: 10px 18px;
  border-top: 1px solid var(--rule);
  font-size: 11px;
  color: var(--mute);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- reboot / shutdown: CRT power-off ------------------------- */

.crt {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  cursor: default;
}

.crt__beam {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, #fff 0%, #dffff0 35%, rgba(0, 255, 156, 0.6) 70%, transparent 100%);
  box-shadow: 0 0 60px 20px rgba(0, 255, 156, 0.5);
  transform-origin: center;
  mix-blend-mode: screen;
}

.crt__hint {
  position: relative;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mute);
  animation: blink 1.6s steps(1) infinite;
}


/* ---------- language switch (header) ---------------------------------- */

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--mute);
  transition: border-color 0.3s;
}

.lang-switch:hover { border-color: var(--rule-accent); }
.lang-switch [data-lang] { transition: color 0.25s; }
.lang-switch [data-lang].is-active { color: var(--accent); font-weight: 700; }
.lang-switch__sep { opacity: 0.4; }


/* the header gets tight with the language switch: drop the status block first */
@media (max-width: 1280px) {
  .header__status { display: none; }
}

/* Contact form honeypot: off-screen, invisible to humans */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Nexa One: work in progress, not clickable ------------------ */

.feat--wip .feat__art { filter: saturate(0.55); }

.visit--wip {
  color: var(--mute);
  cursor: default;
  padding: 6px 12px;
  border: 1px dashed var(--rule-accent);
  border-radius: 999px;
}

.wip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: wip 1.4s ease-in-out infinite;
}

@keyframes wip {
  50% { opacity: 0.25; transform: scale(0.7); }
}

.feat__shot--wide img { object-position: center; }

/* ---------- ReAL Assistent: screenshots as a git log -------------------- */

.asst__head {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 20px;
  row-gap: 28px;
  margin-bottom: clamp(40px, 6vw, 90px);
}

.asst__head .h2 { grid-column: 1 / 9; }

.asst__intro {
  grid-column: 9 / 13;
  align-self: end;
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: var(--fg-2);
}

.asst__note { font-size: 11px; color: var(--mute); }

.asst__pin {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(300px, 5fr) 7fr;
  gap: clamp(28px, 4.5vw, 84px);
  align-items: center;
}

.asst__cmdhead {
  font-size: 12px;
  color: var(--fg-2);
  margin-bottom: 26px;
}

.asst__log { list-style: none; margin: 0; padding: 0; }

.asst__log li { position: relative; }

/* the rail: one segment per commit, green up to the one that is checked out */
.asst__log li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 20px;
  bottom: -4px;
  width: 1px;
  background: var(--rule);
  transition: background 0.5s var(--ease);
}

.asst__log li.is-past::before { background: var(--accent); }

.asst__row {
  all: unset;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 14px auto 1fr;
  column-gap: 14px;
  align-items: center;
  width: 100%;
  padding: 7px 0;
  cursor: pointer;
  color: var(--mute);
  transition: color 0.3s;
}

.asst__row:hover { color: var(--fg); }
.asst__row:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
.is-active .asst__row { color: var(--fg); }

.asst__node {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid var(--mute);
  background: var(--bg);
  position: relative;
  z-index: 1;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.4s;
}

.is-past .asst__node { border-color: var(--accent); }

.is-active .asst__node {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 5px rgba(0, 255, 156, 0.14), 0 0 18px rgba(0, 255, 156, 0.6);
}

.asst__hash { font-size: 11px; color: var(--accent-dim); }
.is-active .asst__hash { color: var(--accent); }

.asst__msg {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(15px, 1.35vw, 20px);
  letter-spacing: -0.03em;
}

.asst__descwrap {
  grid-column: 3;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--ease);
}

.is-active .asst__descwrap { grid-template-rows: 1fr; }

.asst__desc {
  overflow: hidden;
  min-height: 0;
  font-family: var(--sans, inherit);
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 44ch;
  opacity: 0;
  transition: opacity 0.4s;
}

.is-active .asst__desc { opacity: 1; padding: 4px 0 10px; transition-delay: 0.15s; }

.asst__hint { margin-top: 26px; font-size: 11px; color: var(--mute); }
.asst__hint-m { display: none; }

/* the window the screens are checked out into */
.asst__win {
  width: 100%;
  max-width: calc((100svh - 190px) * 1.5);
  justify-self: center;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--bg-2);
  overflow: hidden;
  box-shadow: 0 50px 140px -40px rgba(0, 255, 156, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.asst__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.02);
}

.asst__bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a3444; }
.asst__bar i:first-child { background: #ff5f57; }
.asst__bar i:nth-child(2) { background: #febc2e; }
.asst__bar i:nth-child(3) { background: #28c840; }

.asst__bartitle {
  margin-left: 10px;
  font-size: 11px;
  color: var(--mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asst__idx { margin-left: auto; font-size: 11px; color: var(--accent-dim); }

.asst__screen {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}

.asst__screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.asst__scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 26px 7px rgba(0, 255, 156, 0.55);
  opacity: 0;
  z-index: 9999;
  pointer-events: none;
}

.asst__fig {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 9998;
  padding: 5px 10px;
  font-size: 11px;
  color: var(--accent);
  background: rgba(5, 8, 15, 0.82);
  border: 1px solid var(--rule-accent);
  border-radius: 6px;
  backdrop-filter: blur(6px);
  pointer-events: none;
}

.asst__cmd {
  padding: 11px 14px;
  font-size: 12px;
  color: var(--fg-2);
  border-top: 1px solid var(--rule);
  white-space: nowrap;
  overflow: hidden;
}

.asst__caret {
  display: inline-block;
  width: 7px;
  height: 1em;
  margin-left: 3px;
  vertical-align: -0.15em;
  background: var(--accent);
  animation: caret 1s steps(1) infinite;
}

@keyframes caret { 50% { opacity: 0; } }

@media (max-width: 900px) {
  .asst__head .h2,
  .asst__intro { grid-column: 1 / -1; }
  .asst__pin { grid-template-columns: 1fr; min-height: 0; }
  .asst__win { order: -1; max-width: none; }
  .asst__hint-d { display: none; }
  .asst__hint-m { display: inline; }
  .asst__desc { max-width: none; }
}

/* Mac window buttons on the project screenshots */
.feat__shot {
  display: flex;
  flex-direction: column;
}

.feat__shot::before {
  content: "";
  flex: none;
  height: 26px;
  border-bottom: 1px solid var(--rule);
  background:
    radial-gradient(circle at 16px 13px, #ff5f57 4.5px, transparent 5px),
    radial-gradient(circle at 32px 13px, #febc2e 4.5px, transparent 5px),
    radial-gradient(circle at 48px 13px, #28c840 4.5px, transparent 5px),
    rgba(255, 255, 255, 0.03);
}

.feat__shot img {
  flex: 1 1 0;
  min-height: 0;
}
