/* Global Reset and Base Styles */
:root {
  --primary-color: #007bff; /* Tech Blue */
  --secondary-color: #6c757d; /* Grey */
  --background-color: #ffffff;
  --text-color: #333333;
  --header-bg: rgba(248, 249, 250, 0.9);
  --header-border: #e9ecef;
  --footer-bg: #343a40;
  --footer-text: #fff;
  --ad-bg: #f9f9f9;
  --support-bg: #f0f4f8;
  --support-border: #d1d9e6;
  --bio-bg: #f8f9fa;
  --accent-color: #28a745; /* Success Green */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #4da3ff; /* Lighter Tech Blue for dark mode */
    --secondary-color: #a0aab5;
    --background-color: #121212;
    --text-color: #e0e0e0;
    --header-bg: rgba(30, 30, 30, 0.9);
    --header-border: #333;
    --footer-bg: #1a1a1a;
    --footer-text: #e0e0e0;
    --ad-bg: #1e1e1e;
    --support-bg: #1a202c;
    --support-border: #2d3748;
    --bio-bg: #1e1e1e;
  }
}

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

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

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

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  margin-bottom: 0.5em;
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }

/* Layout */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

nav a {
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

main {
  padding: 2rem 0;
  min-height: 60vh;
}

footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 2rem 0;
  text-align: center;
}

footer a {
  color: var(--footer-text);
  text-decoration: underline;
}

/* AdSense CLS Armor (Phase 4) */
.ad-container-leaderboard {
  min-height: 90px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  background-color: var(--ad-bg);
}

@media (max-width: 768px) {
  .ad-container-leaderboard {
    min-height: 250px;
  }

  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  .container { width: 95%; }
}

/* Utility */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--primary-color);
  color: #fff;
  border-radius: 5px;
}

.btn:hover {
  background: #0056b3;
  text-decoration: none;
}

.btn-payment {
  display: inline-block;
  padding: 12px 24px;
  background: #0070ba; /* Trust-Blue */
  color: #fff;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  min-width: 44px;
  min-height: 44px;
  line-height: 1.5;
  transition: background 0.3s ease;
  touch-action: manipulation;
}

.btn-payment:hover {
  background: #005ea6;
  text-decoration: none;
}

.support-section {
  background: var(--support-bg);
  padding: 2rem;
  border-radius: 8px;
  margin-top: 3rem;
  text-align: center;
  border: 1px solid var(--support-border);
}

.support-section h3 {
  margin-top: 0;
  color: var(--primary-color);
}

/* Article Styles */
article {
  max-width: 800px;
  margin: 0 auto;
}

article p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

article img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}

.meta {
  color: var(--secondary-color);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.article-hero-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.author-bio {
  display: flex;
  align-items: center;
  background: var(--bio-bg);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 3rem;
  border-left: 4px solid var(--primary-color);
}

.author-avatar {
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin-right: 1.5rem;
  flex-shrink: 0;
}

.author-info h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
}

.author-info p {
  margin: 0;
  font-size: 0.95rem;
  color: #555;
}
