/* ============================================================
   Blog / site theme — driven by build-time presets.
   Placeholders injected by build_blog.py:
     #7c5cff #7c5cff "Poppins", system-ui, sans-serif "Inter", system-ui, -apple-system, sans-serif 22px
   Presets (high school / college / business blog / landing) just
   swap these tokens + choose which sections render.
   ============================================================ */

:root {
  --accent: #AE561C;
  --accent-dark: #AE561C;
  --font-display: "Poppins", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --radius: 22px;
  --bg: #75DBCD;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-soft: #5c5b58;
  --text-faint: #8a8884;
  --border: #ebe8e2;
  --max: 42rem;
  --max-wide: 60rem;
  --shadow: 0 1px 2px rgba(20, 18, 14, 0.04), 0 8px 28px rgba(20, 18, 14, 0.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14130f;
    --surface: #1c1b16;
    --text: #f2efe9;
    --text-soft: #b6b2a8;
    --text-faint: #807c72;
    --border: #2c2a23;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
.wrap-wide { max-width: var(--max-wide); }
a { color: inherit; text-decoration: none; }

/* --- Header ---------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  position: sticky; top: 0; z-index: 10;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.01em; }
.nav a { color: var(--text-soft); font-size: 0.95rem; margin-left: 1.4rem; transition: color 0.18s ease; }
.nav a:hover { color: var(--accent); font-weight: 600; }

/* --- Buttons --------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.7rem 1.4rem;
  border-radius: calc(var(--radius) - 4px);
  background: var(--accent);
  color: #fff;
  transition: transform 0.16s ease, opacity 0.16s ease;
}
.btn:hover { transform: translateY(-2px); opacity: 0.92; }
.btn-ghost {
  background: transparent;
  color: var(--accent); font-weight: 600;
  border: 1.5px solid color-mix(in srgb, var(--accent) 45%, transparent);
}
.btn-ghost:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }

/* --- Hero ------------------------------------------------------ */
.hero { padding: 5rem 0 3rem; }
.hero-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 3.6rem); line-height: 1.05;
  letter-spacing: -0.025em; margin: 0 0 1rem;
}
.hero-tagline { font-size: 1.2rem; color: var(--text-soft); max-width: 34rem; margin: 0; }
.eyebrow {
  display: inline-block; font-weight: 600; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); font-weight: 600;
  margin-bottom: 1rem;
}

/* Landing hero is centered and bigger */
.hero-landing { padding: 5.5rem 0 3.5rem; text-align: center; }
.hero-landing .hero-title { font-size: clamp(2.6rem, 7vw, 4.2rem); }
.hero-landing .hero-tagline { margin: 0 auto; max-width: 38rem; font-size: 1.28rem; }
.hero-landing .cta-row { justify-content: center; }

/* --- Section labels -------------------------------------------- */
.section-label {
  font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 0.72rem; font-weight: 600; color: var(--text-faint);
  margin: 0 0 1.5rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--border);
}
.section-head { text-align: center; margin: 0 auto 2.5rem; max-width: 34rem; }
.section-head h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.4rem); letter-spacing: -0.02em; margin: 0 0 0.6rem;
}
.section-head p { color: var(--text-soft); margin: 0; }

/* --- Post list ------------------------------------------------- */
.posts { padding: 1rem 0 3rem; }
.post-card { border-bottom: 1px solid var(--border); }
.post-link { display: block; padding: 1.6rem 0; transition: transform 0.18s ease; }
.post-link:hover { transform: translateX(4px); }
.post-link:hover .post-title { color: var(--accent); font-weight: 600; }
.post-link:hover .read-more { opacity: 1; transform: translateX(0); }
.post-meta { display: flex; align-items: center; gap: 0.6rem; font-size: 0.82rem; color: var(--text-faint); margin-bottom: 0.4rem; }
.post-title { font-family: var(--font-display); font-weight: 600; font-size: 1.55rem; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.4rem; transition: color 0.18s ease; }
.post-summary { color: var(--text-soft); margin: 0 0 0.6rem; font-size: 1.02rem; }
.read-more { display: inline-block; font-size: 0.9rem; font-weight: 500; color: var(--accent); font-weight: 600; opacity: 0; transform: translateX(-6px); transition: opacity 0.18s ease, transform 0.18s ease; }
.tag { display: inline-block; font-size: 0.72rem; font-weight: 500; color: var(--accent); font-weight: 600; background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 0.1rem 0.55rem; border-radius: 999px; }
.empty { color: var(--text-faint); }

