:root {
  --bg: #0B0F1A;
  --header: #12182A;
  --card: rgba(18, 24, 42, 0.85);
  --text: #E6EAF2;
  --muted: #8A93A6;
  --accent: #00E5FF;
  --accent-secondary: #6C63FF;
  --alert: #FF4D6D;
  --grid: rgba(0, 229, 255, 0.15);
}

* { box-sizing: border-box; }

html, body { 
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'EtherealBeauty', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

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

@font-face {
  font-family: 'BigPartyO2Green';
  src: url('font/bigpartyo2green.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'EtherealBeauty';
  src: url('font/etherealbeauty.regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

a { color: var(--text); text-decoration: none; }

a:hover { text-decoration: underline; }

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

.mobile-menu-btn {
  display: none;
  background: #12182A;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 20px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.mobile-menu-btn:active {
  background: #1A2342;
  transform: scale(0.95);
}

.nav-mobile {
  display: flex;
}

.nav-open {
  display: flex !important;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: transparent;
  border-bottom: none;
  transition: transform 0.3s ease;
}

.header-hidden {
  transform: translateY(-100%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}

.brand {
  flex: 1;
}

.header-inner,
.container {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.title {
  font-weight: 800;
}

.sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.container {
  margin: 0;
  padding: 16px 0;
  width: 100%;
  max-width: 100%;
}

.hero {
  position: relative;
  overflow: hidden;
  border: 0;
  background: transparent;
  padding: 0;
  margin-top: 0;
  width: 100vw;
  min-height: 100vh;
}

.hero-full {
  border: 0;
  width: 100vw;
  min-height: 100vh;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: url('images/hero.png');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  filter: saturate(115%);
  animation: floatbg 8s ease-in-out infinite;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(11, 15, 26, 0.7), rgba(18, 24, 42, 0.8));
}

@keyframes floatbg {
  0% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(10px, -6px, 0) scale(1.02); }
  100% { transform: translate3d(0,0,0) scale(1); }
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  align-content: center;
}

.hero-top {
  padding: 80px 24px 40px;
  background: transparent;
  width: 100%;
}

.hero-left {
  text-align: center;
}

.cta-row {
  justify-content: center;
}

.badges {
  justify-content: center;
}

.hero-bottom {
  padding: 0 18px 18px 18px;
  background: transparent;
}

.hero-panel {
  margin-top: 2px;
}

.hero-kicker {
  display: none;
  border: 1px solid var(--grid);
  color: var(--accent);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 14px;
  background: rgba(0,0,0,0.12);
}

.hero h1 {
  margin: 12px 0 0 0;
  font-size: 72px;
  font-family: 'BigPartyO2Green', Arial, sans-serif;
  letter-spacing: 0;
}

.hero p {
  margin: 14px 0 0 0;
  color: #ffffff;
  line-height: 1.5;
  font-family: 'BigPartyO2Green', Arial, sans-serif;
  font-size: 22px;
}

.cta-row {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--grid);
  padding: 10px 12px;
  font-weight: 900;
  cursor: pointer;
  user-select: none;
}

.btn-primary {
  border-color: var(--accent);
  color: #0B0F1A;
  background: var(--accent);
}

.btn-primary:hover { filter: brightness(1.03); }

.btn-secondary {
  background: transparent;
  color: var(--text);
}

.btn-secondary:hover { background: rgba(0, 229, 255, 0.05); }

.badges {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  border: 1px solid var(--grid);
  background: rgba(0,0,0,0.12);
  padding: 6px 10px;
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
}

.panel {
  border: 1px solid var(--grid);
  background: rgba(255,255,255,0.06);
  padding: 12px;
  transition: transform 120ms ease;
}

.panel-title {
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 8px;
}

.hero-code pre {
  max-height: 220px;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
}

.stat {
  border: 1px solid var(--grid);
  background: rgba(0,0,0,0.10);
  padding: 10px;
}

.stat-num {
  font-weight: 900;
  font-size: 18px;
  color: var(--text);
}

.stat-label {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.card {
  border: 1px solid var(--grid);
  background: var(--card);
  padding: 24px;
  margin-top: 16px;
  width: 100%;
  max-width: 100%;
}

.card h2 {
  margin: 0;
  color: var(--accent);
}

.card h3 {
  margin: 14px 0 6px 0;
  color: var(--text);
}

.muted { color: var(--muted); }

.codeblock {
  position: relative;
  margin-top: 10px;
  border: 1px solid var(--grid);
  background: rgba(0,0,0,0.15);
}

pre {
  margin: 0;
  padding: 12px;
  overflow: auto;
}

code { font-family: Consolas, monospace; font-size: 13px; }

.copy {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  padding: 6px 10px;
  font-weight: 800;
  cursor: pointer;
}

.copy:active { transform: translateY(1px); }

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

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

.kv {
  border: 1px solid var(--grid);
  padding: 10px;
  background: rgba(0,0,0,0.10);
}

.k { color: var(--accent); font-weight: 800; }

.v { margin-top: 6px; color: var(--muted); }

.note {
  margin-top: 10px;
  color: var(--muted);
}

.footer {
  border-top: 1px solid var(--grid);
  margin-top: 24px;
  padding: 24px;
  width: 100%;
  text-align: center;
}

.footer-image {
  width: 100vw;
  max-width: 100vw;
  margin-left: -24px;
  margin-right: -24px;
  margin-bottom: 16px;
  margin-top: -24px;
}

.footer-image img {
  width: 100%;
  max-width: 100%;
  height: 500px;
  display: block;
  object-fit: cover;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 56px;
  }

  .hero p {
    font-size: 20px;
  }
}

/* Tablets */
@media (max-width: 768px) {
  .header {
    background: transparent;
  }

  .hero-bg {
    background-position: center top;
    background-size: cover;
    width: 100vw;
    height: 100vh;
  }

  .hero {
    width: 100vw;
    min-height: 100vh;
  }

  .hero-inner {
    width: 100%;
  }

  .hero-top {
    padding: 70px 16px 30px;
  }

  body {
    padding-top: 0;
  }

  .container {
    padding: 12px 16px;
  }

  .card {
    padding: 16px;
    width: 100%;
  }

  .footer {
    padding: 16px;
  }

  .footer-image {
    margin-left: -16px;
    margin-right: -16px;
    margin-top: -16px;
  }

  .footer-image img {
    height: 200px;
  }

  .mobile-menu-btn {
    display: flex;
    margin-left: auto;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: #12182A;
    border: 1px solid var(--grid);
    border-radius: 4px;
  }

  .nav a {
    padding: 12px;
    font-size: 14px;
    text-align: center;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero p {
    font-size: 18px;
  }

  .hero-kicker {
    font-size: 13px;
  }

  .hero-left {
    text-align: center;
  }

  .cta-row {
    justify-content: center;
  }

  .badges {
    justify-content: center;
  }

  .hero-top,
  .hero-bottom {
    padding: 16px;
  }

  .btn {
    min-height: 44px;
    padding: 12px 16px;
  }

  .copy {
    min-height: 36px;
    min-width: 60px;
  }
}

/* Large phones */
@media (max-width: 600px) {
  .hero-bg {
    background-position: center top;
    background-size: cover;
    width: 100vw;
    height: 100vh;
  }

  .hero {
    width: 100vw;
    min-height: 100vh;
  }

  .hero-top {
    padding: 60px 12px 24px;
  }

  .container {
    padding: 10px 12px;
  }

  .card {
    padding: 14px;
  }

  .footer-image img {
    height: 150px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero p {
    font-size: 17px;
  }

  .hero-kicker {
    font-size: 12px;
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 8px;
  }

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

  .panel {
    padding: 10px;
  }

  .container {
    padding: 12px 16px;
    width: 100%;
  }

  .card {
    padding: 12px;
  }

  pre {
    padding: 10px;
    font-size: 12px;
  }

  code {
    font-size: 12px;
  }

  .grid2 {
    grid-template-columns: 1fr;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .container {
    padding: 8px 10px;
    width: 100%;
  }

  .hero {
    width: 100vw;
    min-height: 100vh;
  }

  .hero-bg {
    background-position: 65% top;
    background-size: cover;
    width: 100vw;
    height: 100vh;
  }

  .hero-top {
    padding: 50px 10px 20px;
  }

  .card {
    padding: 12px;
  }

  .footer-image img {
    height: 120px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-kicker {
    font-size: 11px;
  }

  .title {
    font-size: 14px;
  }

  .logo {
    width: 32px;
    height: 32px;
  }

  .nav a {
    font-size: 12px;
    padding: 6px 10px;
  }

  .btn {
    width: 100%;
    font-size: 14px;
  }

  .cta-row {
    flex-direction: column;
    width: 100%;
  }

  .badge {
    font-size: 11px;
    padding: 5px 8px;
  }

  .hero-top,
  .hero-bottom {
    padding: 12px;
  }

  .hero-code pre {
    max-height: 180px;
  }

  .panel-title {
    font-size: 14px;
  }

  .copy {
    position: static;
    width: 100%;
    margin-top: 8px;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .codeblock {
    display: flex;
    flex-direction: column;
  }

  .kv {
    padding: 8px;
  }

  .k {
    font-size: 13px;
  }

  .v {
    font-size: 12px;
  }

  .footer {
    text-align: center;
    font-size: 13px;
    padding: 12px;
  }

  .footer-image {
    margin-left: -12px;
    margin-right: -12px;
    margin-top: -12px;
  }

  .footer-image img {
    height: 100px;
  }
}

/* Very small phones */
@media (max-width: 360px) {
  .hero h1 {
    font-size: 32px;
  }

  .hero p {
    font-size: 15px;
  }

  .hero-kicker {
    font-size: 10px;
  }

  .nav a {
    font-size: 11px;
    padding: 5px 8px;
  }

  .stat-num {
    font-size: 16px;
  }

  .stat-label {
    font-size: 11px;
  }
}

/* Landscape mode on phones */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-bg {
    animation: none;
  }

  .hero h1 {
    font-size: 40px;
    margin-top: 8px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-top {
    padding: 12px;
  }
}

/* High DPI / Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .logo {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Print styles */
@media print {
  .header,
  .hero-bg,
  .copy,
  .btn {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .card,
  .panel {
    border: 1px solid #ccc;
    break-inside: avoid;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  pre {
    background: #f5f5f5;
    border: 1px solid #ddd;
  }
}

/* Additional styles for new index.html sections */

/* Meta info line */
.meta {
  margin-top: 15px;
  font-size: 14px;
  color: var(--muted);
}

.meta span {
  margin: 0 5px;
}

/* Steps styling */
.steps {
  margin: 20px 0;
}

.step {
  background: rgba(0, 229, 255, 0.1);
  border-left: 4px solid var(--accent);
  padding: 15px;
  margin: 15px 0;
  border-radius: 0 8px 8px 0;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #000;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: bold;
  margin-right: 10px;
  font-size: 14px;
}

.marker-info {
  background: rgba(0, 229, 255, 0.15);
  border-left: 4px solid var(--accent);
  padding: 15px;
  margin: 15px 0;
  border-radius: 0 8px 8px 0;
}

/* FAQ styling */
.faq {
  margin: 20px 0;
}

.qa {
  margin: 15px 0;
  padding: 15px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
}

.q {
  font-weight: bold;
  color: var(--accent);
  margin-bottom: 8px;
}

.a {
  color: var(--muted);
  line-height: 1.6;
}

.a code {
  background: rgba(0, 229, 255, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text);
}

/* Terminal output block */
.codeblock.terminal pre {
  background: #1a1a2e;
  color: #00ff88;
}

.codeblock.terminal code {
  color: #00ff88;
  text-shadow: 0 0 5px rgba(0,255,136,0.3);
}

/* Lead paragraph */
.lead {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 30px;
}

/* Font Awesome Icons */
h2 i, h3 i, h1 i {
  color: var(--accent);
  margin-right: 10px;
}

.nav i {
  margin-right: 5px;
}

/* =====================================================================
   MODERN UI LAYER — added enhancements
   ===================================================================== */

/* ---------- Theme system (light) ---------- */
:root[data-theme="light"] {
  --bg: #F2F5FB;
  --header: #FFFFFF;
  --card: rgba(255, 255, 255, 0.92);
  --text: #11182B;
  --muted: #5C6478;
  --accent: #0084FF;
  --accent-secondary: #6C63FF;
  --alert: #E11D48;
  --grid: rgba(0, 132, 255, 0.18);
}

:root[data-theme="light"] body {
  background: linear-gradient(180deg, #EAF1FA 0%, #F5F7FB 60%, #FFFFFF 100%);
}

:root[data-theme="light"] .hero-bg::after {
  background: linear-gradient(120deg, rgba(255,255,255,0.55), rgba(234, 241, 250, 0.65));
}

:root[data-theme="light"] .hero h1,
:root[data-theme="light"] .hero p {
  color: #11182B;
  text-shadow: 0 2px 12px rgba(255,255,255,0.6);
}

:root[data-theme="light"] .codeblock {
  background: #0E1424;
}

:root[data-theme="light"] .codeblock pre,
:root[data-theme="light"] .codeblock code {
  color: #E6EAF2;
}

:root[data-theme="light"] .header.header-scrolled {
  background: rgba(255,255,255,0.85);
  border-bottom: 1px solid var(--grid);
}

:root[data-theme="light"] .nav a { color: #11182B; }

:root[data-theme="light"] .badge {
  background: rgba(0, 132, 255, 0.08);
}

/* ---------- Smooth global transitions ---------- */
body, .card, .panel, .nav, .header, .btn, .badge, .kv,
.theme-toggle, .back-to-top, .copy {
  transition: background-color .28s ease, color .28s ease,
              border-color .28s ease, box-shadow .28s ease,
              transform .28s ease, opacity .28s ease;
}

/* ---------- Custom scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--accent-secondary));
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { filter: brightness(1.15); }

/* ---------- Header refinement (glass) ---------- */
.header.header-scrolled {
  background: rgba(11, 15, 26, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--grid);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
}

.nav a {
  position: relative;
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 10px; right: 10px; bottom: 2px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .25s ease;
  border-radius: 2px;
}

.nav a:hover { text-decoration: none; color: var(--accent); }
.nav a:hover::after { transform: scaleX(1); }
.nav a.active { color: var(--accent); }
.nav a.active::after { transform: scaleX(1); }

/* ---------- Theme toggle button ---------- */
.theme-toggle {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--grid);
  background: rgba(255,255,255,0.04);
  color: var(--accent);
  cursor: pointer;
  border-radius: 10px;
  font-size: 16px;
  margin-right: 8px;
}
.theme-toggle:hover {
  background: rgba(0, 229, 255, 0.10);
  transform: rotate(-12deg) scale(1.05);
  box-shadow: 0 0 18px rgba(0,229,255,0.35);
}

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
  z-index: 9999;
  pointer-events: none;
}
.scroll-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary), var(--alert));
  box-shadow: 0 0 12px var(--accent);
  transition: width .08s linear;
}

/* ---------- Back-to-top ---------- */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: rgba(0, 229, 255, 0.12);
  color: var(--accent);
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.9);
  z-index: 60;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 24px rgba(0,229,255,0.25);
}
.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.back-to-top:hover {
  background: var(--accent);
  color: #0B0F1A;
  transform: translateY(-3px) scale(1.05);
}

/* ---------- Toast notifications ---------- */
.toast-host {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: rgba(11, 15, 26, 0.92);
  color: var(--text);
  border: 1px solid var(--grid);
  border-left: 3px solid var(--accent);
  padding: 10px 14px 10px 12px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
  border-radius: 6px;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity .25s ease, transform .25s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast-success { border-left-color: #2ee37b; }
.toast-success .toast-icon::before { content: "\f00c"; }
.toast-error { border-left-color: var(--alert); }
.toast-error .toast-icon::before { content: "\f00d"; color: var(--alert); }
.toast-info { border-left-color: var(--accent); }
.toast-info .toast-icon::before { content: "\f129"; }
.toast-icon::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--accent);
}

/* ---------- Cursor halo ---------- */
.cursor-halo {
  position: fixed;
  top: 0; left: 0;
  width: 280px; height: 280px;
  margin: -140px 0 0 -140px;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle, rgba(0,229,255,0.18) 0%, rgba(108,99,255,0.10) 40%, rgba(0,0,0,0) 70%);
  mix-blend-mode: screen;
  filter: blur(8px);
  transition: opacity .2s ease;
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .65s cubic-bezier(.2,.8,.2,1),
              transform .65s cubic-bezier(.2,.8,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.revealed { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- Card glow on hover ---------- */
.card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%),
              rgba(0,229,255,0.08), transparent 40%);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(0,229,255,0.18), 0 6px 24px rgba(0,0,0,0.22);
  border-color: rgba(0, 229, 255, 0.35);
}

/* ---------- Buttons: shimmer + glow ---------- */
.btn {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 13px;
  padding: 12px 18px;
}
.btn-primary {
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-secondary) 100%);
  border: 0;
  color: #0B0F1A;
  box-shadow: 0 6px 22px rgba(0,229,255,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,229,255,0.55);
  filter: brightness(1.08);
}
.btn-secondary {
  border: 1px solid var(--accent);
  color: var(--accent);
}
.btn-secondary:hover {
  background: rgba(0,229,255,0.08);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0,229,255,0.18);
}
.btn::after {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-20deg);
  transition: left .6s ease;
}
.btn:hover::after { left: 130%; }

