/* Chessentials — lean gothic theme */
:root {
  --black: #050505;
  --surface: #0c0c0c;
  --surface-2: #141414;
  --border: #222;
  --border-red: #3d0a0a;
  --gray: #888;
  --gray-light: #b0b0b0;
  --white: #e8e8e8;
  --red: #b91c1c;
  --red-bright: #ef4444;
  --red-glow: rgba(185, 28, 28, 0.35);
  --font-display: 'Cinzel', Georgia, serif;
  --font-body: system-ui, -apple-system, sans-serif;
  --max: 72rem;
  --radius: 2px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--gray-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(185, 28, 28, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(30, 30, 30, 0.5) 0%, transparent 50%);
}

a { color: var(--gray-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--red-bright); }

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

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

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0);
  background: rgba(5, 5, 5, 0.94);
  border-bottom: 1px solid rgba(185, 28, 28, 0.2);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: -1;
  pointer-events: none;
}

.header-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: 3.5rem;
  padding: 0.5rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  z-index: 2;
}
.logo:hover { color: var(--white); opacity: 0.92; }
.logo-icon {
  flex-shrink: 0;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(185, 28, 28, 0.3);
}
.logo-text span { color: var(--red-bright); }
.logo--footer { font-size: 1rem; justify-content: center; }
.cute-mark {
  color: var(--red-bright);
  font-family: var(--font-display);
  letter-spacing: 0.06em;
}

/* Desktop nav — clean text links */
.nav-main {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
}
.nav-link {
  position: relative;
  padding: 0.5rem 0.75rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray);
  transition: color 0.2s;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.25rem;
  height: 1px;
  background: var(--red-bright);
  box-shadow: 0 0 8px var(--red-glow);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}
.nav-link:hover { color: var(--white); }
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--white); }

.nav-sep {
  width: 1px;
  height: 1rem;
  background: var(--border);
  margin: 0 0.35rem;
  opacity: 0.7;
}

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

