/* ==========================================================================
   MSDOS — portfolio
   Tokens, base, layout, components, sections, effects.
   ========================================================================== */

/* Geist & Geist Mono — self-hosted, SIL Open Font License 1.1 (assets/fonts/OFL.txt) */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("assets/fonts/geist-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("assets/fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/geist-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/geist-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;

  --bg: #09090b;
  --surface: #111114;
  --surface-2: #17171b;
  --surface-3: #212127;
  --visual-bg: #0d0d10;
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.14);
  --ink: #ededef;
  --ink-2: #a3a3ac;
  --ink-3: #777781;
  --accent: #ffb224;
  --accent-ink: #1a1102;
  --accent-soft: rgba(255, 178, 36, 0.1);
  --ok: #3ecf8e;
  --dot: rgba(255, 255, 255, 0.09);
  --shadow-card: 0 30px 60px -32px rgba(0, 0, 0, 0.85);
  --shadow-pop: 0 40px 120px -30px rgba(0, 0, 0, 0.8);
  --grain: 0.055;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --header-h: 68px;
  --radius: 16px;
  --radius-sm: 10px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f6f6f4;
  --surface: #ffffff;
  --surface-2: #f1f1ef;
  --surface-3: #e7e7e4;
  --visual-bg: #efefec;
  --line: rgba(12, 12, 14, 0.08);
  --line-2: rgba(12, 12, 14, 0.15);
  --ink: #0c0c0e;
  --ink-2: #4e4e56;
  --ink-3: #72727b;
  --accent: #b45309;
  --accent-ink: #fffaf0;
  --accent-soft: rgba(180, 83, 9, 0.08);
  --ok: #16a34a;
  --dot: rgba(12, 12, 14, 0.1);
  --shadow-card: 0 30px 60px -34px rgba(20, 20, 30, 0.3);
  --shadow-pop: 0 40px 120px -30px rgba(20, 20, 30, 0.35);
  --grain: 0.035;
}

/* ---------- Base ---------- */

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

html {
  background: var(--bg);
  scrollbar-color: var(--surface-3) var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

html.is-locked {
  overflow: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Film grain — breaks the flat, rendered look */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

a {
  color: inherit;
}

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

button,
input {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: break-word;
}

[hidden] {
  display: none !important;
}

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

.i {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mono {
  font-family: var(--font-mono);
}

.nowrap {
  white-space: nowrap;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease-out);
}

.skip-link:focus-visible {
  transform: none;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    transform 0.4s var(--ease-out);
}

.btn:active {
  transform: scale(0.97);
}

.btn .i {
  width: 16px;
  height: 16px;
  transition: transform 0.45s var(--ease-out);
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--ink) 86%, var(--accent));
}

.btn-primary:hover .i-arrow-down {
  transform: translateY(3px);
}

.btn-ghost {
  border-color: var(--line-2);
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 40%, transparent);
}

.btn-ghost:hover {
  background: var(--surface-2);
  border-color: color-mix(in srgb, var(--ink) 30%, transparent);
}

.btn-ghost:hover .i-arrow-ur,
.btn-ghost:hover .i {
  transform: translate(2px, -2px);
}

.btn-sm {
  height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.icon-btn:hover {
  color: var(--ink);
  background: var(--surface-2);
  border-color: var(--line-2);
}

.icon-btn .i {
  width: 17px;
  height: 17px;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.35s ease,
    border-color 0.35s ease,
    backdrop-filter 0.35s ease;
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 74%, transparent);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
}

.site-header.is-menu-open {
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  width: min(100% - 2 * var(--gutter), var(--container));
  height: var(--header-h);
  margin-inline: auto;
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border-radius: 8px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  transition: transform 0.6s var(--ease-out);
}

.brand:hover .brand-mark {
  transform: rotate(-8deg) scale(1.06);
}

.brand-mark-bg {
  fill: var(--ink);
}

.brand-mark-fg {
  fill: var(--bg);
}

.brand-mark-cursor {
  fill: var(--accent);
  animation: blink 1.1s steps(1, end) infinite;
}

