@font-face {
  font-family: 'LU Dot Matrix';
  src: url('fonts/lu-medium.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

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

:root {
  --bg:        #07090F;
  --bg2:       #0C1018;
  --border:    rgba(255,255,255,0.08);
  --border-hi: rgba(255,255,255,0.16);
  --fg:        #F0F2F7;
  --muted:     #6B7280;
  --accent:    #CBFF47;
  --accent2:   #a8e800;
  --label-w:   48px;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --font-sans: 'IBM Plex Sans', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 56px;
  overflow-x: hidden;
}

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


/* ── 12-COL GRID OVERLAY ─────────────────────────────────── */
.grid-overlay {
  position: fixed;
  top: 0;
  left: calc(50% + 24px);
  transform: translateX(-50%);
  width: min(1600px, calc(100vw - 144px));
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}

.grid-overlay b {
  display: block;
  border-right: 1px solid rgba(255,255,255,0.095);
}

.grid-overlay b:first-child {
  border-left: 1px solid rgba(255,255,255,0.095);
}

/* ── NAV ──────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 32px 0 64px;
  height: 56px;
  border-bottom: 1px solid var(--border);
  background: rgba(7,9,15,0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav__left {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.nav__cta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  padding: 7px 16px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 100px;
  transition: border-color 0.15s, background 0.15s;
}
.nav__cta:hover {
  border-color: var(--fg);
  background: rgba(255,255,255,0.05);
}

.nav__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
}

.nav__logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: brightness(1);
  transition: filter 0.2s;
}
.nav__logo:hover .nav__logo-img { filter: brightness(1.2); }

.nav__logo-name {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--fg);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.15s;
}
.nav__link:hover { color: var(--fg); }

/* ── BURGER MENU ────────────────────────────────────────── */
.nav__burger {
  display: none;
  position: fixed;
  right: 16px; top: 8px;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  background: none; border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  font-size: 20px;
  cursor: pointer;
  z-index: 110;
  transition: background 0.2s, border-color 0.2s;
}
.nav__burger:hover { background: rgba(255,255,255,0.05); }
.nav__burger.is-open {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.nav-overlay.is-open {
  pointer-events: all;
  opacity: 1;
}
.nav-overlay__bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: saturate(0) brightness(0.35);
  -webkit-backdrop-filter: saturate(0) brightness(0.35);
}
.nav-overlay__body {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 24px;
}
.nav-overlay__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}
.nav-overlay__link {
  font-family: var(--font-mono);
  font-size: clamp(24px, 5vw, 40px);
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.nav-overlay__link:hover { color: var(--accent); }
.nav-overlay__cta {
  margin-top: 16px;
  padding: 12px 32px;
  border: 1px solid var(--accent);
  border-radius: 100px;
  color: var(--accent);
  font-size: clamp(16px, 3vw, 24px);
}
.nav-overlay__cta:hover {
  background: var(--accent);
  color: var(--bg) !important;
}

/* ── TICKER ───────────────────────────────────────────── */
.ticker-wrap {
  position: relative;
  z-index: 10;
  width: 100%;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  height: 28px;
  display: flex;
  align-items: center;
}

.ticker {
  display: flex;
  gap: 0;
  white-space: nowrap;
  animation: ticker-scroll 28s linear infinite;
  will-change: transform;
}

.ticker span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding: 0 20px;
}
.ticker-sep {
  color: var(--accent) !important;
  padding: 0 4px !important;
  font-size: 8px !important;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── SECTION SHELL ────────────────────────────────────── */
.section {
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 100svh;
  border-top: 1px solid var(--border);
  z-index: 1;
  width: 100%;
  background: transparent;
}

.footer {
  position: relative;
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--border);
  z-index: 2;
  width: 100%;
  background: var(--bg2);
}


.section__label {
  flex: 0 0 48px;
  width: 48px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-top: 68px;
  padding-right: 12px;
  border-right: 1px solid var(--border);
}

/* ── SECTION INNER WRAPPER ─────────────────────────────── */
.section__inner {
  flex: 1;
  align-self: stretch;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

/* ── HATCH COLUMNS (inside section__inner) ─────────────── */
.section__hatch {
  flex: 0 0 48px;
  width: 48px;
  align-self: stretch;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0, transparent 4px,
    rgba(255,255,255,0.028) 4px, rgba(255,255,255,0.028) 5px
  );
}

/* ── EXPERTISE — nowy układ ────────────────────────────── */
#expertise {
  min-height: 100svh;
  height: auto;
}
#expertise .section__label {
  flex: 0 0 48px;
  min-width: 48px;
}
#expertise .section__body {
  flex: 0 1 1600px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

