:root {
  --primary: #e74c3c;
  --primary-dark: #c0392b;
  --primary-glow: rgba(231, 76, 60, 0.3);
  --accent: #ff6b6b;
  --accent2: #ff8e53;
  --bg: #070708;
  --bg-card: rgba(18, 18, 22, 0.85);
  --bg-card-hover: rgba(26, 26, 32, 0.9);
  --surface: rgba(30, 30, 38, 0.6);
  --text: #e8e8ea;
  --text-light: #a0a0aa;
  --text-muted: #6b6b78;
  --border: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 8px 40px rgba(0, 0, 0, 0.6);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --nav-height: 60px;
  --topbar-height: 32px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--primary); color: #fff; }

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

/* ─── Scroll Progress ─── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent2));
  z-index: 9999;
  transition: width 0.1s;
}

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

/* ─── Globe ─── */
#globe-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.content-overlay {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, rgba(7,7,8,0.65) 0%, rgba(7,7,8,0.15) 20%, rgba(7,7,8,0.1) 40%, rgba(7,7,8,0.15) 60%, rgba(7,7,8,0.65) 100%);
  min-height: 100vh;
}

/* ─── Top Bar ─── */
.topbar {
  position: relative;
  z-index: 200;
  background: rgba(7,7,8,0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-muted);
  font-size: 0.72em;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.topbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.3;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar a { color: var(--text-muted); text-decoration: none; margin-left: 16px; transition: color 0.3s; }
.topbar a:hover { color: var(--text); }
.topbar-left { display: flex; align-items: center; gap: 8px; }
.topbar-left span { color: var(--primary); font-weight: 600; }

.pulse-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* ─── Header ─── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7,7,8,0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  transition: padding 0.3s, background 0.3s;
}
header.scrolled {
  padding: 8px 0;
  background: rgba(7,7,8,0.85);
}
header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.7em;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-icon { color: var(--primary); font-size: 0.8em; }
.logo span { color: var(--primary); }
.logo .tagline {
  display: block;
  font-size: 0.28em;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-family: var(--font);
}

.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.82em;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: color 0.3s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s;
  border-radius: 1px;
}
.nav-links a:hover { color: #fff; }
.nav-links a:hover::after,
.nav-links a.nav-active::after { width: 100%; }
.nav-links a.nav-active { color: #fff; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7,7,8,0.98);
  backdrop-filter: blur(30px);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.mobile-nav.open { opacity: 1; pointer-events: all; }
.mobile-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.6em;
  font-weight: 600;
  transition: color 0.3s;
}
.mobile-nav a:hover { color: var(--primary); }

/* ─── Container ─── */
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ─── Main Layout ─── */
.site-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  padding: 40px 24px;
  max-width: 1240px;
  margin: 0 auto;
}
.main-content { min-width: 0; }
.sidebar { min-width: 0; position: relative; }
.sidebar-inner {
  position: sticky;
  top: 90px;
}

/* ─── Section Title ─── */
.section-title {
  font-family: var(--font-display);
  font-size: 1.6em;
  font-weight: 700;
  margin-bottom: 28px;
  padding-bottom: 14px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--primary), transparent);
  opacity: 0.4;
}

