/* =====================================================================
   AGENT KD SKILL — design system
   Theme: KrackedDevs (krackeddevs.com) — pixel-art KD wordmark
   tokens: primary #ABFFA7, accent #07AE00, bright #0AF700, dark #023A00,
   bg #010502, surface #0A120B, text #EAFCE9 / #8FBA92 · Inter + JetBrains Mono
   ===================================================================== */

:root {
  --primary: #ABFFA7;
  --secondary: #02140A;
  --accent: #07AE00;
  --accent-soft: #56FF50;
  --accent-bright: #0AF700;
  --accent-mid: #00D237;
  --accent-dark: #023A00;
  --bg: #010502;
  --surface: #0A120B;
  --surface-2: #0D1910;
  --inset: #050D07;
  --text: #EAFCE9;
  --text-2: #8FBA92;
  --border: #14301A;
  --border-strong: #1E4526;

  --r-card: 8px;
  --r-control: 8px;
  --r-pill: 9999px;

  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-section: 80px;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
  overscroll-behavior-x: none;
  -webkit-font-smoothing: antialiased;
  animation: page-in 0.4s ease-out;
}

@keyframes page-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

::selection {
  background: var(--primary);
  color: var(--secondary);
}

a {
  color: inherit;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---------------- ambient layers ---------------- */

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(720px 460px at 50% -8%, rgba(10, 247, 0, 0.20), transparent 70%),
    radial-gradient(560px 420px at 92% 8%, rgba(7, 174, 0, 0.16), transparent 65%),
    radial-gradient(520px 400px at 8% 22%, rgba(171, 255, 167, 0.05), transparent 65%);
  animation: glow-breathe 9s ease-in-out infinite alternate;
}

@keyframes glow-breathe {
  from { opacity: 0.75; }
  to   { opacity: 1; }
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(86, 255, 80, 0.030) 1px, transparent 1px),
    linear-gradient(90deg, rgba(86, 255, 80, 0.030) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, #000 20%, transparent 80%);
  mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, #000 20%, transparent 80%);
}

/* ---------------- layout ---------------- */

.wrap {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 32px);
}

/* ---------------- ascii title ---------------- */

.ascii-title {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(6px, 1.1vw, 14px);
  line-height: 1.15;
  color: var(--accent-bright);
  margin: var(--sp-3) 0;
  white-space: pre;
  user-select: none;
  text-shadow: 0 0 20px rgba(10, 247, 0, 0.3);
}

/* ---------------- header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(1, 5, 2, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-block: var(--sp-2);
  flex-wrap: wrap;
}

.brand {
  min-width: 0;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 6px;
}

.brand-name {
  font-family: var(--font-sans);
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.brand-name span {
  color: var(--primary);
}

.brand-logo-wrap {
  margin: 0;
  line-height: 0;
}

.brand-logo {
  display: block;
  width: clamp(200px, 30vw, 300px);
  height: auto;
  filter: drop-shadow(0 0 26px rgba(10, 247, 0, 0.22));
}

.tagline {
  color: var(--text-2);
  font-size: 13px;
  margin-top: 4px;
  max-width: 52ch;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

/* operational metric readout */

.stats {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-control);
  overflow: hidden;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 8px 14px;
  min-width: 74px;
}

.stat + .stat {
  border-left: 1px solid var(--border-strong);
}

.stat b {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--primary);
}

.stat span {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-top: 3px;
}

.lang-toggle {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  padding: 8px 16px;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

.lang-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

/* ---------------- hero entrance ---------------- */

@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-rise {
  animation: rise-in 0.7s var(--ease) both;
}

.brand .tagline.animate-rise { animation-delay: 0.06s; }
.header-actions.animate-rise { animation-delay: 0.14s; }
.digest-grid .digest-card:nth-child(2) { animation-delay: 0.1s; }
.digest-grid .digest-card:nth-child(3) { animation-delay: 0.2s; }
.digest-grid .digest-card:nth-child(4) { animation-delay: 0.3s; }
.digest-grid .digest-card:nth-child(5) { animation-delay: 0.4s; }
.digest-grid .digest-card:nth-child(6) { animation-delay: 0.5s; }
.digest-grid .digest-card:nth-child(7) { animation-delay: 0.6s; }

/* ---------------- digest (hero focal panel) ---------------- */

.digest {
  padding-top: clamp(40px, 8vw, var(--sp-section));
}

.digest-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: var(--sp-3);
}

