/* ============ 1. COLORS (change these to restyle the whole site) ============ */
:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #626262;
  --card: #efece9;
  --cover-empty: #dcd6d0;

  /* hero banner colors */
  --sky-top: #f7e8dc;
  --sky-bottom: #e6d3e0;
  --moon: #fffaf0;
  --hill-far: #cdb8c8;
  --hill-mid: #ad93b3;
  --hill-near: #86709a;
  --hero-text: #3b3347;
}

/* Dark theme: script.js adds data-theme="dark" to the page */
:root[data-theme="dark"] {
  --bg: #151418;
  --text: #f1eee9;
  --muted: #a9a4ab;
  --card: #23212a;
  --cover-empty: #34313c;

  --sky-top: #1c1a2e;
  --sky-bottom: #3d3052;
  --moon: #fff3d6;
  --hill-far: #4a3d63;
  --hill-mid: #382e4d;
  --hill-near: #262036;
  --hero-text: #f1eee9;
}

/* ============ 2. BASICS ============ */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Serif 4", Georgia, serif;
  transition: background 0.3s, color 0.3s;
}

a { color: inherit; text-decoration: none; }

/* ============ 3. TOP BAR ============ */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  max-width: 1000px;
  margin: 0 auto;
}

.logo {
  font-family: "Vidaloka", Georgia, serif;
  font-size: 24px;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text);
  padding: 6px;
  cursor: pointer;
  border-radius: 50%;
}
.icon-btn:hover { background: var(--card); }

/* Moon in light mode, sun in dark mode */
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun  { display: inline; }

/* ============ 4. HERO BANNER ============ */
main { max-width: 1000px; margin: 0 auto; }

.hero {
  position: relative;
  height: 260px;
  margin: 0 12px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(to bottom, var(--sky-top), var(--sky-bottom));
  /* To use your own photo instead, replace the line above with:
     background: url("images/banner.jpg") center / cover;
     and delete the <svg> block inside <section class="hero"> in index.html. */
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.moon      { fill: var(--moon); }
.moon-glow { fill: var(--moon); opacity: 0.25; }
.star      { fill: var(--moon); opacity: 0.8; }
.hill.far  { fill: var(--hill-far); }
.hill.mid  { fill: var(--hill-mid); }
.hill.near { fill: var(--hill-near); }

.hero-text {
  position: absolute;
  left: 22px;
  top: 28px;
  right: 22px;
  color: var(--hero-text);
}
.hero-text h1 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
}
.hero-text p { margin: 0; font-size: 15px; opacity: 0.85; }

/* ============ 5. CARDS ============ */
.section-title {
  margin: 22px 16px 12px;
  font-size: 20px;
  font-weight: 600;
}

.cards {
  display: grid;
  gap: 20px;
  padding-bottom: 20px;
}

.card {
  display: flex;
  gap: 18px;
  padding: 8px 14px 8px 13px;
  background: var(--card);
  border-radius: 0 8px 8px 0;           /* flat on the left edge, like your design */
  box-shadow: 2px 5px 10px 2px rgba(0, 0, 0, 0.18);
  margin-right: 14px;
  transition: transform 0.2s;
}
.card:hover { transform: translateY(-2px); }

.cover {
  flex: none;
  width: 107px;
  height: 160px;
  background: var(--cover-empty);        /* the empty cover */
  border-radius: 13px;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}
.cover img {                             /* used when you add a cover picture */
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.info { padding-top: 12px; }
.info h3 { margin: 0 0 4px; font-size: 23px; font-weight: 400; }
.author { margin: 0; font-size: 13px; color: var(--muted); }
.meta { margin: 14px 0 0; font-size: 13px; color: var(--muted); }
/* ============ 6. FOOTER ============ */
.footer {
  text-align: center;
  padding: 28px 16px 36px;
  color: var(--muted);
  font-size: 14px;
}

/* ============ 7. BIGGER SCREENS (tablet / computer) ============ */
@media (min-width: 700px) {
  .hero { height: 340px; margin: 0 16px; }
  .hero-text { left: 40px; top: 50px; }
  .hero-text h1 { font-size: 40px; }
  .hero-text p { font-size: 18px; }

  .cards { grid-template-columns: 1fr 1fr; padding: 0 16px 20px; }
  .card { margin-right: 0; border-radius: 8px; }
  .section-title { margin-left: 16px; }
}