/* ─── Hero Featured ─── */
.hero-featured {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: transform 0.5s, box-shadow 0.5s;
}
.hero-featured:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.hero-featured a { text-decoration: none; color: inherit; display: grid; grid-template-columns: 1fr 1fr; min-height: 360px; }
.hero-featured .hero-img-wrap {
  position: relative;
  overflow: hidden;
}
.hero-featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s;
}
.hero-featured:hover .hero-featured-img { transform: scale(1.05); }
.hero-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 50%, rgba(7,7,8,0.8));
}
.hero-featured-body {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-featured .cat-tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--accent2));
  color: #fff;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.7em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  align-self: flex-start;
}
.hero-featured h2 {
  font-family: var(--font-display);
  font-size: 1.8em;
  font-weight: 700;
  margin-bottom: 14px;
  line-height: 1.3;
  color: #fff;
}
.hero-featured p { color: var(--text-light); font-size: 0.92em; line-height: 1.6; margin-bottom: 20px; }
.hero-featured .meta {
  color: var(--text-muted);
  font-size: 0.8em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-featured .meta::before {
  content: '•';
  color: var(--primary);
}

/* ─── Post Grid ─── */
.post-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.4s, box-shadow 0.4s, border-color 0.4s;
  position: relative;
}
.post-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, transparent, transparent, transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: background 0.4s;
  pointer-events: none;
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(231, 76, 60, 0.2);
}
.post-card:hover::before {
  background: linear-gradient(135deg, transparent, var(--primary-glow), transparent);
}
.post-card a { text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.post-card .card-img-wrap {
  position: relative;
  overflow: hidden;
  height: 190px;
}
.post-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s;
}
.post-card:hover .post-card-img { transform: scale(1.06); }
.card-img-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(transparent, rgba(7,7,8,0.9));
}
.post-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; position: relative; z-index: 1; }
.post-card .cat-tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--accent2));
  color: #fff;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.65em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  align-self: flex-start;
}
.post-card h3 {
  font-family: var(--font-display);
  font-size: 1.05em;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
  color: #fff;
  transition: color 0.3s;
}
.post-card:hover h3 { color: var(--accent); }
.post-card p { color: var(--text-light); font-size: 0.85em; margin-bottom: 14px; flex: 1; line-height: 1.6; }
.post-card .meta { color: var(--text-muted); font-size: 0.75em; display: flex; align-items: center; gap: 6px; }

/* ─── Article Page ─── */
article.article-page {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
}
.article-img-wrap {
  position: relative;
  width: 100%;
  max-height: 420px;
  overflow: hidden;
}
.article-img-wrap img.featured-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}
.img-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(transparent, rgba(18,18,22,0.95));
}
.article-header {
  padding: 0 36px;
  margin-top: -60px;
  position: relative;
  z-index: 2;
}
.article-meta-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.article-meta-top .cat-tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--accent2));
  color: #fff;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.7em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.article-meta-top .meta-date { color: var(--text-muted); font-size: 0.85em; }
.article-header h1 {
  font-family: var(--font-display);
  font-size: 2.2em;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.article-body {
  padding: 36px;
}
.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.45em;
  font-weight: 600;
  margin: 36px 0 16px;
  color: #fff;
  line-height: 1.3;
}
.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.15em;
  font-weight: 600;
  margin: 28px 0 12px;
  color: #e0e0e0;
}
.article-body p { margin-bottom: 18px; color: var(--text); font-size: 0.95em; line-height: 1.8; }
.article-body a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.3s; }
.article-body a:hover { border-bottom-color: var(--accent); }
.article-body ul, .article-body ol { margin: 18px 0 18px 24px; }
.article-body li { margin-bottom: 8px; color: var(--text); font-size: 0.95em; line-height: 1.7; }
.article-body blockquote {
  border-left: 3px solid var(--primary);
  padding: 18px 22px;
  margin: 24px 0;
  background: rgba(231,76,60,0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-light);
  font-style: italic;
}
.article-body code {
  background: var(--surface);
  color: #e0e0e0;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.88em;
}
.article-body pre {
  background: rgba(0,0,0,0.5);
  color: #e0e0e0;
  padding: 22px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--border);
  font-size: 0.88em;
}
.article-body img { max-width: 100%; border-radius: var(--radius-sm); margin: 24px 0; }