#expertise .section-sub {
  margin-bottom: 0;
  padding-top: 32px;
  font-size: 14px;
}
#expertise .services__grid {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 0;
}
#expertise .service-card {
  padding: 36px 32px 40px;
}

.section__label span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  transition: color 0.4s ease;
}

/* ── SECTION LABEL ACTIVE ────────────────────────────────── */
.section.is-active .section__label span,
.footer.is-active .section__label span {
  font-weight: 600;
}
#expertise.is-active  .section__label span { color: #ff4040; }
#work.is-active       .section__label span { color: #40ff80; }
#experience.is-active .section__label span { color: #ff4040; }
#blog.is-active       .section__label span { color: #40ff80; }
#contact.is-active    .section__label span { color: #4080ff; }
.footer.is-active     .section__label span { color: #ff4040; }

.section__divider {
  width: 1px;
  background: var(--border);
  flex-shrink: 0;
}

.section__body {
  flex: 0 1 1600px;
  padding: 100px 0;
  min-width: 0;
}

#hero .section__body {
  flex: 1;
  padding: 0;
}


/* ── HERO ─────────────────────────────────────────────── */
.hero-section { min-height: 100svh; }

.hero-section .section__label {
  background-image: none;
}

.hero-section::after {
  display: none;
}

.hero__body {
  position: relative;
  padding: 0;
  overflow: hidden;
}

#canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* SCANLINES */
.scanlines {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.08) 3px,
    rgba(0,0,0,0.08) 4px
  );
  animation: scan-drift 8s linear infinite;
}

@keyframes scan-drift {
  0%   { background-position: 0 0; }
  100% { background-position: 0 80px; }
}

/* CORNER BRACKETS */
.corner {
  position: absolute;
  z-index: 4;
  width: 24px;
  height: 24px;
  pointer-events: none;
}
.corner--tl { top: 20px; left: 20px; border-top: 1px solid var(--border-hi); border-left: 1px solid var(--border-hi); }
.corner--tr { top: 20px; right: 20px; border-top: 1px solid var(--border-hi); border-right: 1px solid var(--border-hi); }
.corner--bl { bottom: 20px; left: 20px; border-bottom: 1px solid var(--border-hi); border-left: 1px solid var(--border-hi); }
.corner--br { bottom: 20px; right: 20px; border-bottom: 1px solid var(--border-hi); border-right: 1px solid var(--border-hi); }

/* HUD LABELS */
.hud {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.hud--tl { top: 24px; left: 52px; }
.hud--tr { top: 24px; right: 24px; }

.hud-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.22);
}

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

@keyframes blink-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

/* LOADER */
.loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg);
  z-index: 5;
  transition: opacity 0.6s ease;
}
.loader.is-hidden { opacity: 0; pointer-events: none; }

.loader__spinner {
  width: 28px; height: 28px;
  border: 1px solid rgba(255,255,255,0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.loader__text {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

@keyframes spin { to { transform: rotate(360deg); } }

.blink { animation: blink 1s step-end infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* HERO TEXT */
.hero__text {
  position: absolute;
  bottom: 80px;
  left: 64px;
  z-index: 3;
  pointer-events: none;
  max-width: 850px;
}
.hero__text .btn,
.hero__text canvas { pointer-events: all; }

.hero__name {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 400;
  color: var(--fg);
  margin-bottom: 14px;
  white-space: nowrap;
}

.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 20px;
}

.hero__title {
  font-family: var(--font-sans);
  font-size: clamp(64px, 8vw, 120px);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.035em;
  color: var(--fg);
  margin-bottom: 20px;
}

.hero__title em {
  font-style: italic;
  font-weight: 300;
  color: rgba(240,242,247,0.45);
  display: block;
}

.hero__desc {
  font-size: 14px;
  color: var(--fg);
  line-height: 1.7;
  margin-bottom: 32px;
  font-family: var(--font-mono);
}

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

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 3px;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
  background: none;
}
.btn--outline {
  border: 1px solid var(--border-hi);
  color: var(--fg);
}
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }
.btn--ghost { color: var(--muted); }
.btn--ghost:hover { color: var(--fg); }
.btn--accent {
  border: 1px solid var(--accent);
  color: var(--accent);
}
.btn--accent:hover {
  background: var(--accent);
  color: var(--bg);
}

.hero__meta {
  position: absolute;
  bottom: 80px;
  right: 40px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: right;
}
.hero__meta-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 600;
  color: var(--fg);
  line-height: 1;
}
.hero__meta-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 5px;
}