/* --- Feature / project cards (landing + students) -------------- */
.card-grid {
  display: grid; gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  padding: 1rem 0 1.5rem;
}
.feature {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow);
  transition: transform 0.18s ease;
}
.feature:hover { transform: translateY(-3px); }
.feature .ficon {
  width: 2.4rem; height: 2.4rem; border-radius: calc(var(--radius) - 4px);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent); font-weight: 600; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.2rem; margin-bottom: 1rem;
}
.feature h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; margin: 0 0 0.5rem; }
.feature p { color: var(--text-soft); margin: 0; font-size: 0.98rem; }
.feature .flink { display: inline-block; margin-top: 0.8rem; color: var(--accent); font-weight: 600; font-size: 0.9rem; font-weight: 500; }

/* --- Testimonial ----------------------------------------------- */
.testimonial { text-align: center; padding: 3rem 0; }
.testimonial blockquote {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.4rem, 3.5vw, 2rem); line-height: 1.35;
  letter-spacing: -0.01em; margin: 0 auto 1.2rem; max-width: 36rem;
}
.testimonial .who { color: var(--text-soft); font-size: 0.98rem; }

/* --- CTA band -------------------------------------------------- */
.cta-band {
  text-align: center; padding: 3.5rem 1.5rem; margin: 3rem auto 0;
  max-width: var(--max-wide);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  border-radius: var(--radius);
}
.cta-band h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 0.6rem; }
.cta-band p { color: var(--text-soft); margin: 0 auto 1.5rem; max-width: 30rem; }

/* --- Gift banner (link to birthday page) ----------------------- */
.gift-banner {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  text-align: center;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent); font-weight: 600; font-weight: 600; font-size: 0.95rem;
  padding: 0.7rem 1rem;
}
.gift-banner a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.gift-banner:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }

/* --- Birthday page --------------------------------------------- */
/* A celebratory, one-of-a-kind page: an oversized age numeral behind the
   title, a quiet quote-styled note, and a year-by-year photo timeline. */
.bday-hero {
  position: relative;
  text-align: center;
  padding: 5rem 1.5rem 3rem;
  overflow: hidden;
  isolation: isolate;
}
.bday-hero .bignum {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -54%);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(13rem, 42vw, 30rem);
  line-height: 0.8;
  letter-spacing: -0.05em;
  color: color-mix(in srgb, var(--accent) 13%, transparent);
  z-index: -1;
  user-select: none;
  pointer-events: none;
}
.bday-hero-inner { position: relative; }
.bday-eyebrow {
  display: inline-block;
  font-weight: 600; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--accent); font-weight: 600;
  margin-bottom: 1rem;
}
.bday-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.6rem, 8vw, 4.6rem); line-height: 1.0;
  letter-spacing: -0.03em; margin: 0 0 0.6rem;
}
.bday-sub { font-size: 1.15rem; color: var(--text-soft); margin: 0; }

.bday-note {
  max-width: 38rem;
  margin: 1rem auto 1.5rem;
  padding: 0 1.5rem;
  position: relative;
}
.bday-note-inner {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.4rem 2.2rem 2rem;
  box-shadow: var(--shadow);
  font-size: 1.1rem;
  line-height: 1.75;
}
.bday-note-inner::before {
  content: "\201C";
  position: absolute;
  top: -0.5rem; left: 1.2rem;
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 1;
  color: color-mix(in srgb, var(--accent) 30%, transparent);
}
.bday-note-inner p { margin: 0 0 1rem; }
.bday-note-inner p:last-of-type { margin-bottom: 0; }
.bday-note-inner em { font-style: italic; }
.bday-signoff {
  margin-top: 1.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--accent); font-weight: 600;
  line-height: 1.4;
}

