/* ==========================================================================
   playxarcade — modern neon-arcade theme
   Deep dark base · purple→blue neon gradient · cyan/green accents
   ========================================================================== */

:root {
  --bg: #0f1117;
  --bg-2: #131623;
  --bg-3: #181c2a;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --purple: #7c3aed;
  --blue: #2563eb;
  --cyan: #22d3ee;
  --green: #34d399;
  --pink: #e879f9;

  --grad: linear-gradient(135deg, var(--purple) 0%, var(--blue) 100%);
  --grad-bright: linear-gradient(120deg, #a78bfa 0%, #60a5fa 45%, #22d3ee 100%);

  --text: #e9ebf4;
  --text-dim: #a6adc6;
  --text-faint: #6d748f;

  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1180px;

  --font-head: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;

  --shadow-glow: 0 0 0 1px rgba(124, 58, 237, 0.25), 0 18px 50px -18px rgba(124, 58, 237, 0.55);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient background glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60rem 40rem at 12% -8%, rgba(124, 58, 237, 0.28), transparent 60%),
    radial-gradient(55rem 38rem at 88% -6%, rgba(37, 99, 235, 0.26), transparent 60%),
    radial-gradient(40rem 34rem at 50% 110%, rgba(34, 211, 238, 0.14), transparent 60%),
    var(--bg);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(75rem 60rem at 50% 0%, #000 0%, transparent 85%);
  -webkit-mask-image: radial-gradient(75rem 60rem at 50% 0%, #000 0%, transparent 85%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

::selection { background: rgba(124, 58, 237, 0.45); color: #fff; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 17, 23, 0.72);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: -0.01em;
}

.brand .logo-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--grad);
  box-shadow: 0 6px 22px -6px rgba(124, 58, 237, 0.8);
}

.brand .logo-mark svg { width: 20px; height: 20px; }

.brand b {
  background: var(--grad-bright);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.main-nav { display: flex; align-items: center; gap: 4px; }

.main-nav a {
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.18s ease, background 0.18s ease;
}

.main-nav a:hover { color: #fff; background: var(--surface-strong); }
.main-nav a.active { color: #fff; background: var(--surface-strong); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero (index)
   ========================================================================== */

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 84px 24px 40px;
  text-align: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
}

.hero-kicker .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px 2px rgba(52, 211, 153, 0.8);
}

.hero h1 {
  margin: 26px auto 18px;
  max-width: 820px;
  font-size: clamp(2.3rem, 5.6vw, 4rem);
  line-height: 1.05;
}

.hero h1 .grad {
  background: var(--grad-bright);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero p.lead {
  max-width: 620px;
  margin: 0 auto 30px;
  font-size: 1.08rem;
  color: var(--text-dim);
}

.hero-cats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.hero-cats a {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.hero-cats a:hover {
  transform: translateY(-2px);
  border-color: var(--purple);
  color: #fff;
}

/* ==========================================================================
   Sections & cards (index)
   ========================================================================== */

.post-section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px 24px;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 22px;
}

.section-head h2 {
  font-size: 1.55rem;
}

.section-head .count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-faint);
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad);
  opacity: 0.85;
}

.card::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -30%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.25), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-glow);
}

.card:hover::after { opacity: 1; }

.card-cat {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text-dim);
}

.card-cat svg { width: 13px; height: 13px; }
.card-cat.bio { color: #c4b5fd; border-color: rgba(139, 92, 246, 0.35); }
.card-cat.finance { color: #7dd3fc; border-color: rgba(56, 189, 248, 0.35); }
.card-cat.crypto { color: #6ee7b7; border-color: rgba(52, 211, 153, 0.35); }

.card h3 {
  font-size: 1.18rem;
  line-height: 1.3;
  margin-bottom: 10px;
  transition: color 0.18s ease;
}

.card:hover h3 { color: #fff; }

.card p.excerpt {
  flex: 1;
  font-size: 0.94rem;
  color: var(--text-dim);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-faint);
}

.card-meta .go {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--cyan);
  font-weight: 600;
}

.card-meta .go svg { width: 15px; height: 15px; transition: transform 0.2s ease; }
.card:hover .go svg { transform: translateX(4px); }

.empty-note {
  padding: 26px;
  border-radius: var(--radius);
  border: 1px dashed var(--border-strong);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* ==========================================================================
   Article page
   ========================================================================== */

.article-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.article { position: relative; }

.article-hero { margin-bottom: 36px; }

.article-hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  margin-bottom: 18px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--cyan);
}

.article-hero h1 {
  font-size: clamp(1.9rem, 4.4vw, 2.9rem);
  line-height: 1.12;
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-faint);
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.article-meta svg { width: 15px; height: 15px; }

.article-body {
  font-size: 1.03rem;
  color: #d6dae8;
}

.article-body > * + * { margin-top: 1.15em; }

.article-body h2 {
  font-size: 1.5rem;
  margin-top: 2.3em;
  padding-top: 0.35em;
  padding-left: 0;
  position: relative;
}

.article-body h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 3px;
  border-radius: 2px;
  background: var(--grad-bright);
}

.article-body p { margin-top: 1em; }

.article-body a {
  color: #8ec9ff;
  border-bottom: 1px solid rgba(142, 201, 255, 0.35);
  transition: color 0.16s ease, border-color 0.16s ease;
}

.article-body a:hover { color: #b6dcff; border-color: #b6dcff; }

.article-body strong { color: #fff; font-weight: 600; }

.article-body em { color: #e7e9f2; }

.article-body ul,
.article-body ol {
  margin: 1.1em 0 1.1em 1.4em;
  display: grid;
  gap: 0.55em;
}

.article-body ul { list-style: none; }

.article-body ul li {
  position: relative;
  padding-left: 24px;
}

.article-body ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-bright);
}

.article-body ol { list-style: decimal; }
.article-body ol li { padding-left: 4px; }

.article-body ol li::marker { color: var(--cyan); font-weight: 600; }

.article-body blockquote {
  margin: 1.6em 0;
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  border-left: 3px solid var(--purple);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.97rem;
}

.article-body blockquote p { margin: 0; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--border);
  background: rgba(13, 15, 21, 0.6);
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 24px 40px;
  text-align: center;
}

.footer-brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 10px;
  background: var(--grad-bright);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.footer-tag {
  max-width: 460px;
  margin: 0 auto 22px;
  font-size: 0.9rem;
  color: var(--text-faint);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 26px;
}

.footer-nav a {
  padding: 7px 14px;
  border-radius: 9px;
  font-size: 0.88rem;
  color: var(--text-dim);
  transition: color 0.16s ease, background 0.16s ease;
}

.footer-nav a:hover { color: #fff; background: var(--surface-strong); }

.copyright {
  font-size: 0.82rem;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

/* ==========================================================================
   Reveal animation
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; }

  .nav-toggle { display: flex; }

  .main-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 20px 20px;
    gap: 6px;
    background: rgba(15, 17, 23, 0.97);
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
  }

  .main-nav.open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav a { padding: 12px 14px; font-size: 1rem; }

  .hero { padding-top: 56px; }
  .article-wrap { padding-top: 40px; }
}