/* ---------- Badges: tilt + glow ---------- */
.badge {
  border-radius: 999px;
  letter-spacing: 0.04em;
  transition: transform .22s ease, color .22s ease, box-shadow .22s ease, background .22s ease;
  cursor: default;
}
.badge:hover {
  transform: translateY(-2px) scale(1.05);
  background: rgba(0,229,255,0.18);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0,229,255,0.35);
}

/* ---------- Code block accent bar ---------- */
.codeblock {
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}
.codeblock::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-secondary));
}
.codeblock pre { padding: 16px 14px 14px 18px; }
.copy {
  border-radius: 6px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(0,229,255,0.06);
}
.copy:hover { background: var(--accent); color: #0B0F1A; }
.copy.copy-success { background: #2ee37b; border-color: #2ee37b; color: #0B0F1A; }

/* ---------- KV cards modernization ---------- */
.kv {
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.08));
  position: relative;
  overflow: hidden;
}
.kv::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  opacity: 0.6;
}
.kv:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,229,255,0.18);
  border-color: rgba(0,229,255,0.35);
}

/* ---------- Search bar ---------- */
.search-wrap {
  margin-top: 16px;
  padding: 6px 0;
  display: flex;
  justify-content: center;
}
.search-bar {
  width: min(720px, 92%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(11,15,26,0.8);
  border: 1px solid var(--grid);
  border-radius: 12px;
  padding: 10px 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}
.search-bar i { color: var(--accent); }
.search-bar input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}
.search-bar input::placeholder { color: var(--muted); }
.search-bar .kbd {
  border: 1px solid var(--grid);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--muted);
  font-family: Consolas, monospace;
}
.search-empty {
  display: none;
  text-align: center;
  color: var(--muted);
  margin-top: 16px;
  padding: 30px;
  border: 1px dashed var(--grid);
  border-radius: 10px;
}