.brand-name {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.brand-cursor {
  color: var(--accent);
  animation: blink 1.1s steps(1, end) infinite;
}

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

.site-nav {
  display: flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-nav a {
  padding: 7px 15px;
  border-radius: 999px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    color 0.25s ease,
    background-color 0.25s ease;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a[aria-current="true"] {
  color: var(--ink);
  background: var(--surface-3);
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.lang-switch button {
  padding: 5px 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.lang-switch button:hover {
  color: var(--ink);
}

.lang-switch button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--surface-3);
}

[data-theme="dark"] .i-moon,
[data-theme="light"] .i-sun {
  display: none;
}

.menu-btn {
  display: none;
}

.menu-btn path {
  transition: transform 0.4s var(--ease-out);
  transform-origin: center;
}

.menu-btn[aria-expanded="true"] .menu-line-1 {
  transform: translateY(3px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] .menu-line-2 {
  transform: translateY(-3px) rotate(-45deg);
}

.mobile-menu {
  display: grid;
  padding: 8px var(--gutter) 28px;
  border-top: 1px solid var(--line);
}

.mobile-menu a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.mobile-menu a .mono {
  color: var(--ink-3);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.mobile-menu a[aria-current="true"] .mono {
  color: var(--accent);
}

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

.hero {
  position: relative;
  isolation: isolate;
  padding: calc(var(--header-h) + clamp(56px, 10vh, 120px)) 0 0;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 48% 62% at 86% 30%, #000 12%, transparent 78%);
  mask-image: radial-gradient(ellipse 48% 62% at 86% 30%, #000 12%, transparent 78%);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  margin-bottom: clamp(24px, 3vw, 36px);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  color: var(--ink);
}

.status-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
}

.status-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--ok);
  animation: ping 2.4s var(--ease-out) infinite;
}

@keyframes ping {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  80%,
  100% {
    transform: scale(3.2);
    opacity: 0;
  }
}

.hero-meta-prompt {
  color: var(--ink-3);
}

.hero-title {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(3rem, 8.4vw, 7.5rem);
  font-weight: 600;
  line-height: 0.93;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.hero-title .dim {
  color: var(--ink-3);
}

.js .hero-title:not(.is-split) {
  opacity: 0;
  animation: reveal-fallback 0s linear 3.5s forwards;
}

/* Word-by-word mask reveal (spans are injected by script.js) */
.hero-title .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}

.hero-title .w > span {
  display: inline-block;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  align-items: start;
  gap: clamp(40px, 7vw, 112px);
  margin-top: clamp(36px, 5vw, 64px);
}

.hero-lead {
  max-width: 34rem;
  margin: 0;
  color: var(--ink-2);
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  line-height: 1.62;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

/* Terminal */

.terminal {
  margin: 0;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  font-family: var(--font-mono);
}

.terminal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 11.5px;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface-3);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.terminal-title {
  margin-inline: auto;
}

.terminal-body {
  min-height: calc(12 * 1.8em + 44px);
  margin: 0;
  padding: 20px 22px 24px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.term-line {
  min-height: 1.8em;
}

.term-line.is-pending {
  visibility: hidden;
}

.term-prompt {
  color: var(--accent);
}

.term-key {
  color: var(--ink-2);
}

.term-dim {
  color: var(--ink-3);
}

.term-val {
  color: var(--ink);
}

.term-cursor {
  display: inline-block;
  width: 0.62em;
  height: 1.15em;
  margin-left: 2px;
  vertical-align: -0.2em;
  background: var(--accent);
  animation: blink 1.1s steps(1, end) infinite;
}

/* Stats */

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(64px, 9vw, 112px) 0 0;
  border-top: 1px solid var(--line);
}

.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 10px;
  padding: 28px 24px 36px;
  border-left: 1px solid var(--line);
}

.stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.stat dd {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.stat-suffix {
  color: var(--accent);
}

.stat dt {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Marquee ---------- */

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 55s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-list {
  display: flex;
  margin: 0;
  padding: 20px 0;
  list-style: none;
}

.marquee-list li {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-right: 32px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.marquee-list li::after {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--accent);
  transform: rotate(45deg);
}

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

/* ---------- Sections ---------- */

.section {
  padding-top: clamp(96px, 13vw, 176px);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  align-items: start;
  gap: 24px;
  margin-bottom: clamp(44px, 6vw, 80px);
}

.section-index {
  display: flex;
  gap: 12px;
  margin: 0;
  padding-top: 0.9em;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.section-index span:first-child {
  color: var(--accent);
}

.section-title {
  max-width: 17ch;
  margin: 0;
  font-size: clamp(2.2rem, 4.8vw, 4rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

/* Capabilities */

.capabilities {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.capability {
  padding: 36px 36px 40px;
  border-left: 1px solid var(--line);
}

.capability:first-child {
  padding-left: 0;
  border-left: 0;
}

.capability:last-child {
  padding-right: 0;
}

.capability-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 48px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  transition:
    color 0.35s ease,
    border-color 0.35s ease,
    transform 0.6s var(--ease-out);
}

.capability-icon .i {
  width: 20px;
  height: 20px;
}

.capability:hover .capability-icon {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  transform: translateY(-4px) rotate(-4deg);
}

.capability h3 {
  margin: 0 0 10px;
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.capability p {
  max-width: 34ch;
  margin: 0;
  color: var(--ink-2);
}

/* Journey */

.journey {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
  gap: 24px;
  margin-top: clamp(88px, 11vw, 144px);
}

.journey-head {
  align-self: start;
  position: sticky;
  top: calc(var(--header-h) + 32px);
}

.journey-title {
  max-width: 14ch;
  margin: 18px 0 0;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.journey-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.journey-item {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.journey-item::before {
  content: "";
  position: absolute;
  inset: -1px -20px;
  z-index: -1;
  border-radius: 12px;
  background: var(--surface);
  opacity: 0;
  transform: scaleY(0.9);
  transition:
    opacity 0.35s ease,
    transform 0.5s var(--ease-out);
}

.journey-item:hover::before {
  opacity: 1;
  transform: none;
}

.journey-num {
  padding-top: 4px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 13px;
  transition: color 0.3s ease;
}

.journey-item:hover .journey-num {
  color: var(--accent);
}

.journey-item h4 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.journey-item p {
  margin: 0;
  color: var(--ink-2);
}

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

.notices {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(100deg, var(--accent-soft), transparent 45%),
    var(--surface);
}

.notice-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 11px;
  color: var(--accent);
}

.notice-icon .i {
  width: 20px;
  height: 20px;
}

.notice-eyebrow {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.notice h3 {
  margin: 4px 0 8px;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.notice p:not(.notice-eyebrow) {
  max-width: 96ch;
  margin: 0;
  color: var(--ink-2);
  font-size: 0.94rem;
  line-height: 1.65;
}

.notice--private {
  background: var(--surface);
}

.notice--private .notice-icon {
  border-color: var(--line-2);
  color: var(--ink);
}

.notice--private .notice-eyebrow {
  color: var(--ink-2);
}

.notice-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.notice-link .i {
  width: 14px;
  height: 14px;
  transition: transform 0.4s var(--ease-out);
}

.notice-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.notice-link:hover .i {
  transform: translate(2px, -2px);
}

/* Controls */

.work-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 56px;
}

.search {
  display: flex;
  flex: 1 1 260px;
  align-items: center;
  gap: 10px;
  max-width: 360px;
  height: 46px;
  padding: 0 8px 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-3);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.search:focus-within {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font-size: 14.5px;
}

.search input::placeholder {
  color: var(--ink-3);
}

.search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.search kbd {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 12px;
}

.filters {
  position: relative;
  display: flex;
  gap: 2px;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  overflow-x: auto;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filters-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: var(--ink);
  transition:
    transform 0.55s var(--ease-out),
    width 0.55s var(--ease-out);
}

.filter {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.35s ease;
}

.filter:hover {
  color: var(--ink);
}

.filter.is-active {
  color: var(--bg);
}

html:not(.js) .filter.is-active {
  background: var(--ink);
}

.filter-count {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.55;
}

/* Groups */

.work-group + .work-group {
  margin-top: clamp(64px, 8vw, 96px);
}

.group-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.group-index {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
}

.group-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.group-count {
  margin-left: auto;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: 16px;
}

.card--sm {
  grid-column: span 2;
}

.card--lg {
  grid-column: span 3;
}

.card--xl {
  grid-column: span 4;
}

.card--full {
  grid-column: 1 / -1;
}

.work-empty {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 72px 24px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  color: var(--ink-2);
  text-align: center;
}

.work-empty p {
  margin: 0;
}

/* ---------- Card ---------- */

.card {
  --visual-h: 236px;
  --mx: 50%;
  --my: -20%;

  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition:
    transform 0.6s var(--ease-out),
    border-color 0.35s ease,
    box-shadow 0.6s var(--ease-out);
}

.card--lg {
  --visual-h: 300px;
}

.card--full {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.card--full .card-visual {
  height: auto;
  min-height: 400px;
  border-right: 1px solid var(--line);
  border-bottom: 0;
}

.card--full .card-body {
  justify-content: center;
  gap: 14px;
  padding: clamp(24px, 3vw, 40px);
}

.card--full .card-title {
  font-size: clamp(1.55rem, 2.3vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.card--full .card-tags {
  margin-top: 4px;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  box-shadow: var(--shadow-card);
}

/* Cursor spotlight + accent edge following the pointer */
.card::before,
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.card::before {
  background: radial-gradient(
    560px circle at var(--mx) var(--my),
    color-mix(in srgb, var(--ink) 5%, transparent),
    transparent 42%
  );
}

.card::after {
  padding: 1px;
  background: radial-gradient(
    340px circle at var(--mx) var(--my),
    color-mix(in srgb, var(--accent) 75%, transparent),
    transparent 62%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box exclude,
    linear-gradient(#000 0 0);
}

.card:hover::before,
.card:hover::after {
  opacity: 1;
}

.card-visual {
  position: relative;
  height: var(--visual-h);
  flex: none;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--visual-bg);
}

/* Dot grid behind every visual */
.card-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--dot) 1px, transparent 1.3px);
  background-size: 16px 16px;
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, #000 30%, transparent 85%);
  mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, #000 30%, transparent 85%);
}

.card-visual img {
  transition: transform 0.9s var(--ease-out);
}

.card:hover .card-visual img {
  transform: scale(1.035);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 22px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-type {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.card-type::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--accent);
}

.card-private {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 7px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.card-private .i {
  width: 12px;
  height: 12px;
}

.card-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 6px 0 0;
  padding: 16px 0 2px;
  border-top: 1px solid var(--line);
}

.card-stats--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-stats div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 4px;
}

.card-stats dd {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.card-stats dt {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  line-height: 1.35;
}

/* Detailed feature lists live in the card but are only shown in the dialog */
.card-features {
  display: none;
}

.card-title {
  margin: 2px 0 0;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.022em;
}

.card--lg .card-title,
.card--xl .card-title {
  font-size: 1.45rem;
}

/* The title button is stretched over the whole card (accessible click target) */
.card-open {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
}

.card-open::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius);
}

.card-open:focus-visible {
  outline: 0;
}

.card-open:focus-visible::after {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.card-desc {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.6;
}

.card--sm .card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-links {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 2px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line-2);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.card-link .i {
  width: 14px;
  height: 14px;
  transition: transform 0.4s var(--ease-out);
}

.card-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.card-link:hover .i {
  transform: translate(2px, -2px);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: auto 0 0;
  padding: 12px 0 0;
  list-style: none;
}

.card-tags li {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
}

/* ---------- Card visuals ---------- */

/* Screenshot anchored top-left, bleeding off the right and bottom edges */
.v-bleed img {
  position: absolute;
  top: 26px;
  left: 26px;
  width: calc(100% - 26px);
  height: calc(100% - 26px);
  object-fit: cover;
  object-position: left top;
  border: 1px solid var(--line-2);
  border-right: 0;
  border-bottom: 0;
  border-radius: 10px 0 0 0;
  box-shadow: -12px -12px 40px -20px rgba(0, 0, 0, 0.6);
  transform-origin: left top;
}

/* Tall UI rising from the bottom edge */
.v-rise img {
  position: absolute;
  top: 26px;
  left: 50%;
  width: min(58%, 220px);
  height: calc(100% - 26px);
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--line-2);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  box-shadow: 0 -10px 40px -18px rgba(0, 0, 0, 0.6);
  translate: -50% 0;
  transform-origin: center top;
}

.v-center {
  display: grid;
  place-items: center;
  padding: 28px;
}

.v-center img {
  position: relative;
  max-width: 88%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45));
}

.v-glow::after {
  content: "";
  position: absolute;
  inset: 20% 25%;
  z-index: 0;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.1;
  filter: blur(40px);
}

.v-glow img {
  z-index: 1;
}

.v-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  gap: 16px;
  padding: 26px;
}

.v-duo img {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.45));
}

.v-phones {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 30px 26px 0;
}

.v-phones img {
  position: relative;
  width: 27%;
  max-width: 150px;
  height: calc(100% + 40px);
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.6);
}

.v-phones img:nth-child(2) {
  margin-top: -14px;
}

.v-mosaic {
  display: grid;
  grid-template-columns: 1.9fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 26px 0 0 26px;
}

.v-mosaic img {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: left top;
  border: 1px solid var(--line-2);
  border-radius: 10px;
}

.v-mosaic img:first-child {
  grid-row: span 2;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.v-mosaic img:nth-child(2) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.v-mosaic img:nth-child(3) {
  border-radius: 10px 0 0 0;
}

.v-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  gap: 12px;
  padding: 26px 26px 0;
}

.v-strip img {
  position: relative;
  width: 100%;
  height: calc(100% + 12px);
  min-height: 0;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--line-2);
  border-radius: 10px;
}

.v-strip img:nth-child(even) {
  margin-top: 18px;
}

.v-trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  gap: 10px;
  padding: 26px 22px 0;
}

.v-trio img {
  position: relative;
  width: 100%;
  height: calc(100% + 10px);
  min-height: 0;
  object-fit: cover;
  object-position: left top;
  border: 1px solid var(--line-2);
  border-radius: 8px;
}

/* Benchmark chart (Orpane) */
.v-bench {
  display: grid;
  align-items: center;
  padding: 30px clamp(22px, 3vw, 36px);
}

.bench {
  position: relative;
  display: grid;
  gap: 22px;
  font-family: var(--font-mono);
}

.bench-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-2);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bench-badge {
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--ink);
}