.nav-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.15rem;
  padding: 0 1.1rem;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  background: linear-gradient(180deg, #b91c1c 0%, #7f1d1d 100%);
  border: 1px solid rgba(239, 68, 68, 0.45);
  box-shadow: 0 0 18px rgba(185, 28, 28, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.nav-play:hover {
  color: var(--white);
  transform: translateY(-1px);
  border-color: var(--red-bright);
  box-shadow: 0 0 24px rgba(185, 28, 28, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.65rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--gray-light);
  cursor: pointer;
  border-radius: var(--radius);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.menu-toggle-label {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.menu-toggle-icon {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 1rem;
}
.menu-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.25s;
}
.menu-toggle.is-open .menu-toggle-bar:first-child {
  transform: translateY(3px) rotate(45deg);
}
.menu-toggle.is-open .menu-toggle-bar:last-child {
  transform: translateY(-3px) rotate(-45deg);
}
.menu-toggle:hover,
.menu-toggle.is-open {
  border-color: var(--red);
  color: var(--red-bright);
  background: rgba(185, 28, 28, 0.06);
}

/* Mobile drawer — outside header so fixed positioning works on iOS */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  visibility: hidden;
  pointer-events: none;
}
.nav-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.nav-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.nav-drawer.is-open .nav-drawer-backdrop { opacity: 1; }

.nav-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(18rem, 88vw);
  height: 100%;
  height: 100dvh;
  background: linear-gradient(180deg, #0e0e0e 0%, #050505 100%);
  border-left: 1px solid var(--border-red);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.65);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
  overflow: hidden;
}
.nav-drawer.is-open .nav-drawer-panel { transform: translateX(0); }

.nav-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.nav-drawer-title {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray);
}
.nav-drawer-close {
  background: none;
  border: 1px solid var(--border);
  color: var(--gray);
  width: 2.75rem;
  height: 2.75rem;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  transition: color 0.2s, border-color 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.nav-drawer-close:hover {
  color: var(--red-bright);
  border-color: var(--red);
}

.nav-drawer-links {
  display: flex;
  flex-direction: column;
  padding: 1rem 0.85rem;
  gap: 0.15rem;
  overflow-y: auto;
}
.nav-drawer-play {
  display: block;
  text-align: center;
  margin-bottom: 0.85rem;
  padding: 0.85rem 1rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white);
  background: linear-gradient(180deg, #b91c1c, #7f1d1d);
  border: 1px solid rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 20px rgba(185, 28, 28, 0.2);
}
.nav-drawer-play:hover { color: var(--white); }

.nav-drawer-link {
  display: block;
  padding: 0.95rem 0.75rem;
  min-height: 2.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.nav-drawer-link:hover {
  color: var(--white);
  background: rgba(185, 28, 28, 0.05);
}
.nav-drawer-link.is-active {
  color: var(--red-bright);
  border-left-color: var(--red-bright);
  background: rgba(185, 28, 28, 0.08);
}

body.nav-open { overflow: hidden; }

@media (min-width: 900px) {
  .nav-main { display: flex; }
  .menu-toggle { display: none; }
  .header-bar {
    grid-template-columns: auto 1fr auto;
  }
}

@media (max-width: 899px) {
  .nav-play {
    min-height: 2.75rem;
    min-width: 2.75rem;
    padding: 0 0.85rem;
    font-size: 0.62rem;
  }
  .menu-toggle-label { display: none; }
  .logo-text { font-size: 0.95rem; letter-spacing: 0.1em; }
}

@media (min-width: 900px) {
  .nav-drawer { display: none !important; }
}

/* ── Main ── */
main { flex: 1; }

.page-section { padding: 3rem 0; }
.page-section--tight { padding: 2rem 0; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  color: var(--white);
  text-align: center;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.section-title::after {
  content: '';
  display: block;
  width: 3rem;
  height: 2px;
  background: var(--red);
  margin: 0.75rem auto 0;
  box-shadow: 0 0 12px var(--red-glow);
}
.section-sub {
  text-align: center;
  color: var(--gray);
  max-width: 36rem;
  margin: 0 auto 2.5rem;
  font-size: 0.95rem;
}

/* ── Cards & panels ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: var(--border-red);
  box-shadow: 0 0 24px var(--red-glow);
}
.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: var(--red-bright);
}
.card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--white);
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.card p { font-size: 0.875rem; color: var(--gray); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.65rem 1.25rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--white);
  cursor: pointer;
  border-radius: var(--radius);
  transition: 0.2s;
}
.btn:hover {
  border-color: var(--red);
  color: var(--red-bright);
  box-shadow: 0 0 16px var(--red-glow);
}
.btn--primary {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}
.btn--primary:hover {
  background: var(--red-bright);
  border-color: var(--red-bright);
  color: var(--white);
}
.btn--ghost {
  background: transparent;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

select.btn {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%23888'%3E%3Cpath d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

/* ── Game layout ── */
.game-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 2rem 0 3rem;
}
@media (min-width: 960px) {
  .game-layout {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
  }
}

#chessboard {
  width: min(90vw, 480px);
  touch-action: none;
  user-select: none;
  border-radius: var(--radius);
}

.board-wrap {
  padding: 3px;
  border: 2px solid var(--border-red);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), 0 0 20px var(--red-glow);
  border-radius: var(--radius);
}
.board-wrap.theme-classic { border-color: #b58863; box-shadow: 0 0 30px rgba(181, 136, 99, 0.2); }
.board-wrap.theme-blood { border-color: #7f1d1d; box-shadow: 0 0 35px rgba(127, 29, 29, 0.35); }
.board-wrap.theme-frost { border-color: #334155; box-shadow: 0 0 35px rgba(51, 65, 85, 0.35); }

.theme-gothic #chessboard .white-1e1d7 { background-color: #2a2a2a !important; }
.theme-gothic #chessboard .black-3c85d { background-color: #0a0a0a !important; }
.theme-classic #chessboard .white-1e1d7 { background-color: #f0d9b5 !important; }
.theme-classic #chessboard .black-3c85d { background-color: #b58863 !important; }
.theme-blood #chessboard .white-1e1d7 { background-color: #3d2020 !important; }
.theme-blood #chessboard .black-3c85d { background-color: #140808 !important; }
.theme-frost #chessboard .white-1e1d7 { background-color: #3d4f5f !important; }
.theme-frost #chessboard .black-3c85d { background-color: #1a2430 !important; }

.game-sidebar {
  width: min(100%, 22rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
@media (max-width: 959px) {
  .game-sidebar {
    width: min(100%, 480px);
  }
  .game-controls .btn {
    min-height: 2.75rem;
  }
}

.game-controls {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  border-color: var(--border-red);
}
.game-controls .btn-row { width: 100%; }
.game-controls .btn { flex: 1 1 calc(50% - 0.4rem); min-width: 5rem; text-align: center; }

@media (max-width: 959px) {
  .game-controls {
    z-index: 10;
  }
}

.game-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

#game-status {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--red-bright);
  padding: 1rem;
  border: 1px solid var(--border-red);
  background: var(--surface);
}

.move-history-panel h2 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 0.75rem;
  text-align: center;
}
#move-history {
  list-style: decimal inside;
  font-size: 0.875rem;
  color: var(--gray-light);
  max-height: 14rem;
  overflow-y: auto;
  line-height: 1.8;
}
#move-history::-webkit-scrollbar { width: 4px; }
#move-history::-webkit-scrollbar-thumb { background: var(--red); }

.difficulty-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}
.difficulty-row label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
}