.card.search-hidden { display: none; }
.card.search-match { animation: pulseMatch .5s ease; }
@keyframes pulseMatch {
  0% { box-shadow: 0 0 0 rgba(0,229,255,0); }
  50% { box-shadow: 0 0 0 4px rgba(0,229,255,0.2); }
  100% { box-shadow: 0 0 0 rgba(0,229,255,0); }
}

/* ---------- Stats / metric strip ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin: 0;
}
.metric {
  position: relative;
  padding: 22px 18px;
  background: linear-gradient(160deg, rgba(0,229,255,0.08), rgba(108,99,255,0.05));
  border: 1px solid var(--grid);
  border-radius: 14px;
  text-align: center;
  overflow: hidden;
}
.metric::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: conic-gradient(from 0deg, transparent, var(--accent), transparent 30%);
  opacity: 0;
  filter: blur(20px);
  transition: opacity .4s ease;
}
.metric:hover::before { opacity: 0.7; }
.metric .num {
  font-size: 36px;
  font-weight: 900;
  font-family: 'BigPartyO2Green', Arial, sans-serif;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  z-index: 2;
}
.metric .label {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  z-index: 2;
}
.metric .icon {
  font-size: 20px;
  color: var(--accent);
  margin-bottom: 6px;
  position: relative;
  z-index: 2;
}

/* ---------- Feature pill grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.feature-pill {
  border: 1px solid var(--grid);
  border-radius: 12px;
  padding: 18px;
  background: linear-gradient(160deg, rgba(0,229,255,0.04), rgba(108,99,255,0.02));
  position: relative;
  overflow: hidden;
}
.feature-pill .ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  color: #0B0F1A;
  margin-bottom: 10px;
  font-size: 16px;
}
.feature-pill h4 {
  margin: 0 0 6px 0;
  color: var(--text);
  font-size: 15px;
}
.feature-pill p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.feature-pill:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(0,229,255,0.18);
}

/* ---------- Typed terminal ---------- */
.codeblock.terminal {
  background: linear-gradient(180deg, #0a0f1d 0%, #060912 100%);
  border-color: rgba(0,229,255,0.25);
  box-shadow: inset 0 0 0 1px rgba(0,229,255,0.1), 0 10px 32px rgba(0,0,0,0.45);
}
.codeblock.terminal::before {
  background: linear-gradient(180deg, #2ee37b, var(--accent));
}
.term-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(0,229,255,0.15);
  background: rgba(0,0,0,0.3);
}
.term-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #5a6072;
}
.term-dot.r { background: #ff5f57; }
.term-dot.y { background: #ffbd2e; }
.term-dot.g { background: #28c840; }
.term-title {
  margin-left: 12px;
  font-size: 12px;
  color: var(--muted);
  font-family: Consolas, monospace;
}
.term-cursor {
  display: inline-block;
  color: var(--accent);
  animation: blink 0.9s steps(1) infinite;
  margin-left: 1px;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Improved hero (subtle particles via gradient) ---------- */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(0,229,255,0.18), transparent 30%),
    radial-gradient(circle at 80% 70%, rgba(108,99,255,0.18), transparent 30%);
  animation: heroPulse 6s ease-in-out infinite;
  z-index: 0;
}
@keyframes heroPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.hero h1 {
  background: linear-gradient(120deg, #ffffff 0%, var(--accent) 60%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 18px rgba(0,229,255,0.25));
}

/* ---------- Section dividers ---------- */
.card h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'BigPartyO2Green', Arial, sans-serif;
  font-size: 28px;
  margin-bottom: 8px;
  position: relative;
  padding-bottom: 8px;
}
.card h2::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 60px; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 2px;
}

/* ---------- Mobile menu refinement ---------- */
.mobile-menu-btn {
  border-radius: 10px;
}

/* ---------- Tab buttons (programming.html) ---------- */
.tab-btn {
  border-radius: 8px !important;
  letter-spacing: 0.04em;
  font-weight: 800;
  transition: all .25s ease;
}
.tab-btn:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  transform: translateY(-1px);
}
.tab-btn.active {
  background: linear-gradient(120deg, var(--accent), var(--accent-secondary)) !important;
  border-color: transparent !important;
  box-shadow: 0 6px 20px rgba(0,229,255,0.35);
}

/* ---------- Footer image gradient mask ---------- */
.footer {
  position: relative;
}
.footer-image {
  position: relative;
}
.footer-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--bg) 0%, transparent 30%);
  pointer-events: none;
}

/* ---------- Responsive adjustments ---------- */
@media (max-width: 768px) {
  .search-wrap { top: auto; position: relative; }
  .search-bar { width: 100%; }
  .back-to-top { right: 12px; bottom: 12px; width: 42px; height: 42px; }
  .toast-host { top: 12px; right: 12px; left: 12px; }
  .toast { min-width: 0; width: 100%; }
  .theme-toggle { width: 38px; height: 38px; }
  .metric .num { font-size: 28px; }
}

