/* ================================================
   T3chm4ster Blog - Main Stylesheet
   Dark Cyberpunk Tech Theme
   ================================================ */

:root {
  --bg-primary:    #08090f;
  --bg-secondary:  #0f1018;
  --bg-card:       #13141f;
  --bg-card-hover: #181928;
  --border:        #1e2035;
  --border-glow:   #00d4ff33;
  --text-primary:  #e8eaf0;
  --text-muted:    #6b7280;
  --text-dim:      #9ca3af;
  --accent-blue:   #00d4ff;
  --accent-red:    #ff2d2d;
  --accent-orange: #ff6b2b;
  --accent-green:  #00ff88;
  --yt-red:        #ff0000;
  --gradient-1:    linear-gradient(135deg, #00d4ff 0%, #0070ff 100%);
  --gradient-yt:   linear-gradient(135deg, #ff2d2d 0%, #ff6b2b 100%);
  --font-mono:     'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --radius:        8px;
  --radius-lg:     14px;
  --shadow-card:   0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-glow:   0 0 20px rgba(0, 212, 255, 0.15);
  --transition:    all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}
a { color: var(--accent-blue); text-decoration: none; transition: var(--transition); }
a:hover { color: #fff; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-blue); }

/* ── Grid lines background ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 9, 15, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary) !important;
}
.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
  transition: var(--transition);
}
.logo:hover .logo-icon {
  border-color: var(--accent-blue);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}
.logo span.highlight { color: var(--accent-blue); }

.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  padding: 6px 14px;
  border-radius: var(--radius);
  color: var(--text-dim) !important;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}
.main-nav a:hover { color: var(--text-primary) !important; background: var(--bg-card); }
.main-nav a.active { color: var(--accent-blue) !important; }

.btn-yt {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: var(--yt-red);
  color: #fff !important;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
  flex-shrink: 0;
}
.btn-yt:hover { background: #cc0000; transform: translateY(-1px); }
.btn-yt svg { width: 16px; height: 16px; fill: #fff; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dim);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Hero ── */
.hero {
  position: relative;
  z-index: 1;
  padding: 80px 24px 60px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--accent-blue);
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}
.hero-tag::before { content: '▶'; font-size: 0.6rem; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #a0b4cc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero h1 .glitch { color: var(--accent-blue); -webkit-text-fill-color: var(--accent-blue); }
.hero p {
  max-width: 560px;
  margin: 0 auto 32px;
  color: var(--text-dim);
  font-size: 1.05rem;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat .num {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent-blue);
}
.hero-stat .lbl { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* ── Main layout ── */
.main-container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
}
.content-area { min-width: 0; }
.sidebar { min-width: 0; }

/* ── Section titles ── */
.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--gradient-1);
  border-radius: 2px;
}

/* ── Featured post ── */
.featured-post {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  transition: var(--transition);
}
.featured-post:hover {
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}
.featured-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #0a0b12;
}
.featured-thumb-placeholder {
  width: 100%;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}
.featured-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 4px 12px;
  background: var(--gradient-1);
  color: #000;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 100px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.featured-content { padding: 24px; }
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tag {
  padding: 3px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  transition: var(--transition);
}
.tag:hover { border-color: var(--accent-blue); color: var(--accent-blue); }
.tag.blue { border-color: rgba(0, 212, 255, 0.3); color: var(--accent-blue); }
.tag.red  { border-color: rgba(255, 45, 45, 0.3);  color: var(--accent-red); }
.tag.green{ border-color: rgba(0, 255, 136, 0.3); color: var(--accent-green); }
.tag.orange{border-color: rgba(255, 107, 43, 0.3); color: var(--accent-orange);}

.featured-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.featured-content h2 a { color: inherit !important; }
.featured-content h2 a:hover { color: var(--accent-blue) !important; }
.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.post-meta .sep { opacity: 0.4; }
.featured-content p { color: var(--text-dim); margin-bottom: 20px; }
.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  background: transparent;
  border: 1px solid var(--accent-blue);
  border-radius: var(--radius);
  color: var(--accent-blue) !important;
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--transition);
}
.read-more:hover {
  background: var(--accent-blue);
  color: #000 !important;
  transform: translateX(3px);
}
.read-more::after { content: '→'; }

/* ── Post grid ── */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
}
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  border-color: rgba(0, 212, 255, 0.4);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}
.post-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--bg-secondary);
}
.post-thumb-placeholder {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}
.post-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.post-body h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
}
.post-body h3 a { color: var(--text-primary) !important; }
.post-body h3 a:hover { color: var(--accent-blue) !important; }
.post-body p { font-size: 0.88rem; color: var(--text-dim); flex: 1; margin-bottom: 14px; }
.post-body .read-more { font-size: 0.8rem; padding: 7px 14px; }