/* Evaluation bar */
.eval-panel { padding: 1rem 1.25rem; }
.eval-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}
.eval-label {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
}
.eval-text {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--red-bright);
}
.eval-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.eval-bar {
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, #111, var(--red));
  box-shadow: 0 0 8px var(--red-glow);
  transition: width 0.4s ease;
}
.hint-text {
  font-size: 0.8rem;
  color: var(--gray-light);
  margin-top: 0.65rem;
  font-family: ui-monospace, monospace;
}
.eval-mood {
  font-size: 0.72rem;
  color: var(--gray);
  margin-top: 0.5rem;
  font-style: italic;
}
.eval-bar.eval-winning { box-shadow: 0 0 12px rgba(74, 222, 128, 0.35); }
.eval-bar.eval-losing { background: linear-gradient(90deg, #111, #555); }

.board-tip {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--gray);
  text-align: center;
  margin: 0;
  line-height: 1.35;
  opacity: 0.85;
}
.board-tip.customize-tip {
  margin: 0.35rem 0 0.25rem;
  text-align: left;
  font-size: 0.62rem;
  opacity: 0.7;
}

.pref-toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.85rem;
  cursor: pointer;
  user-select: none;
}
.pref-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.pref-toggle-ui {
  flex-shrink: 0;
  width: 2.25rem;
  height: 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  position: relative;
  transition: background 0.2s, border-color 0.2s;
}
.pref-toggle-ui::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: var(--gray);
  transition: transform 0.2s, background 0.2s;
}
.pref-toggle input:checked + .pref-toggle-ui {
  background: rgba(185, 28, 28, 0.25);
  border-color: var(--red);
}
.pref-toggle input:checked + .pref-toggle-ui::after {
  transform: translateX(1.05rem);
  background: var(--red-bright);
}
.pref-toggle input:focus-visible + .pref-toggle-ui {
  outline: 2px solid var(--red-bright);
  outline-offset: 2px;
}
.pref-toggle-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-light);
}

.player-stats {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
  text-align: center;
  margin: 0;
}
.player-stats:empty {
  display: none;
}

