/* ============================================
   CSS Variables
   ============================================ */
:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface-hover: #1a1a25;
  --fg: #e8e8ec;
  --muted: #7a7a85;
  --border: #2a2a35;
  --accent: #00ff88;
  --accent-dim: rgba(0, 255, 136, 0.12);
  --accent-glow: rgba(0, 255, 136, 0.06);
  --accent-glow-strong: rgba(0, 255, 136, 0.15);
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ============================================
   Reset & Base
   ============================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--bg);
}

body {
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ============================================
   Page Transition Animation
   ============================================ */
@keyframes pageIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
body { animation: pageIn 0.35s ease-out; }

/* ============================================
   Cursor Glow & Dot
   ============================================ */
.cursor-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 255, 136, 0.09) 0%, rgba(0, 255, 136, 0.03) 30%, transparent 70%);
  pointer-events: none;
  z-index: 9990;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  will-change: transform;
}

.cursor-dot {
  position: fixed;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9992;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
}

/* ============================================
   Floating Particles
   ============================================ */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% { opacity: 0; transform: translateY(100vh) scale(0); }
  10% { opacity: 0.5; }
  90% { opacity: 0.5; }
  100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

/* ============================================
   Loading Screen
   ============================================ */
.loading-screen {
  position: fixed;
  inset: 0;
  background: #050508;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 1s;
  overflow: hidden;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-screen.skip {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: none;
}

.loading-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 255, 136, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.5; }
}

.loading-floor {
  position: absolute;
  bottom: 0;
  left: -20%;
  right: -20%;
  height: 45%;
  background:
    linear-gradient(0deg, rgba(0, 255, 136, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.04) 1px, transparent 1px);
  background-size: 60px 30px;
  transform: perspective(400px) rotateX(55deg);
  transform-origin: bottom center;
  opacity: 0;
  animation: floorIn 1.2s 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  mask-image: linear-gradient(0deg, white 30%, transparent 100%);
  -webkit-mask-image: linear-gradient(0deg, white 30%, transparent 100%);
}

@keyframes floorIn {
  0% { opacity: 0; transform: perspective(400px) rotateX(70deg); }
  100% { opacity: 0.6; transform: perspective(400px) rotateX(55deg); }
}

.loading-scan {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.loading-scan::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 255, 136, 0.4) 20%, rgba(0, 255, 136, 0.8) 50%, rgba(0, 255, 136, 0.4) 80%, transparent 100%);
  animation: scanDown 2.5s 0.5s linear infinite;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.3), 0 0 60px rgba(0, 255, 136, 0.1);
}

@keyframes scanDown {
  0% { top: -3px; }
  100% { top: 100%; }
}

.loading-brackets {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.loading-brackets::before,
.loading-brackets::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 80px;
  border-color: rgba(0, 255, 136, 0.25);
  border-style: solid;
  opacity: 0;
}

.loading-brackets::before {
  top: 12%;
  left: 12%;
  border-width: 1.5px 0 0 1.5px;
  animation: bracketIn 0.6s 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.loading-brackets::after {
  bottom: 12%;
  right: 12%;
  border-width: 0 1.5px 1.5px 0;
  animation: bracketIn 0.6s 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes bracketIn {
  0% { opacity: 0; width: 20px; height: 20px; }
  100% { opacity: 1; width: 80px; height: 80px; }
}

.loading-brand {
  font-size: clamp(36px, 7vw, 64px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  position: relative;
  z-index: 1;
  text-shadow: 0 0 40px rgba(0, 255, 136, 0.15), 0 0 80px rgba(0, 255, 136, 0.05);
}

.loading-brand .char {
  display: inline-block;
  opacity: 0;
  animation: charReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.loading-brand .char-green {
  color: var(--accent);
  text-shadow: 0 0 20px rgba(0, 255, 136, 0.5), 0 0 40px rgba(0, 255, 136, 0.2);
}

.loading-brand .cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--accent);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: cursorBlink 1s step-end infinite;
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
}

.loading-log {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  z-index: 1;
  opacity: 0;
  animation: fadeIn 0.4s 1.2s forwards;
  width: 320px;
  text-align: center;
}

.loading-log-line {
  opacity: 0;
  transform: translateY(4px);
  animation: logLine 0.4s forwards;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
}

.loading-log-line .ok {
  color: var(--accent);
}

@keyframes logLine {
  to { opacity: 1; transform: translateY(0); }
}

.loading-sub {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-top: 20px;
  opacity: 0;
  animation: fadeUp 0.8s 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
  z-index: 1;
}

.loading-bar {
  width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  margin-top: 36px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: fadeIn 0.4s 1.8s forwards;
  z-index: 1;
}

.loading-bar::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), rgba(0, 255, 136, 0.5));
  animation: loadProgress 1.6s 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.5);
}