.bench-rows {
  display: grid;
  gap: 10px;
}

.bench-row {
  display: grid;
  grid-template-columns: minmax(84px, 128px) minmax(0, 1fr) 64px;
  align-items: center;
  gap: 14px;
  font-size: 12px;
}

.bench-name {
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bench-track {
  display: block;
  height: 18px;
}

.bench-bar {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: 0 4px 4px 0;
  background: color-mix(in srgb, var(--ink) 22%, transparent);
  transform-origin: left center;
  transition: transform 1.4s var(--ease-out) 0.2s;
}

.bench-bar.is-accent {
  background: var(--accent);
}

.js .card:not(.is-visible) .bench-bar {
  transform: scaleX(0);
}

.bench-val {
  color: var(--ink-2);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.bench-foot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 11px;
}

.bench-foot b {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Typographic visual (Roblox exploit legacy) */
.v-type {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
}

.v-type > * {
  position: relative;
}

.v-type-big {
  font-size: 4.6rem;
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.v-type-big span {
  color: var(--accent);
}

.v-type-label {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.v-type-chip {
  margin-top: 10px;
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}

/* Roblox game icons */
.v-games {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
}

.v-games-row {
  position: relative;
  display: flex;
  gap: 18px;
}

.v-games figure {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 0;
}

.v-games img {
  width: 92px;
  height: 92px;
  border: 1px solid var(--line-2);
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 18px 36px -16px rgba(0, 0, 0, 0.6);
}

.card:hover .v-games figure:first-child img {
  transform: rotate(-5deg) scale(1.04);
}

.card:hover .v-games figure:last-child img {
  transform: rotate(5deg) scale(1.04);
}

.v-games figcaption,
.v-caption,
.v-logos figcaption {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.v-caption {
  position: relative;
  color: var(--ink-3);
}

/* Logo tiles (servers, AI, Discord) */
.v-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
}

.v-logos figure {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 0;
}

.logo-tile {
  position: relative;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink-2);
  transition:
    color 0.45s ease,
    border-color 0.45s ease,
    transform 0.6s var(--ease-out);
}

.logo-tile svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.card:hover .logo-tile {
  color: var(--brand, var(--ink));
  border-color: color-mix(in srgb, var(--brand, var(--ink)) 40%, transparent);
}

.card:hover .v-logos figure:nth-child(odd) .logo-tile {
  transform: translateY(-4px);
}

.card:hover .v-logos figure:nth-child(even) .logo-tile {
  transform: translateY(4px);
}

.v-logos--solo .logo-tile {
  width: 96px;
  height: 96px;
  border-radius: 26px;
}

.v-logos--solo .logo-tile svg {
  width: 48px;
  height: 48px;
}

.card:hover .v-logos--solo figure .logo-tile {
  transform: translateY(-4px) rotate(-4deg);
}

/* Chrome extension + audio equaliser */
.v-ext {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.v-ext .logo-tile {
  width: 84px;
  height: 84px;
  border-radius: 22px;
}

.v-ext .logo-tile svg {
  width: 40px;
  height: 40px;
}

.eq {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 64px;
}

.eq i {
  width: 6px;
  height: 100%;
  border-radius: 3px;
  background: var(--ink-3);
  transform-origin: bottom;
  transform: scaleY(0.3);
  animation: eq 1.4s var(--ease-in-out) infinite alternate;
  animation-play-state: paused;
}

.eq i:nth-child(1) { animation-delay: -0.2s; }
.eq i:nth-child(2) { animation-delay: -0.9s; }
.eq i:nth-child(3) { animation-delay: -0.4s; }
.eq i:nth-child(4) { animation-delay: -1.2s; }
.eq i:nth-child(5) { animation-delay: -0.6s; }
.eq i:nth-child(6) { animation-delay: -1s; }
.eq i:nth-child(7) { animation-delay: -0.1s; }

.card:hover .eq i {
  background: var(--accent);
  animation-play-state: running;
}

@keyframes eq {
  0% { transform: scaleY(0.2); }
  35% { transform: scaleY(0.85); }
  70% { transform: scaleY(0.4); }
  100% { transform: scaleY(1); }
}

/* Anticheat log */
.v-log {
  display: grid;
  place-items: center;
  padding: 24px;
}

.v-log-window {
  position: relative;
  display: grid;
  gap: 4px;
  width: min(100%, 260px);
  padding: 16px 18px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
  white-space: pre;
  box-shadow: 0 18px 36px -18px rgba(0, 0, 0, 0.6);
}

.v-log-window i {
  display: inline-block;
  min-width: 3.4em;
  color: var(--ink-3);
  font-style: normal;
}

.v-log-window b {
  color: var(--ok);
  font-weight: 500;
}

.v-log-window em {
  color: var(--accent);
  font-style: normal;
}

/* Server status board (Firefall / PIN) */
.v-server {
  display: grid;
  place-items: center;
  padding: clamp(24px, 3vw, 40px);
}

.server {
  position: relative;
  width: min(100%, 460px);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  font-family: var(--font-mono);
}

.server-head,
.server-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  color: var(--ink-2);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.server-head {
  border-bottom: 1px solid var(--line);
}

.server-foot {
  border-top: 1px solid var(--line);
  color: var(--ink-3);
}

.server-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.server-live i,
.modules-status i,
.tele-rec {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
}

.server-live i::after,
.modules-status i::after,
.tele-rec::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: ping 2.4s var(--ease-out) infinite;
}

.server-rows {
  margin: 0;
  padding: 6px 16px;
  list-style: none;
}

.server-rows li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--ink-2);
  font-size: 12px;
}

.server-rows li:last-child {
  border-bottom: 0;
}

.server-rows b {
  flex: none;
  padding: 2px 8px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--ok) 13%, transparent);
  color: var(--ok);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.server-rows b.is-partial {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Layered screenshots (Antigravity+) */
.v-ag img {
  position: absolute;
  border: 1px solid var(--line-2);
  box-shadow: 0 26px 50px -22px rgba(0, 0, 0, 0.75);
}

.v-ag img:nth-child(1) {
  top: 26px;
  left: 26px;
  width: 44%;
  border-radius: 12px;
  transform-origin: left top;
}

.v-ag img:nth-child(2) {
  top: 26px;
  right: 26px;
  width: 38%;
  border-radius: 10px;
  transform-origin: right top;
}

.v-ag img:nth-child(3) {
  bottom: 20px;
  left: 31%;
  width: 40%;
  border-radius: 10px;
  z-index: 1;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.85);
}