/* Customize panel */
.customize-panel { padding: 0; overflow: hidden; }
.customize-panel summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-light);
  list-style: none;
}
.customize-panel summary::-webkit-details-marker { display: none; }
.customize-panel summary::after { content: '+'; float: right; color: var(--red); }
.customize-panel[open] summary::after { content: '−'; }
.customize-body { padding: 0 1.25rem 1.25rem; border-top: 1px solid var(--border); }
.customize-label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
  margin: 0.75rem 0 0.5rem;
}
.theme-swatches { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.theme-swatch {
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  padding: 2px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  border-radius: var(--radius);
  transition: 0.2s;
}
.theme-swatch.active { border-color: var(--red-bright); box-shadow: 0 0 12px var(--red-glow); }
.swatch-light, .swatch-dark { border-radius: 1px; min-height: 100%; }
.piece-options { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.piece-option { font-size: 0.65rem !important; padding: 0.45rem 0.65rem !important; }
.piece-option.active {
  border-color: var(--red-bright) !important;
  color: var(--red-bright) !important;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  background: var(--surface);
  border: 1px solid var(--border-red);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  font-size: 0.85rem;
  z-index: 300;
  box-shadow: 0 0 30px var(--red-glow);
  opacity: 0;
  transition: 0.3s ease;
  max-width: min(90vw, 24rem);
  text-align: center;
}
.toast.toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#game-status.thinking {
  animation: pulse-red 1.2s ease-in-out infinite;
  color: var(--gray);
}
#game-status.status-win { color: #4ade80; border-color: #166534; }
#game-status.status-lose { color: var(--red-bright); }

@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* Promotion modal */
.promotion-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: grid;
  place-items: center;
  z-index: 200;
}
.promotion-inner {
  background: var(--surface);
  border: 1px solid var(--border-red);
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 0 40px var(--red-glow);
}
.promotion-inner p {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 1rem;
}
.promotion-pieces {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

/* Board highlights */
.highlight { box-shadow: inset 0 0 0 3px var(--red-bright) !important; }

#chessboard .square-hint-from {
  box-shadow: inset 0 0 0 3px rgba(248, 113, 113, 0.75) !important;
}
#chessboard .square-hint-to {
  background-image: radial-gradient(circle, rgba(248, 113, 113, 0.92) 17%, transparent 18%) !important;
}
#chessboard .square-hint-capture {
  box-shadow: inset 0 0 0 4px rgba(248, 113, 113, 0.55) !important;
  background-image: radial-gradient(circle, rgba(248, 113, 113, 0.92) 17%, transparent 18%) !important;
}
.theme-classic #chessboard .square-hint-to,
.theme-classic #chessboard .square-hint-capture {
  background-image: radial-gradient(circle, rgba(185, 28, 28, 0.88) 17%, transparent 18%) !important;
}

/* ── Features strip ── */
.features-strip {
  background: var(--surface);
  border-block: 1px solid var(--border);
  padding: 3rem 0;
}
.feature-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* ── Page content (subpages) ── */
.content-wrap {
  max-width: 48rem;
  margin: 0 auto;
  padding: 2.5rem 0 3rem;
}

.page-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  color: var(--white);
  letter-spacing: 0.06em;
  text-shadow: 0 0 30px var(--red-glow);
}
.page-hero p { color: var(--gray); margin-top: 0.75rem; }

