
:root {
  --bg-primary:    #0a0a0f;
  --bg-secondary:  #0f0f15;
  --bg-card:       #12121a;
  --bg-terminal:   #0c0c10;

  --accent-primary:   #00d4ff;
  --accent-secondary: #8b5cf6;
  --accent-success:   #22c55e;
  --accent-warning:   #f59e0b;
  --accent-error:     #ef4444;

  --text-primary:   #ffffff;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow:  rgba(0, 212, 255, 0.3);
  --shadow-glow:  0 0 60px rgba(0, 212, 255, 0.12);

  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-sans: 'Inter', -apple-system, sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

html, body {
  height: 100%;
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Background ── */

.bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none; z-index: 0;
}

.bg-glow {
  position: fixed; border-radius: 50%;
  filter: blur(120px); pointer-events: none; z-index: 0; opacity: 0.45;
}
.glow-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,212,255,.22) 0%, transparent 70%);
  top: -150px; left: -100px;
  animation: floatGlow 15s ease-in-out infinite;
}
.glow-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(139,92,246,.22) 0%, transparent 70%);
  bottom: -100px; right: -100px;
  animation: floatGlow 15s ease-in-out infinite reverse;
}
@keyframes floatGlow {
  0%, 100% { transform: translate(0,0); }
  50%       { transform: translate(30px,30px); }
}

/* ── Navbar ── */

.navbar {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 48px;
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  background: rgba(10,10,15,.6);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 16px; font-weight: 600;
  text-decoration: none; color: var(--text-primary);
}
.nav-logo-bracket { color: var(--text-muted); }
.nav-logo-accent  { color: var(--accent-primary); }

.nav-links { display: flex; gap: 20px; }
.nav-link {
  font-size: 14px; color: var(--text-secondary);
  text-decoration: none;
  display: flex; align-items: center; gap: 6px;
  transition: color .2s;
}
.nav-link:hover { color: var(--accent-primary); }

/* ── Hero ── */

.hero {
  position: relative; z-index: 1;
  max-width: 900px;
  margin: 72px auto 0;
  padding: 0 24px;
}

.hero-eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--accent-primary); letter-spacing: 3px;
  margin-bottom: 16px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-success);
  box-shadow: 0 0 8px var(--accent-success);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

.hero-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.hero-accent { color: var(--accent-primary); }

.hero-sub {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* ── Filters ── */

.filters-section {
  position: relative; z-index: 1;
  max-width: 900px; margin: 40px auto 0; padding: 0 24px;
}

.filters { display: flex; flex-wrap: wrap; gap: 10px; }

.filter-btn {
  padding: 8px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-family: var(--font-mono); font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer; transition: all .2s;
}
.filter-btn:hover,
.filter-btn.active {
  background: rgba(0,212,255,.1);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* ── Posts Grid ── */

.posts-grid {
  position: relative; z-index: 1;
  max-width: 900px; margin: 28px auto 0; padding: 0 24px 80px;
  display: flex; flex-direction: column; gap: 18px;
}

.post-card {
  display: flex; flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all .25s ease;
}
.post-card:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

.post-card-link {
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  padding: 22px 24px; gap: 10px;
}

.post-card-top {
  display: flex; align-items: center; gap: 10px;
}

.post-tag {
  font-family: var(--font-mono); font-size: 11px;
  padding: 3px 12px; border-radius: 999px;
}
.post-tag.ctf      { background: rgba(0,212,255,.1);   color: var(--accent-primary); }
.post-tag.web      { background: rgba(139,92,246,.12); color: var(--accent-secondary); }
.post-tag.hardware { background: rgba(34,197,94,.1);   color: var(--accent-success); }
.post-tag.tools    { background: rgba(245,158,11,.1);  color: var(--accent-warning); }

.post-date { font-size: 12px; color: var(--text-muted); margin-left: auto; }

.post-title {
  font-size: 20px; font-weight: 600;
  color: var(--text-primary); line-height: 1.3;
}

.post-excerpt {
  font-size: 14px; color: var(--text-secondary);
  line-height: 1.65;
}

.post-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 6px;
  font-size: 13px; color: var(--text-muted);
}

.read-more {
  color: var(--accent-primary);
  font-family: var(--font-mono); font-size: 12px;
  display: flex; align-items: center; gap: 5px;
  transition: gap .2s;
}
.post-card:hover .read-more { gap: 9px; }

/* ── Post Article Page ── */

.post-page {
  position: relative; z-index: 1;
  max-width: 760px; margin: 48px auto 0; padding: 0 24px 80px;
}

.post-article {
  display: flex; flex-direction: column; gap: 0;
}

.post-article-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 20px;
}

.back-link {
  color: var(--accent-primary); text-decoration: none;
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; margin-right: auto;
  transition: gap .15s;
}
.back-link:hover { gap: 10px; }

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

.post-article-subtitle {
  font-size: 16px; color: var(--text-secondary);
  line-height: 1.6; margin-bottom: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-color);
}

/* ── Article Body ── */

.post-article-body {
  font-size: 16px; color: var(--text-secondary);
  line-height: 1.75;
  display: flex; flex-direction: column; gap: 14px;
}

.post-article-body h2 {
  font-size: 20px; font-weight: 600;
  color: var(--text-primary);
  margin-top: 10px;
}

.post-article-body p { margin: 0; }

.post-article-body code {
  font-family: var(--font-mono); font-size: 13px;
  background: rgba(0,212,255,.06);
  color: var(--accent-primary);
  padding: 2px 6px; border-radius: 4px;
}

.post-article-body pre {
  background: var(--bg-terminal);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--font-mono); font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.post-article-body pre code {
  background: none; color: inherit; padding: 0;
}

.post-divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 6px 0;
}

.post-article-footer { font-size: 14px; color: var(--text-muted); }

.inline-link {
  color: var(--accent-primary);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent-primary);
  transition: color .15s;
}
.inline-link:hover { color: var(--accent-secondary); border-color: var(--accent-secondary); }

/* ── Footer ── */

.site-footer {
  position: relative; z-index: 1;
  text-align: center;
  padding: 28px 24px;
  border-top: 1px solid var(--border-color);
  font-size: 13px; color: var(--text-muted);
}
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent-primary); }
.footer-accent { color: var(--accent-primary); }

/* ── Responsive ── */

@media (max-width: 600px) {
  .navbar { padding: 16px 20px; }
  .hero   { margin-top: 40px; }
  .hero-title { font-size: 28px; }
  .posts-grid, .post-page, .filters-section { padding-left: 16px; padding-right: 16px; }
  .post-card-link { padding: 16px 18px; }
}