/* Live telemetry plot (Watch7) */
.v-telemetry {
  display: grid;
  place-items: center;
  padding: 26px;
}

.tele {
  position: relative;
  display: grid;
  gap: 10px;
  width: 100%;
  height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface);
  font-family: var(--font-mono);
  box-shadow: 0 26px 50px -26px rgba(0, 0, 0, 0.7);
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.tele-head,
.tele-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-3);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tele-head span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.tele-rec {
  display: inline-block;
  background: #ef4444;
}

.tele-plot {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.tele-grid {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.tele-trace path {
  fill: none;
  stroke-width: 1.5;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.tele-trace {
  animation: tele-scroll 5s linear infinite;
}

.tele-trace--1 path {
  stroke: var(--accent);
}

.tele-trace--2 path {
  stroke: var(--ink-2);
}

.tele-trace--3 path {
  stroke: var(--ink-3);
}

.tele-trace--2 {
  animation-duration: 7s;
}

.tele-trace--3 {
  animation-duration: 9s;
}

@keyframes tele-scroll {
  to {
    transform: translateX(-400px);
  }
}

/* Module board (Rifty / SnitchersBot) */
.v-modules {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 22px 24px;
}

.modules-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.modules-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.modules-brand svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: color 0.4s ease;
}

.card:hover .modules-brand svg {
  color: #5865f2;
}

.modules-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-3);
}