/* Accordion */
.accordion-item { border: 1px solid var(--border); margin-bottom: 0.5rem; border-radius: var(--radius); overflow: hidden; }
.accordion-btn {
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  background: var(--surface-2);
  border: none;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: 0.2s;
}
.accordion-btn:hover { background: rgba(185, 28, 28, 0.08); color: var(--red-bright); }
.accordion-btn::before { content: '♟'; color: var(--red); font-size: 1rem; }
.accordion-btn[aria-expanded="true"]::after { content: '−'; margin-left: auto; color: var(--gray); }
.accordion-btn[aria-expanded="false"]::after { content: '+'; margin-left: auto; color: var(--gray); }
.accordion-body {
  display: none;
  padding: 1rem 1.25rem 1.25rem;
  font-size: 0.875rem;
  color: var(--gray);
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.accordion-body.open { display: block; }

/* Quiz */
.quiz-options { display: flex; flex-direction: column; gap: 0.5rem; margin: 1.25rem 0; }
@media (min-width: 540px) { .quiz-options { flex-direction: row; flex-wrap: wrap; justify-content: center; } }
.quiz-option { min-width: 10rem; }
#feedback.correct { color: #4ade80; }
#feedback.incorrect { color: var(--red-bright); }
.hidden { display: none !important; }

/* Tip cards */
.tip-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 2rem;
}
@media (min-width: 720px) {
  .tip-grid { grid-template-columns: repeat(3, 1fr); }
}
.tip-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 1.25rem;
  border-radius: var(--radius);
  text-align: center;
  transition: 0.2s;
}
.tip-card:hover { border-color: var(--red); transform: translateY(-2px); }
.tip-card .piece { font-size: 2.5rem; margin-bottom: 0.5rem; }
.tip-card h4 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--white);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.tip-card p { font-size: 0.8rem; color: var(--gray); }

/* Progress bar */
.progress-track {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin: 1.5rem 0;
  overflow: hidden;
}
#progress {
  height: 100%;
  width: 0;
  background: var(--red);
  box-shadow: 0 0 8px var(--red-glow);
  transition: width 0.4s;
}
#progress.completed { background: var(--red-bright); }

.path-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 1.5rem;
}
.path-btn { width: 100%; text-align: center; }

.challenge-moves {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin: 1rem 0;
}
.fen-display {
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--red-bright);
  word-break: break-all;
  margin-top: 0.35rem;
}
.feedback-msg { text-align: center; font-size: 0.95rem; min-height: 1.5rem; }
.feedback-msg.ok { color: #4ade80; }
.feedback-msg.err { color: var(--red-bright); }

.opening-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  text-align: center;
  margin-top: 1.25rem;
  padding: 1.25rem 1rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.opening-result strong {
  font-size: 1.15rem;
  color: var(--red-bright);
  text-shadow: 0 0 20px var(--red-glow);
}
.opening-moves {
  font-size: 0.82rem;
  color: var(--gray);
  font-family: ui-monospace, monospace;
  letter-spacing: 0.02em;
  line-height: 1.5;
  max-width: 36rem;
}
.opening-desc {
  font-size: 0.88rem;
  color: var(--white);
  opacity: 0.85;
  max-width: 28rem;
  line-height: 1.45;
}
.opening-depth {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
}
.opening-badge {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--red);
  color: var(--red-bright);
  border-radius: 999px;
}
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 1rem;
}
.category-pill {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--gray);
  cursor: pointer;
  border-radius: 999px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.category-pill:hover,
.category-pill.active {
  color: var(--white);
  border-color: var(--red);
  background: rgba(185, 28, 28, 0.12);
}
.opening-vault .section-sub { margin-bottom: 0; }

/* About page — workspace hero */
.about-page { overflow-x: hidden; }
.about-page .content-wrap { padding-top: 1.5rem; }

.about-hero {
  margin-bottom: 1.5rem;
  perspective: 900px;
}

.about-hero-panel {
  position: relative;
  max-width: 36rem;
  margin-inline: auto;
  transform: rotateX(4deg);
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.about-hero-panel:hover {
  transform: rotateX(0deg) translateY(-2px);
}
.about-hero-bevel {
  position: absolute;
  inset: 0;
  transform: translateZ(-12px) translateY(8px) scale(0.98);
  background: linear-gradient(145deg, #1a0505, #0a0a0a);
  border: 1px solid rgba(185, 28, 28, 0.25);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
  pointer-events: none;
}
.about-hero-inner {
  position: relative;
  padding: 1.1rem 1.25rem 1.35rem;
  background:
    linear-gradient(165deg, rgba(24, 8, 8, 0.95) 0%, rgba(8, 8, 8, 0.98) 45%, rgba(5, 5, 5, 1) 100%);
  border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 0, 0, 0.8),
    0 12px 32px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(185, 28, 28, 0.12);
  text-align: center;
  overflow: hidden;
}
.about-hero-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red-bright), #fff, var(--red-bright), transparent);
  opacity: 0.55;
}
.about-hero-inner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 0, 0, 0.04) 3px,
    rgba(0, 0, 0, 0.04) 4px
  );
  pointer-events: none;
  opacity: 0.35;
}

