﻿:root {
  --bg: #f3f8ff;
  --surface: #ffffff;
  --primary: #0f4fa8;
  --primary-2: #1d6ae5;
  --text: #0f1b35;
  --muted: #58709a;
  --line: #d8e7ff;
  --shadow: 0 16px 40px rgba(15, 79, 168, 0.15);
  --bubble-1: #d3e7ff;
  --bubble-2: #d8f0ff;
}

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

body {
  font-family: 'Manrope', sans-serif;
  background:
    radial-gradient(circle at 10% -10%, var(--bubble-1) 0, transparent 50%),
    radial-gradient(circle at 90% 0%, var(--bubble-2) 0, transparent 42%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

body.pink-theme {
  --bg: #fff3f9;
  --surface: #ffffff;
  --primary: #b4327c;
  --primary-2: #d64f99;
  --text: #3c1230;
  --muted: #8c4f74;
  --line: #ffd5e9;
  --shadow: 0 16px 40px rgba(180, 50, 124, 0.18);
  --bubble-1: #ffd9eb;
  --bubble-2: #ffe7f3;
}

.topbar {
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  background: rgba(243, 248, 255, 0.8);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 6vw;
  z-index: 20;
}

.logo {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: var(--primary);
}

nav {
  display: flex;
  gap: 20px;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
}

main {
  width: min(1120px, 92vw);
  margin: 28px auto 56px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  margin-bottom: 34px;
}

.hero-text {
  background: var(--surface);
  border-radius: 20px;
  padding: 34px;
  box-shadow: var(--shadow);
}

.tag {
  color: var(--primary-2);
  font-weight: 700;
  margin-bottom: 12px;
}

.hero-text h1 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.05;
  margin-bottom: 14px;
}

.hero-text p {
  color: var(--muted);
  max-width: 56ch;
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
}

.hero-card {
  border-radius: 20px;
  padding: 28px;
  background: linear-gradient(160deg, var(--primary-2) 0%, var(--primary) 100%);
  color: #fff;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.hero-card h3 {
  opacity: 0.85;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.9px;
}

.hero-card p {
  opacity: 0.92;
  line-height: 1.6;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-head a {
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.story {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 26px rgba(15, 79, 168, 0.08);
}

.story h3 {
  margin-bottom: 8px;
}

.story .meta {
  color: var(--primary-2);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.story .author {
  color: #395988;
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.story p {
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.btn {
  border: none;
  background: #e9f2ff;
  color: var(--primary);
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.ghost {
  background: #dcecff;
}

.btn.read {
  width: fit-content;
  background: #fff;
  color: var(--primary);
}

.theme-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  padding: 12px 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  z-index: 30;
}

.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 45, 0.5);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 40;
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(560px, 94vw);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 20px;
  position: relative;
}

.modal-card h3 {
  color: var(--primary);
  margin-bottom: 10px;
}

.modal-card p {
  color: var(--muted);
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #e9f2ff;
  color: var(--primary);
  cursor: pointer;
  font-weight: 700;
}

footer {
  text-align: center;
  color: var(--muted);
  padding: 20px;
  border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
  nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .topbar {
    padding: 14px 4vw;
  }

  .hero-text,
  .hero-card {
    padding: 22px;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}