/* ── GLITCH ───────────────────────────────────────────── */
.glitch, .glitch-em {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after,
.glitch-em::before,
.glitch-em::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
}

.glitch.is-glitching::before,
.glitch-em.is-glitching::before {
  opacity: 1;
  color: #ff2d6b;
  clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
  transform: translateX(-3px);
  animation: glitch-a 0.18s steps(2) forwards;
}
.glitch.is-glitching::after,
.glitch-em.is-glitching::after {
  opacity: 1;
  color: #CBFF47;
  clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
  transform: translateX(3px);
  animation: glitch-b 0.18s steps(2) forwards;
}

@keyframes glitch-a {
  0%   { clip-path: polygon(0 15%, 100% 15%, 100% 35%, 0 35%); transform: translateX(-4px); }
  50%  { clip-path: polygon(0 55%, 100% 55%, 100% 65%, 0 65%); transform: translateX(2px); }
  100% { clip-path: polygon(0 80%, 100% 80%, 100% 95%, 0 95%); transform: translateX(-2px); opacity: 0; }
}
@keyframes glitch-b {
  0%   { clip-path: polygon(0 45%, 100% 45%, 100% 60%, 0 60%); transform: translateX(4px); }
  50%  { clip-path: polygon(0 10%, 100% 10%, 100% 25%, 0 25%); transform: translateX(-2px); }
  100% { clip-path: polygon(0 70%, 100% 70%, 100% 85%, 0 85%); transform: translateX(2px); opacity: 0; }
}

/* dot matrix — disabled, will be replaced with proper implementation */

/* ── SECTION EYEBROW ────────────────────────────────────── */
.section__eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

/* ── MARQUEE DIVIDER ──────────────────────────────────── */
.marquee-divider {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  background: var(--bg2);
}

.marquee-track {
  display: flex;
  white-space: nowrap;
  animation: marquee 20s linear infinite;
  width: max-content;
}

.marquee-track span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
  padding: 0 16px;
}
.msep {
  color: var(--accent2) !important;
  font-size: 9px !important;
  padding: 0 6px !important;
}

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── SECTION TITLES ───────────────────────────────────── */
.section-title {
  font-size: clamp(36px, 4.5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 14px;
  color: var(--fg);
}

.reveal-title {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-title.is-revealed { opacity: 1; transform: none; }

/* dot-title: text + dots canvas side by side on desktop */
.dot-title {
  display: flex;
  align-items: center;
  gap: 0.25em;
}

.section-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 48px;
}

/* ── SERVICES ─────────────────────────────────────────── */
.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 40px;
}

.service-card {
  background: var(--bg);
  padding: 36px 32px 40px;
  opacity: 0;
  transform: translateY(16px);
  transition: background 0.2s, opacity 0.5s ease, transform 0.5s ease;
}
.service-card.is-revealed { opacity: 1; transform: none; }
.service-card:nth-child(2) { transition-delay: 0.08s; }
.service-card:nth-child(3) { transition-delay: 0.16s; }
.service-card:nth-child(4) { transition-delay: 0.24s; }
.service-card:hover { background: var(--bg2); }

.service-card__num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}
.service-card__title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  color: var(--fg);
}
.service-card__desc {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}

.service-card__visual {
  margin: -36px -32px 32px 0;
  height: 260px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--fg);
}
.service-card__visual svg,
.ascii-canvas {
  width: 100%;
  height: 100%;
}

.ascii-canvas {
  display: block;
  color: var(--fg);
  user-select: none;
  cursor: default;
  pointer-events: none;
}

/* ── WORK ─────────────────────────────────────────────── */
.work__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 20px;
}

.work__tabs { display: flex; gap: 2px; }