.modules-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.modules-grid li {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.2;
  transition:
    border-color 0.3s ease,
    color 0.3s ease,
    transform 0.5s var(--ease-out);
}

.modules-grid li .i {
  width: 17px;
  height: 17px;
  color: var(--ink-3);
  transition: color 0.3s ease;
}

.card:hover .modules-grid li {
  color: var(--ink);
  border-color: var(--line-2);
}

.card:hover .modules-grid li .i {
  color: var(--accent);
}

.card:hover .modules-grid li:nth-child(odd) {
  transform: translateY(-2px);
}

.dialog-media .v-modules {
  grid-template-rows: auto auto;
  align-content: center;
  padding: 32px;
}

.dialog-media .modules-grid {
  grid-auto-rows: 92px;
}

/* Collection preview (Roblox Pet Tracker) */
.v-collection {
  display: grid;
  place-items: center;
  padding: 22px;
}

.collection {
  position: relative;
  display: grid;
  gap: 10px;
  width: min(100%, 196px);
  padding: 12px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 26px 50px -26px rgba(0, 0, 0, 0.7);
}

.collection-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.collection-head span:last-child {
  color: var(--ink);
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.collection-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.collection-grid img.is-missing {
  filter: grayscale(1) brightness(0.45);
  opacity: 0.55;
}

.card:hover .collection-grid img.is-missing {
  filter: grayscale(1) brightness(0.6);
}

.collection-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}

