/* Simon's Studios — shared styles */

@font-face { font-family: 'Inter'; src: url('../assets/fonts/inter-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('../assets/fonts/space-grotesk-var.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../assets/fonts/jetbrains-mono-var.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }

/* ---------- Tokens ---------- */

:root {
  --bg: #f6f7f9;
  --bg-soft: #eef0f4;
  --card: #ffffff;
  --card-hover: #ffffff;
  --border: rgba(15, 23, 42, 0.09);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text: #0e1525;
  --muted: #5a6476;
  --faint: #8a93a3;
  --accent: #4f63e8;
  --accent-2: #0891b2;
  --accent-3: #8b5cf6;
  --ok: #10b981;
  --warn: #f59e0b;
  --glow: rgba(79, 99, 232, 0.14);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --nav-bg: rgba(246, 247, 249, 0.75);
  --grid-line: rgba(15, 23, 42, 0.05);
  --node: 79, 99, 232;

  --font-head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;
  --radius: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1160px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #090b10;
  --bg-soft: #0e1118;
  --card: #10131b;
  --card-hover: #141824;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #e8ecf3;
  --muted: #9099aa;
  --faint: #636c7d;
  --accent: #7c8cff;
  --accent-2: #22d3ee;
  --accent-3: #a78bfa;
  --ok: #34d399;
  --glow: rgba(124, 140, 255, 0.16);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.35);
  --nav-bg: rgba(9, 11, 16, 0.72);
  --grid-line: rgba(255, 255, 255, 0.035);
  --node: 124, 140, 255;
  color-scheme: dark;
}

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

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .3s ease, color .3s ease;
}

::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Bilingual content: both languages live in the markup, only one is shown. */
html:not([data-lang="de"]) [lang="de"]:not(html),
html[data-lang="de"] [lang="en"]:not(html) { display: none !important; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

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

/* ---------- Navbar ---------- */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background-color .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }

.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; white-space: nowrap; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: #fff; font-size: .8rem; font-weight: 700; font-family: var(--font-mono);
  box-shadow: 0 4px 14px var(--glow);
}

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  white-space: nowrap;
  font-size: .9rem; color: var(--muted); padding: 8px 12px; border-radius: 8px;
  transition: color .2s ease, background-color .2s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--bg-soft); }

.nav-tools { display: flex; align-items: center; gap: 6px; }
.tool-btn {
  height: 34px; min-width: 34px; padding: 0 10px; border-radius: 9px;
  border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: .78rem; font-family: var(--font-mono); color: var(--muted);
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}
.tool-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-soft); }
.tool-btn svg { width: 16px; height: 16px; }
.lang-btn b { color: var(--text); font-weight: 600; }

.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }

.menu-btn { display: none; }

@media (max-width: 1000px) {
  .menu-btn { display: inline-flex; }
  .nav-links {
    position: fixed; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 16px 20px;
    background: var(--nav-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .25s ease, transform .25s var(--ease);
  }
  .nav.open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav.open { background: var(--nav-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .nav-links a { padding: 12px; font-size: 1rem; }
}

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

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 11px;
  font-weight: 500; font-size: .95rem;
  border: 1px solid var(--border-strong);
  background: var(--card);
  transition: transform .2s var(--ease), box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--accent); box-shadow: 0 6px 20px var(--glow); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--text); color: var(--bg); border-color: transparent; }
.btn-primary:hover { background: var(--text); box-shadow: 0 8px 24px var(--glow); }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn-sm { height: 36px; padding: 0 14px; font-size: .86rem; border-radius: 9px; }

/* ---------- Start screen ---------- */

.start {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center; text-align: center;
  overflow: hidden; isolation: isolate;
}
.start-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; }
.start { touch-action: manipulation; }   /* no double-tap zoom: double tap opens the easter-egg menu */
.start::before {
  content: ''; position: absolute; inset: 0; z-index: -3;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 75%);
}
.start::after {
  content: ''; position: absolute; z-index: -1; width: 720px; height: 720px; max-width: 120vw;
  left: 50%; top: 45%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--glow), transparent 65%);
  pointer-events: none;
}

.start-inner { padding: 96px 16px 120px; }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: color-mix(in srgb, var(--card) 70%, transparent);
  font-family: var(--font-mono); font-size: .76rem; color: var(--muted);
  margin-bottom: 28px; backdrop-filter: blur(6px);
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: ping 2.4s ease-out infinite; }
@keyframes ping {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); }
  70%, 100% { box-shadow: 0 0 0 8px transparent; }
}

.title {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(2.8rem, 9vw, 6.2rem); line-height: 1; letter-spacing: -0.035em;
  background: linear-gradient(100deg, var(--text) 0%, var(--accent) 30%, var(--accent-3) 50%, var(--accent-2) 70%, var(--text) 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: titleShift 14s ease-in-out infinite alternate;
  padding-bottom: .08em;
}
@keyframes titleShift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

.type-lines { margin-top: 22px; min-height: 3.6em; font-family: var(--font-mono); }
.type-line { font-size: clamp(1rem, 2.2vw, 1.2rem); color: var(--muted); min-height: 1.6em; }
.type-line.sub { color: var(--text); font-weight: 500; }
.caret { display: inline-block; width: .55em; height: 1.1em; margin-left: 2px; vertical-align: -0.18em; background: var(--accent); animation: blink 1s steps(1) infinite; }
.type-fallback { position: absolute; left: -9999px; }
html.no-js .type-lines { display: none; }
html.no-js .type-fallback { position: static; margin-top: 22px; font-family: var(--font-mono); font-size: clamp(1rem, 2.2vw, 1.2rem); color: var(--muted); }
.caret.gone { opacity: 0; transition: opacity .6s ease; animation: none; }
@keyframes blink { 50% { opacity: 0; } }

.start-cta { margin-top: 34px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.scroll-cue {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint);
  transition: opacity .4s ease, color .2s ease;
}
.scroll-cue:hover { color: var(--text); }
.scroll-cue .mouse { width: 20px; height: 32px; border: 1.5px solid currentColor; border-radius: 12px; position: relative; }
.scroll-cue .mouse::after { content: ''; position: absolute; left: 50%; top: 7px; width: 3px; height: 6px; margin-left: -1.5px; border-radius: 2px; background: currentColor; animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(9px); } }
.scroll-cue.hidden { opacity: 0; pointer-events: none; }

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

.section { padding: 120px 0; position: relative; }
.section + .section { border-top: 1px solid var(--border); }
@media (max-width: 700px) { .section { padding: 84px 0; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ''; width: 18px; height: 1px; background: currentColor; }

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head h2 {
  font-family: var(--font-head); font-weight: 600; letter-spacing: -0.03em;
  font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.08; margin: 14px 0 16px;
}
.section-head p { color: var(--muted); font-size: 1.08rem; }

h3 { font-family: var(--font-head); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }

/* ---------- Cards ---------- */

.card {
  position: relative; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color .3s ease, transform .4s var(--ease), box-shadow .3s ease, background-color .3s ease;
}
.card.spot::before {
  /* soft light that follows the cursor (positions set from JS) */
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--glow), transparent 60%);
  opacity: 0; transition: opacity .3s ease;
}
.card.spot:hover::before { opacity: 1; }
.card.spot:hover { border-color: var(--border-strong); }
.card > * { position: relative; z-index: 1; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--font-mono); font-size: .72rem; color: var(--muted);
  padding: 4px 9px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-soft);
}

.link { color: var(--accent); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.link:hover .arrow { transform: translateX(3px); }
.link .arrow { transition: transform .2s var(--ease); }

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

.feature {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 0; min-height: 520px;
}
.feature-text { padding: 48px; display: flex; flex-direction: column; gap: 18px; }
.feature-text h3 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.feature-text p { color: var(--muted); }
.feature-badge { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-family: var(--font-mono); color: var(--ok); }
.feature-badge .status-dot { animation-duration: 2s; }
.feature-points { list-style: none; display: grid; gap: 10px; margin: 4px 0; }
.feature-points li { display: flex; gap: 10px; color: var(--muted); font-size: .95rem; }
.feature-points li::before { content: ''; flex: none; width: 6px; height: 6px; margin-top: .62em; border-radius: 2px; background: var(--accent); }
.feature-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }

.feature-visual {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 70% 30%, var(--glow), transparent 60%),
    var(--bg-soft);
  border-left: 1px solid var(--border);
  min-height: 420px;
}
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 20px; }
.project { padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.project h3 { font-size: 1.45rem; }
.project p { color: var(--muted); font-size: .96rem; }
.project .feature-actions { padding-top: 4px; }
.project > .tags:last-child { margin-top: auto; }

.browser {
  border-radius: 12px; overflow: hidden; border: 1px solid var(--border-strong);
  background: var(--bg-soft); box-shadow: var(--shadow);
}
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.browser-bar span { margin-left: 10px; font-family: var(--font-mono); font-size: .7rem; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; transition: transform 1.2s var(--ease); }
.project:hover .browser img { transform: scale(1.03); }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { padding: 14px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--border); }
.stat b { display: block; font-family: var(--font-head); font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.stat > span { font-size: .78rem; color: var(--muted); }

.shrink { padding: 22px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--border); }
.shrink-row { display: flex; align-items: baseline; justify-content: space-between; font-family: var(--font-mono); font-size: .78rem; color: var(--muted); margin-bottom: 8px; }
.shrink-row b { font-family: var(--font-head); font-size: 1.9rem; color: var(--text); letter-spacing: -0.02em; }
.shrink-bar { height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; }
.shrink-bar i { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transform-origin: left; transition: transform 1.8s var(--ease) .2s; }
.shrink.in .shrink-bar i { transform: scaleX(0.03); }