.loading-percent {
  font-size: 11px;
  color: var(--accent);
  margin-top: 14px;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  animation: fadeIn 0.4s 2s forwards;
  position: relative;
  z-index: 1;
  text-shadow: 0 0 12px rgba(0, 255, 136, 0.4);
}

.loading-hex {
  position: absolute;
  top: 18%;
  right: 15%;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(0, 255, 136, 0.08);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  opacity: 0;
  animation: hexSpin 12s 0.5s linear infinite, fadeIn 0.6s 0.5s forwards;
  z-index: 0;
}

.loading-hex::after {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(0, 255, 136, 0.12);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

@keyframes hexSpin {
  to { transform: rotate(360deg); }
}

.loading-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.loading-particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: loadParticleRise linear infinite;
}

@keyframes loadParticleRise {
  0% { opacity: 0; transform: translateY(0) scale(0.5); }
  15% { opacity: 0.6; }
  85% { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(-100vh) scale(1); }
}

@keyframes charReveal {
  0% { opacity: 0; transform: translateY(24px) rotateX(-50deg); filter: blur(6px); }
  100% { opacity: 1; transform: translateY(0) rotateX(0deg); filter: blur(0); }
}

@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes loadProgress {
  to { width: 100%; }
}

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: rgba(10, 10, 15, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.6s, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav.visible {
  opacity: 1;
  transform: translateY(0);
}

.nav.visible.nav--autohide {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s, background 0.3s;
}
.nav.nav--hidden {
  transform: translateY(-100%);
}

.nav-brand {
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: text-shadow 0.3s, font-size 0.3s;
}

.nav-brand:hover {
  text-shadow: 0 0 20px var(--accent-glow-strong);
}

.nav-brand .green { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: color 0.25s, border-color 0.25s, background 0.25s, transform 0.2s, box-shadow 0.3s, padding 0.3s, font-size 0.3s;
  position: relative;
}

.nav-links a:hover {
  color: var(--accent);
  border-color: var(--border);
  background: var(--accent-glow);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 255, 136, 0.08);
}

.nav-links a.active {
  color: var(--accent);
  border-color: var(--border);
  background: var(--accent-glow);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s, left 0.3s;
}

.nav-links a:hover::after {
  width: 80%;
  left: 10%;
}

/* ============================================
   Main Content
   ============================================ */
.main {
  padding-top: 56px;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  background: var(--bg);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  padding: 80px 32px 60px;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s 0.2s, transform 0.8s 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-eyebrow {
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
  animation: lineExpand 0.8s 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: left;
  transform: scaleX(0);
}

@keyframes lineExpand {
  to { transform: scaleX(1); }
}

.hero-title {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  position: relative;
}

.hero-title .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero.visible .hero-title .word {
  opacity: 1;
  transform: translateY(0);
}

.hero-desc {
  font-size: 14px;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.8;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s 0.6s, transform 0.6s 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero.visible .hero-desc {
  opacity: 1;
  transform: translateY(0);
}

.status-line {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s 0.8s, transform 0.6s 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero.visible .status-line {
  opacity: 1;
  transform: translateY(0);
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(0, 255, 136, 0); }
}

.status-text { flex: 1; }
.status-accent { color: var(--accent); }

/* ============================================
   Article Grid
   ============================================ */
.section {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 32px 80px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-header.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.section-count {
  font-size: 12px;
  color: var(--border);
  font-variant-numeric: tabular-nums;
}

.articles {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.article-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
  padding: 24px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s, background 0.3s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
  opacity: 0;
  transform: translateY(16px) translateX(0);
  position: relative;
  overflow: hidden;
}

.article-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-glow) 0%, transparent 100%);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
}

.article-card:hover::before {
  width: 100%;
}

.article-card.visible {
  opacity: 1;
  transform: translateY(0) translateX(0);
}

.article-card:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 255, 136, 0.06), 0 0 0 1px rgba(0, 255, 136, 0.1);
}

.article-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.article-date {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-date::before {
  content: '>';
  color: var(--accent);
  font-size: 10px;
}

.article-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  transition: color 0.2s;
}

.article-card:hover .article-title {
  color: var(--accent);
}