.about-hero-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(185, 28, 28, 0.2);
}
.about-hero-kanji {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--red-bright);
  opacity: 0.7;
  text-shadow: 0 0 16px var(--red-glow);
  line-height: 1;
  flex-shrink: 0;
}
.about-log-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
}
.about-log-dots {
  display: inline-flex;
  gap: 4px;
  flex-shrink: 0;
}
.about-log-dots i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  font-style: normal;
}
.about-log-dots i:first-child { background: #ef4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.6); }
.about-log-dots i:nth-child(2) { background: #888; }
.about-log-dots i:nth-child(3) { background: #444; }
.about-log-path {
  color: #4ade80;
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.about-log-path::before { content: '// '; color: var(--red-bright); opacity: 0.7; }
.about-log-tag {
  flex-shrink: 0;
  color: var(--gray);
  opacity: 0.65;
  font-size: 0.55rem;
}

.about-hero-title {
  position: relative;
  margin: 0;
  line-height: 1.05;
  min-height: 1.1em;
}
.about-title-layer {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 5.5vw, 2.35rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.about-title-layer--back {
  position: absolute;
  inset: 0;
  color: transparent;
  -webkit-text-stroke: 1px rgba(185, 28, 28, 0.35);
  transform: translate(3px, 4px);
  opacity: 0.5;
  pointer-events: none;
}
.about-title-layer--mid {
  position: absolute;
  inset: 0;
  color: rgba(127, 29, 29, 0.45);
  transform: translate(1px, 2px);
  pointer-events: none;
}
.about-title-layer--front {
  position: relative;
  color: var(--white);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.15),
    0 4px 0 rgba(127, 29, 29, 0.5),
    0 8px 16px rgba(0, 0, 0, 0.8),
    0 0 30px rgba(185, 28, 28, 0.35);
}

.about-hero-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(185, 28, 28, 0.15);
}
.about-hero-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  font-family: ui-monospace, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.about-hero-social a:hover {
  color: var(--white);
  border-color: var(--red);
  box-shadow: 0 0 14px rgba(185, 28, 28, 0.25);
  transform: translateY(-1px);
}
.about-social-icon {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
  opacity: 0.85;
}
.about-hero-social a:hover .about-social-icon {
  color: var(--red-bright);
  opacity: 1;
}

@media (max-width: 480px) {
  .about-hero-panel { transform: rotateX(2deg); }
  .about-hero-inner { padding: 0.95rem 1rem 1.15rem; }
  .about-log-tag { display: none; }
  .about-title-layer { letter-spacing: 0.06em; }
}

.about-showcase { margin-bottom: 2rem; }

.about-pic-frame {
  position: relative;
  margin: 0;
  border: 1px solid var(--border-red);
  background: var(--surface);
  box-shadow:
    0 0 50px rgba(0, 0, 0, 0.65),
    0 0 30px var(--red-glow),
    inset 0 0 80px rgba(185, 28, 28, 0.04);
  overflow: hidden;
  animation: about-frame-glow 4s ease-in-out infinite;
}
@keyframes about-frame-glow {
  0%, 100% { box-shadow: 0 0 50px rgba(0, 0, 0, 0.65), 0 0 24px var(--red-glow); }
  50% { box-shadow: 0 0 55px rgba(0, 0, 0, 0.7), 0 0 40px rgba(185, 28, 28, 0.45); }
}

.about-pic-stage {
  position: relative;
  overflow: hidden;
}
.about-pic-stage:hover .about-pic {
  transform: scale(1.03);
}
.about-pic {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center 35%;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.about-pic-scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.04) 2px,
    rgba(0, 0, 0, 0.04) 4px
  );
  pointer-events: none;
  z-index: 2;
  opacity: 0.55;
  animation: scan-drift 8s linear infinite;
}
@keyframes scan-drift {
  0% { transform: translateY(0); }
  100% { transform: translateY(4px); }
}
.about-pic-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.35) 0%, transparent 28%),
    linear-gradient(0deg, rgba(5, 5, 5, 0.5) 0%, transparent 35%),
    radial-gradient(ellipse at center, transparent 40%, rgba(5, 5, 5, 0.25) 100%);
  pointer-events: none;
  z-index: 1;
}