@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; }
  .feature-visual { border-left: 0; border-top: 1px solid var(--border); min-height: 380px; }
  .feature-text { padding: 32px 24px; }
  .project-grid { grid-template-columns: 1fr; }
  .project { padding: 24px; }
}


/* ---------- Nextcloud feature ---------- */

.apps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.apps li {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 11px; border-radius: 9px; font-size: .84rem;
  background: var(--bg-soft); border: 1px solid var(--border);
  opacity: 0; transform: translateY(8px) scale(.96);
  transition: opacity .5s var(--ease), transform .5s var(--ease), border-color .2s ease;
  transition-delay: calc(var(--i) * 55ms + 150ms);
}
.apps li:hover { border-color: var(--accent); }
.apps li svg { width: 15px; height: 15px; color: var(--accent); flex: none; }
.apps li.hl { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 8%, var(--bg-soft)); }
.apps li.more { color: var(--muted); font-family: var(--font-mono); font-size: .76rem; }
.in .apps li, html.no-js .apps li { opacity: 1; transform: none; }

.nc-visual { display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 40px 36px; }
.nc-shot img { aspect-ratio: 1320 / 1095; object-fit: cover; }
.nc-caption { font-size: .9rem; color: var(--muted); padding: 0 4px; }
.nc-caption b { color: var(--text); display: block; font-family: var(--font-head); font-size: 1rem; margin-bottom: 2px; }

/* ---------- Chat demo ---------- */

.chat { border-radius: 14px; border: 1px solid var(--border); background: var(--bg-soft); overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.chat-head b { display: block; font-size: .88rem; }
.chat-head small { display: block; font-size: .72rem; color: var(--faint); font-family: var(--font-mono); }
.chat-avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .8rem; color: #fff; background: linear-gradient(135deg, #d97757, #b65a3a); flex: none; }
.chat-time { margin-left: auto; font-family: var(--font-mono); font-size: .72rem; color: var(--faint); }
.chat-body { padding: 14px; display: grid; gap: 8px; justify-items: start; }
.msg {
  max-width: 92%; padding: 9px 13px; border-radius: 4px 14px 14px 14px; font-size: .88rem;
  background: var(--card); border: 1px solid var(--border);
  opacity: 0; transform: translateY(8px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  transition-delay: calc(var(--i) * 700ms + 300ms);
}
.msg.warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.msg-time { display: block; font-family: var(--font-mono); font-size: .66rem; color: var(--faint); margin-bottom: 3px; }
.msg.brief { max-width: 100%; white-space: pre-line; font-size: .82rem; line-height: 1.5; }
.msg.brief b { font-weight: 600; }
.chat.in .msg, html.no-js .msg { opacity: 1; transform: none; }

/* ---------- LearningForge screenshots ---------- */

.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.shots img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top;
  border-radius: 10px; border: 1px solid var(--border-strong); background: #0b1020;
  transition: transform .5s var(--ease), box-shadow .3s ease;
}
.shots img:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

/* ---------- AI server ---------- */

.gpu-visual { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 40px 36px; }
.gpu { width: 100%; height: auto; filter: drop-shadow(0 20px 40px rgba(0,0,0,.35)); }
.fan { animation: spin 1.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.gpu-glow { animation: glow 3s ease-in-out infinite; }
@keyframes glow { 50% { opacity: .35; } }
.vram { padding: 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); }
.vram-head, .vram-foot { display: flex; justify-content: space-between; gap: 10px; font-family: var(--font-mono); font-size: .74rem; color: var(--muted); }
.vram-head b { color: var(--text); font-family: var(--font-head); font-size: 1.15rem; }
.vram-head { align-items: baseline; margin-bottom: 10px; }
.vram-foot { margin-top: 10px; color: var(--faint); }
.vram-cells { display: grid; grid-template-columns: repeat(18, 1fr); gap: 4px; }
.vram-cells i { height: 18px; border-radius: 3px; background: var(--bg-soft); border: 1px solid var(--border); transition: background-color .3s ease, box-shadow .3s ease; }
.in .vram-cells i { background: linear-gradient(180deg, var(--accent), var(--accent-3)); border-color: transparent; box-shadow: 0 0 10px var(--glow); }
.in .vram-cells i:nth-child(1) { transition-delay: 300ms; }
.in .vram-cells i:nth-child(2) { transition-delay: 370ms; }
.in .vram-cells i:nth-child(3) { transition-delay: 440ms; }
.in .vram-cells i:nth-child(4) { transition-delay: 510ms; }
.in .vram-cells i:nth-child(5) { transition-delay: 580ms; }
.in .vram-cells i:nth-child(6) { transition-delay: 650ms; }
.in .vram-cells i:nth-child(7) { transition-delay: 720ms; }
.in .vram-cells i:nth-child(8) { transition-delay: 790ms; }
.in .vram-cells i:nth-child(9) { transition-delay: 860ms; }
.in .vram-cells i:nth-child(10) { transition-delay: 930ms; }
.in .vram-cells i:nth-child(11) { transition-delay: 1000ms; }
.in .vram-cells i:nth-child(12) { transition-delay: 1070ms; }
.in .vram-cells i:nth-child(13) { transition-delay: 1140ms; }
.in .vram-cells i:nth-child(14) { transition-delay: 1210ms; }
.in .vram-cells i:nth-child(15) { transition-delay: 1280ms; }
.in .vram-cells i:nth-child(16) { transition-delay: 1350ms; }
.in .vram-cells i:nth-child(17) { transition-delay: 1420ms; }
.in .vram-cells i:nth-child(18) { transition-delay: 1490ms; }
@media (max-width: 900px) { .nc-visual, .gpu-visual { padding: 28px 20px; } }

/* ---------- Homelab: topology ---------- */

.topo-card { padding: 36px 28px; }
.topo { display: flex; align-items: stretch; justify-content: space-between; }
.topo-col { display: flex; flex-direction: column; justify-content: center; gap: 10px; flex: none; }
.topo-node {
  position: relative; width: 132px; padding: 14px 12px; border-radius: 12px; text-align: center;
  background: var(--bg-soft); border: 1px solid var(--border);
  transition: border-color .25s ease, transform .3s var(--ease), box-shadow .25s ease;
  cursor: default;
}
.topo-node:hover, .topo-node:focus-visible, .topo-node.lit { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 22px var(--glow); }
.topo-node svg { width: 22px; height: 22px; color: var(--accent); margin: 0 auto 6px; display: block; }
.topo-node b { display: block; font-size: .86rem; font-weight: 600; }
.topo-node small { display: block; font-family: var(--font-mono); font-size: .66rem; color: var(--muted); }
.topo-col.vms .topo-node { width: 150px; padding: 9px 12px; text-align: left; display: flex; align-items: center; gap: 10px; }
.topo-col.vms .topo-node svg { margin: 0; width: 18px; height: 18px; flex: none; }
.topo-col.vms .topo-node b { font-size: .8rem; }

.wire { position: relative; flex: 1; min-width: 18px; align-self: center; height: 2px; background: var(--border-strong); overflow: hidden; border-radius: 2px; }
.wire::after {
  content: ''; position: absolute; top: -1px; left: -30%; width: 30%; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, transparent, var(--accent-2), var(--accent));
  animation: packet 2.2s linear infinite; animation-delay: var(--d, 0s);
}
@keyframes packet { to { left: 100%; } }
.wire.dashed { background: repeating-linear-gradient(90deg, var(--border-strong) 0 6px, transparent 6px 11px); }

.topo-tip {
  margin-top: 24px; min-height: 3.2em; padding: 14px 16px; border-radius: 10px;
  background: var(--bg-soft); border: 1px dashed var(--border-strong);
  font-size: .92rem; color: var(--muted); display: flex; gap: 10px; align-items: flex-start;
}
.topo-tip .mono { color: var(--accent); flex: none; }