.article-excerpt {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-tags {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.tag {
  font-size: 11px;
  color: var(--accent);
  padding: 2px 8px;
  border: 1px solid var(--accent-dim);
  letter-spacing: 0.05em;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.tag:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.article-arrow {
  font-size: 18px;
  color: var(--border);
  transition: color 0.3s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  align-self: center;
  position: relative;
  z-index: 1;
}

.article-card:hover .article-arrow {
  color: var(--accent);
  transform: translateX(6px);
}

/* ============================================
   Stats Section
   ============================================ */
.stats-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 32px 80px;
  position: relative;
}

.stats-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 200px;
  background: radial-gradient(ellipse at center, rgba(0, 255, 136, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stats-grid.visible {
  opacity: 1;
  transform: translateY(0);
}

.stat-item {
  background: var(--surface);
  padding: 28px 24px;
  text-align: center;
  transition: background 0.3s;
}

.stat-item:hover {
  background: var(--surface-hover);
}

.stat-number {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  position: relative;
  z-index: 1;
}

.footer a {
  color: var(--accent);
  text-decoration: none;
  transition: text-shadow 0.3s;
}

.footer a:hover {
  text-shadow: 0 0 12px var(--accent-glow-strong);
}

.footer-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}

.footer-dot {
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  animation: cursorBlink 2s step-end infinite;
}

/* ============================================
   Scanlines & Noise
   ============================================ */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  opacity: 0.3;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ============================================
   Back to Top
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 40px;
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 14px;
  z-index: 90;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s, color 0.2s, border-color 0.2s, background 0.2s;
  pointer-events: none;
  font-family: var(--font-mono);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

/* ============================================
   Visit Memory
   ============================================ */
body.visited .hero-eyebrow::before,
body.visited .page-eyebrow::before,
body.visited .about-eyebrow::before {
  animation: none !important;
  transform: scaleX(1) !important;
}

body.visited .nav,
body.visited .page-header,
body.visited .stats,
body.visited .year-group,
body.visited .tabs,
body.visited .about-header,
body.visited .profile,
body.visited .bio,
body.visited .stack,
body.visited .links,
body.visited .calendar-section {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

body.visited .article-header,
body.visited .article-content,
body.visited .toc {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

body.visited .article-title .word {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* ============================================
   Glitch Animation
   ============================================ */
@keyframes glitch1 {
  0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
  20% { clip-path: inset(20% 0 60% 0); transform: translate(-2px, 1px); }
  40% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -1px); }
  60% { clip-path: inset(40% 0 30% 0); transform: translate(-1px, 2px); }
  80% { clip-path: inset(10% 0 70% 0); transform: translate(1px, -2px); }
}

.nav-brand.glitch {
  animation: glitch1 0.3s linear;
}

/* ============================================
   Post Page
   ============================================ */
.progress-bar {
  position: fixed;
  top: 56px;
  left: 0;
  height: 2px;
  background: var(--accent);
  z-index: 99;
  transition: width 0.1s, top 0.35s cubic-bezier(.16,1,.3,1);
  width: 0%;
  box-shadow: 0 0 8px var(--accent);
}

.article {
  padding-top: 56px;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  background: var(--bg);
}

.article-header {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 32px 48px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 32px;
  transition: color 0.2s, transform 0.2s;
}

.article-back:hover {
  color: var(--accent);
  transform: translateX(-4px);
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-meta-item .meta-icon {
  color: var(--accent);
  font-size: 10px;
}

.article-meta-divider {
  width: 1px;
  height: 12px;
  background: var(--border);
}

.article-title .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(10px);
  animation: wordIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes wordIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Content */
.article-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 32px 80px;
  opacity: 0;
  animation: fadeUp 0.8s 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
}

.article-content::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(0, 255, 136, 0.025) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.article-content h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 48px 0 16px;
  letter-spacing: -0.01em;
  color: var(--fg);
  position: relative;
  padding-left: 20px;
}

.article-content h2::before {
  content: '##';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.article-content h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--fg);
}

.article-content p {
  margin-bottom: 20px;
  color: var(--fg);
  opacity: 0.9;
}

.article-content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-dim);
  transition: border-color 0.2s, text-shadow 0.3s;
}

.article-content a:hover {
  border-color: var(--accent);
  text-shadow: 0 0 12px var(--accent-glow-strong);
}

.article-content strong {
  color: var(--fg);
  font-weight: 600;
}

.article-content em {
  color: var(--muted);
  font-style: italic;
}