.collection-bar span {
  display: block;
  width: var(--w, 66.7%);
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transform-origin: left center;
  transition: transform 1.2s var(--ease-out) 0.2s;
}

.js .card:not(.is-visible) .collection-bar span {
  transform: scaleX(0);
}

.card--xl .collection {
  width: min(100%, 540px);
}

.card--xl .collection-grid {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.dialog-media .collection {
  width: min(100%, 520px);
}

/* 2D room map (QuantumClean Pro 2026) */
.v-map {
  display: grid;
  place-items: center;
  padding: 22px;
}

.map {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 8px;
  width: 100%;
  height: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 26px 50px -26px rgba(0, 0, 0, 0.7);
  font-family: var(--font-mono);
}

.map-head,
.map-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-3);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.map-head span:first-child {
  color: var(--ink);
}

.map-foot {
  justify-content: flex-start;
  gap: 16px;
}

.map-foot span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.map-plot {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: visible;
}

.map-room {
  fill: color-mix(in srgb, var(--ink) 3%, transparent);
  stroke: var(--ink-2);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.map-trail {
  fill: none;
  stroke: var(--accent);
  stroke-opacity: 0.4;
  stroke-width: 1.2;
  stroke-dasharray: 3 3;
}

.map-furniture {
  fill: var(--surface-3);
  stroke: var(--line-2);
}

.map-wall {
  fill: none;
  stroke: #ef4444;
  stroke-width: 2;
  stroke-dasharray: 4 3;
}

.map-dock {
  fill: var(--ok);
}

.map-robot circle {
  fill: var(--ink);
  stroke: var(--accent);
  stroke-width: 2;
}

.map-robot path {
  fill: none;
  stroke: var(--bg);
  stroke-width: 2;
  stroke-linecap: round;
}

.map-key {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1.5px var(--accent);
}

.map-key--wall {
  width: 12px;
  height: 0;
  border-top: 2px dashed #ef4444;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.map-key--dock {
  border-radius: 2px;
  background: var(--ok);
  box-shadow: none;
}

/* Ambient glow (JellyBite) */
.v-ambi {
  --ambi: linear-gradient(115deg, #1d4ed8 0%, #0ea5e9 30%, #f59e0b 66%, #db2777 100%);

  display: grid;
  place-content: center;
  justify-items: center;
  gap: 52px;
}

.ambi {
  position: relative;
  width: min(56vw, 250px);
  aspect-ratio: 16 / 9;
  margin-top: 8px;
  transition: filter 0.6s ease;
}

.ambi-glow {
  position: absolute;
  inset: -16%;
  border-radius: 28px;
  background: var(--ambi);
  opacity: 0.72;
  filter: blur(22px);
  transition:
    opacity 0.6s ease,
    filter 0.6s ease;
}

.ambi-screen {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background:
    linear-gradient(#000 0 11%, transparent 11% 89%, #000 89%),
    linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
    var(--ambi);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.7);
}

.ambi-pip {
  --ambi: linear-gradient(135deg, #10b981, #6366f1);

  position: absolute;
  right: -30%;
  bottom: -24%;
  width: 36%;
  aspect-ratio: 16 / 9;
}

.ambi-pip .ambi-glow {
  inset: -24%;
  border-radius: 18px;
  filter: blur(12px);
}

.ambi-pip .ambi-screen {
  border-radius: 4px;
  background:
    linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.25)),
    var(--ambi);
}

.card:hover .ambi-glow {
  opacity: 1;
}

.card:hover .ambi {
  animation: ambi-hue 7s linear infinite;
}

@keyframes ambi-hue {
  to {
    filter: hue-rotate(1turn);
  }
}

.v-ambi .v-caption {
  position: relative;
}

/* ---------- Skills ---------- */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.skill-col {
  padding: 32px 28px 0;
  border-left: 1px solid var(--line);
}

.skill-col:first-child {
  padding-left: 0;
  border-left: 0;
}

.skill-col:last-child {
  padding-right: 0;
}

.skill-col h3 {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin: 0 0 24px;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.skill-col h3 .mono {
  color: var(--accent);
  font-size: 12px;
}

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

.skill-list li {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.95rem;
  transition: color 0.25s ease;
}

.skill-list li::before {
  content: "";
  flex: none;
  width: 0;
  height: 1px;
  margin-right: 0;
  background: var(--accent);
  transition:
    width 0.4s var(--ease-out),
    margin 0.4s var(--ease-out);
}

.skill-list li:hover {
  color: var(--ink);
}

.skill-list li:hover::before {
  width: 14px;
  margin-right: 10px;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: end;
  gap: clamp(48px, 7vw, 112px);
}

.contact-copy .section-index {
  padding-top: 0;
  margin-bottom: 28px;
}

.contact-title {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 5.25rem);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.052em;
  text-wrap: balance;
}

.contact-desc {
  max-width: 30rem;
  margin: 28px 0 0;
  color: var(--ink-2);
  font-size: 1.05rem;
}

.contact-list {
  border-top: 1px solid var(--line);
}

.contact-row {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 24px 6px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.contact-row::before {
  content: "";
  position: absolute;
  inset: 0 -14px;
  z-index: -1;
  border-radius: 12px;
  background: var(--surface);
  opacity: 0;
  transform: scale(0.97);
  transition:
    opacity 0.3s ease,
    transform 0.5s var(--ease-out);
}

.contact-row:hover::before,
.contact-row:focus-visible::before {
  opacity: 1;
  transform: none;
}

.contact-row-label {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.contact-row-value {
  overflow: hidden;
  font-size: clamp(1.2rem, 2.1vw, 1.6rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: transform 0.5s var(--ease-out);
}

.contact-row:hover .contact-row-value {
  transform: translateX(6px);
}

.contact-row-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease,
    transform 0.5s var(--ease-out);
}

.contact-row-icon .i {
  width: 16px;
  height: 16px;
}

.contact-row:hover .contact-row-icon {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  transform: rotate(-8deg);
}

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

.site-footer {
  margin-top: clamp(112px, 14vw, 184px);
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  align-items: start;
  gap: 32px;
  padding: 44px 0 20px;
}

.footer-brand p {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 0.95rem;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 10px 40px;
}

.footer-nav a,
.footer-top-link {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-nav a:hover,
.footer-top-link:hover {
  color: var(--ink);
}

.footer-top-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-top-link .i {
  width: 14px;
  height: 14px;
  transition: transform 0.4s var(--ease-out);
}

.footer-top-link:hover .i {
  transform: translateY(-3px);
}

.footer-wordmark {
  margin: 0 auto -0.14em;
  background: linear-gradient(180deg, var(--surface-3) 10%, transparent 88%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(5.5rem, 25vw, 23rem);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.075em;
  text-align: center;
  user-select: none;
}

.footer-bottom {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 12px;
}

.footer-bottom p {
  margin: 0;
}

/* ---------- Dialogs ---------- */

.project-dialog {
  width: min(1100px, calc(100vw - 32px));
  max-width: none;
  max-height: min(88vh, 820px);
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}

.project-dialog[open] {
  animation: dialog-in 0.55s var(--ease-out);
}

.project-dialog::backdrop {
  background: rgba(6, 6, 8, 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.project-dialog[open]::backdrop {
  animation: fade-in 0.4s ease;
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.975);
  }
}

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

.dialog-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  height: 100%;
  max-height: inherit;
}

.dialog-media {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 460px;
  border-right: 1px solid var(--line);
  background: var(--visual-bg);
}

.dialog-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--dot) 1px, transparent 1.3px);
  background-size: 16px 16px;
  pointer-events: none;
}

.dialog-stage {
  position: relative;
  display: grid;
  flex: 1;
  place-items: center;
  min-height: 0;
  padding: 32px;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.dialog-stage img {
  max-width: 100%;
  max-height: calc(min(88vh, 820px) - 150px);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.65);
  animation: fade-in 0.4s ease;
}

.dialog-zoom-hint {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dialog-stage:hover .dialog-zoom-hint,
.dialog-stage:focus-visible .dialog-zoom-hint {
  opacity: 1;
}

.dialog-zoom-hint .i {
  width: 14px;
  height: 14px;
}

.dialog-thumbs {
  position: relative;
  display: flex;
  gap: 8px;
  padding: 0 32px 26px;
  overflow-x: auto;
}

.dialog-thumb {
  flex: none;
  width: 68px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  opacity: 0.5;
  cursor: pointer;
  transition:
    opacity 0.25s ease,
    border-color 0.25s ease;
}

.dialog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.dialog-thumb:hover,
.dialog-thumb.is-active {
  opacity: 1;
}

.dialog-thumb.is-active {
  border-color: var(--accent);
}

.dialog-media .card-visual {
  flex: 1;
  height: auto;
  min-height: 460px;
  border: 0;
  background: transparent;
}

.dialog-media .card-visual::before {
  display: none;
}

.dialog-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  max-height: min(88vh, 820px);
  padding: 26px 30px 30px;
  overflow-y: auto;
}

.dialog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog-title {
  margin: 8px 0 0;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.dialog-desc {
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.7;
}

.dialog-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dialog-features {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.dialog-features li {
  display: grid;
  gap: 2px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.9rem;
  line-height: 1.55;
}

.dialog-features b {
  color: var(--ink);
  font-weight: 500;
}

.dialog-tags {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.zoom-dialog {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(6, 6, 8, 0.94);
  cursor: zoom-out;
}

.zoom-dialog[open] {
  display: grid;
  place-items: center;
  animation: fade-in 0.3s ease;
}

.zoom-dialog::backdrop {
  background: transparent;
}

.zoom-dialog img {
  max-width: 94vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 10px;
  animation: dialog-in 0.5s var(--ease-out);
}

.zoom-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-color: rgba(255, 255, 255, 0.16);
  color: #ededef;
  background: rgba(255, 255, 255, 0.06);
}

.zoom-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

/* ---------- Floating UI ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px 11px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  pointer-events: none;
  translate: -50% 16px;
  transition:
    opacity 0.35s ease,
    translate 0.5s var(--ease-out);
}

.toast.is-visible {
  opacity: 1;
  translate: -50% 0;
}

.toast .i {
  width: 16px;
  height: 16px;
  color: var(--ok);
  stroke-width: 2.2;
}

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--ink);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  translate: 0 14px;
  transition:
    opacity 0.35s ease,
    translate 0.5s var(--ease-out),
    background-color 0.25s ease;
}

.to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  translate: 0 0;
}

.to-top:hover {
  background: var(--surface-2);
}

.to-top .i {
  width: 18px;
  height: 18px;
  transition: transform 0.4s var(--ease-out);
}

.to-top:hover .i {
  transform: translateY(-2px);
}

.to-top-ring {
  position: absolute;
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  transform: rotate(-90deg);
  pointer-events: none;
}

.to-top-ring circle {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--progress, 0) * 100);
}

/* ---------- Reveal ---------- */

/* Elements start hidden only when JS runs; a delayed fallback shows them if it never does. */
.js [data-reveal]:not(.is-visible) {
  opacity: 0;
  animation: reveal-fallback 0s linear 3.5s forwards;
}

@keyframes reveal-fallback {
  to {
    opacity: 1;
  }
}

/* Theme switch — circular reveal handled in JS */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card--sm,
  .card--lg {
    grid-column: span 1;
  }

  .card--xl {
    grid-column: span 2;
  }

  .card--lg {
    --visual-h: 260px;
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .skill-col:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .skill-col:nth-child(2) {
    padding-right: 0;
  }

  .skill-col:nth-child(n + 3) {
    margin-top: 24px;
  }
}

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

  .site-nav {
    display: none;
  }

  .menu-btn {
    display: inline-grid;
  }

  .hero-grid,
  .contact-grid,
  .notices {
    grid-template-columns: minmax(0, 1fr);
  }

  .card--full {
    display: flex;
  }

  .card--full .card-visual {
    height: auto;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hero-grid {
    align-items: start;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .section-head,
  .journey {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .section-index {
    padding-top: 0;
  }

  .journey-head {
    position: static;
    margin-bottom: 16px;
  }

  .journey-title {
    max-width: 24ch;
  }

  .capabilities {
    grid-template-columns: minmax(0, 1fr);
  }

  .capability,
  .capability:first-child,
  .capability:last-child {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 24px;
    padding: 28px 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .capability-icon {
    grid-row: span 2;
    margin-bottom: 0;
  }

  .dialog-shell {
    grid-template-columns: minmax(0, 1fr);
    overflow-y: auto;
  }

  .dialog-media {
    min-height: 300px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .dialog-media .card-visual {
    min-height: 300px;
  }

  .dialog-stage img {
    max-height: 52vh;
  }

  .dialog-body {
    max-height: none;
    overflow: visible;
  }

  .footer-top {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (min-width: 901px) {
  .mobile-menu {
    display: none !important;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 60px;
  }

  .lang-switch button {
    padding: 5px 8px;
  }

  .hero {
    padding-top: calc(var(--header-h) + 44px);
  }

  .hero-meta-prompt {
    display: none;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .terminal-body {
    min-height: 0;
    padding: 16px 16px 18px;
    font-size: 12px;
  }

  .stat {
    padding: 22px 16px 26px;
  }

  .work-controls {
    margin-bottom: 40px;
  }

  .search {
    max-width: none;
  }

  .filters {
    margin-inline: calc(var(--gutter) * -1);
    max-width: none;
    width: calc(100% + 2 * var(--gutter));
    border-radius: 0;
    border-inline: 0;
    padding-inline: var(--gutter);
  }

  .filters-indicator {
    top: 4px;
  }

  .work-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .card--sm,
  .card--lg,
  .card--xl,
  .card--full {
    grid-column: auto;
  }

  .card-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card .v-modules {
    height: auto;
  }

  .modules-status {
    display: none;
  }

  .card-stats--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .map-foot span:nth-child(3),
  .map-head span:last-child {
    display: none;
  }

  .card,
  .card--lg {
    --visual-h: 220px;
  }

  .v-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .v-strip img:nth-child(4) {
    display: none;
  }

  .journey-item {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 8px 16px;
    padding: 24px 0;
  }

  .journey-item p {
    grid-column: 2;
  }

  .skills-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .skill-col,
  .skill-col:nth-child(n) {
    margin-top: 0;
    padding: 28px 0 0;
    border-left: 0;
  }

  .contact-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 16px;
  }

  .contact-row-label {
    grid-column: 1;
  }

  .contact-row-value {
    grid-column: 1;
    grid-row: 2;
  }

  .contact-row-icon {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .notice {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 22px;
  }

  .footer-nav {
    grid-template-columns: max-content;
  }

  .to-top {
    right: 16px;
    bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .marquee-track {
    animation: none;
  }
}
