/*
Theme Name: Midnight Tech Blog
Author: AI Designer
Description: A dark, technical, high-performance blog theme with blueprint grids and neon accents.
Version: 9.0
*/

:root {
  /* Colors - Midnight Tech */
  --c-bg: #0A0A0A;
  --c-surface: #141414;
  --c-accent: #00E5FF; /* Cyber Cyan */
  --c-accent-dark: #00B8CC;
  --c-text: #E0E0E0;
  --c-text-muted: #888888;
  --c-border: #222222;
  --c-white: #FFFFFF;
  
  /* Typography */
  --f-display: 'Space Grotesk', sans-serif;
  --f-mono: 'IBM Plex Mono', monospace;
  
  /* Layout */
  --s-container: 1400px;
  --radius: 2px;
}

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

body {
  background-color: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-display);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--c-white);
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

ul { list-style: none; }

.container {
  max-width: var(--s-container);
  margin: 0 auto;
  padding: 0 40px;
}

/* SIDEBAR NAVIGATION */
.sidebar-nav {
    position: fixed;
    top: 0;
    left: -450px;
    width: 450px;
    height: 100vh;
    background: var(--c-surface);
    border-right: 1px solid var(--c-border);
    z-index: 3000;
    transition: 0.6s cubic-bezier(0.85, 0, 0.15, 1);
    padding: 80px;
    display: flex;
    flex-direction: column;
}

.nav-toggle:checked ~ .sidebar-nav {
    left: 0;
}

.nav-toggle:checked ~ .nav-overlay {
    opacity: 1;
    visibility: visible;
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    z-index: 2500;
    opacity: 0;
    visibility: hidden;
    transition: 0.5s;
}

.close-sidebar {
    position: absolute;
    top: 40px;
    right: 40px;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--c-accent);
}

.sidebar-logo {
    font-family: var(--f-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 80px;
    color: var(--c-accent);
    letter-spacing: 2px;
}

.mobile-nav ul {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.mobile-nav a {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--c-white);
}

.mobile-nav a:hover {
    color: var(--c-accent);
    transform: skewX(-10deg);
}

.sidebar-footer {
    margin-top: auto;
    font-family: var(--f-mono);
    font-size: 0.8rem;
    color: var(--c-text-muted);
}

/* HEADER */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2000;
  padding: 30px 0;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--c-border);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    font-family: var(--f-mono);
    font-size: 0.8rem;
    color: var(--c-accent);
}

.hamburger {
    width: 30px;
    height: 2px;
    background: var(--c-accent);
    position: relative;
}

.hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; width: 60%; }

.logo {
  font-family: var(--f-display);
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.logo span { color: var(--c-accent); }

/* HERO */
.hero {
  padding: 200px 0 100px;
  background-image: linear-gradient(var(--c-border) 1px, transparent 1px), linear-gradient(90deg, var(--c-border) 1px, transparent 1px);
  background-size: 50px 50px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.9;
  margin-bottom: 40px;
}

.hero-meta {
  font-family: var(--f-mono);
  font-size: 0.9rem;
  color: var(--c-accent);
  margin-bottom: 20px;
  display: block;
}

/* CARDS */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding: 100px 0;
}

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  padding: 40px;
  position: relative;
  transition: 0.4s;
}

.card::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px; width: 20px; height: 20px;
    border-top: 2px solid var(--c-accent);
    border-left: 2px solid var(--c-accent);
}

.card:hover {
  border-color: var(--c-accent);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 229, 255, 0.05);
}

.card-cat {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  color: var(--c-accent);
  margin-bottom: 20px;
  display: block;
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: 20px;
  line-height: 1.2;
}

.card-excerpt {
  color: var(--c-text-muted);
  font-size: 0.9rem;
  margin-bottom: 30px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--f-mono);
    font-size: 0.7rem;
    color: var(--c-text-muted);
    border-top: 1px solid var(--c-border);
    padding-top: 20px;
}

/* TECH STATS */
.tech-stats {
    background: var(--c-surface);
    border-y: 1px solid var(--c-border);
    padding: 60px 0;
}

.stats-flex {
    display: flex;
    justify-content: space-between;
}

.stat-box {
    text-align: center;
}

.stat-num {
    font-size: 3rem;
    font-weight: 700;
    color: var(--c-accent);
    display: block;
}

.stat-label {
    font-family: var(--f-mono);
    font-size: 0.8rem;
    color: var(--c-text-muted);
}

/* FOOTER */
.site-footer {
  padding: 100px 0 40px;
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 100px;
  margin-bottom: 80px;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: 30px;
}

.footer-col h5 {
  font-family: var(--f-mono);
  font-size: 0.9rem;
  color: var(--c-accent);
  margin-bottom: 30px;
}

.footer-contact-item {
    margin-bottom: 20px;
}

.contact-label {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    color: var(--c-text-muted);
    margin-bottom: 5px;
}

.contact-val { font-weight: 600; }

.footer-bottom {
  border-top: 1px solid var(--c-border);
  padding-top: 40px;
  display: flex;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  color: var(--c-text-muted);
}

/* BUTTON */
.btn {
  display: inline-flex;
  padding: 18px 40px;
  background: var(--c-accent);
  color: var(--c-bg);
  font-weight: 700;
  font-family: var(--f-mono);
  font-size: 0.9rem;
  text-transform: uppercase;
  border-radius: var(--radius);
}

.btn:hover {
  background: var(--c-white);
  transform: scale(1.05);
}

/* ENTRY CONTENT */
.entry-content { color: var(--c-text); line-height: 1.8; }
.entry-content h2 { margin: 3rem 0 1.5rem; color: var(--c-accent); font-size: 2.5rem; }
.entry-content p { margin-bottom: 1.5rem; }

/* RESPONSIVE */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .posts-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 60px; }
  .sidebar-nav { width: 100%; left: -100%; }
}

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