:root {
  --bg-color: #0f172a; /* Slate 900 */
  --text-primary: #f8fafc; /* Slate 50 */
  --text-secondary: #94a3b8; /* Slate 400 */
  --primary: #38bdf8; /* Electric Blue */
  --accent: #22c55e; /* Cyber Green */
  --bg-dark: #070b14; /* Deep Space */
  --bg-card: #111827; /* Slate Card */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --heading-font: "Outfit", sans-serif;
  --body-font: "Inter", sans-serif;
  --container-width: 1200px;
  --glass: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.1);
}

/* Legal Mode: Paper Document Style */
.legal-mode body {
    background: var(--bg-dark); /* Keep global background */
}

.legal-mode .content-page {
    background: #ffffff;
    color: #000000;
    padding: 60px 8%;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    margin: 40px auto;
    max-width: 900px;
}

.legal-mode .content-page h1, 
.legal-mode .content-page h2, 
.legal-mode .content-page p, 
.legal-mode .content-page li {
    color: #1a1a1a;
}

.legal-mode .content-page h1 {
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.legal-mode .content-page h2 {
    margin-top: 40px;
    color: #000;
}

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

body {
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--body-font);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography Overhaul */
h1,
h2,
h3 {
  font-family: var(--heading-font);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

/* Global Header */
header {
  background: rgba(7, 11, 20, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 5%;
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--heading-font);
  text-transform: uppercase;
}
.logo span {
  color: var(--primary);
}

/* Layout Grid: Magazine System */
.magazine-grid {
  max-width: var(--container-width);
  margin: 2rem auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 350px; /* Main vs Sidebar */
  gap: 40px;
}

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

/* Hero Section (Billboard Style) */
.hero-story {
  grid-column: 1 / -1;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  height: 500px;
  margin-bottom: 2rem;
  cursor: pointer;
}

.hero-story img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hero-story:hover img {
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3rem;
}

.hero-badge {
  background: var(--accent);
  color: #000;
  padding: 4px 12px;
  font-weight: 900;
  font-size: 0.8rem;
  display: inline-block;
  width: fit-content;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 1rem;
}

/* Categorical Sections (TechCrunch Style) */
.section-header {
  border-bottom: 3px solid var(--primary);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.5rem;
  padding-bottom: 5px;
}

.section-title {
  font-size: 1.8rem;
  color: var(--text-main);
}

/* List Items (TechCrunch density) */
.article-item {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--glass-border);
}

.article-thumb {
  width: 180px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.article-cat {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.article-title {
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 700;
  color: #fff;
}
.article-title:hover {
  color: var(--primary);
}

.article-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Sidebar (Entrepreneur Style) */
.sidebar-box {
  padding: 20px;
  background: var(--bg-card);
  border-radius: 12px;
  position: sticky;
  top: 100px;
}

.sidebar-title {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--accent);
  padding-left: 10px;
}

.popular-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--glass-border);
}

.popular-rank {
  color: var(--accent);
  font-weight: 900;
  font-size: 1.5rem;
  margin-right: 10px;
  opacity: 0.3;
}

/* Ad Slot Placeholders */
.ad-slot {
  background: var(--glass);
  border: 1px dashed var(--glass-border);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  margin: 2rem 0;
}

.ad-leaderboard {
  width: 100%;
  height: 90px;
}

/* Post Content Page Styling */
article {
  max-width: 800px;
  margin: 40px auto;
  padding: 0 20px;
}
article h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-transform: none;
}
.post-meta {
  margin-bottom: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.post-content {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #cbd5e1;
}
.post-content h2 {
  margin-top: 2.5rem;
  font-size: 1.8rem;
  color: #fff;
  text-transform: none;
}
.post-content p {
  margin-bottom: 1.5rem;
}
.post-content table {
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-card);
}
.post-content th {
  background: var(--primary);
  color: #000;
}

/* Footer Overhaul (TechCrunch Style) */
footer {
    background: #000;
    border-top: 1px solid var(--glass-border);
    padding: 60px 5% 40px;
    margin-top: 80px;
}

.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 40px;
    text-align: left;
}

@media (max-width: 768px) {
    .footer-container { grid-template-columns: 1fr; text-align: center; }
}

.footer-brand .logo { font-size: 1.8rem; margin-bottom: 20px; display: block; }
.footer-social { display: flex; gap: 15px; margin-top: 20px; }
.footer-social a { font-size: 1.2rem; opacity: 0.6; }
.footer-social a:hover { opacity: 1; color: var(--primary); }

.footer-col h4 {
    font-family: var(--heading-font);
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; font-size: 0.9rem; }
.footer-col ul li a { color: #94a3b8; }
.footer-col ul li a:hover { color: #fff; }

.footer-bottom {
    max-width: var(--container-width);
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #475569;
}
