/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ===== TOKENS ===== */
:root {
  --bg: #F5F0FF;
  --bg-card: #FFFFFF;
  --text: #2D2640;
  --text-muted: #6B5F80;
  --text-light: #9B8FB5;
  --accent: #7C5CFC;
  --accent-hover: #6A48E8;
  --accent-light: #EDE7FF;
  --accent-2: #FF7EB3;
  --accent-2-light: #FFF0F5;
  --border: #E8E0F5;
  --gradient-hero: linear-gradient(135deg, #F5F0FF 0%, #FFF0F5 50%, #E7F5FF 100%);
  --shadow: 0 2px 16px rgba(45, 38, 64, 0.05);
  --shadow-hover: 0 8px 32px rgba(124, 92, 252, 0.12);
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Luckiest Guy', cursive;
  --max-w: 780px;
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
  --bg: #0f0f0f;
  --bg-card: #1a1a1a;
  --text: #e0e0e0;
  --text-muted: #aaa;
  --text-light: #888;
  --accent-light: rgba(124, 92, 252, 0.15);
  --accent-2-light: rgba(255, 126, 179, 0.1);
  --border: #333;
  --gradient-hero: linear-gradient(135deg, #0f0f0f 0%, #1a0f1f 50%, #0f1520 100%);
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 32px rgba(124, 92, 252, 0.2);
}

/* ===== BASE ===== */
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== NAV ===== */
.nav {
  background: rgba(245, 240, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
}
[data-theme="dark"] .nav {
  background: rgba(15, 15, 15, 0.85);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.logo {
  font-family: var(--font-display);
  font-size: 26px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(2px 2px 0 rgba(124, 92, 252, 0.15));
  transition: transform 0.2s;
}
.logo:hover { transform: scale(1.03); }
.nav-links { display: flex; gap: 28px; justify-content: center; }
.nav-links a {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--accent); }

/* ===== HERO ===== */
.hero {
  background: var(--gradient-hero);
  text-align: center;
  padding: 72px 24px 56px;
}
.hero-inner {
  max-width: 600px;
  margin: 0 auto;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: 46px;
  line-height: 1.15;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(3px 3px 0 rgba(124, 92, 252, 0.12));
}
.hero p {
  font-size: 17px;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.7;
}

/* ===== SECTION HEADERS ===== */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-header h2 {
  font-size: 22px;
  font-weight: 700;
}
.section-header h2 span {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-header a {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  transition: opacity 0.2s;
}
.section-header a:hover { opacity: 0.75; }

/* ===== CARDS (generic) ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  transition: all 0.3s;
  box-shadow: var(--shadow);
  display: block;
}
a.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

/* ===== FEATURED POST ===== */
.featured {
  max-width: var(--max-w);
  margin: -32px auto 0;
  padding: 0 24px 48px;
  position: relative;
  z-index: 2;
}
.featured .card {
  padding: 32px;
}
.featured-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  padding: 3px 12px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.featured h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}
.featured p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}
.featured-meta {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 500;
  margin-top: 12px;
}

/* ===== TOOLS GRID ===== */
.tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 48px;
}
.tool-card {
  padding: 22px 24px;
  border-radius: 16px;
}
.tool-card .tool-icon {
  font-size: 24px;
  margin-bottom: 10px;
  display: block;
}
.tool-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}
.tool-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== BLOG LIST ===== */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 48px;
}
.blog-card {
  border-radius: 16px;
  padding: 22px 26px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
}
.blog-date-box {
  background: var(--accent-light);
  border-radius: 12px;
  padding: 8px 12px;
  text-align: center;
  flex-shrink: 0;
  min-width: 52px;
}
.blog-date-box .day {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.blog-date-box .month {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  margin-top: 2px;
}
.blog-content h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}
.blog-content p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== TAGS ===== */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 99px;
  background: var(--accent-light);
  color: var(--accent);
}
.tag.pink {
  background: var(--accent-2-light);
  color: var(--accent-2);
}

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}
.badge.purple { background: var(--accent-light); color: var(--accent); }
.badge.pink { background: var(--accent-2-light); color: var(--accent-2); }

/* ===== BLOG POST (article) ===== */
.article-header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 24px 0;
}
.article-header .back {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 600;
  transition: color 0.2s;
  display: inline-block;
  margin-bottom: 24px;
}
.article-header .back:hover { color: var(--accent); }
.article-header time {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
}
.article-header h1 {
  font-size: 32px;
  font-weight: 700;
  margin: 8px 0 12px;
  line-height: 1.25;
}
.article-header .desc {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.6;
}

.article-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px 24px 64px;
}
.article-body h2 {
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  margin-top: 40px;
  margin-bottom: 16px;
}
.article-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-top: 32px;
  margin-bottom: 12px;
}
.article-body p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 16px;
}
.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(124, 92, 252, 0.3);
}
.article-body a:hover {
  text-decoration-color: var(--accent);
}
.article-body ul, .article-body ol {
  padding-left: 20px;
  margin-bottom: 16px;
}
.article-body li {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 6px;
}
.article-body blockquote {
  border-left: 3px solid var(--accent-light);
  padding-left: 16px;
  font-style: italic;
  color: var(--text-muted);
  margin: 16px 0;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  justify-self: end;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s;
  width: 34px;
  height: 34px;
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
  margin-top: auto;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .hero h1 { font-size: 34px; }
  .tools-grid { grid-template-columns: 1fr; }
  .blog-card { flex-direction: column; gap: 10px; }
  .featured .card { padding: 24px; }
}