.article-content ul, .article-content ol {
  margin: 0 0 20px 20px;
}

.article-content li {
  margin-bottom: 8px;
  color: var(--fg);
  opacity: 0.9;
  position: relative;
  padding-left: 4px;
}

.article-content li::marker {
  color: var(--accent);
}

.article-content blockquote {
  border-left: 2px solid var(--accent);
  padding: 16px 20px;
  margin: 24px 0;
  background: var(--accent-glow);
  color: var(--muted);
  font-style: italic;
  position: relative;
  overflow: hidden;
}

.article-content blockquote::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-glow) 0%, transparent 100%);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-content blockquote.revealed::before {
  width: 100%;
}

.article-content code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--surface);
  padding: 2px 6px;
  border: 1px solid var(--border);
  color: var(--accent);
  transition: background 0.2s, border-color 0.2s;
}

.article-content code:hover {
  background: var(--surface-hover);
  border-color: var(--accent-dim);
}

.article-content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 20px;
  margin: 24px 0;
  overflow-x: auto;
  position: relative;
  transition: border-color 0.3s;
}

.article-content pre:hover {
  border-color: var(--accent-dim);
}

.article-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--fg);
}

.code-label {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.code-copy {
  position: absolute;
  top: 8px;
  right: 80px;
  font-size: 11px;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  padding: 2px 8px;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.code-copy:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.code-copy.copied {
  color: var(--accent);
  border-color: var(--accent);
}

.article-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
  position: relative;
}

.article-content hr::after {
  content: '* * *';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  padding: 0 16px;
  color: var(--border);
  font-size: 12px;
  letter-spacing: 0.5em;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 13px;
}

.article-content th {
  text-align: left;
  padding: 10px 16px;
  border-bottom: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.article-content td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  opacity: 0.9;
  transition: background 0.2s;
}

.article-content tr:hover td {
  background: var(--accent-glow);
}

/* TOC */
.toc {
  position: fixed;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  opacity: 0;
  animation: fadeUp 0.8s 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toc-title {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.toc-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
  transition: color 0.2s;
  padding: 2px 0;
}

.toc-list a::before {
  content: '';
  width: 4px;
  height: 1px;
  background: var(--border);
  transition: width 0.3s, background 0.3s;
}

.toc-list a:hover,
.toc-list a.active {
  color: var(--accent);
}

.toc-list a:hover::before,
.toc-list a.active::before {
  width: 12px;
  background: var(--accent);
}

/* Article Footer */
.article-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 32px 80px;
  border-top: 1px solid var(--border);
  padding-top: 32px;
}

.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.article-nav-item {
  padding: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
  position: relative;
  overflow: hidden;
}

.article-nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-glow) 0%, transparent 100%);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-nav-item:hover::before {
  width: 100%;
}

.article-nav-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 255, 136, 0.06);
}

.article-nav-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.article-nav-title {
  font-size: 14px;
  font-weight: 600;
  position: relative;
  z-index: 1;
  transition: color 0.2s;
}

.article-nav-item:hover .article-nav-title {
  color: var(--accent);
}

.article-nav-item.next { text-align: right; }

/* ============================================
   Archive Page
   ============================================ */
.page-header {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 32px 48px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.page-eyebrow {
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.page-eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
  animation: lineExpand 0.8s 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: left;
  transform: scaleX(0);
}

.page-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.page-desc {
  font-size: 14px;
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  max-width: 720px;
  margin: 0 auto 48px;
  padding: 0 32px;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.timeline {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 32px 80px;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.year-group {
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(16px);
}

.year-group.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.year-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.2em;
  margin-bottom: 20px;
  padding-bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.year-count {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}

.timeline-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 16px 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s, background 0.3s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
  position: relative;
  overflow: hidden;
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-glow) 0%, transparent 100%);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-item:hover::before {
  width: 100%;
}

.timeline-item:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(0, 255, 136, 0.06);
}

.timeline-date {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 1;
}

.timeline-title {
  font-size: 14px;
  font-weight: 500;
  position: relative;
  z-index: 1;
  transition: color 0.2s;
}

.timeline-item:hover .timeline-title {
  color: var(--accent);
}