.tab {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 15px;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.tab:hover { border-color: var(--border-hi); color: var(--fg); }
.tab.is-active { background: var(--fg); border-color: var(--fg); color: var(--bg); }

.work__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

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

.blog__grid {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1100px) {
  .blog__grid { grid-template-columns: repeat(2, 1fr); }
}

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

.blog__more-card {
  background: var(--bg2);
  transition: background 0.15s, opacity 0.5s ease, transform 0.5s ease;
  opacity: 0;
  transform: translateY(16px);
  display: flex;
}

.blog__more-card.is-revealed { opacity: 1; transform: none; }

.blog__more-card:hover {
  background: var(--bg);
}

.blog__more-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
  padding: 32px 24px;
}

.blog__more-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.blog__more-eyebrow {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.blog__more-cta {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  transition: opacity 0.15s;
}

.blog__more-card:hover .blog__more-cta {
  opacity: 0.7;
}

.blog__more-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}

.project-card {
  background: var(--bg);
  transition: background 0.15s, opacity 0.5s ease, transform 0.5s ease;
  opacity: 0;
  transform: translateY(16px);
}
.project-card.is-revealed { opacity: 1; transform: none; }
.project-card:nth-child(2) { transition-delay: 0.1s; }
.project-card:nth-child(3) { transition-delay: 0.2s; }
.project-card:hover { background: var(--bg2); }

.project-card__img { aspect-ratio: 3/2; overflow: hidden; position: relative; }