/* ─── Sidebar ─── */
.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 24px;
  transition: border-color 0.3s;
}
.sidebar-widget:hover { border-color: rgba(231,76,60,0.15); }
.sidebar-widget h3 {
  font-family: var(--font-display);
  font-size: 0.9em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.widget-icon {
  color: var(--primary);
  font-size: 0.7em;
}
.sidebar-widget p { font-size: 0.88em; color: var(--text-light); line-height: 1.7; }
.sidebar-posts { list-style: none; }
.sidebar-posts li { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.sidebar-posts li:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.sidebar-posts li a {
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.88em;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  transition: color 0.3s;
}
.sidebar-posts li a:hover { color: var(--accent); }
.post-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 8px;
}
.sidebar-cat a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  border-left: 2px solid var(--primary);
  font-weight: 500;
  font-size: 0.82em;
  letter-spacing: 0.2px;
  margin-bottom: 6px;
  text-decoration: none;
  color: var(--text-light);
  transition: all 0.3s;
}
.sidebar-cat a:hover {
  background: rgba(231,76,60,0.08);
  color: var(--accent);
  border-left-color: var(--accent);
  padding-left: 18px;
}
.cat-count { color: var(--text-muted); font-size: 0.85em; transition: transform 0.3s; }
.sidebar-cat a:hover .cat-count { transform: translateX(3px); color: var(--accent); }

/* ─── Page ─── */
.page-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  margin-bottom: 40px;
}
.page-content h1 { font-family: var(--font-display); font-size: 1.8em; font-weight: 700; margin-bottom: 24px; color: #fff; }
.page-content h2 { font-family: var(--font-display); font-size: 1.3em; font-weight: 600; margin: 28px 0 14px; color: #e0e0e0; }
.page-content p { margin-bottom: 16px; color: var(--text); font-size: 0.95em; line-height: 1.8; }
.page-content ul { margin: 14px 0 14px 22px; }
.page-content li { margin-bottom: 8px; color: var(--text); font-size: 0.95em; line-height: 1.7; }
.page-content a { color: var(--accent); }

/* ─── Footer ─── */
footer {
  background: linear-gradient(180deg, rgba(7,7,8,0.8), rgba(0,0,0,0.95));
  border-top: 1px solid var(--border);
  padding: 60px 0 0;
  margin-top: 60px;
  position: relative;
}
footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 10%;
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.3;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.3em;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}
.footer-logo span { color: var(--primary); }
.footer-brand p { font-size: 0.85em; line-height: 1.7; color: var(--text-muted); }
.footer-links h4 {
  color: #fff;
  font-size: 0.82em;
  font-weight: 600;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-display);
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  display: block;
  margin-bottom: 8px;
  font-size: 0.85em;
  transition: color 0.3s, padding-left 0.3s;
}
.footer-links a:hover { color: var(--accent); padding-left: 4px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  font-size: 0.8em;
  color: var(--text-muted);
}
.footer-made { color: var(--text-muted); opacity: 0.6; }

/* ─── Scroll Reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .hero-featured a { grid-template-columns: 1fr; }
  .hero-featured .hero-img-wrap { height: 240px; }
  .hero-img-wrap::after { background: linear-gradient(transparent 50%, rgba(7,7,8,0.8)); }
  .hero-featured-body { padding: 28px; }
  .hero-featured h2 { font-size: 1.5em; }
  .site-wrap { grid-template-columns: 1fr; gap: 30px; }
  .post-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 768px) {
  #globe-container { display: none; }
  .topbar { display: none; }
  header { padding: 12px 0; }
  header.scrolled { padding: 8px 0; }
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .post-grid { grid-template-columns: 1fr; gap: 20px; }
  .hero-featured .hero-img-wrap { height: 200px; }
  .hero-featured-body { padding: 20px; }
  .hero-featured h2 { font-size: 1.3em; }
  .section-title { font-size: 1.3em; }
  .article-header { padding: 0 20px; margin-top: -40px; }
  .article-header h1 { font-size: 1.5em; }
  .article-body { padding: 20px; }
  .page-content { padding: 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .site-wrap { padding: 20px 16px; }
  .container { padding: 0 16px; }
}
@media (max-width: 480px) {
  .logo a { font-size: 1.4em; }
  .hero-featured h2 { font-size: 1.1em; }
  .article-header h1 { font-size: 1.3em; }
}
