/* ============================================================
   Lessons from Raggs — styles.css
   Clean, documentation-style. Mobile-first. One accent color.
   ============================================================ */

:root {
  --bg: #fdfcfa;
  --surface: #ffffff;
  --text: #1f2328;
  --text-muted: #6a737d;
  --accent: #c2571b;        /* warm orange */
  --accent-soft: #fbeee4;
  --border: #e4e1dc;
  --font-serif: "Source Serif 4", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-serif);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header / age counter ---------- */

.site-header {
  text-align: center;
  padding: 4.5rem 1.25rem 3.5rem;
  border-bottom: 1px solid var(--border);
}

.site-title {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.site-subtitle {
  font-family: var(--font-sans);
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.age-counter {
  margin-top: 2rem;
}

.age-counter-value {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.age-caption {
  font-family: var(--font-sans);
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.4rem;
  font-style: italic;
}

/* ---------- Sections ---------- */

main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 1.75rem;
}

/* ---------- About / bio ---------- */

.bio-block {
  margin-bottom: 1.75rem;
}

.bio-block:last-child {
  margin-bottom: 0;
}

.bio-block h3 {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* Placeholder text — visually obvious that it needs replacing */
.placeholder {
  color: var(--text-muted);
  font-style: italic;
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 0.35rem 0.6rem;
  display: inline-block;
}

/* ---------- About the Author (dropdown) ---------- */

.about-dropdown {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.about-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  list-style: none;              /* hide default marker */
}

.about-summary::-webkit-details-marker {
  display: none;                 /* hide default marker (Safari) */
}

.about-summary .section-title {
  margin-bottom: 0;
}

.about-summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Chevron indicator that rotates when the dropdown is open */
.about-chevron {
  width: 0.7rem;
  height: 0.7rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-right: 0.2rem;
}

.about-dropdown[open] .about-chevron {
  transform: rotate(225deg);
}

.about-body {
  padding: 0 1.5rem 1.5rem;
  animation: fadeIn 0.25s ease;
}

.about-body p {
  margin-bottom: 1.1rem;
}

.about-body p:last-child {
  margin-bottom: 0;
}

.about-photo {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin: 1.75rem auto 0;
}

/* ---------- Tabs ---------- */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
  margin-bottom: 1.5rem;
}

.tab {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tab:hover {
  color: var(--text);
}

.tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Lessons ---------- */

.lessons-list {
  list-style: none;
}

.lesson {
  padding: 0.4rem 0 0.4rem 1.25rem;
  border-left: 3px solid var(--accent);
  margin-bottom: 1.9rem;
}

.lesson:last-child {
  margin-bottom: 0;
}

.lesson-title {
  font-size: 1.3rem;
  line-height: 1.4;
  margin-bottom: 0.45rem;
}

.lesson-note {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ---------- Stories ---------- */

.story-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
}

.story-card:last-child {
  margin-bottom: 0;
}

.story-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.story-photo {
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-top: 1.25rem;
}

/* ---------- Footer ---------- */

.site-footer {
  text-align: center;
  padding: 3.5rem 1.25rem 4rem;
}

.footer-love {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.75rem;
}

.footer-photo {
  max-width: min(320px, 80vw);
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: block;
  margin: 0 auto;
}

.footer-domain {
  font-family: var(--font-sans);
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 1.25rem;
}

/* ---------- Wider screens ---------- */

@media (min-width: 640px) {
  .site-title {
    font-size: 2.75rem;
  }

  .age-counter-value {
    font-size: 1.35rem;
  }

  .lesson-title {
    font-size: 1.45rem;
  }
}