/* Justified photo gallery: chronological left-to-right, each row filled
   edge-to-edge, every photo at its true proportions — never cropped, never
   blurred. Row width is driven by each photo's --ar (aspect ratio). */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 1.3rem;
  padding: 2rem 0 1rem;
}
.shot {
  /* basis + grow both scale with --ar so a row's photos share one height */
  flex-grow: calc(var(--ar) * 100);
  flex-basis: calc(var(--ar) * 15rem);
  min-width: 11rem;
  margin: 0;
}
.gallery-spacer { flex-grow: 1e6; }   /* soaks up the last row's free space */
.shot .yr {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--accent); font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 0.45rem 0.15rem;
}
.shot .frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.shot:hover .frame {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(20, 18, 14, 0.16);
}
.shot .fg {
  width: 100%;
  height: auto;          /* natural aspect ratio — full photo, no crop */
  display: block;
}
.shot .ph {
  aspect-ratio: 4 / 5;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 2.4rem;
  color: color-mix(in srgb, var(--accent) 55%, transparent);
}
.shot .cap {
  margin: 0.6rem 0.15rem 0;
  font-size: 0.94rem;
  color: var(--text-soft);
  line-height: 1.4;
}
@media (max-width: 560px) {
  .gallery { display: block; }
  .shot { margin: 0 0 1.6rem; }
}

/* --- About ----------------------------------------------------- */
.about { padding: 2rem 0 3rem; }

/* --- Article --------------------------------------------------- */
.article { padding: 3rem 0; }
.back { display: inline-block; color: var(--text-faint); font-size: 0.9rem; margin-bottom: 2rem; transition: color 0.18s ease; }
.back:hover { color: var(--accent); font-weight: 600; }
.article-header { margin-bottom: 2.5rem; }
.article-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; letter-spacing: -0.025em; margin: 0.5rem 0 0.8rem; }
.article-summary { font-size: 1.2rem; color: var(--text-soft); margin: 0; }

/* --- Prose (rendered markdown) --------------------------------- */
.prose { font-size: 1.06rem; }
.prose h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; letter-spacing: -0.02em; margin: 2.4rem 0 0.8rem; }
.prose h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; margin: 2rem 0 0.6rem; }
.prose p { margin: 0 0 1.3rem; }
.prose a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.prose a:hover { text-decoration-color: var(--accent); font-weight: 600; }
.prose ul, .prose ol { margin: 0 0 1.3rem; padding-left: 1.4rem; }
.prose li { margin: 0.3rem 0; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 1.5rem 0; }
.prose blockquote { margin: 1.5rem 0; padding: 0.4rem 0 0.4rem 1.4rem; border-left: 3px solid var(--accent); color: var(--text-soft); font-style: italic; }
.prose code { font-family: "SFMono-Regular", ui-monospace, "Menlo", monospace; font-size: 0.88em; background: color-mix(in srgb, var(--text) 8%, transparent); padding: 0.12em 0.4em; border-radius: 5px; }
.prose pre { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.3rem; overflow-x: auto; margin: 1.5rem 0; box-shadow: var(--shadow); }
.prose pre code { background: none; padding: 0; font-size: 0.86rem; line-height: 1.6; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* --- Footer ---------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 4rem; padding: 2.5rem 0 4rem; }
.site-footer .social { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.6rem; }
.site-footer .social a { color: var(--text-soft); font-size: 0.95rem; transition: color 0.18s ease; }
.site-footer .social a:hover { color: var(--accent); font-weight: 600; }
.site-footer .dot { color: var(--text-faint); }
.copyright { color: var(--text-faint); font-size: 0.85rem; margin: 0; }

/* --- Responsive ------------------------------------------------ */
@media (max-width: 640px) {
  body { font-size: 17px; }
  .hero { padding: 3rem 0 2rem; }
  .nav a:first-child:not(:only-child) { display: none; }
}
