:root {
  /* Luxurious Palette */
  --primary-color: #0f172a; /* Deep Slate / Midnight Blue */
  --secondary-color: #1e293b; /* Slightly lighter slate */
  --accent-color: #d4af37; /* Champagne Gold */
  --background-color: #faf9f6; /* Off-white / Pearl */
  --surface-color: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --nav-bg: rgba(250, 249, 246, 0.9);
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --radius: 8px;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --transition: all 0.3s ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #d4af37;
    --background-color: #0a0a0a;
    --surface-color: #171717;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --border-color: #262626;
    --nav-bg: rgba(10, 10, 10, 0.9);
    --secondary-color: #262626;
  }
}

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

body {
  font-family: var(--font-family);
  background-color: var(--background-color);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Glassmorphism Navbar */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links a {
  margin-left: 20px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--accent-color);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  font-weight: 800;
}

.hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 30px auto;
  opacity: 0.9;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--accent-color);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.1);
}

/* Layout */
.main-layout {
  display: flex;
  gap: 40px;
  padding: 40px 0;
  flex-wrap: wrap;
}

.content-area {
  flex: 1;
  min-width: 0; /* fixes flexbox overflow */
}

.sidebar {
  width: 300px;
  position: sticky;
  top: 90px;
  align-self: start;
}

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    position: static;
  }
}

/* Cards */
.card {
  background: var(--surface-color);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card h3 a {
  text-decoration: none;
  color: var(--primary-color);
}

.card h3 a:hover {
  color: var(--accent-color);
}

/* Article Styles */
.article-header {
  margin-bottom: 30px;
}

.article-header h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  gap: 15px;
}

.key-takeaways {
  background: rgba(252, 163, 17, 0.1);
  border-left: 4px solid var(--accent-color);
  padding: 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 30px;
}

.key-takeaways h3 {
  margin-top: 0;
  color: var(--text-main);
}

.article-content h2 {
  margin-top: 40px;
  margin-bottom: 15px;
  color: var(--primary-color);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.article-content p {
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.article-content ul, .article-content ol {
  margin-bottom: 20px;
  padding-left: 20px;
  font-size: 1.1rem;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.article-content th, .article-content td {
  border: 1px solid var(--border-color);
  padding: 12px;
  text-align: left;
}

.article-content th {
  background: var(--surface-color);
  font-weight: 600;
}

/* Social Share */
.social-share {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

.social-share a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-color);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  text-decoration: none;
}

.social-share a:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* Newsletter */
.newsletter-box {
  background: var(--primary-color);
  color: white;
  padding: 30px;
  border-radius: var(--radius);
  text-align: center;
  margin: 40px 0;
}

.newsletter-box h3 {
  margin-bottom: 10px;
}

.newsletter-box form {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: center;
}

.newsletter-box input {
  padding: 12px;
  border-radius: var(--radius);
  border: none;
  width: 100%;
  max-width: 300px;
}

/* Adsense Placeholders */
.ad-slot {
  background: var(--surface-color);
  border: 1px dashed var(--border-color);
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  margin: 20px 0;
  border-radius: var(--radius);
}

/* Footer */
footer {
  background: var(--primary-color);
  color: white;
  padding: 40px 0;
  text-align: center;
  margin-top: 40px;
}

footer a {
  color: #fff;
  text-decoration: none;
  opacity: 0.8;
  margin: 0 10px;
}

footer a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Utilities */
.tag {
  display: inline-block;
  background: var(--secondary-color);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  text-decoration: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