.project-card__placeholder {
  width: 100%; height: 100%;
  position: relative;
}
.project-card__placeholder--lighthouse {
  background: linear-gradient(135deg, #060810 0%, #0d1530 40%, #12082a 100%);
}
.project-card__placeholder--lighthouse::after {
  content: 'RGB LIGHTHOUSE';
  position: absolute;
  bottom: 10px; left: 14px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: rgba(79,110,247,0.5);
}
.project-card__placeholder--game       { background: linear-gradient(135deg, #060810 0%, #0b1f0d 100%); }
.project-card__placeholder--env        { background: linear-gradient(135deg, #060810 0%, #1a0b20 100%); }
.project-card__placeholder--blockchain { background: linear-gradient(135deg, #060810 0%, #0a1528 50%, #0e1040 100%); }
.project-card__placeholder--backend    { background: linear-gradient(135deg, #060810 0%, #0d1a14 50%, #071a20 100%); }

.dither-canvas { z-index: 1; }
.card-chip { z-index: 2; position: relative; }

/* card chip badge */
.card-chip {
  position: absolute;
  top: 12px; right: 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  padding: 3px 8px;
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.35);
  color: #22c55e;
  animation: chip-pulse 2s ease-in-out infinite;
}
.card-chip--wip {
  background: rgba(79,110,247,0.12);
  border-color: rgba(79,110,247,0.3);
  color: var(--accent);
  animation: none;
}
.card-chip--oss {
  background: rgba(251,191,36,0.12);
  border-color: rgba(251,191,36,0.3);
  color: #fbbf24;
  animation: none;
}

@keyframes chip-pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

.project-card__body { padding: 28px 32px 34px; }

.project-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.project-card__num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 600;
}
.project-card__msep {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--border-hi);
}
.project-card__tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.project-card__year {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  flex-shrink: 0;
}
.project-card__title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
  color: var(--fg);
  line-height: 1.2;
}
.project-card__desc {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 18px;
}
.project-card__link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: opacity 0.15s;
}
.project-card__link:hover { opacity: 0.7; }
.project-card__wip {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border: 1px solid var(--border);
  display: inline-block;
}

/* ── EXPERTISE TOOLS SUB-SECTION ─────────────────────── */
.expertise__tools {
  border-top: 1px solid var(--border);
  padding-top: 56px;
  margin-top: 56px;
}
.expertise__tools-title {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
  margin-bottom: 10px;
}
.expertise__tools-desc {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 560px;
}

/* ── STACK ────────────────────────────────────────────── */
.stack__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 36px;
}

.stack__group {
  background: var(--bg);
  padding: 32px 28px 36px;
  opacity: 0;
  transform: translateY(12px);
  transition: background 0.2s, opacity 0.5s ease, transform 0.5s ease;
}
.stack__group.is-revealed { opacity: 1; transform: none; }
.stack__group:nth-child(2) { transition-delay: 0.07s; }
.stack__group:nth-child(3) { transition-delay: 0.14s; }
.stack__group:nth-child(4) { transition-delay: 0.21s; }
.stack__group:hover { background: var(--bg2); }

.stack__group-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.stack__list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.stack__list li {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.15s;
}
.stack__list li .tech-logo {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  image-rendering: pixelated;
}
.stack__group:hover .stack__list li { color: var(--fg); }

/* ── CONTACT ──────────────────────────────────────────── */
.contact__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 60vh;
}
.contact__pre {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.contact__title {
  font-size: clamp(48px, 7vw, 100px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.9;
  margin-bottom: 40px;
  color: var(--fg);
}
.contact__email {
  font-family: var(--font-mono);
  font-size: clamp(15px, 2vw, 22px);
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  display: inline-block;
  margin-bottom: 28px;
  transition: opacity 0.15s;
}
.contact__email:hover { opacity: 0.7; }

.contact__socials { display: flex; align-items: center; gap: 12px; }
.social-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  transition: color 0.15s;
}
.social-link:hover { color: var(--fg); }
.social-sep { font-family: var(--font-mono); font-size: 12px; color: var(--border-hi); }

/* ── FOOTER ───────────────────────────────────────────── */
.footer__body {
  padding: 22px 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  flex: 1;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer__logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  opacity: 0.5;
}
.footer__copy, .footer__built {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (min-width: 1600px) {
  .section__label {
    flex: 0 0 48px;
    min-width: 48px;
  }
}

@media (max-width: 1024px) {
  .nav__left { display: none; }
  .nav__right { display: none; }
  .nav { padding: 0 20px; grid-template-columns: 1fr; justify-items: center; }
  .nav__burger { display: flex; }
  .contact__bar { padding: 48px 0; }
}

@media (max-width: 768px) {
  :root { --label-w: 36px; }
  .section__label { display: none; }
  #canvas { pointer-events: none; touch-action: auto; }
  .hero__body { overflow: visible; }
  .section__hatch { display: none; }
  .section__body { padding: 48px 24px 60px; }
  .hero__text { left: 24px; bottom: 56px; max-width: calc(100vw - 48px); }
  .hero__meta { display: none; }
  .hero__title { font-size: clamp(36px, 13vw, 52px); }
  .hero__name { white-space: normal; }
  .work__head { flex-direction: column; align-items: flex-start; }
  .footer__body { padding: 22px 24px; }
  .hud { display: none; }
  .section__divider { display: none; }
  .exp__timeline { padding-left: 0; }
  .exp__timeline::before { display: none; }
  .exp__head {
    display: block;
    margin-bottom: 32px;
    width: 100vw;
    margin-left: -24px;
    padding: 0 24px;
  }
  #experience .exp__entry {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 10px;
    row-gap: 8px;
    width: 100vw;
    margin-left: -24px;
    margin-bottom: 32px;
  }
  #experience .exp__entry:last-child { margin-bottom: 0; }
  #experience .exp__date {
    display: contents;
  }
  #experience .exp__date span {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.06em;
    color: var(--muted);
  }
  #experience .exp__date span:first-child {
    margin-left: 24px;
  }
  #experience .exp__dot-col {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    padding-top: 0;
  }
  #experience .exp__card {
    width: 100%;
    box-sizing: border-box;
    padding: 24px 24px 28px;
    border-left: none;
    border-right: none;
  }
  .contact__bar { padding: 40px 0; gap: 32px; }

  /* expertise grid: single column on mobile */
  #expertise .services__grid { grid-template-columns: 1fr; }

  /* dot-title: text above, dots below */
  .dot-title { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* Prevent accidental interactions on decorative elements */
  .ascii-canvas, .dither-canvas, .tech-logo { pointer-events: none; }

  /* ─── grid overlay: 4 lines aligned to content edges ─── */
  .grid-overlay {
    left: 24px;
    transform: none;
    width: calc(100vw - 48px);
    grid-template-columns: repeat(4, 1fr);
  }
  .grid-overlay b:nth-child(n+5) { display: none; }

  /* ─── project-card: prevent grid overflow ──────────── */
  .project-card { overflow: hidden; }
}

@media (max-width: 480px) {
  .work__tabs { flex-wrap: wrap; gap: 4px; }
  .work__tabs .tab { padding: 7px 12px; font-size: 10px; }
}