.timeline-tags {
  display: flex;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.timeline-tag {
  font-size: 10px;
  color: var(--accent);
  padding: 1px 6px;
  border: 1px solid var(--accent-dim);
}

.timeline-arrow {
  color: var(--border);
  font-size: 14px;
  transition: color 0.3s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 1;
}

.timeline-item:hover .timeline-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* ============================================
   Categories Page
   ============================================ */
.tabs {
  display: flex;
  gap: 2px;
  max-width: 900px;
  margin: 0 auto 32px;
  padding: 0 32px;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tab-btn {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 10px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s, transform 0.2s, box-shadow 0.3s;
  position: relative;
}

.tab-btn:hover {
  color: var(--fg);
  border-color: var(--muted);
  transform: translateY(-1px);
}

.tab-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 4px 16px rgba(0, 255, 136, 0.08);
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s, left 0.3s;
}

.tab-btn:hover::after,
.tab-btn.active::after {
  width: 60%;
  left: 20%;
}

.content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 32px 80px;
}

.tab-panel {
  display: none;
  opacity: 0;
}

.tab-panel.active {
  display: block;
  animation: fadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.category-group {
  margin-bottom: 4px;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.25s, background 0.25s;
}

.category-header:hover {
  border-color: var(--muted);
  background: var(--surface-hover);
}

.category-header.expanded {
  border-color: var(--accent-dim);
  border-bottom-color: transparent;
}

.category-toggle {
  font-size: 10px;
  color: var(--muted);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.category-header.expanded .category-toggle {
  transform: rotate(90deg);
  color: var(--accent);
}

.category-name {
  font-size: 15px;
  font-weight: 600;
}

.category-count {
  font-size: 11px;
  color: var(--accent);
  padding: 2px 8px;
  border: 1px solid var(--accent-dim);
  margin-left: auto;
  transition: background 0.2s;
}

.category-header:hover .category-count {
  background: var(--accent-glow);
}

.category-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--border);
  border-top: none;
}

.category-body.expanded {
  grid-template-rows: 1fr;
}

.category-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.category-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s, background 0.3s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
  position: relative;
  overflow: hidden;
}

.category-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-glow) 0%, transparent 100%);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-item:hover::before {
  width: 100%;
}

.category-item:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(0, 255, 136, 0.06);
}

.category-item-date {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 1;
}

.category-item-title {
  font-size: 13px;
  font-weight: 500;
  position: relative;
  z-index: 1;
  transition: color 0.2s;
}

.category-item:hover .category-item-title {
  color: var(--accent);
}

.category-item-arrow {
  color: var(--border);
  font-size: 12px;
  transition: color 0.3s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 1;
}

.category-item:hover .category-item-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

.category-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  margin-top: 2px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.1em;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}

.category-more:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

.category-more .arrow {
  transition: transform 0.25s;
}

.category-more:hover .arrow {
  transform: translateX(4px);
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 48px;
  position: relative;
}

.tags-cloud::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 200px;
  background: radial-gradient(ellipse at center, rgba(0, 255, 136, 0.025) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.cloud-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.25s, border-color 0.25s, background 0.25s, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s;
}

.cloud-tag:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 255, 136, 0.1);
}

.cloud-tag.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 255, 136, 0.08);
}

.cloud-tag .count {
  color: var(--muted);
  margin-left: 4px;
}

.tag-filter-notice {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  animation: fadeUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tag-filter-notice .tag-name {
  color: var(--accent);
}

.clear-filter {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dashed var(--border);
  transition: color 0.2s, border-color 0.2s;
  margin-left: auto;
}

.clear-filter:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ============================================
   Category Detail Page
   ============================================ */
.controls {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto 32px;
  padding: 0 32px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  flex: 1;
}

.search-prompt-sm {
  color: var(--accent);
  font-size: 13px;
}

.search-input-sm {
  font-family: var(--font-mono);
  font-size: 13px;
  background: none;
  border: none;
  color: var(--fg);
  outline: none;
  width: 100%;
}

.search-input-sm::placeholder {
  color: var(--muted);
}

.sort-group {
  display: flex;
  gap: 2px;
}

.sort-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.sort-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow);
}

.date-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-clear {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.date-clear:hover {
  color: var(--accent);
}

.date-sep {
  color: var(--border);
  font-size: 11px;
}

.result-count {
  font-size: 12px;
  color: var(--muted);
  max-width: 900px;
  margin: 0 auto 20px;
  padding: 0 32px;
}

.article-list {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 32px 80px;
}

.article-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s, background 0.3s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
  margin-bottom: 4px;
  position: relative;
  overflow: hidden;
}

.article-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-glow) 0%, transparent 100%);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.article-item:hover::before {
  width: 100%;
}

.article-item:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(0, 255, 136, 0.06);
}