.digest-title {
  font-size: clamp(26px, 4.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.digest-title em {
  font-style: normal;
  color: var(--primary);
}

.digest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-2);
}

.digest-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: var(--sp-3);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.digest-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--digest-accent, var(--accent)), transparent 80%);
}

.digest-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.digest-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.digest-chip {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  background: var(--inset);
  color: var(--text-2);
}

.digest-index {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-soft);
}

.digest-title2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.digest-desc {
  font-size: 13px;
  color: var(--text-2);
  flex: 1;
}

.digest-metric {
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: var(--inset);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 12px 14px;
  margin-top: 4px;
}

.digest-count {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: var(--primary);
}

.digest-unit {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
}

/* role-tinted accents for digest cards */
.digest-card.digest-plan       { --digest-accent: var(--accent); }
.digest-card.digest-build      { --digest-accent: var(--primary); }
.digest-card.digest-compact    { --digest-accent: #1E4526; }
.digest-card.digest-capability { --digest-accent: var(--accent-bright); }
.digest-card.digest-sub        { --digest-accent: #56FFC0; }
.digest-card.digest-deep       { --digest-accent: #9BFF5A; }
.digest-card.digest-micro      { --digest-accent: #4DD8FF; }

/* ---------------- toolbar ---------------- */

.toolbar {
  margin-top: var(--sp-section);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: var(--sp-2);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.toolbar-row {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.search {
  flex: 1 1 260px;
  background: var(--inset);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-control);
  color: var(--text);
  font-size: 14px;
  padding: 11px 14px;
  font-family: var(--font-mono);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.search::placeholder {
  color: #4A6B4D;
}

.search:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 247, 0, 0.16);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.filter-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-2);
  flex: 0 0 auto;
}

/* ---------------- pills ---------------- */

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
}

.pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-2);
  background: var(--inset);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  padding: 7px 14px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.pill:hover {
  border-color: #2E5A33;
  color: var(--text);
  transform: translateY(-1px);
}

.pill[data-active="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--secondary);
}

/* ---------------- buttons — neon border trace ---------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  background: transparent;
  color: var(--accent-bright);
  border: none;
  border-radius: var(--r-control);
  padding: 10px 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  overflow: hidden;
  transition: background 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
}

.btn span {
  position: absolute;
  display: block;
}

/* top border — slides left to right */
.btn span:nth-child(1) {
  top: 0;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--accent-bright));
  animation: btn-border-top 1.5s linear infinite;
}

@keyframes btn-border-top {
  0%   { left: -100%; }
  50%, 100% { left: 100%; }
}

/* right border — slides top to bottom */
.btn span:nth-child(2) {
  top: -100%;
  right: 0;
  width: 1.5px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--accent-bright));
  animation: btn-border-right 1.5s linear infinite;
  animation-delay: 0.375s;
}

@keyframes btn-border-right {
  0%   { top: -100%; }
  50%, 100% { top: 100%; }
}

/* bottom border — slides right to left */
.btn span:nth-child(3) {
  bottom: 0;
  right: 0;
  width: 100%;
  height: 1.5px;
  background: linear-gradient(270deg, transparent, var(--accent-bright));
  animation: btn-border-bottom 1.5s linear infinite;
  animation-delay: 0.75s;
}

@keyframes btn-border-bottom {
  0%   { right: -100%; }
  50%, 100% { right: 100%; }
}

/* left border — slides bottom to top */
.btn span:nth-child(4) {
  bottom: -100%;
  left: 0;
  width: 1.5px;
  height: 100%;
  background: linear-gradient(360deg, transparent, var(--accent-bright));
  animation: btn-border-left 1.5s linear infinite;
  animation-delay: 1.125s;
}

