@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  color-scheme: dark;
  --bg: #08090b;
  --text: #eceef2;
  --muted: #9398a3;
  --line: #22262e;
  --accent: #94baff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.header, main, footer { position: relative; z-index: 1; }
.software-backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity .8s ease; background: radial-gradient(ellipse at 65% 88%, #06397825, transparent 60%), var(--bg); }
.circuit-active .software-backdrop { opacity: 1; }
.circuit-active .stage { background: transparent; }
.circuit-active .stage-caption { text-shadow: 0 3px 18px #08090b, 0 0 45px #08090b; }
.circuit-active .category-menu, .circuit-active .header, .circuit-active .category-details, .circuit-active .about, .circuit-active footer { background: #08090bbb; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
[hidden] { display: none !important; }
.wrap { width: min(1240px, calc(100% - 80px)); margin-inline: auto; }

.header {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; min-width: 0; flex-shrink: 1; line-height: 1; }
.brand-logo { display: block; width: 252px; max-width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: contain; }
.header nav { display: flex; align-items: center; flex-shrink: 0; gap: 28px; font-size: 14px; }
.github-link { border: 1px solid #343a46; border-radius: 7px; padding: 8px 19px; }
.header a { transition: color .2s; }
.header a:hover { color: var(--accent); }

.explorer { padding-top: 30px; }
.explorer-heading { display: flex; flex-direction: column; align-items: center; gap: 5px; margin-bottom: 4px; }
.explorer-heading h1 { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: 3px; }
.explorer-heading > span { font-size: 9px; color: #737b89; letter-spacing: 2px; }
.explorer-layout { display: grid; grid-template-columns: 218px minmax(0, 1fr); gap: 38px; }
.category-menu { display: flex; flex-direction: column; gap: 12px; padding-top: 133px; align-self: start; position: sticky; top: 28px; }
.category-tab {
  --tab-accent: #8cbcff;
  --tab-tint: #8cbcff16;
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 14px;
  line-height: 1.45;
  cursor: pointer;
  transition: color .3s, transform .3s;
}
.category-tab[data-category="software"] { --tab-accent: #ae95ff; --tab-tint: #ae95ff16; }
.category-tab[data-category="app"] { --tab-accent: #65d5ce; --tab-tint: #65d5ce16; }
.category-tab[data-category="product"] { --tab-accent: #edbd72; --tab-tint: #edbd7216; }
.category-tab > span:nth-child(2) { flex: 1; min-width: 0; }
.category-tab small { display: block; margin-bottom: 4px; font-size: 9px; color: #616a79; letter-spacing: 2px; }
.category-tab:hover { color: #fff; transform: translateX(3px); }
.category-tab.active { color: var(--text); border-color: #40516a; background: linear-gradient(90deg, var(--tab-tint), transparent); }
.category-tab.active small { color: var(--tab-accent); }
.tab-art { display: grid; place-items: center; width: 48px; height: 48px; flex-shrink: 0; color: var(--tab-accent); border: 1px solid #334256; border-radius: 12px; background: linear-gradient(145deg, #142032, #080e17); opacity: .85; transition: opacity .2s, border-color .2s, transform .2s; }
.tab-art svg { display: block; width: 78%; height: 78%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tab-art .icon-surface { fill: currentColor; fill-opacity: .12; }
.tab-art .icon-dot { fill: currentColor; stroke: none; }
.category-tab.active .tab-art { opacity: 1; border-color: var(--tab-accent); box-shadow: 0 0 16px var(--tab-tint); }
.category-tab:hover .tab-art { opacity: 1; transform: translateY(-2px); }
.tab-indicator { width: 5px; height: 5px; border: 1px solid #424a59; border-radius: 50%; }
.category-tab.active .tab-indicator { background: var(--tab-accent); border-color: var(--tab-accent); }

.stage { position: relative; height: 580px; overflow: hidden; background: var(--bg); --accent: #94baff; }
.stage[data-active="software"] { --accent: #81baff; }
.visual-slide[data-slide="software"] .stage-caption h1 {
  color: #b2d7ff;
  font-weight: 600;
  letter-spacing: -2px;
  text-shadow: 0 0 36px #367bdb25;
}
.stage[data-active="app"] { --accent: #8de1c6; }
.stage[data-active="product"] { --accent: #edb987; }
.visual-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(22px);
  transition: opacity .65s ease, transform .85s cubic-bezier(.2, .65, .25, 1);
}
.visual-slide.active { opacity: 1; transform: translateY(0); z-index: 1; pointer-events:auto; }
.stage::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(to bottom, transparent 47%, #419dff35 49%, #8ecaff90 50%, #419dff18 51%, transparent 54%);
  transform: translateY(-100%);
}
.stage.is-hacking::after { animation: hacker-scan .7s ease-out both; }
.stage.is-hacking .visual-slide.active .stage-caption h1 { animation: hacker-text .65s ease-out both; }
.stage-caption { position: relative; z-index: 2; padding-top: 42px; text-align: center; }
.stage-caption > span { font-size: 9px; letter-spacing: 2.5px; color: #788292; }
.stage-caption h1 { margin: 12px 0 0; font-size: clamp(36px, 3.8vw, 51px); font-weight: 500; line-height: 1.16; letter-spacing: -1.5px; }
.art-frame {
  position: absolute;
  inset: 145px 0 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 88%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 88%, transparent);
}
.project-frame { inset: 127px -12px 32px; -webkit-mask-image: none; mask-image: none; }
.project-assembly { display: block; width: 100%; height: 100%; object-fit: contain; }
.project-parts { display: none; position: absolute; left: 0; right: 0; bottom: 40px; margin: 0; text-align: center; color: #91a7ba; font-size: 12px; }
.project-parts span { display: block; margin-bottom: 4px; font: 9px/1.5 'JetBrains Mono', Consolas, monospace; letter-spacing: 1.8px; color: #5e829c; }
.tools-frame, .product-frame { inset: 210px -8px 34px; -webkit-mask-image: none; mask-image: none; }
.tools-animation, .product-animation { display: block; width: 100%; height: 100%; object-fit: contain; }
.scene-legend { display: none; position: absolute; left: 0; right: 0; bottom: 40px; margin: 0; text-align: center; font-size: 12px; }
.scene-legend span { display: block; margin-bottom: 4px; font: 9px/1.5 'JetBrains Mono', Consolas, monospace; letter-spacing: 1.8px; opacity: .6; }
.tools-legend { color: #8ec5b6; }
.product-legend { color: #c8ad92; }
.scene-art {
  width: min(100%, 480px);
  height: auto;
  aspect-ratio: 1;
  flex-shrink: 0;
  opacity: .94;
  background-image: url('category-art.png');
  background-repeat: no-repeat;
  background-size: 200% 200%;
  animation: art-drift 13s ease-in-out infinite;
  will-change: transform;
}
.visual-slide:nth-child(3) .scene-art { animation-delay: -6s; }
.visual-slide:nth-child(4) .scene-art { animation-delay: -9s; }
.visual-slide:not(.active) .scene-art { animation-play-state: paused; }
.stage-footer { position: absolute; bottom: 15px; left: 22px; right: 22px; z-index: 3; display: flex; justify-content: space-between; color: #748092; font-size: 9px; letter-spacing: 1.8px; }
.stage-footer #stage-page { color: var(--accent); }

/* Static circuit traces with only two softly pulsing node groups. */
.circuit-network { position:absolute; inset:0; width:100%; height:100%; overflow:hidden; }
.circuit-traces { fill:none; stroke:#147fe3; stroke-width:1; }
.circuit-point { fill:#65ccff; }
.circuit-halo { fill:#168cff; opacity:.13; }
.circuit-nodes { opacity:.65; animation:circuit-pulse 7s ease-in-out infinite alternate paused; }
.circuit-nodes-1 { animation-delay:-3.5s; }
.software-backdrop[data-running="true"] .circuit-nodes { animation-play-state:running; }
@keyframes circuit-pulse { from { opacity:.4; } to { opacity:1; } }

.software-code { --code-line-height:24px; position:absolute; top:160px; left:50%; width:min(550px,calc(100% - 40px)); transform:translateX(-50%); border:1px solid #345c82; border-radius:16px; overflow:hidden; background:radial-gradient(ellipse at 100% 0,#18355755,transparent 65%),#0a1423f5; box-shadow:0 24px 65px #0006,0 0 48px #1675d515,inset 0 1px 0 #a6d5ff12; color:#c1d4e8; }
.code-toolbar,.code-status { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 17px; font:10px/1.4 'JetBrains Mono',Consolas,monospace; color:#799bbd; }
.code-toolbar { padding:0 17px; min-height:47px; border-bottom:1px solid #29405a; background:#14223899; }
.code-file { align-self:stretch; display:flex; align-items:center; gap:9px; padding:0 15px; color:#c5dff7; border-bottom:2px solid #65baff; background:#0c1829; }
.code-file b { font:600 8px/1 Inter,Arial,sans-serif; color:#111c2c; background:#ecc779; border-radius:3px; padding:4px; }
.code-file i { width:5px; height:5px; border-radius:50%; background:#70c7f2; margin-left:8px; }
.code-toolbar-icon { font-size:14px; color:#7697b5; }
.code-copy { flex-shrink:0; min-height:32px; padding:6px 9px; border:1px solid #345c82; border-radius:6px; background:#142942; color:#bbdfff; font:10px/1.4 'JetBrains Mono',Consolas,monospace; cursor:pointer; transition:background .2s,border-color .2s; }
.code-copy:hover { background:#1c3b5e; border-color:#6cb9ff; }
.code-copy[data-state="success"] { color:#88e2cb; border-color:#3f8778; }
.code-copy[data-state="error"] { color:#ffb4b4; border-color:#b96767; }
.code-copy:disabled { cursor:wait; opacity:.7; }
.code-copy-controls { display:flex; justify-content:flex-end; margin:18px 0 -8px; }
.code-breadcrumb { display:flex; align-items:center; gap:10px; padding:11px 21px 0; color:#637e99; font:9px/1.4 'JetBrains Mono',Consolas,monospace; }
.code-breadcrumb span { color:#3e5c79; }
.code-breadcrumb strong { color:#93b3d1; font-weight:400; }
.code-lights { display:flex; gap:5px; }
.code-lights i { width:7px; height:7px; border-radius:50%; background:#ed827e; }
.code-lights i:nth-child(2) { background:#e7bd70; }
.code-lights i:nth-child(3) { background:#6abda0; }
.software-code pre { position:relative; margin:0; padding:18px 20px 20px 51px; overflow-x:auto; font:12px/var(--code-line-height) 'JetBrains Mono',Consolas,monospace; counter-reset:code-line; background:linear-gradient(90deg,#10203666 38px,#43638326 38px,#43638326 39px,transparent 39px); }
.software-code code { font:inherit; }
.code-row { position:relative; counter-increment:code-line; }
.code-row::before { content:counter(code-line); position:absolute; right:calc(100% + 16px); color:#41617f; font-size:10px; }
.code-keyword { color:#a6a5ff; }
.code-property { color:#82c7ff; }
.code-string { color:#6fd7d1; }
.code-function { color:#a7cfff; }
.software-code pre::after { content:''; position:absolute; left:0; right:0; top:18px; height:var(--code-line-height); background:linear-gradient(90deg,#408bdf1c,#408bdf08 70%,transparent); border-left:2px solid #7dcfff; pointer-events:none; animation:code-highlight 16s ease-in-out infinite paused; }
.software-code[data-running="true"] pre::after { animation-play-state:running; }
.code-status { border-top:1px solid #29405a; background:#11223999; padding-block:10px; font-size:9px; }
.code-branch { display:flex; align-items:center; gap:7px; }
.code-status-dot { width:4px; height:4px; border-radius:50%; background:#70cdbb; margin-left:7px; }
.code-status-divider { margin-inline:7px; color:#3f5c77; }
.code-status i { display:inline-block; width:5px; height:5px; margin-right:5px; border-radius:50%; background:#6fd7d1; }
@keyframes code-highlight { 0%,15% { opacity:0; transform:translateY(calc(var(--code-line-height) * 7)); } 25%,45% { opacity:1; transform:translateY(calc(var(--code-line-height) * 7)); } 55%,75% { opacity:1; transform:translateY(calc(var(--code-line-height) * 8)); } 85%,100% { opacity:0; transform:translateY(calc(var(--code-line-height) * 8)); } }
@media(max-width:700px) { .code-toolbar .code-lights { display:none; } .code-toolbar .code-file { margin-right:auto; font-size:9px; } .code-toolbar .code-file i { display:none; } }
@media(max-width:700px) { .software-code { --code-line-height:20px; top:145px; width:calc(100% - 16px); border-radius:12px; } .software-code pre { padding:18px 12px 18px 37px; font-size:10px; background:linear-gradient(90deg,#10203666 27px,#43638326 27px,#43638326 28px,transparent 28px); } .code-toolbar,.code-status { padding-inline:12px; } .code-file { padding-inline:9px; gap:6px; } .code-breadcrumb { padding-left:13px; font-size:8px; gap:7px; } .code-status { font-size:8px; } .code-status-divider { margin-inline:3px; } }

.category-details { padding: 27px 22px 30px; border-top: 1px solid var(--line); }
.detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.detail-heading h2 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -.6px; }
.detail-heading > span { color: var(--muted); font-size: 12px; }
.category-details > p { margin: 11px 0; color: var(--muted); font-size: 16px; line-height: 1.8; }
.category-details .empty { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); color: #6f7a8b; font-size: 13px; }
.category-details.switching { animation: details-enter .5s ease both; }
.entries { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.entry { padding: 22px; margin-top: 20px; border: 1px solid var(--line); border-radius: 8px; }
.entry-type { color: var(--accent); font-size: 10px; letter-spacing: 1.5px; }
.entry h3 { margin: 10px 0; font-size: 20px; }
.entry p { color: var(--muted); font-size: 14px; }
.entry-links { display: flex; gap: 20px; margin-top: 20px; font-size: 14px; }
.entry-links a { color: var(--accent); }
.about { padding: 65px 0 75px; margin-top: 42px; border-top: 1px solid var(--line); }
.eyebrow { margin: 0 0 20px; color: var(--muted); font-size: 10px; letter-spacing: 2px; }
.about h2 { margin: 0 0 23px; font-size: 49px; line-height: 1.18; letter-spacing: -2px; font-weight: 500; }
.about h2 span { color: #808a9a; }
.about > p:not(.eyebrow) { max-width: 570px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.about > a { display: inline-block; padding-bottom: 6px; margin-top: 14px; border-bottom: 1px solid #535f74; font-size: 14px; }
.purpose-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; margin-top: 52px; padding-top: 34px; border-top: 1px solid var(--line); scroll-margin-top: 36px; }
.purpose-item { min-width: 0; scroll-margin-top: 36px; }
.purpose-item + .purpose-item { padding-left: 48px; border-left: 1px solid var(--line); }
.purpose-tag { color: #94baff; font: 10px/1.6 'JetBrains Mono', Consolas, monospace; letter-spacing: 2px; }
.purpose-item + .purpose-item .purpose-tag { color: #8de1c6; }
.purpose-item h3 { margin: 12px 0 16px; font-size: 28px; font-weight: 500; line-height: 1.25; letter-spacing: -.8px; }
.purpose-item p { max-width: 520px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.9; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; padding: 25px 0 34px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }

@keyframes art-drift {
  0%, 100% { transform: scale(1.02) translateY(0); }
  50% { transform: scale(1.075) translateY(-10px); }
}

@keyframes details-enter {
  from { opacity: .25; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hacker-scan {
  0% { opacity: 0; transform: translateY(-65%); }
  18% { opacity: .7; }
  65% { opacity: .5; }
  100% { opacity: 0; transform: translateY(65%); }
}
@keyframes hacker-text {
  0% { opacity: .45; transform: translateX(-3px); text-shadow: -3px 0 #2689ff, 3px 0 #88d2ff55; }
  25% { opacity: .85; transform: translateX(2px); }
  45% { transform: translateX(-1px); text-shadow: 2px 0 #2689ff80; }
  100% { opacity: 1; transform: translateX(0); text-shadow: 0 0 24px #367bdb20; }
}

@media (max-width: 1100px) {
  .project-parts, .scene-legend { display: block; }
  .tools-frame, .product-frame { bottom: 82px; }
}

@media (max-width: 1000px) {
  .wrap { width: calc(100% - 48px); }
  .explorer-layout { grid-template-columns: 188px minmax(0, 1fr); gap: 22px; }
  .category-tab { font-size: 14px; gap: 11px; }
  .tab-art { width: 42px; height: 42px; }
  .stage-caption h1 { font-size: 42px; }
}

@media (max-width: 700px) {
  .wrap { width: calc(100% - 32px); }
  .header { height: auto; min-height: 78px; gap: 12px 16px; flex-wrap: wrap; padding: 14px 0; }
  .header .brand { flex-basis: 100%; }
  .brand-logo { width: 168px; }
  .header nav { gap: 14px; }
  .header nav > a:first-child { display: none; }
  .github-link { padding: 7px 14px; font-size: 12px; }
  .explorer { padding-top: 24px; }
  .explorer-layout { display: block; }
  .category-menu { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 23px; gap: 8px; }
  .category-tab { min-height: 80px; padding: 10px; border: 1px solid #252c37; font-size: 13px; gap: 10px; }
  .category-tab.active { border-color: #53617b; background: #10141b; }
  .category-tab small { font-size: 8px; }
  .category-tab:hover { transform: none; }
  .tab-art { width: 38px; height: 38px; border-radius: 10px; }
  .tab-indicator { display: none; }
  .stage { height: 515px; }
  .stage-caption { padding-top: 33px; }
  .stage-caption h1 { margin-top: 11px; font-size: 36px; letter-spacing: -1.2px; }
  .stage-caption > span { font-size: 8px; letter-spacing: 2px; }
  .art-frame { inset: 125px -5% 38px; }
  .project-frame { inset: 110px -10px 65px; }
  .project-assembly { transform: scale(1.65) translateX(4%); }
  .tools-frame, .product-frame { inset: 170px -10px 82px; }
  .tools-animation { transform: scale(1.2); }
  .product-animation { transform: scale(1.45); }
  .scene-art { width: min(100%, 390px); }
  .stage-footer { left: 3px; right: 3px; bottom: 13px; font-size: 8px; letter-spacing: 1px; }
  .category-details { padding: 23px 3px 25px; }
  .detail-heading h2 { font-size: 20px; }
  .detail-heading > span { white-space: nowrap; }
  .category-details > p { font-size: 16px; }
  .entries { grid-template-columns: 1fr; }
  .about { padding: 48px 0; margin-top: 28px; }
  .about h2 { font-size: 40px; }
  .about > p:not(.eyebrow) { font-size: 14px; }
  .purpose-grid { grid-template-columns: 1fr; gap: 28px; margin-top: 36px; padding-top: 28px; }
  .purpose-item + .purpose-item { padding: 28px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .purpose-item h3 { font-size: 25px; }
  .purpose-item p { font-size: 15px; }
  footer > span:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .scene-art { transform: none; }
}