@media (max-width: 980px) {
  .topo { flex-direction: column; align-items: center; }
  .topo-col { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .topo-node, .topo-col.vms .topo-node { width: 200px; }
  .wire { width: 2px; height: 30px; flex: none; min-width: 0; }
  .wire::after { top: -30%; left: -1px; width: 4px; height: 30%; background: linear-gradient(180deg, transparent, var(--accent-2), var(--accent)); animation-name: packetY; }
  .wire.dashed { background: repeating-linear-gradient(180deg, var(--border-strong) 0 6px, transparent 6px 11px); }
  @keyframes packetY { to { top: 100%; } }
  .topo-col.vms { max-width: 420px; }
  .topo-col.vms .topo-node { width: calc(50% - 5px); min-width: 150px; }
}

/* ---------- Homelab: rack + specs ---------- */

.lab-grid { display: grid; grid-template-columns: 380px 1fr; gap: 20px; margin-top: 20px; }
.rack-card { padding: 28px; display: flex; flex-direction: column; justify-content: center; }
.rack {
  border-radius: 10px; padding: 10px 14px; position: relative;
  background: linear-gradient(90deg, #1b1f29, #252a36 6%, #1b1f29 8%, #1b1f29 92%, #252a36 94%, #1b1f29);
  border: 1px solid rgba(255,255,255,.08);
}
.rack::before, .rack::after { content: ''; position: absolute; top: 10px; bottom: 10px; width: 3px; background: repeating-linear-gradient(180deg, #3a4150 0 2px, transparent 2px 9px); }
.rack::before { left: 5px; } .rack::after { right: 5px; }
.unit {
  height: 26px; margin: 3px 0; border-radius: 3px; display: flex; align-items: center; gap: 8px; padding: 0 10px;
  background: linear-gradient(180deg, #2c3240, #232835); border: 1px solid rgba(255,255,255,.06);
  font-family: var(--font-mono); font-size: .64rem; color: #a3acbd;
  opacity: 0; transform: translateX(-24px);
  transition: opacity .5s ease, transform .6s var(--ease);
  transition-delay: calc(var(--i) * 110ms);
}
.rack.in .unit { opacity: 1; transform: none; }
.unit.u2 { height: 55px; } .unit.u4 { height: 113px; align-items: flex-start; padding-top: 8px; flex-wrap: wrap; align-content: flex-start; }
.unit.empty { background: transparent; border: 1px dashed rgba(255,255,255,.08); color: #586072; }
.unit .label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.led { width: 5px; height: 5px; border-radius: 50%; background: #34d399; box-shadow: 0 0 6px #34d399; flex: none; }
.led.blink { animation: led 1.4s steps(2) infinite; animation-delay: var(--ld, 0s); }
.led.amber { background: #fbbf24; box-shadow: 0 0 6px #fbbf24; }
@keyframes led { 50% { opacity: .25; } }
.ports { display: grid; grid-template-columns: repeat(12, 7px); gap: 3px; }
.ports i { width: 7px; height: 6px; background: #12151c; border-radius: 1px; border-bottom: 2px solid #3a4150; }
.ports i.on { border-bottom-color: #34d399; animation: led 1s steps(2) infinite; animation-delay: var(--ld, 0s); }
.bays { width: 100%; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 6px; }
.bays i { height: 40px; border-radius: 2px; background: #171b24; border: 1px solid rgba(255,255,255,.06); position: relative; }
.bays i.on::after { content: ''; position: absolute; bottom: 4px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #60a5fa; box-shadow: 0 0 5px #60a5fa; animation: led .9s steps(2) infinite; animation-delay: var(--ld, 0s); }
.rack-caption { margin-top: 14px; font-size: .82rem; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }

.spec-card { padding: 32px; }
.spec-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.spec-head h3 { font-size: 1.35rem; }
.pill { font-family: var(--font-mono); font-size: .72rem; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--muted); }
.pill.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.pill.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.spec { background: var(--card); padding: 16px 18px; }
.spec small { display: block; font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: 4px; }
.spec b { font-weight: 600; font-size: .95rem; }
.spec > span { display: block; color: var(--muted); font-size: .82rem; }

.now-box { margin-top: 20px; padding: 18px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--border); display: flex; gap: 14px; align-items: flex-start; }
.now-box svg { width: 22px; height: 22px; color: var(--ok); flex: none; margin-top: 2px; }
.now-box p { font-size: .92rem; color: var(--muted); }
.now-box b { color: var(--text); }

@media (max-width: 980px) {
  .lab-grid { grid-template-columns: 1fr; }
  .rack-card { max-width: 440px; width: 100%; margin: 0 auto; }
}
@media (max-width: 560px) { .specs { grid-template-columns: 1fr; } .spec-card { padding: 22px; } }


/* ---------- Custom rack units (Pi display) ---------- */

.unit.disp { align-items: center; }
.mini-screen { width: 64px; height: 38px; border-radius: 3px; background: #05070c; border: 1px solid #000; display: flex; align-items: flex-end; gap: 3px; padding: 4px; flex: none; }
.mini-screen i { flex: 1; height: var(--h); background: linear-gradient(180deg, #7c8cff, #22d3ee); border-radius: 1px; opacity: .85; animation: eq 2.4s ease-in-out infinite alternate; }
.mini-screen i:nth-child(2n) { animation-delay: -.8s; } .mini-screen i:nth-child(3n) { animation-delay: -1.6s; }
@keyframes eq { to { height: calc(var(--h) * .45); } }
.unit.ups { align-items: center; }
.ups-bar { width: 70px; height: 10px; border-radius: 2px; border: 1px solid #3a4150; padding: 1px; flex: none; }
.ups-bar i { display: block; height: 100%; width: 100%; background: #34d399; border-radius: 1px; }

.custom-card { margin-top: 20px; display: grid; grid-template-columns: 1fr 1.1fr; }
.custom-text, .orch-text { padding: 40px; display: flex; flex-direction: column; gap: 16px; }
.custom-text h3, .orch-text h3 { font-size: 1.6rem; }
.custom-text p, .orch-text p { color: var(--muted); }
.pi-visual { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 40px 32px; background: radial-gradient(circle at 60% 40%, var(--glow), transparent 65%), var(--bg-soft); border-left: 1px solid var(--border); }
.pi-panel { position: relative; padding: 14px 40px; border-radius: 6px; background: linear-gradient(180deg, #2c3240, #1d212b); border: 1px solid rgba(255,255,255,.08); box-shadow: 0 24px 50px rgba(0,0,0,.3); }
.pi-panel::before, .pi-panel::after { content: ''; position: absolute; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: #3d4453; box-shadow: inset 0 0 0 2px #2a2f3b; }
.pi-panel::before { left: 14px; } .pi-panel::after { right: 14px; }
.pi-screen { background: #05070c; border: 2px solid #000; border-radius: 6px; padding: 12px; font-family: var(--font-mono); color: #cfd6e4; display: grid; gap: 10px; }
.pi-top { display: flex; justify-content: space-between; font-size: .68rem; color: #6b7385; }
.pi-top b { color: #cfd6e4; font-weight: 500; }
.pi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pi-tile { background: #0f131c; border: 1px solid rgba(255,255,255,.05); border-radius: 6px; padding: 8px 10px; min-height: 66px; }
.pi-tile small { display: block; font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: #6b7385; }
.pi-tile b { display: block; font-size: .92rem; font-weight: 500; margin: 2px 0 6px; color: #e8ecf3; }
.pi-bar { height: 4px; border-radius: 2px; background: #1d2330; overflow: hidden; }
.pi-bar i { display: block; height: 100%; background: linear-gradient(90deg, #22d3ee, #7c8cff); transition: width .9s var(--ease); }
.pi-spark { height: 18px; }
.pi-spark svg { width: 100%; height: 100%; display: block; }
.pi-ok { font-size: .62rem; color: #34d399; }
.pi-vms { display: flex; flex-wrap: wrap; gap: 5px; }
.pi-vms span { font-size: .6rem; padding: 2px 7px; border-radius: 4px; background: #0f131c; border: 1px solid rgba(255,255,255,.05); color: #9aa3b5; }
.pi-vms span.on::before { content: '● '; color: #34d399; }
.pi-note { text-align: center; font-family: var(--font-mono); font-size: .7rem; color: var(--faint); }

/* ---------- Orchestrator diagram ---------- */

.orch-card { margin-top: 20px; display: grid; grid-template-columns: 1fr 1.15fr; }
.orch { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 32px; background: var(--bg-soft); border-left: 1px solid var(--border); }
.orch-req { width: 100%; max-width: 380px; text-align: center; padding: 12px 16px; border-radius: 12px; border: 1px dashed var(--border-strong); background: var(--card); }
.orch-req small { display: block; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
#orchTask { display: block; font-size: .92rem; min-height: 1.5em; transition: opacity .3s ease, transform .3s ease; }
#orchTask.swap { opacity: 0; transform: translateY(-4px); }
.orch-line, .orch-bus::before, .w-line { position: relative; background: var(--border-strong); overflow: hidden; }
.orch-line { width: 2px; height: 28px; }
.orch-line::after, .w-line::after { content: ''; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: linear-gradient(180deg, transparent, var(--accent-2), var(--accent)); opacity: 0; }
.orch.pulse .orch-line::after { animation: drop .6s ease-in forwards; }
.worker.active .w-line::after { animation: drop .6s ease-in forwards; }
@keyframes drop { 0% { top: -40%; opacity: 1; } 100% { top: 100%; opacity: 1; } }
.orch-main { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 12px; background: var(--card); border: 1px solid var(--accent); box-shadow: 0 8px 26px var(--glow); }
.orch-main svg { width: 20px; height: 20px; color: var(--accent); }
.orch-main.think svg { animation: spin 2s linear infinite; }
.orch-main small { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); }
.orch-bus { position: relative; width: 66.7%; height: 46px; }
.orch-bus::before { content: ''; position: absolute; left: 50%; top: 0; width: 2px; height: 22px; margin-left: -1px; }
.orch-bus::after { content: ''; position: absolute; left: 0; right: 0; top: 22px; height: 2px; background: var(--border-strong); }
.orch-workers { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: -24px; }
.worker { display: flex; flex-direction: column; align-items: center; text-align: center; }
.w-line { width: 2px; height: 24px; margin-bottom: 0; }
.worker b, .worker small { display: block; }
.worker > b { margin-top: 0; width: 100%; padding: 10px 8px 2px; border: 1px solid var(--border); border-bottom: 0; border-radius: 10px 10px 0 0; background: var(--card); font-size: .88rem; font-weight: 600; transition: border-color .3s ease, background-color .3s ease; }
.worker > small { width: 100%; padding: 0 8px 10px; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 10px 10px; background: var(--card); font-family: var(--font-mono); font-size: .62rem; color: var(--faint); transition: border-color .3s ease; }
.worker.active > b, .worker.active > small { border-color: var(--accent); }
.worker.active > b { color: var(--accent); }

@media (max-width: 900px) {
  .custom-card, .orch-card { grid-template-columns: 1fr; }
  .pi-visual, .orch { border-left: 0; border-top: 1px solid var(--border); padding: 28px 18px; }
  .custom-text, .orch-text { padding: 26px; }
  .pi-panel { padding: 12px 30px; }
}

/* ---------- Roadmap ---------- */

.roadmap { margin-top: 20px; padding: 32px; }
.roadmap h3 { font-size: 1.2rem; margin-bottom: 26px; }
.phases { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; position: relative; }
.phases::before { content: ''; position: absolute; top: 7px; left: 8px; right: 8px; height: 2px; background: var(--border-strong); }
.phases::after {
  content: ''; position: absolute; top: 7px; left: 8px; height: 2px; width: calc((100% - 16px) * var(--progress, 0));
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transform-origin: left; transform: scaleX(0); transition: transform 1.6s var(--ease) .2s;
}
.phases.in::after { transform: scaleX(1); }
.phase { position: relative; padding-top: 28px; }
.phases.four { grid-template-columns: repeat(4, 1fr); }
.phase::before { content: ''; position: absolute; top: 0; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 2px solid var(--border-strong); z-index: 1; }
.phase.done::before { background: var(--accent); border-color: var(--accent); }
.phase.current::before { border-color: var(--accent); box-shadow: 0 0 0 5px var(--glow); }
.phase small { font-family: var(--font-mono); font-size: .7rem; color: var(--faint); display: block; }
.phase b { display: block; font-size: .92rem; font-weight: 600; margin: 2px 0 4px; }
.phase > span { font-size: .8rem; color: var(--muted); display: block; line-height: 1.45; }
@media (max-width: 900px) {
  .phases, .phases.four { grid-template-columns: 1fr; gap: 20px; padding-left: 30px; }
  .phases::before { top: 8px; bottom: 8px; left: 7px; right: auto; width: 2px; height: auto; }
  .phases::after { top: 8px; left: 7px; width: 2px; height: calc((100% - 16px) * var(--progress, 0)); transform: scaleY(0); transform-origin: top; }
  .phases.in::after { transform: scaleY(1); }
  .phase { padding-top: 0; }
  .phase::before { left: -30px; top: 2px; }
}

/* ---------- Local AI ---------- */

.ai-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 20px; align-items: stretch; }
.ai-text { padding: 36px; display: flex; flex-direction: column; gap: 16px; }
.ai-text h3 { font-size: 1.6rem; }
.ai-text p { color: var(--muted); }
.ai-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.ai-fact b { overflow-wrap: anywhere; }
@media (max-width: 420px) { .ai-facts { grid-template-columns: 1fr; } }
.ai-fact { padding: 14px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--border); }
.ai-fact small { font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); display: block; }
.ai-fact b { font-size: .98rem; font-weight: 600; }

.term { display: flex; flex-direction: column; background: #0b0e14; border-color: rgba(255,255,255,.08); color: #d6dbe5; }
.term-bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.07); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a303c; }
.term-bar > span { margin-left: auto; font-family: var(--font-mono); font-size: .7rem; color: #6b7385; display: flex; align-items: center; gap: 6px; }
.term-body { padding: 20px; font-family: var(--font-mono); font-size: .84rem; line-height: 1.7; flex: 1; min-height: 300px; white-space: pre-wrap; word-break: break-word; }
.term-body .p { color: #7c8cff; } .term-body .u { color: #e8ecf3; } .term-body .c { color: #6b7385; } .term-body .g { color: #34d399; }
.term-foot { display: flex; gap: 18px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid rgba(255,255,255,.07); font-family: var(--font-mono); font-size: .7rem; color: #6b7385; }
.term-foot b { color: #34d399; font-weight: 500; }
@media (max-width: 900px) { .ai-grid { grid-template-columns: 1fr; } .ai-text { padding: 26px; } }

/* ---------- Timeline / experience ---------- */

.xp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.xp { padding: 32px; }
.xp h3 { font-size: 1.2rem; margin-bottom: 22px; display: flex; align-items: center; gap: 10px; }
.xp h3 svg { width: 20px; height: 20px; color: var(--accent); }
.tl { list-style: none; position: relative; padding-left: 22px; display: grid; gap: 22px; }
.tl::before { content: ''; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--border-strong); }
.tl li { position: relative; }
.tl li::before { content: ''; position: absolute; left: -22px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--card); border: 2px solid var(--accent); }
.tl small { font-family: var(--font-mono); font-size: .72rem; color: var(--faint); display: block; }
.tl b { display: block; font-weight: 600; margin: 2px 0 3px; }
.tl p { font-size: .9rem; color: var(--muted); }
.award { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .74rem; font-family: var(--font-mono); color: var(--warn); padding: 3px 9px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); }
@media (max-width: 900px) { .xp-grid { grid-template-columns: 1fr; } .xp { padding: 24px; } }

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

.contact { text-align: center; padding: 72px 32px; }
.contact h2 { font-family: var(--font-head); font-weight: 600; letter-spacing: -0.03em; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; margin: 14px 0; }
.contact p { color: var(--muted); max-width: 520px; margin: 0 auto 30px; }
.mail {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: clamp(1rem, 2.6vw, 1.35rem);
  padding: 14px 22px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--bg-soft);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.mail:hover { border-color: var(--accent); box-shadow: 0 8px 26px var(--glow); }
.copy-btn { font-size: .75rem; color: var(--muted); padding: 4px 8px; border-radius: 6px; border: 1px solid var(--border); }
.copy-btn:hover { color: var(--text); }
.contact-links { display: flex; justify-content: center; gap: 10px; margin-top: 22px; flex-wrap: wrap; }

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

.footer { border-top: 1px solid var(--border); padding: 32px 0 40px; font-size: .85rem; color: var(--faint); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a:hover { color: var(--text); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- Subpages ---------- */

.page-head { padding: 150px 0 60px; position: relative; overflow: hidden; }
.page-head::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 90% at 20% 0%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 20% 0%, #000 20%, transparent 70%);
}
.page-head h1 { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.035em; font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 1.02; margin: 16px 0 18px; }
.page-head p { color: var(--muted); font-size: 1.15rem; max-width: 680px; }
.page-head .meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }

.back { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--muted); }
.back:hover { color: var(--text); }

.block { padding: 64px 0; border-top: 1px solid var(--border); }
.block-grid { display: grid; grid-template-columns: 260px 1fr; gap: 40px; }
.block-grid > h2 { font-family: var(--font-head); font-weight: 600; font-size: 1.5rem; letter-spacing: -0.02em; position: sticky; top: 96px; align-self: start; }
.block-grid > h2 small { display: block; font-family: var(--font-mono); font-size: .72rem; color: var(--accent); letter-spacing: .1em; margin-bottom: 6px; }
@media (max-width: 860px) { .block-grid { grid-template-columns: 1fr; gap: 22px; } .block-grid > h2 { position: static; } }

.entries { display: grid; gap: 16px; }
.entry { padding: 26px; }
.entry-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.entry-top h3 { font-size: 1.15rem; }
.entry p, .entry li { color: var(--muted); font-size: .95rem; }
.entry ul { padding-left: 18px; display: grid; gap: 6px; margin-top: 8px; }
.entry p + p { margin-top: 8px; }
.entry .tags { margin-top: 14px; }

.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.skill { padding: 22px; }
.skill h3 { font-size: 1rem; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.skill h3 svg { width: 18px; height: 18px; color: var(--accent); }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.fact { padding: 20px; }
.fact small { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); display: block; margin-bottom: 4px; }
.fact b { font-weight: 600; overflow-wrap: anywhere; }

.values { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.values li { padding: 22px; font-family: var(--font-head); font-size: 1.15rem; font-weight: 500; letter-spacing: -0.01em; }
.values li .num { display: block; font-family: var(--font-mono); font-size: .7rem; color: var(--accent); margin-bottom: 8px; }
@media (max-width: 600px) { .values { grid-template-columns: 1fr; } }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 560px; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--border); }
th { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); font-weight: 500; background: var(--bg-soft); }
tr:last-child td { border-bottom: 0; }
td { color: var(--muted); }
td:first-child { color: var(--text); font-weight: 500; }

.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 84px; gap: 14px; align-items: center; font-size: .88rem; }
.bar-row > span:first-child { color: var(--text); }
.bar-row > span:last-child { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); text-align: right; }
.bar { height: 10px; border-radius: 99px; background: var(--bg-soft); border: 1px solid var(--border); overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: inherit; transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.bars.in .bar i { transform: scaleX(1); }
@media (max-width: 560px) { .bar-row { grid-template-columns: 100px 1fr 72px; gap: 10px; } }

.layers { display: grid; gap: 10px; }
.layer { padding: 18px 20px; display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; }
.layer .n { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-family: var(--font-mono); font-size: .8rem; color: var(--accent); background: var(--glow); }
.layer b { display: block; font-weight: 600; }
.layer p { color: var(--muted); font-size: .9rem; }

.decisions { display: grid; gap: 12px; }
.decision { padding: 20px 22px; }
.decision b { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 4px; flex-wrap: wrap; }
.decision b .vs { font-family: var(--font-mono); font-size: .7rem; color: var(--faint); font-weight: 400; }
.decision p { color: var(--muted); font-size: .9rem; }

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--rd, 0) * 80ms); }
.reveal.in { opacity: 1; transform: none; }
html.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .unit { opacity: 1; transform: none; }
  .wire::after { display: none; }
}

/* ---------- Without JavaScript: show final states instead of empty placeholders ---------- */

html:not(.no-js) .term-fallback { display: none; }
html.no-js .unit { opacity: 1; transform: none; }
html.no-js .bars i { transform: scaleX(1); }
html.no-js .phases::after { transform: none; }
html.no-js .shrink-bar i { transform: scaleX(0.03); }
html.no-js .vram-cells i { background: linear-gradient(180deg, var(--accent), var(--accent-3)); border-color: transparent; }
html.no-js .scroll-cue { display: none; }

/* ---------- Legal pages ---------- */

.legal { max-width: 780px; }
.legal h2 { font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.01em; margin: 36px 0 10px; }
.legal h2:first-of-type { margin-top: 0; }
.legal p, .legal li { color: var(--muted); }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 20px; display: grid; gap: 8px; margin-top: 10px; }
.legal strong { color: var(--text); font-weight: 600; }
.legal code { font-family: var(--font-mono); font-size: .85em; padding: 1px 6px; border-radius: 5px; background: var(--bg-soft); border: 1px solid var(--border); }
.legal-address { font-style: normal; font-size: 1.05rem; line-height: 1.7; padding: 18px 20px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); margin: 14px 0; }
.legal-meta { margin-top: 28px; font-size: .88rem; }
.todo { display: block; margin: 12px 0; padding: 10px 14px; border-radius: 10px; font-size: .86rem; font-family: var(--font-mono); color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); border: 1px dashed color-mix(in srgb, var(--warn) 55%, transparent); }
li .todo, p .todo { display: inline; padding: 2px 8px; margin: 0; }

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

.cc { position: fixed; right: 20px; bottom: 20px; z-index: 60; font-size: .92rem; }
.cc-fab {
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px 0 16px; border-radius: 999px;
  background: var(--text); color: var(--bg); font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.25), 0 0 0 1px var(--border);
  transition: transform .25s var(--ease), box-shadow .25s ease;
}
.cc-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0,0,0,.3), 0 0 0 4px var(--glow); }
.cc-fab svg { width: 20px; height: 20px; }
.cc.open .cc-fab { transform: scale(.9); opacity: .0; pointer-events: none; }
.cc-panel {
  position: absolute; right: 0; bottom: 0; width: 360px; max-height: min(560px, calc(100vh - 100px));
  display: flex; flex-direction: column; border-radius: 18px; overflow: hidden;
  background: var(--card); border: 1px solid var(--border-strong); box-shadow: 0 24px 60px rgba(0,0,0,.35);
  opacity: 0; transform: translateY(14px) scale(.98); transform-origin: bottom right;
  transition: opacity .25s ease, transform .3s var(--ease);
}
.cc-panel[hidden] { display: none; }
.cc:not(.open) .cc-panel { pointer-events: none; }
.cc.open .cc-panel { opacity: 1; transform: none; }
.cc-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 16px; border-bottom: 1px solid var(--border); }
.cc-head b { display: block; font-size: .95rem; }
.cc-head small { display: block; font-size: .72rem; color: var(--faint); font-family: var(--font-mono); }
.cc-close { margin-left: auto; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.cc-close:hover { background: var(--bg-soft); color: var(--text); }
.cc-close svg { width: 16px; height: 16px; }
.cc-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; background: var(--bg-soft); }
.cc-bubble { max-width: 85%; padding: 9px 13px; border-radius: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; animation: ccIn .3s var(--ease); }
.cc-bubble.bot { align-self: flex-start; background: var(--card); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.cc-bubble.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.cc-bubble.err { border-color: color-mix(in srgb, #ef4444 50%, transparent); color: #ef4444; }
.cc-bubble.hint { border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.cc-bubble.typing { width: 54px; height: 34px; position: relative; }
.cc-bubble.typing::before { content: '• • •'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); letter-spacing: 1px; animation: blink 1s steps(2) infinite; }
@keyframes ccIn { from { opacity: 0; transform: translateY(6px); } }
.cc-form { padding: 12px; border-top: 1px solid var(--border); display: grid; gap: 8px; }
.cc-form input, .cc-form textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 12px; resize: none;
}
.cc-form input:focus, .cc-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.cc-row { display: flex; gap: 8px; align-items: flex-end; }
.cc-send { flex: none; width: 42px; height: 42px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; transition: opacity .2s ease; }
.cc-send:disabled { opacity: .5; }
.cc-send svg { width: 18px; height: 18px; }
.cc-note { font-size: .7rem; color: var(--faint); line-height: 1.4; }
.cc-note a { color: var(--accent); }
@media (max-width: 600px) {
  .cc { right: 12px; bottom: 12px; }
  .cc-fab-label { display: none; }
  .cc-fab { width: 52px; height: 52px; padding: 0; justify-content: center; }
  .cc-panel { position: fixed; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: calc(100svh - 80px); }
}

/* ---------- Start screen easter egg ---------- */

.dvd-logo {
  position: absolute; left: 0; top: 0; z-index: 1; pointer-events: none;
  display: none; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 14px;
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; line-height: 1.05; letter-spacing: -0.01em;
  color: hsl(var(--dvd-hue, 230), 85%, 60%);
  border: 2px solid currentColor; background: color-mix(in srgb, var(--bg) 60%, transparent);
  box-shadow: 0 0 24px hsla(var(--dvd-hue, 230), 85%, 60%, .35);
  transition: color .2s ease;
}
.dvd-logo.on { display: flex; }
.dvd-logo .brand-mark { width: 38px; height: 38px; font-size: 1rem; background: currentColor; box-shadow: none; }
.dvd-logo .brand-mark { color: var(--bg); }

.egg-menu {
  position: absolute; z-index: 5; width: 260px; padding: 6px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--border-strong); box-shadow: 0 20px 50px rgba(0,0,0,.3);
  font-size: .86rem; text-align: left; animation: ccIn .18s var(--ease);
}
.egg-menu[hidden] { display: none; }
.egg-title { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 10px 6px; font-weight: 600; font-family: var(--font-head); }
.egg-title small { font-family: var(--font-mono); font-size: .68rem; color: var(--faint); font-weight: 400; }
.egg-menu > button, .egg-step { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-align: left; }
.egg-menu > button:hover, .egg-menu > button:focus-visible { background: var(--bg-soft); outline: none; }
.egg-menu > button > span, .egg-step > span { width: 20px; text-align: center; flex: none; }
.egg-check { margin-left: auto; font-style: normal; color: var(--accent); font-weight: 700; }
.egg-step b { min-width: 52px; text-align: center; font-family: var(--font-mono); font-size: .76rem; font-weight: 500; color: var(--muted); }
.egg-step button { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border); background: var(--bg-soft); font-weight: 600; flex: none; }
.egg-step button:first-of-type { margin-left: auto; }
.egg-step button:hover { border-color: var(--accent); color: var(--accent); }
.egg-hint { padding: 8px 10px 6px; margin-top: 4px; border-top: 1px solid var(--border); font-size: .72rem; color: var(--faint); font-family: var(--font-mono); }

/* ---------- Work: pipeline, wide card, horizontal timeline ---------- */

.pipe { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pipe > span { font-size: .78rem; padding: 6px 10px; border-radius: 8px; background: var(--bg-soft); border: 1px solid var(--border); }
.pipe > span.hl { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 8%, var(--bg-soft)); }
.pipe > i { font-style: normal; color: var(--faint); }
.project.wide { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .tl.tl-h { grid-template-columns: repeat(4, 1fr); padding-left: 0; padding-top: 22px; gap: 24px; }
  .tl.tl-h::before { left: 4px; right: 4px; top: 4px; bottom: auto; width: auto; height: 1px; }
  .tl.tl-h li::before { left: 0; top: -22px; }
}

/* ---------- Local AI: tiers and reference build ---------- */

.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tiers > div { padding: 12px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--border); }
.tiers small { display: block; font-family: var(--font-mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.tiers b { font-size: .86rem; font-weight: 600; }
.stat-row.four { grid-template-columns: repeat(4, 1fr); }
.stat-row.four .stat b { font-size: 1.3rem; }
.ai-text .note { font-size: .86rem; padding: 12px 14px; border-radius: 10px; background: var(--bg-soft); border-left: 3px solid var(--accent); }
@media (max-width: 560px) { .tiers, .stat-row.four { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Local AI: multi-agent run ---------- */

.run-card { margin-top: 20px; padding: 32px; }
.run-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 24px; }
.run-head h3 { font-size: 1.6rem; margin: 10px 0 8px; }
.run-head p { color: var(--muted); max-width: 640px; }
.run-status { flex: none; display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: .72rem; color: var(--muted); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); }
.run-flow { display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-areas: "req req orch" "lanes lanes lanes" "res res res"; gap: 14px; }
.run-request { grid-area: req; padding: 16px; border-radius: 12px; border: 1px dashed var(--border-strong); background: var(--bg-soft); }
.run-request small, .run-result small { display: block; font-family: var(--font-mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: 6px; }
.run-request p { font-size: .92rem; min-height: 4.5em; }
.run-orch { grid-area: orch; display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--accent); box-shadow: 0 8px 26px var(--glow); }
.run-orch svg { width: 26px; height: 26px; color: var(--accent); flex: none; }
.run-orch.busy svg { animation: spin 2s linear infinite; }
.run-orch b { display: block; }
.run-orch small { display: block; font-family: var(--font-mono); font-size: .72rem; color: var(--muted); }
.run-lanes { grid-area: lanes; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.lane { padding: 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-soft); display: flex; flex-direction: column; gap: 8px; transition: border-color .3s ease, opacity .3s ease; }
.lane.idle { opacity: .5; }
.lane.working { border-color: var(--accent); }
.lane.done { border-color: color-mix(in srgb, var(--ok) 55%, transparent); }
.lane-head b { display: block; font-size: .9rem; }
.lane-head small { font-family: var(--font-mono); font-size: .62rem; color: var(--faint); }
.lane-task { font-size: .8rem; padding: 6px 10px; border-radius: 8px; background: var(--card); border: 1px solid var(--border); min-height: 2.2em; }
.lane-task:empty { visibility: hidden; }
.lane-log { list-style: none; font-family: var(--font-mono); font-size: .72rem; color: var(--muted); display: grid; align-content: start; gap: 3px; min-height: 5.4em; }
.lane-log li { animation: ccIn .3s var(--ease); }
.lane-bar { height: 4px; border-radius: 4px; background: var(--border); overflow: hidden; }
.lane-bar i { display: block; height: 100%; width: var(--p, 0%); background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .4s ease; }
.lane.done .lane-bar i { width: 100%; background: var(--ok); }
.run-result { grid-area: res; padding: 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); transition: border-color .3s ease, opacity .4s ease; }
.run-result.empty { opacity: .45; }
.run-result.ready { border-color: color-mix(in srgb, var(--ok) 55%, transparent); }
.run-result ul { list-style: none; display: grid; gap: 6px; font-size: .9rem; min-height: 4.6em; }
.run-result li { animation: ccIn .35s var(--ease); }
.run-foot { margin-top: 16px; border-top: 1px solid var(--border); color: var(--faint); padding: 12px 0 0; }
.run-foot b { color: var(--ok); }
@media (max-width: 900px) {
  .run-card { padding: 22px; }
  .run-head { flex-direction: column; }
  .run-flow { grid-template-columns: 1fr; grid-template-areas: "req" "orch" "lanes" "res"; }
  .run-lanes { grid-template-columns: 1fr; }
  .lane-log { min-height: 0; }
}

.note-line { font-size: .88rem; color: var(--muted); padding: 10px 12px; border-radius: 10px; background: var(--bg-soft); border-left: 3px solid var(--accent); }

.chat-note { padding: 8px 14px; border-top: 1px solid var(--border); font-size: .68rem; line-height: 1.45; color: var(--muted); }
.chat-note.chat-date { border-top: 0; padding-top: 0; font-family: var(--font-mono); font-size: .64rem; color: var(--faint); }

/* ---------- Image viewer (lightbox) ---------- */

img.zoomable { cursor: zoom-in; }
img.zoomable:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(5, 7, 12, .94); overflow: hidden; touch-action: none;
  opacity: 0; transition: opacity .2s ease; cursor: grab; }
.lb:active { cursor: grabbing; }
.lb.open { opacity: 1; }
.lb[hidden] { display: none; }
.lb-img { position: absolute; left: 0; top: 0; max-width: none; width: auto; height: auto; transform-origin: 0 0;
  user-select: none; -webkit-user-drag: none; box-shadow: 0 20px 60px rgba(0,0,0,.5); border-radius: 6px; }
.lb-bar { position: absolute; top: 14px; right: 14px; display: flex; align-items: center; gap: 6px; padding: 6px;
  border-radius: 12px; background: rgba(20, 24, 36, .85); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(8px); cursor: default; }
.lb-btn { width: 36px; height: 36px; border-radius: 8px; color: #e8ecf3; font-size: 1.1rem; display: grid; place-items: center; }
.lb-btn:hover, .lb-btn:focus-visible { background: rgba(255,255,255,.1); outline: none; }
.lb-zoom { min-width: 54px; text-align: center; font-family: var(--font-mono); font-size: .78rem; color: #9099aa; }
.lb-cap { position: absolute; left: 16px; right: 16px; bottom: 14px; text-align: center; color: #c9d0dc; font-size: .88rem; pointer-events: none; }
.lb-cap small { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: .7rem; color: #6b7385; }
.lb-load { position: absolute; top: 22px; left: 22px; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.2); border-top-color: #7c8cff; animation: spin .8s linear infinite; display: none; }
.lb.loading .lb-load { display: block; }
@media (max-width: 600px) { .lb-cap small { display: none; } }

/* ---------- GPU spec sheet ---------- */

.gpu-specs { padding: 14px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); }
.gpu-specs dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.gpu-specs dt { font-family: var(--font-mono); font-size: .72rem; color: var(--faint); align-self: center; }
.gpu-specs dd { margin: 0; font-size: .86rem; font-weight: 500; text-align: right; }
.gpu-specs-foot { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-family: var(--font-mono); font-size: .72rem; color: var(--muted); }

/* ---------- Status list (in use / setting up / planned) ---------- */

.st-list { list-style: none; display: grid; gap: 12px; }
.st-list li { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: start; font-size: .92rem; color: var(--muted); }
.st-list b { color: var(--text); font-weight: 600; }
.st { justify-self: start; font-family: var(--font-mono); font-size: .66rem; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--border-strong); white-space: nowrap; margin-top: 2px; }
.st-use { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.st-set { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.st-plan { color: var(--faint); }
.st-course { border: 0; padding: 0 0 0 4px; font-size: .95rem; }
@media (max-width: 420px) { .st-list li { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Links into the homelab deep dive ---------- */

.h-link { color: inherit; text-decoration: none; }
.h-link .h-arrow { color: var(--accent); display: inline-block; transition: transform .2s var(--ease); }
.h-link:hover .h-arrow { transform: translateX(6px); }
.h-link:hover { color: var(--accent); }
.card.linked { cursor: pointer; }
.card.linked:hover { border-color: var(--accent); }
.card > .card-stretch { position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
.card-stretch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only-x { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.card > .deep-badge { position: absolute; top: 12px; right: 12px; z-index: 2; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: .85rem; color: var(--accent); background: var(--bg-soft); border: 1px solid var(--border);
  opacity: 0; transform: translateX(-4px); transition: opacity .2s ease, transform .2s var(--ease); }
.card.linked:hover > .deep-badge, .card.linked:focus-within > .deep-badge { opacity: 1; transform: none; }
@media (hover: none) { .card > .deep-badge { opacity: 1; transform: none; } }
.nw { white-space: nowrap; }

/* ---------- Homelab deep dive: text-led layout ---------- */

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.toc-chip { font-size: .84rem; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--muted); transition: border-color .2s ease, color .2s ease; }
.toc-chip:hover { border-color: var(--accent); color: var(--text); }
.prose { max-width: 760px; display: grid; gap: 16px; }
.prose > p { color: var(--muted); font-size: 1.02rem; line-height: 1.7; }
.prose > p b, .prose > p strong { color: var(--text); font-weight: 600; }
.prose h3.sub { font-size: 1.15rem; margin-top: 14px; }
.prose .callout { color: var(--text); padding: 14px 16px; border-radius: 12px; background: var(--bg-soft); border-left: 3px solid var(--accent); font-size: .96rem; }
.prose .callout b { font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.facts.mini { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.facts.mini .fact { padding: 14px; }
.facts.mini .fact span { display: block; font-size: .76rem; color: var(--muted); margin-top: 2px; }
.checks { list-style: none; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 28px; color: var(--muted); line-height: 1.6; }
.checks li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: .72rem; color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.checks li b { color: var(--text); font-weight: 600; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.split > div > p + p { margin-top: 14px; }
.split > div > p { color: var(--muted); line-height: 1.7; }
.split > div > p b { color: var(--text); }
.split .rack-card { padding: 20px; }
.static-topo { padding: 24px 18px; }
.static-topo .topo-node { cursor: default; }
.static-topo .topo-node:hover { transform: none; box-shadow: none; border-color: var(--border); }
details.more { border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
details.more summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
details.more summary::after { content: '+'; color: var(--accent); font-family: var(--font-mono); }
details.more[open] summary::after { content: '−'; }
details.more .table-wrap { border: 0; border-top: 1px solid var(--border); border-radius: 0 0 12px 12px; }
.airflow { width: 100%; max-width: 360px; height: auto; justify-self: center; }
.af-body { fill: var(--card); stroke: var(--border-strong); stroke-width: 2; }
.af-mesh { stroke: var(--accent); stroke-width: 4; stroke-dasharray: 3 4; }
.af-unit { fill: var(--bg-soft); stroke: var(--border-strong); }
.af-fan { fill: var(--bg-soft); stroke: var(--text); stroke-width: 1.5; }
.af-cool path { stroke: #38bdf8; stroke-width: 2.5; fill: none; stroke-linecap: round; }
.af-hot path { stroke: #f87171; stroke-width: 2.5; fill: none; stroke-linecap: round; }
.af-txt { font-family: var(--font-mono); font-size: 11px; fill: var(--muted); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.topo-tip { align-items: center; }
.topo-tip #topoTipText { flex: 1; }
.topo-more { flex: none; font-size: .86rem; white-space: nowrap; }
.gpu-text > p:not(.gpu-specs-foot) { font-size: .95rem; line-height: 1.6; color: var(--muted); }
.gpu-text b { color: var(--text); font-weight: 700; }
@media (max-width: 600px) { #typeB .tt { display: inline; } .type-line { text-wrap: balance; } }

/* ---------- Start screen: the buttons live in a small 4U rack ----------
   Geometry: 1U = 54px. Rails have 3 square holes per U (every 18px, centred at 9/27/45px),
   unit ears are 26px wide, so the ear screws sit exactly on the top and bottom rail holes. */

.rack4 { --u: 54px; --ear: 26px; --rs: 1; position: absolute; left: 50%; bottom: 0; z-index: 2; width: min(440px, calc(100vw - 36px));
  transform: translateX(-50%) scale(var(--rs)); transform-origin: 50% 100%; }
.rk-top { display: block; width: calc(100% + 16px); max-width: none; height: auto; margin: 0 -8px -2px; position: relative; z-index: 2; pointer-events: none; user-select: none; }
/* open-frame rack: no back panel — only two punched rails and a bottom crossbar, the page shows through */
.rk-body { --metal: #3f4757; --metal-hi: #555e70; position: relative; }
.rk-body::before, .rk-body::after { content: ''; position: absolute; top: 0; bottom: 0; width: var(--ear); z-index: 0;
  background:
    linear-gradient(90deg, var(--metal) 0 9px, transparent 9px 17px, var(--metal) 17px) ,
    repeating-linear-gradient(180deg, var(--metal-hi) 0 6px, transparent 6px 12px, var(--metal-hi) 12px 18px) center top / 8px 100% no-repeat;
  box-shadow: inset 1px 0 0 rgba(255,255,255,.08), inset -1px 0 0 rgba(0,0,0,.35); }
.rk-body::before { left: 0; } .rk-body::after { right: 0; }
.ru, .ru-empty { position: relative; z-index: 1; display: block; height: var(--u); }
.ru { --k: 1; overflow: hidden; color: #e8ecf3; -webkit-tap-highlight-color: transparent; }
.ru:focus-visible { outline: none; }

.ru-face, .ru-cover { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #2f3544, #222733); border: 1px solid rgba(255,255,255,.07); border-radius: 2px; }
/* subtle seam where the ears meet the faceplate */
.ru-face::before, .ru-face::after { content: ''; position: absolute; top: 4px; bottom: 4px; width: 1px; background: rgba(0,0,0,.35); box-shadow: 1px 0 0 rgba(255,255,255,.05); }
.ru-face::before { left: var(--ear); } .ru-face::after { right: var(--ear); }
.ru-label { font-weight: 600; font-size: .95rem; letter-spacing: -.01em; white-space: nowrap; text-align: center; }
.ru-led { position: absolute; left: calc(var(--ear) + 14px); top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; }

/* ear screws: centred on the top and bottom rail hole of the unit */
.ru-screw { position: absolute; z-index: 3; width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #c2c9d4, #4a5263); box-shadow: inset 0 0 0 1px rgba(0,0,0,.35), 0 1px 1px rgba(0,0,0,.4); }
.ru-screw::after { content: ''; position: absolute; left: 1.5px; right: 1.5px; top: 4px; height: 1px; background: #1a1e27; }
.ru-screw.s1, .ru-screw.s2 { left: calc(var(--ear) / 2 - 4.5px); }
.ru-screw.s3, .ru-screw.s4 { right: calc(var(--ear) / 2 - 4.5px); }
.ru-screw.s1, .ru-screw.s3 { top: 4.5px; }
.ru-screw.s2, .ru-screw.s4 { top: 40.5px; }

/* hover / focus: a line runs once around the unit — up the left edge, along the top, down the right, back along the bottom */
.ru-line { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.ru-line i { position: absolute; background: var(--accent); transition: transform 110ms linear; }
.ru-line .l { left: 0; top: 0; bottom: 0; width: 2px; transform: scaleY(0); transform-origin: bottom; transition-delay: 330ms; }
.ru-line .t { left: 0; right: 0; top: 0; height: 2px; transform: scaleX(0); transform-origin: left; transition-delay: 220ms; }
.ru-line .r { right: 0; top: 0; bottom: 0; width: 2px; transform: scaleY(0); transform-origin: top; transition-delay: 110ms; }
.ru-line .b { left: 0; right: 0; bottom: 0; height: 2px; transform: scaleX(0); transform-origin: right; transition-delay: 0ms; }
.ru:hover .ru-line i, .ru:focus-visible .ru-line i { transform: none; }
.ru:hover .ru-line .l, .ru:focus-visible .ru-line .l { transition-delay: 0ms; }
.ru:hover .ru-line .t, .ru:focus-visible .ru-line .t { transition-delay: 110ms; }
.ru:hover .ru-line .r, .ru:focus-visible .ru-line .r { transition-delay: 220ms; }
.ru:hover .ru-line .b, .ru:focus-visible .ru-line .b { transition-delay: 330ms; }

/* 1 · server: fan is always running, click just navigates */
.ru-fan { position: absolute; right: calc(var(--ear) + 12px); top: 50%; width: 30px; height: 30px; margin-top: -15px; }
.ru-fan svg { width: 100%; height: 100%; display: block; }
.fan-ring { fill: #151922; stroke: rgba(255,255,255,.1); }
.fan-blades { fill: #4a5263; transform-origin: 12px 12px; animation: fanSpin 0.9s linear infinite; }
.fan-hub { fill: #5a6272; }
@keyframes fanSpin { to { transform: rotate(360deg); } }

/* 2 · blank plate gets unscrewed, a switch is put in and screwed in (0.8 s) */
.ru-switch { transform: translateY(110%); }
.ru-ports { position: absolute; left: calc(var(--ear) + 12px); top: 50%; margin-top: -10px; display: grid; grid-template-columns: repeat(6, 9px); gap: 3px; }
.ru-ports i { width: 9px; height: 7px; background: #0e1118; border-radius: 1px; border-bottom: 2px solid #34d399; }
.ru-ports i:nth-child(3n) { border-bottom-color: #3a4150; }
.ru-plate { background: linear-gradient(180deg, #363c4b, #282d39); }
.ru-swap.slow { --k: 1.5; }        /* hover: 1.2 s instead of 0.8 s */
.ru-swap.play .ru-screw { animation: screwOut calc(160ms * var(--k)) ease-in forwards, screwIn calc(150ms * var(--k)) ease-out forwards; }
.ru-swap.play .s1 { animation-delay: 0ms, calc(560ms * var(--k)); }
.ru-swap.play .s2 { animation-delay: calc(40ms * var(--k)), calc(590ms * var(--k)); }
.ru-swap.play .s3 { animation-delay: calc(80ms * var(--k)), calc(620ms * var(--k)); }
.ru-swap.play .s4 { animation-delay: calc(120ms * var(--k)), calc(650ms * var(--k)); }
.ru-swap.play .ru-plate { animation: plateOut calc(150ms * var(--k)) ease-in calc(280ms * var(--k)) forwards; }
.ru-swap.play .ru-switch { animation: switchIn calc(150ms * var(--k)) ease-out calc(420ms * var(--k)) forwards; }
/* screws really turn: two turns while backing out (they come towards you), then they're taken off */
@keyframes screwOut {
  0%   { transform: rotate(0) scale(1); opacity: 1; }
  80%  { transform: rotate(-720deg) scale(1.3); opacity: 1; }
  100% { transform: rotate(-760deg) scale(1.35) translateY(-3px); opacity: 0; } }
@keyframes screwIn {
  0%   { transform: rotate(760deg) scale(1.35) translateY(-3px); opacity: 0; }
  20%  { transform: rotate(720deg) scale(1.3); opacity: 1; }
  100% { transform: rotate(0) scale(1); opacity: 1; } }
@keyframes plateOut { to { transform: translateY(-115%); opacity: .3; } }
@keyframes switchIn { from { transform: translateY(110%); } to { transform: translateY(0); } }

/* reverse (on hover-out): switch screws out, switch slides away, blank plate goes back in and is screwed in.
   Same choreography mirrored: reverse delay = total - delay - duration (total 800ms × k). */
.ru-swap.rev .ru-switch { animation: switchInR calc(150ms * var(--k)) ease-in calc(230ms * var(--k)) reverse both; }
.ru-swap.rev .ru-plate { animation: plateOutR calc(150ms * var(--k)) ease-out calc(370ms * var(--k)) reverse both; }
.ru-swap.rev .ru-screw { animation: screwInR calc(150ms * var(--k)) ease-in reverse forwards, screwOutR calc(160ms * var(--k)) ease-out reverse forwards; }
.ru-swap.rev .s1 { animation-delay: calc(90ms * var(--k)), calc(640ms * var(--k)); }
.ru-swap.rev .s2 { animation-delay: calc(60ms * var(--k)), calc(600ms * var(--k)); }
.ru-swap.rev .s3 { animation-delay: calc(30ms * var(--k)), calc(560ms * var(--k)); }
.ru-swap.rev .s4 { animation-delay: 0ms, calc(520ms * var(--k)); }

/* 3 · lock: hasp + padlock; shackle opens, padlock drops, hasp folds back, cover lifts (0.5 s) */
.ru-under { background: linear-gradient(180deg, #232836, #1a1e28); }
.ru-cover { z-index: 2; left: var(--ear); right: var(--ear); padding: 0 44px; border-radius: 1px; }
.latch-staple { position: absolute; z-index: 3; right: 30px; top: 50%; width: 8px; height: 12px; margin-top: -9px; border: 2.5px solid #aab2c0;
  border-bottom: 0; border-radius: 5px 5px 0 0; }
.latch-staple::after { content: ''; position: absolute; left: -6px; right: -6px; bottom: -3px; height: 3px; border-radius: 1px; background: #8a93a3; }
.latch { position: absolute; inset: 0 var(--ear) 0 0; z-index: 4; pointer-events: none; }
.latch-base { position: absolute; right: 0; top: 7px; bottom: 7px; width: 11px; border-radius: 2px 0 0 2px;
  background: linear-gradient(90deg, #5a6272, #9aa3b5 45%, #5a6272); box-shadow: -1px 0 2px rgba(0,0,0,.5); }
.latch-base i { position: absolute; left: 2.5px; width: 6px; height: 6px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #c7cdd8, #4a5263); }
.latch-base i:first-child { top: 4px; } .latch-base i:last-child { bottom: 4px; }
.latch-hasp { position: absolute; right: 9px; top: 50%; width: 30px; height: 13px; margin-top: -7px; border-radius: 6px 2px 2px 6px;
  background: linear-gradient(180deg, #b9c0cc, #7d8696); box-shadow: 0 2px 3px rgba(0,0,0,.5); transform-origin: right center; }
.latch-hasp::before { content: ''; position: absolute; left: 6px; top: 3px; width: 10px; height: 7px; border-radius: 3px; background: #1d2230; }
.padlock { position: absolute; right: 21px; top: 50%; width: 19px; height: 26px; margin-top: -6px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.55)); transform-origin: 50% 20%; }
.pl-shackle { transform-box: fill-box; transform-origin: center bottom; }
.ru-lock-unit.slow { --k: 2.4; }   /* hover: 1.2 s instead of 0.5 s */
.ru-lock-unit.play .pl-shackle { animation: shackleOpen calc(110ms * var(--k)) ease-out forwards; }
.ru-lock-unit.play .padlock { animation: padlockDrop calc(120ms * var(--k)) ease-in calc(110ms * var(--k)) forwards; }
.ru-lock-unit.play .latch-hasp { animation: haspOpen calc(110ms * var(--k)) ease-in-out calc(200ms * var(--k)) forwards; }
.ru-lock-unit.play .ru-cover { animation: coverLift calc(200ms * var(--k)) cubic-bezier(.4, 0, .2, 1) calc(300ms * var(--k)) forwards; }
/* reverse: cover comes down, hasp folds over, padlock comes back, shackle snaps shut (total 500ms × k) */
.ru-lock-unit.rev .ru-cover { animation: coverLiftR calc(200ms * var(--k)) cubic-bezier(.4, 0, .2, 1) 0ms reverse both; }
.ru-lock-unit.rev .latch-hasp { animation: haspOpenR calc(110ms * var(--k)) ease-in-out calc(190ms * var(--k)) reverse both; }
.ru-lock-unit.rev .padlock { animation: padlockDropR calc(120ms * var(--k)) ease-out calc(270ms * var(--k)) reverse both; }
.ru-lock-unit.rev .pl-shackle { animation: shackleOpenR calc(110ms * var(--k)) ease-in calc(390ms * var(--k)) reverse both; }
@keyframes shackleOpen { to { transform: translateY(-4px); } }
@keyframes padlockDrop { to { transform: translateY(26px) rotate(18deg); opacity: 0; } }
@keyframes haspOpen { to { transform: scaleX(.12); } }
@keyframes coverLift { to { transform: translateY(-100%); } }

@media (max-width: 420px) { .ru-label { font-size: .88rem; } .ru-ports { grid-template-columns: repeat(4, 9px); } .ru-ports i:nth-child(n+9) { display: none; } }
@media (prefers-reduced-motion: reduce) { .ru-line i { transition: none !important; } .fan-blades { animation: none; } }

/* ---------- Start screen layout: text at the top, rack standing on the floor ---------- */

.start { flex-direction: column; justify-content: flex-start; }
.start .start-inner { padding: calc(64px + 5vh) 16px 0; }
.scroll-cue { display: none; }
/* the projects heading box is the floor the rack stands on */
.floor-section { padding-top: 0; }
.floor { position: relative; padding: 40px 40px 34px; margin-bottom: 40px; border-radius: 4px 4px var(--radius) var(--radius);
  background: var(--card); border: 1px solid var(--border); border-top: 3px solid var(--border-strong); box-shadow: var(--shadow); }
.floor .section-head { margin-bottom: 0; }
@media (max-width: 700px) { .floor { padding: 30px 22px 26px; } }

/* reverse copies: a different name makes the browser start a fresh animation on hover-out */
@keyframes screwOutR {
  0%   { transform: rotate(0) scale(1); opacity: 1; }
  80%  { transform: rotate(-720deg) scale(1.3); opacity: 1; }
  100% { transform: rotate(-760deg) scale(1.35) translateY(-3px); opacity: 0; } }
@keyframes screwInR {
  0%   { transform: rotate(760deg) scale(1.35) translateY(-3px); opacity: 0; }
  20%  { transform: rotate(720deg) scale(1.3); opacity: 1; }
  100% { transform: rotate(0) scale(1); opacity: 1; } }
@keyframes plateOutR { to { transform: translateY(-115%); opacity: .3; } }
@keyframes switchInR { from { transform: translateY(110%); } to { transform: translateY(0); } }
@keyframes shackleOpenR { to { transform: translateY(-4px); } }
@keyframes padlockDropR { to { transform: translateY(26px) rotate(18deg); opacity: 0; } }
@keyframes haspOpenR { to { transform: scaleX(.12); } }
@keyframes coverLiftR { to { transform: translateY(-100%); } }

/* chat button waits until the visitor has scrolled past the rack (homepage only) */
.cc-fab { transition: transform .25s var(--ease), box-shadow .25s ease, opacity .25s ease; }
.cc.cc-away .cc-fab { opacity: 0; transform: translateY(20px); pointer-events: none; }