@keyframes btn-border-left {
  0%   { bottom: -100%; }
  50%, 100% { bottom: 100%; }
}

.btn:hover {
  background: var(--accent-bright);
  color: #010502;
  box-shadow:
    0 0 5px var(--accent-bright),
    0 0 20px var(--accent-bright),
    0 0 40px rgba(10, 247, 0, 0.4);
  -webkit-box-reflect: below 1px linear-gradient(transparent, rgba(0,0,0,0.3));
}

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

.btn-primary {
  background: var(--primary);
  color: var(--secondary);
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--accent-bright);
  color: #010502;
  box-shadow:
    0 0 5px var(--accent-bright),
    0 0 25px var(--accent-bright),
    0 0 50px var(--accent-bright),
    0 0 100px rgba(10, 247, 0, 0.3);
}

/* ---------------- grid / role sections ---------------- */

.grid {
  padding-top: var(--sp-section);
}

.role-section {
  margin-bottom: 52px;
}

.role-head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-2);
}

.role-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
}

.role-chip-plan       { color: #56FF50; border-color: rgba(10, 247, 0, 0.45); background: rgba(10, 247, 0, 0.12); }
.role-chip-build      { color: var(--primary); border-color: rgba(171, 255, 167, 0.45); background: rgba(171, 255, 167, 0.08); }
.role-chip-compact    { color: var(--text-2); border-color: var(--border-strong); background: var(--surface-2); }
.role-chip-capability { color: #00D237; border-color: rgba(0, 210, 55, 0.5); background: rgba(0, 210, 55, 0.1); }
.role-chip-sub        { color: #56FFC0; border-color: rgba(86, 255, 192, 0.5); background: rgba(86, 255, 192, 0.1); }
.role-chip-deep       { color: #9BFF5A; border-color: rgba(155, 255, 90, 0.5); background: rgba(155, 255, 90, 0.1); }
.role-chip-micro      { color: #4DD8FF; border-color: rgba(77, 216, 255, 0.5); background: rgba(77, 216, 255, 0.1); }
.role-chip-custom     { color: #FFB347; border-color: rgba(255, 179, 71, 0.5); background: rgba(255, 179, 71, 0.1); }

.role-desc {
  font-size: 13.5px;
  color: var(--text-2);
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-2);
}

/* ---------------- skill cards — skewed glass design ---------------- */

.skill-card {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 40px 0;
  transition: 0.5s var(--ease);
  content-visibility: auto;
  contain-intrinsic-size: auto 320px;
  will-change: transform;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 30px;
  width: 50%;
  height: 100%;
  border-radius: 8px;
  transform: skewX(12deg);
  transition: 0.5s var(--ease);
  z-index: 0;
}

.skill-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 30px;
  width: 50%;
  height: 100%;
  border-radius: 8px;
  transform: skewX(12deg);
  transition: 0.5s var(--ease);
  filter: blur(30px);
  z-index: 0;
  opacity: 0.5;
}

.skill-card:hover::before,
.skill-card:hover::after {
  transform: skewX(0deg);
  left: 15px;
  width: calc(100% - 60px);
}

/* category color gradients */
.skill-card[data-role="plan"]::before,
.skill-card[data-role="plan"]::after {
  background: linear-gradient(315deg, #0AF700, #023A00);
}
.skill-card[data-role="build"]::before,
.skill-card[data-role="build"]::after {
  background: linear-gradient(315deg, #ABFFA7, #07AE00);
}
.skill-card[data-role="compact"]::before,
.skill-card[data-role="compact"]::after {
  background: linear-gradient(315deg, #8FBA92, #14301A);
}
.skill-card[data-role="capability"]::before,
.skill-card[data-role="capability"]::after {
  background: linear-gradient(315deg, #00D237, #023A00);
}
.skill-card[data-role="sub"]::before,
.skill-card[data-role="sub"]::after {
  background: linear-gradient(315deg, #56FFC0, #07AE00);
}
.skill-card[data-role="deep"]::before,
.skill-card[data-role="deep"]::after {
  background: linear-gradient(315deg, #9BFF5A, #023A00);
}
.skill-card[data-role="micro"]::before,
.skill-card[data-role="micro"]::after {
  background: linear-gradient(315deg, #4DD8FF, #07AE00);
}
.skill-card[data-role="custom"]::before,
.skill-card[data-role="custom"]::after {
  background: linear-gradient(315deg, #FFB347, #FF6B00);
}

/* floating glass orbs */
.skill-card .card-orb {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: 0.4s ease;
}

.skill-card .card-orb-top {
  top: -30px;
  left: 40px;
  width: 60px;
  height: 60px;
}

.skill-card .card-orb-bottom {
  bottom: -30px;
  right: 40px;
  width: 60px;
  height: 60px;
}

.skill-card:hover .card-orb {
  opacity: 1;
}

.skill-card:hover .card-orb-top {
  top: -40px;
  left: 50px;
  width: 80px;
  height: 80px;
}

.skill-card:hover .card-orb-bottom {
  bottom: -40px;
  right: 50px;
  width: 80px;
  height: 80px;
}

@keyframes card-float {
  0%, 100% { transform: translateY(8px); }
  50% { transform: translate(-6px, -2px); }
}

.skill-card .card-orb {
  animation: card-float 3s ease-in-out infinite;
}

.skill-card .card-orb-bottom {
  animation-delay: -1.5s;
}

/* content panel */
.skill-card .card-content {
  position: relative;
  z-index: 2;
  padding: 20px 28px;
  background: rgba(10, 18, 11, 0.55);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(10, 247, 0, 0.08);
  border-radius: 8px;
  transition: 0.5s var(--ease);
  color: var(--text);
}

.skill-card:hover .card-content {
  padding: 28px 28px;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
}

.badge-plan       { color: #56FF50; border-color: rgba(10, 247, 0, 0.45); background: rgba(10, 247, 0, 0.14); }
.badge-build      { color: var(--primary); border-color: rgba(171, 255, 167, 0.45); background: rgba(171, 255, 167, 0.08); }
.badge-compact    { color: var(--text-2); border-color: var(--border-strong); background: var(--inset); }
.badge-capability { color: #00D237; border-color: rgba(0, 210, 55, 0.5); background: rgba(0, 210, 55, 0.12); }
.badge-sub        { color: #56FFC0; border-color: rgba(86, 255, 192, 0.5); background: rgba(86, 255, 192, 0.12); }
.badge-deep       { color: #9BFF5A; border-color: rgba(155, 255, 90, 0.5); background: rgba(155, 255, 90, 0.12); }
.badge-micro      { color: #4DD8FF; border-color: rgba(77, 216, 255, 0.5); background: rgba(77, 216, 255, 0.12); }
.badge-custom     { color: #FFB347; border-color: rgba(255, 179, 71, 0.5); background: rgba(255, 179, 71, 0.12); }

.badge-platform {
  color: var(--text-2);
  background: var(--inset);
}

.card-file {
  font-size: 11.5px;
  color: var(--accent-soft);
  background: var(--inset);
  border: 1px solid var(--border);
  border-radius: var(--r-control);
  padding: 7px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-howto {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-bright);
  letter-spacing: 0.5px;
  opacity: 0.6;
  transition: opacity 0.2s ease;
  cursor: default;
}

.skill-card:hover .card-howto {
  opacity: 1;
}

.card-title {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 13.5px;
  color: var(--text-2);
  flex: 1;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.card-actions .btn {
  flex: 1;
}

/* ---------------- platforms ---------------- */

.platforms {
  padding-top: var(--sp-section);
  padding-bottom: calc(var(--sp-section) - 32px);
}

.section-title {
  font-size: clamp(24px, 3.6vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-note {
  color: var(--text-2);
  font-size: 13.5px;
  max-width: 72ch;
  margin-top: 8px;
  margin-bottom: var(--sp-3);
}

.platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--sp-2);
}

.platform-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: var(--sp-3);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
  content-visibility: auto;
  contain-intrinsic-size: auto 280px;
}

.platform-card:hover {
  transform: translateY(-4px);
  border-color: #1E4526;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.plat-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.plat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-soft);
  background: var(--inset);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-control);
}

.plat-head h3 {
  font-size: 16px;
  font-weight: 700;
}

.plat-vendor {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-top: 2px;
}

.plat-desc {
  font-size: 13.5px;
  color: var(--text-2);
}

.platform-card dl {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--inset);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 12px 14px;
  margin: 0;
}

.platform-card dt {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 2px;
}

.platform-card dd {
  font-size: 12.5px;
  color: var(--text);
}

.platform-card dd code {
  font-size: 11.5px;
  color: #C8E4C4;
  word-break: break-all;
}

.install-path {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.install-path + .install-path {
  margin-top: 6px;
}

.install-path span {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(10, 247, 0, 0.08);
  border: 1px solid rgba(10, 247, 0, 0.35);
  border-radius: var(--r-pill);
  padding: 2px 8px;
  flex: 0 0 auto;
}

.plat-note {
  font-size: 12.5px;
  color: var(--text-2);
}

/* ---------------- empty state ---------------- */

.empty {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-card);
  padding: var(--sp-3);
  text-align: center;
}

/* ---------------- footer ---------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--sp-3) var(--sp-4);
  margin-top: var(--sp-section);
}

.site-footer p {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.8;
}

.footer-nav {
  display: flex;
  gap: 20px;
  margin-top: 12px;
}

.footer-link {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-bright);
  text-decoration: none;
  letter-spacing: 0.5px;
  opacity: 0.7;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.footer-link:hover {
  opacity: 1;
  color: #fff;
}

/* ---------------- FAQ page ---------------- */

.faq-section {
  padding-top: var(--sp-section);
  padding-bottom: var(--sp-section);
  max-width: 800px;
  margin: 0 auto;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: var(--sp-3);
}

.faq-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item[open] {
  border-color: rgba(10, 247, 0, 0.25);
}

.faq-q {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: color 0.2s ease;
}

.faq-q::-webkit-details-marker { display: none; }
.faq-q::marker { display: none; content: ""; }

.faq-q::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-bright);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item[open] .faq-q::after {
  transform: rotate(45deg);
}

.faq-item:hover .faq-q {
  color: var(--accent-bright);
}

.faq-a {
  padding: 0 20px 16px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
}

.faq-a p {
  margin-bottom: 8px;
}

.faq-a p:last-child {
  margin-bottom: 0;
}

.faq-a code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--inset);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
}

.faq-a a {
  color: var(--accent-bright);
  text-decoration: none;
}

.faq-a a:hover {
  text-decoration: underline;
}

/* ---------------- modal ---------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 40px);
  background: rgba(0, 0, 0, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.modal[hidden] {
  display: none;
}

.modal-box {
  width: min(880px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-card);
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.modal-head h3 {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-close {
  font-size: 20px;
  line-height: 1;
  color: var(--text-2);
  background: transparent;
  border: none;
  border-radius: var(--r-control);
  padding: 4px 10px;
}

.modal-close:hover {
  color: var(--text);
  background: var(--border-strong);
}

.modal-body {
  flex: 1;
  overflow: auto;
  background: var(--inset);
  padding: 16px;
  margin: 0;
}

.modal-body code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: #D8F2D4;
  white-space: pre-wrap;
  word-break: break-word;
}

.modal-actions {
  display: flex;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
}

.modal-actions .btn {
  flex: 1;
}

/* ---------------- motion: scroll reveal ---------------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: calc(var(--i, 0) * 60ms);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------- responsive ---------------- */

@media (max-width: 900px) {
  .digest-grid {
    grid-template-columns: 1fr;
  }
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  :root {
    --sp-section: 48px;
  }
  .stats {
    flex: 1 1 auto;
  }
  .stat {
    flex: 1;
    align-items: flex-start;
    min-width: 0;
  }
  .toolbar-row {
    flex-direction: column;
  }
  .card-actions {
    flex-direction: column;
  }
}

/* ---------------- sidebar — minimalistic translucent iOS ---------------- */

.sidebar {
  --sb-bg: rgba(10, 18, 11, 0.65);
  --sb-border: rgba(10, 247, 0, 0.12);
  --sb-glow: rgba(10, 247, 0, 0.08);
  --sb-radius: 16px;
  --sb-blur: 20px;

  position: fixed;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  width: 48px;
  background: var(--sb-bg);
  border: 1px solid var(--sb-border);
  border-radius: var(--sb-radius);
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  -webkit-backdrop-filter: blur(var(--sb-blur)) saturate(1.4);
  backdrop-filter: blur(var(--sb-blur)) saturate(1.4);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 0.5px rgba(10, 247, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sidebar:hover,
.sidebar.open {
  width: 160px;
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.4),
    0 0 0 0.5px rgba(10, 247, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--accent-bright);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  white-space: nowrap;
  border-radius: 10px;
  margin: 0;
  transition: background 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
  position: relative;
  z-index: 2;
  opacity: 0.5;
  overflow: hidden;
}

.sidebar:hover .sidebar-link,
.sidebar.open .sidebar-link {
  opacity: 1;
}

.sidebar-link:hover {
  background: var(--accent-bright);
  color: #010502;
  box-shadow:
    0 0 5px var(--accent-bright),
    0 0 20px var(--accent-bright),
    0 0 40px rgba(10, 247, 0, 0.4);
}

.sidebar-link:active {
  transform: scale(0.97);
}

.sidebar-link svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: inherit;
  position: relative;
  z-index: 2;
}

/* neon border trace spans */
.sidebar-link > span:not(.sidebar-link-text) {
  position: absolute;
  display: block;
  z-index: 1;
}

.sidebar-link > span:not(.sidebar-link-text):nth-child(1) {
  top: 0;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--accent-bright));
  animation: sb-border-top 1.5s linear infinite;
}

.sidebar-link > span:not(.sidebar-link-text):nth-child(2) {
  top: -100%;
  right: 0;
  width: 1.5px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--accent-bright));
  animation: sb-border-right 1.5s linear infinite;
  animation-delay: 0.375s;
}

.sidebar-link > span:not(.sidebar-link-text):nth-child(3) {
  bottom: 0;
  right: 0;
  width: 100%;
  height: 1.5px;
  background: linear-gradient(270deg, transparent, var(--accent-bright));
  animation: sb-border-bottom 1.5s linear infinite;
  animation-delay: 0.75s;
}

.sidebar-link > span:not(.sidebar-link-text):nth-child(4) {
  bottom: -100%;
  left: 0;
  width: 1.5px;
  height: 100%;
  background: linear-gradient(360deg, transparent, var(--accent-bright));
  animation: sb-border-left 1.5s linear infinite;
  animation-delay: 1.125s;
}

@keyframes sb-border-top {
  0%   { left: -100%; }
  50%, 100% { left: 100%; }
}
@keyframes sb-border-right {
  0%   { top: -100%; }
  50%, 100% { top: 100%; }
}
@keyframes sb-border-bottom {
  0%   { right: -100%; }
  50%, 100% { right: 100%; }
}
@keyframes sb-border-left {
  0%   { bottom: -100%; }
  50%, 100% { bottom: 100%; }
}

.sidebar-link-text {
  opacity: 0;
  transition: opacity 0.25s ease 0.08s;
  position: relative;
  z-index: 2;
}

.sidebar:hover .sidebar-link-text,
.sidebar.open .sidebar-link-text {
  opacity: 1;
}

.sidebar-toggle {
  display: none;
}

.pull-indicator {
  display: none;
}

/* mobile: centered Home pill with pull-to-refresh */
@media (max-width: 768px) {
  .site-header {
    display: none;
  }
  .sidebar {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    height: auto;
    transform: none;
    flex-direction: column;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--sb-border);
    padding: 10px 16px;
    justify-content: center;
    align-items: center;
    z-index: 100;
    background: var(--sb-bg);
    -webkit-backdrop-filter: blur(var(--sb-blur)) saturate(1.4);
    backdrop-filter: blur(var(--sb-blur)) saturate(1.4);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  }
  .sidebar::before,
  .sidebar::after {
    display: none;
  }
  .sidebar-toggle {
    display: none;
  }
  .sidebar-link {
    justify-content: center;
    gap: 6px;
    padding: 6px 20px;
    border-radius: 999px;
    border: 1px solid var(--sb-border);
    background: rgba(10, 247, 0, 0.06);
    font-size: 13px;
    opacity: 1;
    transition: transform 0.2s ease, background 0.2s;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    overflow: hidden;
  }
  .sidebar-link:active {
    transform: scale(0.96);
    background: rgba(10, 247, 0, 0.12);
  }
  .sidebar-link > span:not(.sidebar-link-text) {
    animation: none;
    display: none;
  }
  .sidebar-link-text {
    opacity: 1;
  }
  .sidebar:hover,
  .sidebar.open {
    width: 100%;
  }
  .pull-indicator {
    display: block;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-2);
    height: 0;
    overflow: hidden;
    transition: height 0.25s ease, opacity 0.25s ease;
    opacity: 0;
  }
  .pull-indicator.visible {
    height: 28px;
    opacity: 1;
    line-height: 28px;
  }
  .pull-indicator.refreshing {
    color: var(--accent-bright);
  }
  .hero {
    padding-top: 8px;
  }
}

/* ---------------- hero ---------------- */

.hero {
  padding: 48px 0 24px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent-bright);
  background: rgba(10, 247, 0, 0.08);
  border: 1px solid rgba(10, 247, 0, 0.2);
  border-radius: 999px;
  padding: 5px 16px;
  margin-bottom: 16px;
}

.hero-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(20px, 5vw, 48px);
  font-weight: 900;
  color: var(--text);
  margin: 0 0 12px;
  line-height: 1.1;
  overflow-wrap: break-word;
}

.hero-accent {
  color: var(--accent-bright);
  text-shadow: 0 0 30px rgba(10, 247, 0, 0.4);
}

.hero-desc {
  font-size: 15px;
  color: var(--text-2);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.6;
}

.hero-desc strong {
  color: var(--accent-bright);
}

/* ---------------- carousel ---------------- */

.carousel-section {
  overflow: hidden;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 24px;
}

.carousel-track {
  display: flex;
  gap: 24px;
  width: max-content;
  animation: scroll-left 30s linear infinite;
  will-change: transform;
}

.carousel-item {
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-bright);
  background: rgba(10, 247, 0, 0.06);
  border: 1px solid rgba(10, 247, 0, 0.15);
  border-radius: 6px;
  padding: 8px 16px;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}

.carousel-item:hover {
  background: rgba(10, 247, 0, 0.15);
  border-color: var(--accent-bright);
}

.carousel-item small {
  color: var(--text-2);
  font-size: 11px;
}

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

/* ---------------- star rating ---------------- */

.card-stars {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 6px 0;
}

.card-stars .star {
  font-size: 16px;
  color: #333;
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
  user-select: none;
}

.card-stars .star:hover {
  transform: scale(1.2);
}

.card-stars .star.active {
  color: #f5a623;
  text-shadow: 0 0 6px rgba(245, 166, 35, 0.4);
}

.card-stars .star-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-2);
  margin-left: 6px;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .bg-glow,
  .animate-rise,
  .carousel-track {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .skill-card:hover,
  .platform-card:hover,
  .digest-card:hover {
    transform: none;
  }
  .skill-card::before,
  .skill-card::after {
    transition: none;
  }
  .skill-card .card-orb {
    animation: none;
  }
  .btn span {
    animation: none;
  }
  .carousel-track {
    animation: none;
    will-change: auto;
  }
  .skill-card {
    will-change: auto;
    content-visibility: visible;
  }
  .sidebar-link > span:not(.sidebar-link-text) {
    animation: none;
  }
  .sidebar {
    transition: none;
  }
}