.about-hud {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.hud-corner {
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  border-color: rgba(239, 68, 68, 0.7);
  border-style: solid;
  border-width: 0;
}
.hud-corner--tl { top: 0.75rem; left: 0.75rem; border-top-width: 2px; border-left-width: 2px; }
.hud-corner--tr { top: 0.75rem; right: 0.75rem; border-top-width: 2px; border-right-width: 2px; }
.hud-corner--bl { bottom: 0.75rem; left: 0.75rem; border-bottom-width: 2px; border-left-width: 2px; }
.hud-corner--br { bottom: 0.75rem; right: 0.75rem; border-bottom-width: 2px; border-right-width: 2px; }

.hud-chip {
  position: absolute;
  font-family: ui-monospace, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.55rem;
  background: rgba(5, 5, 5, 0.72);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #4ade80;
  backdrop-filter: blur(4px);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
}
.hud-chip--tl { top: 1.25rem; left: 1.25rem; color: #4ade80; }
.hud-chip--tr { top: 1.25rem; right: 1.25rem; color: var(--red-bright); animation: clock-pulse 2s ease-in-out infinite; }
.hud-chip--bl { bottom: 1.25rem; left: 1.25rem; color: var(--gray-light); font-size: 0.52rem; }
.hud-chip--br { bottom: 1.25rem; right: 1.25rem; color: var(--white); }
@keyframes clock-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.about-pic-meta {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.15rem 1.15rem;
  border-top: 1px solid var(--border-red);
  background:
    linear-gradient(180deg, rgba(12, 12, 12, 0.98), rgba(5, 5, 5, 1)),
    repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(185, 28, 28, 0.02) 40px, rgba(185, 28, 28, 0.02) 41px);
}
@media (min-width: 720px) {
  .about-pic-meta {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
  }
}

.dev-terminal {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.72rem;
  line-height: 1.7;
  color: #4ade80;
  text-align: left;
  min-height: 5.5rem;
  flex: 1;
}
.term-line { margin: 0 0 0.15rem; }
.term-prompt { color: var(--red-bright); margin-right: 0.35rem; }
.term-out {
  color: var(--gray-light);
  padding-left: 1rem;
  margin: 0 0 0.35rem;
  opacity: 0;
  animation: term-fade-in 0.25s ease forwards;
}
@keyframes term-fade-in {
  to { opacity: 1; }
}
.term-cursor {
  animation: term-blink 1s step-end infinite;
  color: var(--red-bright);
}
.term-cursor--hold { margin-left: 0.15rem; }
@keyframes term-blink {
  50% { opacity: 0; }
}

.dev-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-start;
  flex-shrink: 0;
}
.dev-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--gray);
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.dev-badge-icon {
  width: 0.85rem;
  height: 0.85rem;
  flex-shrink: 0;
  opacity: 0.9;
}
.dev-badge:hover {
  border-color: var(--red);
  color: var(--white);
}
.dev-badge--python:hover .dev-badge-icon { color: #3b82f6; }
.dev-badge--flask:hover .dev-badge-icon { color: #e8e8e8; }
.dev-badge--stockfish:hover .dev-badge-icon { color: #60a5fa; }
.dev-badge--live {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.08);
}
.live-dot {
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #4ade80;
  margin-right: 0.25rem;
  animation: live-pulse 1.5s ease-in-out infinite;
  vertical-align: middle;
}
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); }
  50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