.article-item-date {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 1;
}

.article-item-title {
  font-size: 14px;
  font-weight: 500;
  position: relative;
  z-index: 1;
  transition: color 0.2s;
}

.article-item:hover .article-item-title {
  color: var(--accent);
}

.article-item-tags {
  display: flex;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.article-item-tag {
  font-size: 10px;
  color: var(--accent);
  padding: 1px 6px;
  border: 1px solid var(--accent-dim);
}

.article-item-arrow {
  color: var(--border);
  font-size: 12px;
  transition: color 0.3s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 1;
}

.article-item:hover .article-item-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* ============================================
   About Page
   ============================================ */
.about {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 32px 80px;
  position: relative;
}

.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse at center, rgba(0, 255, 136, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.about-header {
  margin-bottom: 48px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
}

.about-header::after {
  content: '';
  position: absolute;
  top: -60px;
  left: -100px;
  width: 400px;
  height: 200px;
  background: radial-gradient(ellipse at center, rgba(0, 255, 136, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.about-eyebrow {
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.about-eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
  animation: lineExpand 0.8s 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: left;
  transform: scaleX(0);
}

.about-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.profile {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.avatar {
  width: 80px;
  height: 80px;
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--accent);
  background: var(--accent-glow);
  position: relative;
  overflow: hidden;
}

.avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(0, 255, 136, 0.08) 100%);
  opacity: 0;
  transition: opacity 0.4s;
}

.avatar:hover::after {
  opacity: 1;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-name {
  font-size: 18px;
  font-weight: 700;
}

.profile-role {
  font-size: 13px;
  color: var(--muted);
}

.profile-handle {
  font-size: 12px;
  color: var(--accent);
}

.bio {
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeUp 0.8s 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.bio p {
  margin-bottom: 20px;
  color: var(--fg);
  opacity: 0.9;
}

.bio strong {
  color: var(--fg);
  font-weight: 600;
}

.bio a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-dim);
  transition: border-color 0.2s, text-shadow 0.3s;
}

.bio a:hover {
  border-color: var(--accent);
  text-shadow: 0 0 12px var(--accent-glow-strong);
}

.stack {
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeUp 0.8s 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.section-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

.stack-item {
  padding: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.25s, background 0.25s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
  position: relative;
  overflow: hidden;
}

.stack-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-glow) 0%, transparent 100%);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.stack-item:hover::before {
  width: 100%;
}

.stack-item:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 255, 136, 0.06);
}

.stack-category {
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.stack-tools {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.links {
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeUp 0.8s 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s, background 0.3s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
  position: relative;
  overflow: hidden;
}

.link-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-glow) 0%, transparent 100%);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.link-item:hover::before {
  width: 100%;
}

.link-item:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  transform: translateX(4px);
  box-shadow: 0 4px 16px rgba(0, 255, 136, 0.06);
}