/* ── EXPERIENCE TIMELINE ────────────────────────────────── */
.exp__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 56px;
}

.exp__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.exp__timeline {
  position: relative;
}

.exp__timeline::before {
  content: '';
  position: absolute;
  left: 148px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
  z-index: 0;
}

.exp__entry {
  display: grid;
  grid-template-columns: 110px 40px 1fr;
  margin-bottom: 40px;
  position: relative;
}

.exp__entry:last-child { margin-bottom: 0; }

.exp__date {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  line-height: 2.2;
  padding-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.exp__dot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 26px;
  position: relative;
  z-index: 1;
}

.exp__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-hi);
  border: 2px solid var(--border-hi);
  flex-shrink: 0;
}

.exp__entry--current .exp__dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(203,255,71,0.4);
}

.exp__card {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 24px 28px 28px;
  transition: border-color 0.15s;
}

.exp__card:hover { border-color: var(--border-hi); }

.exp__card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.exp__company {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.exp__badge {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  padding: 2px 9px;
  text-transform: uppercase;
}

.exp__badge--current {
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.3);
  color: #22c55e;
}

.exp__role {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 12px;
}

.exp__location { opacity: 0.65; }

.exp__company-desc {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.75;
  font-style: italic;
  margin-bottom: 16px;
  opacity: 0.8;
}

.exp__bullets {
  list-style: none;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exp__bullets li {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  padding-left: 18px;
  position: relative;
  line-height: 1.75;
}

.exp__bullets li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 16px;
  line-height: 1.4;
}

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

.exp__tags span {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 3px 9px;
}

/* ── SHOW ALL TOGGLE ──────────────────────────────────────── */
.exp__entry--hidden {
  display: none;
}

.exp__entry--hidden.exp__entry--revealed {
  display: grid;
}

.exp__full {
  display: none;
}

.exp__full--revealed {
  display: block;
  animation: expSlideDown 0.45s ease both;
  animation-delay: var(--anim-delay, 0s);
}

.exp__compact--hidden {
  display: none;
}

@keyframes expSlideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.exp__show-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 40px auto 0;
  padding: 10px 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 3px;
  color: var(--accent);
  transition: background 0.15s, color 0.15s;
}

.exp__show-all:hover {
  background: var(--accent);
  color: var(--bg);
}

.exp__show-all-icon {
  transition: transform 0.25s ease;
  width: 12px;
  height: 12px;
}

.exp__show-all--expanded .exp__show-all-icon {
  transform: rotate(180deg);
}

.exp__full-heading {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 20px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.exp__project {
  margin-bottom: 20px;
}

.exp__project-name {
  display: block;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 4px;
}

.exp__project-desc {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 10px;
  opacity: 0.85;
}

.exp__full .exp__bullets {
  margin-bottom: 0;
}

.exp__full .exp__bullets li {
  font-size: 10px;
}

.exp__full .exp__tags {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* expanded white text */
.exp__full--revealed .exp__project-desc,
.exp__full--revealed .exp__bullets li,
.exp__full--revealed .exp__company-desc {
  color: var(--fg);
  opacity: 1;
}

.exp__full--revealed .exp__tags span {
  color: var(--fg);
  border-color: var(--border-hi);
}

/* ── CONTACT — compact solid bar ────────────────────────── */
#contact {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 2;
  display: flex;
  align-items: stretch;
  width: 100%;
}

.contact__bar {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 80px;
  padding: 56px 64px;
  flex-wrap: wrap;
}

.contact__bar-left {
  display: flex;
  flex-direction: column;
}

.contact__bar-title {
  font-size: clamp(36px, 4vw, 60px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--fg);
  margin-bottom: 18px;
}

.contact__status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.contact__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: blink-dot 2s ease-in-out infinite;
}

.contact__status-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #22c55e;
}

.contact__blurb {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.85;
  max-width: 360px;
}

.contact__link-list {
  display: flex;
  flex-direction: column;
  min-width: 280px;
}

.contact__link-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  padding: 11px 0;
  text-decoration: none;
  transition: opacity 0.15s;
}
.contact__link-item:hover { opacity: 0.65; }

.contact__link-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}

.contact__link-val {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg);
  text-align: right;
  transition: color 0.15s;
}
.contact__link-item:hover .contact__link-val { color: var(--accent); }