/* ── Sidebar ── */
.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}
.widget-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* YouTube widget */
.yt-channel-card {
  text-align: center;
}
.yt-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--gradient-yt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  font-family: var(--font-mono);
  color: #fff;
  margin: 0 auto 12px;
  border: 2px solid var(--yt-red);
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
}
.yt-channel-name { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.yt-channel-sub { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 16px; }
.btn-subscribe {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  background: var(--yt-red);
  color: #fff !important;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.88rem;
  transition: var(--transition);
}
.btn-subscribe:hover { background: #cc0000; transform: translateY(-1px); }
.btn-subscribe svg { width: 18px; height: 18px; fill: #fff; }

/* Tags cloud */
.tags-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

/* Recent posts list */
.recent-list { display: flex; flex-direction: column; gap: 14px; }
.recent-item { display: flex; gap: 12px; align-items: flex-start; }
.recent-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.recent-item h4 { font-size: 0.85rem; font-weight: 600; line-height: 1.3; margin-bottom: 3px; }
.recent-item h4 a { color: var(--text-primary) !important; }
.recent-item h4 a:hover { color: var(--accent-blue) !important; }
.recent-item span { font-size: 0.75rem; color: var(--text-muted); }

/* ── Footer ── */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 40px 24px 24px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.footer-brand p { font-size: 0.88rem; color: var(--text-muted); margin-top: 10px; }
.footer-col h4 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; color: var(--text-dim); }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col ul a { font-size: 0.88rem; color: var(--text-muted) !important; }
.footer-col ul a:hover { color: var(--accent-blue) !important; }
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a { color: var(--accent-blue) !important; }
.uptime-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
  animation: pulse 2s infinite;
  margin-right: 6px;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Post page ── */
.post-header {
  position: relative;
  z-index: 1;
  padding: 60px 24px 40px;
  max-width: 860px;
  margin: 0 auto;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted) !important;
  margin-bottom: 28px;
  transition: var(--transition);
}
.back-link:hover { color: var(--accent-blue) !important; }
.back-link::before { content: '←'; }
.post-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.post-content-area {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 80px;
}
.post-content-area h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 36px 0 14px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}
.post-content-area h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 22px;
  background: var(--gradient-1);
  border-radius: 2px;
  flex-shrink: 0;
}
.post-content-area h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 24px 0 10px;
  color: var(--accent-blue);
}
.post-content-area p { margin-bottom: 16px; color: var(--text-dim); }
.post-content-area ul, .post-content-area ol {
  margin: 0 0 16px 20px;
  color: var(--text-dim);
  list-style: disc;
}
.post-content-area ol { list-style: decimal; }
.post-content-area li { margin-bottom: 6px; }
.post-content-area strong { color: var(--text-primary); }

/* Code blocks */
.post-content-area pre {
  background: #0d0e16;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-blue);
  border-radius: var(--radius);
  padding: 20px 24px;
  overflow-x: auto;
  margin: 20px 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  color: #c9d1d9;
}
.post-content-area code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: #1a1b26;
  color: var(--accent-blue);
  padding: 2px 7px;
  border-radius: 4px;
}
.post-content-area pre code { background: none; color: inherit; padding: 0; font-size: inherit; }

/* Info / warning boxes */
.info-box, .warning-box, .tip-box {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius);
  margin: 20px 0;
  border: 1px solid;
}
.info-box    { background: rgba(0, 212, 255, 0.05); border-color: rgba(0, 212, 255, 0.25); }
.warning-box { background: rgba(255, 107, 43, 0.05); border-color: rgba(255, 107, 43, 0.25); }
.tip-box     { background: rgba(0, 255, 136, 0.05);  border-color: rgba(0, 255, 136, 0.25); }
.info-box    .box-icon { color: var(--accent-blue);   font-size: 1.2rem; flex-shrink: 0; }
.warning-box .box-icon { color: var(--accent-orange); font-size: 1.2rem; flex-shrink: 0; }
.tip-box     .box-icon { color: var(--accent-green);  font-size: 1.2rem; flex-shrink: 0; }
.box-content p { margin: 0; font-size: 0.9rem; }

/* YouTube embed */
.yt-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 28px 0;
  border: 1px solid var(--border);
}
.yt-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Post navigation */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.post-nav a {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  transition: var(--transition);
  color: var(--text-primary) !important;
}
.post-nav a:hover { border-color: var(--accent-blue); }
.post-nav .nav-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.08em; }
.post-nav .nav-title { font-size: 0.9rem; font-weight: 600; }
.post-nav .next { text-align: right; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .main-container { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .posts-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .footer-inner { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .main-nav.open { display: flex; flex-direction: column; position: fixed; inset: 68px 0 0; background: var(--bg-primary); padding: 24px; z-index: 99; }
  .hamburger { display: flex; }
  .btn-yt span { display: none; }
}
