/* =========================
   DESIGN TOKENS
========================= */

:root {
  --bg: #f4f8ff;
  --surface: #ffffff;
  --surface-2: #f9fbff;

  --text: #0b1220;
  --muted: #64748b;

  --primary: #2563eb;
  --primary-light: #eaf2ff;
  --accent: #1d4ed8;

  --border: rgba(15, 23, 42, 0.08);

  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 20px 60px rgba(15, 23, 42, 0.12);

  --transition: 0.25s cubic-bezier(.2, .8, .2, 1);
}

/* =========================
   DARK MODE (FIXED NAVY)
========================= */

[data-theme="dark"] {
  --bg: #050814;
  --surface: #0b1226;
  --surface-2: #0f1933;

  /* FIXED: pure white text */
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.75);

  --primary: #60a5fa;
  --primary-light: rgba(96, 165, 250, 0.12);
  --accent: #3b82f6;

  --border: rgba(148, 163, 184, 0.12);

  --shadow-sm: 0 10px 25px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 30px 80px rgba(0, 0, 0, 0.6);
}

/* =========================
   BASE
========================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  text-rendering: optimizeLegibility;
  letter-spacing: -0.2px;
}

.container {
  max-width: 1150px;
  margin: auto;
  padding: 24px;
}



a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:visited {
  color: var(--primary);
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* DARK MODE LINKS (FORCE WHITE) */
[data-theme="dark"] a,
[data-theme="dark"] a:visited {
  color: #ffffff;
}

[data-theme="dark"] a:hover {
  color: var(--primary);
}


/* =========================
   TYPOGRAPHY
========================= */

h1,
h2,
h3 {
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.4px;
}

p {
  color: var(--text);
  opacity: 0.78;
  line-height: 1.65;
}

/* =========================
   HEADER (CLEAN PREMIUM)
========================= */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  font-size: 20px;
}

.nav-links {
  display: flex;
  gap: 22px;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
}

/* =========================
   MOBILE MENU
========================= */

#menuBtn {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text);
  transition: 0.2s ease;

}

[data-theme="dark"] #menuBtn {
  color: #ffffff;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 20px;
  gap: 10px;
}

.mobile-menu.show {
  display: flex;
}

/* =========================
   HERO (FEATURE STORY STYLE)
========================= */

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
  margin-top: 40px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-content span {
  display: inline-flex;
  width: fit-content;

  padding: 6px 12px;
  background: var(--primary-light);
  color: var(--primary);

  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;

  margin-bottom: 12px;
}

.hero-content h1 {
  font-size: 46px;
  line-height: 1.1;
  margin: 10px 0 12px;
  font-weight: 750;
}

.hero-content p {
  max-width: 460px;
  font-size: 16px;
  opacity: 0.82;
}

.hero-btn {
  margin-top: 20px;
  width: fit-content;

  padding: 12px 18px;
  border-radius: 12px;

  background: var(--primary);
  color: white;
  text-decoration: none;

  font-weight: 600;
  transition: 0.25s ease;
}

.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.hero img {
  width: 100%;
  height: 480px;
  object-fit: cover;

  border-radius: var(--radius);
  box-shadow: var(--shadow-md);

  transition: 0.3s ease;
}

.hero img:hover {
  transform: scale(1.02);
  filter: contrast(1.05) saturate(1.05);
}

/* =========================
   POSTS GRID (CLEAN FEED)
========================= */

.posts {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* =========================
   CARDS (SMALL + MODERN)
========================= */

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);

  display: flex;
  flex-direction: column;

  transition: 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.card-content {
  padding: 14px;
}

.card-content span {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
}

.card-content h3 {
  font-size: 16px;
  margin: 6px 0;
  line-height: 1.35;
}

.card-content p {
  font-size: 13px;
  opacity: 0.75;
  margin: 0;
}

/* =========================
   ARTICLE PAGE (READING UX)
========================= */

.article-page {
  max-width: 780px;
  margin: 60px auto;
  padding: 0 20px;
}

.article-hero img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.article-content {
  margin-top: 28px;
}

.article-content p {
  font-size: 17px;
  line-height: 1.75;
  margin-bottom: 16px;
}

/* =========================
   FOOTER
========================= */

.footer {
  margin-top: 80px;
  padding: 40px 20px;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

/* =========================
   BUTTONS
========================= */

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--primary-light);
}

.read-more {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.read-more:hover {
  text-decoration: underline;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: 32px;
  }

  .posts {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  #menuBtn {
    display: block;
  }
}