.link-icon {
  font-size: 16px;
  width: 24px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.link-info {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.link-name {
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
}

.link-item:hover .link-name {
  color: var(--accent);
}

.link-handle {
  font-size: 11px;
  color: var(--muted);
}

/* Calendar Section */
.calendar-section {
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeUp 0.8s 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.calendar-wrapper {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 20px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.15em;
}

.calendar-stats {
  font-size: 11px;
  color: var(--muted);
}

.calendar-stats .stat-num {
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.calendar-body {
  display: flex;
  flex-direction: column;
}

.calendar-months {
  display: flex;
  gap: 2px;
  margin-bottom: 4px;
  padding-left: 0;
}

.calendar-months .month-spacer {
  flex-shrink: 0;
  width: 28px;
}

.calendar-months span {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-align: left;
  flex-shrink: 0;
}

.calendar-grid {
  display: flex;
  gap: 2px;
}

.calendar-days {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 4px;
  flex-shrink: 0;
  width: 22px;
}

.calendar-days span {
  font-size: 9px;
  color: var(--muted);
  height: 11px;
  line-height: 11px;
  text-align: right;
}

.calendar-weeks {
  display: flex;
  gap: 2px;
  flex: 1;
}

.calendar-week {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.calendar-cell {
  width: 100%;
  aspect-ratio: 1;
  max-width: 11px;
  max-height: 11px;
  border-radius: 2px;
  background: #161b22;
  border: 1px solid rgba(27, 31, 35, 0.4);
  transition: border-color 0.2s, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  cursor: default;
  flex-shrink: 1;
  min-width: 0;
  margin: 0 auto;
}

.calendar-cell:hover {
  border-color: var(--accent);
  transform: scale(1.4);
  z-index: 2;
}

.calendar-cell[data-level="1"] { background: #0e4429; }
.calendar-cell[data-level="2"] { background: #006d32; }
.calendar-cell[data-level="3"] { background: #26a641; }
.calendar-cell[data-level="4"] { background: var(--accent); }

.calendar-cell[data-level="0"]:hover { background: #1a2332; }

.calendar-cell .tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: #24292e;
  color: #fff;
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 3px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 10;
  font-family: var(--font-mono);
}

.calendar-cell:hover .tip {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.calendar-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  margin-top: 10px;
  font-size: 9px;
  color: var(--muted);
}

.calendar-legend .cell {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  border: 1px solid rgba(27, 31, 35, 0.4);
}

.calendar-legend .cell.l0 { background: #161b22; }
.calendar-legend .cell.l1 { background: #0e4429; }
.calendar-legend .cell.l2 { background: #006d32; }
.calendar-legend .cell.l3 { background: #26a641; }
.calendar-legend .cell.l4 { background: var(--accent); }

.streak-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 14px;
}

.streak-item {
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  text-align: center;
}

.streak-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.streak-label {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ============================================
   Page Content
   ============================================ */
.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 32px 80px;
}

/* ============================================
   Responsive — 768px
   ============================================ */
@media (max-width: 768px) {
  .nav-brand { font-size: 14px; }
  .hero { padding: 64px 24px 40px; }
  .section { padding: 0 24px 60px; }
  .stats-section { padding: 0 24px 60px; }
  .status-line { flex-wrap: wrap; gap: 8px; }
  .footer { padding: 28px 24px; }
  .loading-hex { display: none; }
  .loading-brackets::before,
  .loading-brackets::after { width: 50px; height: 50px; }
  .loading-log { width: 260px; font-size: 10px; }

  .page-header { padding: 64px 24px 36px; }
  .stats { padding: 0 24px; margin-bottom: 36px; }
  .timeline { padding: 0 24px 60px; }

  .tabs { padding: 0 24px; margin-bottom: 24px; }
  .content { padding: 0 24px 60px; }

  .article-header { padding: 64px 24px 36px; }
  .article-content { padding: 0 24px 60px; }
  .article-content h2 { font-size: 18px; }
  .article-content pre { padding: 16px; font-size: 12px; }
  .article-content table { font-size: 12px; }
  .article-content th, .article-content td { padding: 8px 10px; }
  .article-footer { padding: 0 24px 60px; }
  .article-nav { gap: 12px; }
  .article-nav-item { padding: 16px; }

  .about { padding: 64px 24px 60px; }
  .about-header { margin-bottom: 36px; }
  .profile { gap: 24px; margin-bottom: 36px; }
  .bio { margin-bottom: 36px; }
  .stack { margin-bottom: 36px; }
  .links { margin-bottom: 36px; }
  .calendar-section { margin-bottom: 36px; }
}

/* ============================================
   Responsive — 640px
   ============================================ */
@media (max-width: 640px) {
  .nav { padding: 0 16px; }
  .hero { padding: 56px 16px 32px; }
  .hero-title { font-size: 26px; }
  .hero-desc { font-size: 13px; }
  .section { padding: 0 16px 48px; }
  .section-header { margin-bottom: 20px; padding-bottom: 12px; }
  .stats-section { padding: 0 16px 48px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-item { padding: 20px 16px; }
  .article-card {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px;
  }
  .article-arrow { display: none; }
  .article-title { font-size: 15px; }
  .article-excerpt { font-size: 12px; -webkit-line-clamp: 2; }
  .article-tags { gap: 4px; }
  .tag { font-size: 10px; padding: 2px 6px; }
  .status-line { font-size: 11px; padding: 10px 12px; gap: 6px; }
  .footer { padding: 24px 16px; }
  .back-to-top { bottom: 20px; right: 20px; width: 36px; height: 36px; font-size: 13px; }
  .cursor-glow, .cursor-dot { display: none; }
  .bg-glow { opacity: 0.4; }
  .bg-corner { display: none; }
  .loading-brackets::before,
  .loading-brackets::after { width: 36px; height: 36px; }
  .loading-log { width: 220px; font-size: 9px; bottom: 15%; }
  .loading-bar { width: 140px; }
  .loading-sub { font-size: 10px; letter-spacing: 0.2em; }

  .page-header { padding: 56px 16px 24px; }
  .page-title { font-size: 22px; }
  .page-desc { font-size: 13px; }
  .stats { grid-template-columns: 1fr; padding: 0 16px; margin-bottom: 28px; }
  .stat-item { padding: 16px; }
  .stat-value { font-size: 24px; }
  .timeline { padding: 0 16px 48px; }
  .year-label { font-size: 12px; margin-bottom: 12px; }
  .year-count { font-size: 10px; }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 14px;
  }
  .timeline-date { font-size: 11px; }
  .timeline-title { font-size: 13px; }
  .timeline-tags { gap: 4px; }
  .timeline-tag { font-size: 9px; padding: 1px 5px; }
  .timeline-arrow { display: none; }

  .tabs { padding: 0 16px; gap: 4px; }
  .tab-btn { padding: 8px 14px; font-size: 12px; flex: 1; text-align: center; }
  .content { padding: 0 16px 48px; }
  .category-header { padding: 12px 14px; gap: 10px; }
  .category-name { font-size: 14px; }
  .category-count { font-size: 10px; padding: 2px 6px; }
  .category-item { grid-template-columns: 1fr; gap: 4px; padding: 12px; }
  .category-item-date { font-size: 11px; }
  .category-item-title { font-size: 12px; }
  .category-item-arrow { display: none; }
  .category-more { font-size: 11px; padding: 8px 14px; }
  .cloud-tag { font-size: 11px; padding: 5px 10px; }
  .tags-cloud { gap: 6px; }

  .article-header { padding: 56px 16px 24px; }
  .article-meta { gap: 8px; font-size: 11px; }
  .article-meta-divider { display: none; }
  .article-title { font-size: 22px; }
  .article-content { padding: 0 16px 48px; }
  .article-content h2 { font-size: 17px; margin: 36px 0 12px; padding-left: 16px; }
  .article-content h2::before { font-size: 14px; }
  .article-content p { font-size: 13px; }
  .article-content pre { padding: 14px; margin: 16px 0; }
  .article-content pre code { font-size: 11px; line-height: 1.6; }
  .article-content blockquote { padding: 12px 16px; margin: 16px 0; font-size: 13px; }
  .article-content table { font-size: 11px; display: block; overflow-x: auto; }
  .article-content ul, .article-content ol { margin-left: 16px; }
  .article-content li { font-size: 13px; }
  .article-footer { padding: 0 16px 48px; }
  .article-nav { grid-template-columns: 1fr; gap: 10px; }
  .article-nav-item { padding: 14px; }
  .article-nav-title { font-size: 13px; }
  .code-copy { font-size: 10px; padding: 2px 6px; right: 60px; }
  .code-label { font-size: 10px; }

  .about { padding: 56px 16px 48px; }
  .about-title { font-size: 22px; }
  .profile { grid-template-columns: 1fr; gap: 16px; text-align: center; justify-items: center; }
  .avatar { width: 64px; height: 64px; font-size: 24px; }
  .profile-info { align-items: center; }
  .profile-name { font-size: 16px; }
  .bio p { font-size: 13px; }
  .section-label { font-size: 12px; margin-bottom: 14px; padding-bottom: 10px; }
  .stack-grid { grid-template-columns: 1fr; }
  .stack-item { padding: 14px; }
  .stack-tools { font-size: 12px; }
  .links-grid { grid-template-columns: 1fr; }
  .link-item { padding: 12px 14px; }
  .link-name { font-size: 12px; }
  .link-handle { font-size: 10px; }
  .calendar-wrapper { padding: 12px; }
  .calendar-header { margin-bottom: 8px; }
  .calendar-title { font-size: 11px; }
  .calendar-stats { font-size: 10px; }
  .calendar-cell { max-width: 8px; max-height: 8px; border-radius: 1px; }
  .calendar-days { width: 16px; }
  .calendar-days span { font-size: 7px; height: 8px; line-height: 8px; }
  .calendar-months span { font-size: 7px; }
  .month-spacer { width: 20px !important; }
  .calendar-legend { font-size: 8px; gap: 2px; }
  .calendar-legend .cell { width: 7px; height: 7px; }
  .streak-info { grid-template-columns: 1fr; gap: 4px; }
  .streak-item { padding: 8px 10px; }
  .streak-value { font-size: 16px; }
  .streak-label { font-size: 8px; }
}

/* ============================================
   Responsive — 1100px (TOC)
   ============================================ */
@media (max-width: 1100px) {
  .toc { display: none; }
}