.about-stack-section {
  background: var(--surface);
  border-block: 1px solid var(--border);
}
.about-cta { text-align: center; margin-top: 2rem; }

.creator-quote {
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  color: var(--gray-light);
  border-left: 2px solid var(--red);
  padding: 0.5rem 0 0.5rem 1rem;
  margin: 0 0 1rem;
  opacity: 0.9;
}
@media (min-width: 640px) { .creator-quote { max-width: 32rem; } }

.stack-card--hover {
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.stack-card--hover:hover {
  transform: translateY(-3px);
  border-color: var(--border-red);
  box-shadow: 0 0 24px rgba(185, 28, 28, 0.15);
}
.stack-icon {
  display: block;
  font-size: 1.25rem;
  color: var(--red-bright);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 12px var(--red-glow);
}

/* About page — creator card */
.creator-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 2rem;
  align-items: center;
  margin-top: 1rem;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), inset 0 0 60px rgba(185, 28, 28, 0.03);
}
@media (min-width: 640px) {
  .creator-card { grid-template-columns: auto 1fr; gap: 2.5rem; }
}

.creator-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(185, 28, 28, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(185, 28, 28, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  opacity: 0.5;
}
.creator-card > * { position: relative; z-index: 1; }

.creator-avatar {
  position: relative;
  width: 10rem;
  height: 10rem;
  margin: 0 auto;
  flex-shrink: 0;
}
.creator-avatar::before {
  content: '';
  position: absolute;
  inset: -6px;
  border: 1px solid var(--border-red);
  box-shadow: 0 0 20px var(--red-glow);
  pointer-events: none;
}
.creator-avatar::after {
  content: '♛';
  position: absolute;
  bottom: -0.5rem;
  right: -0.5rem;
  font-size: 1.25rem;
  color: var(--red-bright);
  background: var(--black);
  border: 1px solid var(--border-red);
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  box-shadow: 0 0 12px var(--red-glow);
}
.creator-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  background: var(--surface-2);
}

.creator-meta { text-align: center; }
@media (min-width: 640px) { .creator-meta { text-align: left; } }

.creator-name {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--white);
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}
.creator-role {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red-bright);
  margin-bottom: 1rem;
}
.creator-bio {
  font-size: 0.925rem;
  color: var(--gray);
  line-height: 1.75;
  max-width: 32rem;
}
.creator-bio strong { color: var(--white); font-weight: 600; }
.creator-bio em {
  font-style: normal;
  color: var(--red-bright);
  text-shadow: 0 0 20px var(--red-glow);
}
.creator-meta .social-row { justify-content: center; margin-top: 1.25rem; }
@media (min-width: 640px) { .creator-meta .social-row { justify-content: flex-start; } }

.about-grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}
@media (min-width: 640px) {
  .about-grid { grid-template-columns: 1fr 1fr; }
}
.stack-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-top: 2rem;
}
.stack-card {
  border: 1px solid var(--border);
  padding: 1.25rem;
  background: var(--surface);
  border-top: 2px solid var(--red);
}
.stack-card h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.stack-card p { font-size: 0.8rem; color: var(--gray); }
.stack-tag {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red-bright);
  border: 1px solid var(--border-red);
  padding: 0.15rem 0.5rem;
  margin-top: 0.75rem;
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1.5rem;
}
.social-row a {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  border-bottom: 1px solid transparent;
}
.social-row a:hover { color: var(--red-bright); border-color: var(--red); }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border-red);
  padding: 2rem 0;
  text-align: center;
  background: var(--surface);
}
.site-footer .logo { margin-bottom: 0.5rem; }
.footer-brand { margin-bottom: 1rem; }
.footer-tagline {
  font-size: 0.78rem;
  color: var(--gray);
  letter-spacing: 0.04em;
  margin-top: 0.35rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
  margin-bottom: 1rem;
}
.footer-links a {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
}
.footer-copy { font-size: 0.75rem; color: #555; }
