/* ============================================================
   Lakshmi Prasad — warm, editorial, premium
   ============================================================ */
:root {
  --max: 64rem;
  --measure: 40rem;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;

  --bg: #fbf3ef;          /* warm blush cream */
  --bg-soft: #f6e6df;     /* soft rose mist */
  --surface: #fffaf7;
  --text: #2c2220;
  --muted: #8a7a76;
  --border: #ecd8d0;
  --accent: #b76e79;      /* rose gold — overridden per-category via inline style */
  --gold: #c9a24b;        /* warm gold companion */
  --code-bg: #f4e7e1;
  --shadow: 0 18px 40px -24px rgba(120, 70, 70, 0.4);
  --shadow-sm: 0 8px 24px -18px rgba(120, 70, 70, 0.45);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16110f;
    --bg-soft: #221815;
    --surface: #211916;
    --text: #f0e6e2;
    --muted: #b0a09a;
    --border: #382a26;
    --accent: #d99aa3;     /* lifted rose gold for dark */
    --gold: #d8b366;
    --code-bg: #2a1f1b;
    --shadow: 0 22px 48px -26px rgba(0, 0, 0, 0.7);
    --shadow-sm: 0 10px 28px -20px rgba(0, 0, 0, 0.7);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background:
    radial-gradient(1200px 600px at 80% -10%, var(--bg-soft), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, var(--bg-soft), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }

.eyebrow {
  font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin: 0 0 0.75rem;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.bar { display: flex; align-items: center; justify-content: space-between; height: 4.25rem; }
.site-title { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; color: var(--text); }
.site-title:hover { text-decoration: none; }
.site-nav a { color: var(--muted); margin-left: 1.4rem; font-size: 0.95rem; font-weight: 500; transition: color .2s; }
.site-nav a:hover { color: var(--accent); text-decoration: none; }
.site-nav a:first-child { margin-left: 0; }

main { padding-bottom: 4rem; }

/* ---------- hero ---------- */
/* ===== full-bleed, image-forward hero ===== */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 92vh; display: flex; align-items: flex-end;
  margin-top: -4.25rem;            /* slide under the sticky header */
  padding: 0 0 6vh;
}
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -3; }
.hero-img { background-size: cover; background-position: center; transform: scale(1.06); animation: kenburns 26s ease-in-out infinite alternate; }
video.hero-media { object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(180deg, rgba(12,5,9,0.45) 0%, rgba(12,5,9,0.15) 38%, rgba(12,5,9,0.55) 78%, var(--bg) 100%),
    radial-gradient(120% 80% at 80% 25%, rgba(183,110,121,0.25), transparent 60%);
}
.hero-fx { position: absolute; inset: 0; z-index: -1; }
.hero .spark { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); opacity: 0.5; box-shadow: 0 0 10px 1px var(--gold); animation: float 11s ease-in-out infinite; }
.hero .s1 { left: 16%; top: 34%; animation-delay: 0s; }
.hero .s2 { left: 74%; top: 24%; animation-delay: 2.2s; background: #eac6c1; box-shadow: 0 0 10px 1px #eac6c1; }
.hero .s3 { left: 40%; top: 58%; animation-delay: 4s; }
.hero .s4 { left: 86%; top: 50%; animation-delay: 6.1s; background: #eac6c1; box-shadow: 0 0 10px 1px #eac6c1; }
.hero .s5 { left: 28%; top: 72%; animation-delay: 8s; }
.hero-content { position: relative; text-align: left; }
.hero .eyebrow { color: #e7cf93; }

.hero-title {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(3.2rem, 11vw, 9rem); line-height: 0.9; letter-spacing: -0.02em;
  text-transform: uppercase; margin: 0;
  background: linear-gradient(96deg, #f6e7e2 0%, #eac6c1 35%, #e7cf93 70%, #f6e7e2 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: #f6e7e2;
  text-shadow: 0 2px 30px rgba(0,0,0,0.25);
}
.hero-tagline {
  font-family: var(--serif); font-style: italic; color: #f3e7e2;
  font-size: clamp(1.15rem, 2.6vw, 1.6rem); max-width: 34rem; margin: 1.2rem 0 0;
  text-shadow: 0 1px 14px rgba(0,0,0,0.4);
}
.hero-actions { margin-top: 2rem; display: flex; gap: 0.8rem; flex-wrap: wrap; }
.hero-actions .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.5); }
.hero-actions .btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,0.1); }

.hero-scroll { position: absolute; bottom: 2.2rem; left: 50%; transform: translateX(-50%); z-index: 1; }
.hero-scroll span { display: block; width: 26px; height: 42px; border: 2px solid rgba(255,255,255,0.6); border-radius: 14px; position: relative; }
.hero-scroll span::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: scrolldot 1.8s ease-in-out infinite; }

@keyframes kenburns { from { transform: scale(1.04) translate(0,0); } to { transform: scale(1.14) translate(-1.5%, -1%); } }
@keyframes float { 0%,100% { transform: translateY(0); opacity: 0.25; } 50% { transform: translateY(-26px); opacity: 0.75; } }
@keyframes scrolldot { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translateY(14px); } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .hero-img, .hero .spark, .hero-scroll span::after { animation: none; }
}
.btn {
  display: inline-block; padding: 0.72rem 1.4rem; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 0.95rem;
  box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- section heads ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 1.5rem; }
.section-head h2 { font-size: 1.7rem; margin: 0; }
.section-head a { font-size: 0.9rem; font-weight: 500; }

.page-head { padding: 3.5rem 0 1.5rem; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin: 0 0 0.5rem; }
.page-head p { color: var(--muted); font-size: 1.1rem; margin: 0; max-width: 34rem; }

/* ---------- featured ---------- */
.featured { margin: 1rem auto 3.5rem; }
.featured-link {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; overflow: hidden;
  border-radius: 20px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow); transition: transform .25s ease, box-shadow .25s ease;
}
.featured-link:hover { transform: translateY(-4px); text-decoration: none; box-shadow: var(--shadow), 0 0 0 1px var(--accent); }
.featured-cover { background-size: cover; background-position: center; min-height: 320px; }
.featured-body { padding: 2.4rem; display: flex; flex-direction: column; align-items: flex-start; }
.featured-title { font-family: var(--serif); font-size: 1.9rem; line-height: 1.15; color: var(--text); margin: 0.7rem 0 0; }
.featured-excerpt { color: var(--muted); margin: 0.7rem 0 0; }
.featured-meta { color: var(--muted); font-size: 0.85rem; margin: 1rem 0 0; }
.card-cta { color: var(--accent); font-weight: 600; font-size: 0.92rem; margin-top: 1.1rem; }

/* ---------- category strip ---------- */
.cats { margin: 0 auto 3.5rem; }
.cat-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.cat-card a {
  display: flex; flex-direction: column; height: 100%; padding: 1.5rem;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--cat); transition: transform .2s ease, box-shadow .2s ease;
}
.cat-card a:hover { transform: translateY(-3px); text-decoration: none; box-shadow: var(--shadow-sm); }
.cat-name { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; color: var(--text); }
.cat-blurb { color: var(--muted); font-size: 0.95rem; margin: 0.4rem 0 0; flex: 1; }
.cat-card .card-cta { color: var(--cat); }

/* ---------- card grid ---------- */
.card-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.6rem; }
.card-link { display: flex; flex-direction: column; height: 100%; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); transition: transform .22s ease, box-shadow .22s ease; }
.card-link:hover { transform: translateY(-4px); text-decoration: none; box-shadow: var(--shadow); }
.card-cover { display: block; height: 9.5rem; background-size: cover; background-position: center; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 1.25rem 1.25rem 1.4rem; }
.card-title { font-family: var(--serif); font-size: 1.18rem; font-weight: 600; color: var(--text); line-height: 1.2; margin-top: 0.7rem; }
.card-excerpt { color: var(--muted); font-size: 0.95rem; margin-top: 0.45rem; flex: 1; }
.card-meta { color: var(--muted); font-size: 0.8rem; margin-top: 0.9rem; }

/* category pill */
.cat-pill {
  display: inline-block; align-self: flex-start; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: var(--cat, var(--accent));
  padding: 0.22rem 0.66rem; border-radius: 999px;
}
a.cat-pill:hover { text-decoration: none; filter: brightness(1.08); }

/* filter chips */
.filter-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 2rem; }
.chip { font-size: 0.85rem; font-weight: 500; color: var(--muted); border: 1px solid var(--border); padding: 0.35rem 0.85rem; border-radius: 999px; transition: all .18s; }
.chip:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.empty { color: var(--muted); font-style: italic; }

/* ---------- article ---------- */
.article-cover { height: clamp(180px, 30vw, 300px); background-size: cover; background-position: center; }
.article { max-width: var(--measure); }
.article-header { padding: 2.5rem 0 1.5rem; }
.article-header h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0.9rem 0 0; }
.article-lede { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1.2rem; margin: 0.9rem 0 0; }
.article-meta { color: var(--muted); font-size: 0.88rem; margin: 1.1rem 0 0; }

.prose { font-size: 1.1rem; }
.prose p { text-align: justify; text-justify: inter-word; -webkit-hyphens: auto; hyphens: auto; }
.prose > p:first-of-type::first-letter {
  font-family: var(--serif); float: left; font-size: 3.6rem; line-height: 0.8;
  padding: 0.25rem 0.6rem 0 0; color: var(--accent); font-weight: 600;
}
.prose h2 { font-size: 1.6rem; margin-top: 2.4rem; }
.prose h3 { font-size: 1.28rem; margin-top: 1.9rem; }
.prose img { max-width: 100%; height: auto; border-radius: 10px; }
.prose blockquote {
  margin: 1.8rem 0; padding: 0.4rem 1.3rem; border-left: 3px solid var(--accent);
  color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 1.18rem;
}
.prose code { background: var(--code-bg); padding: 0.12em 0.38em; border-radius: 5px; font-size: 0.88em; }
.prose pre { background: var(--code-bg); padding: 1.1rem 1.2rem; border-radius: 10px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2.6rem 0; }

.tags { margin-top: 2rem; }
.tag { display: inline-block; font-size: 0.78rem; color: var(--muted); background: var(--code-bg); padding: 0.14rem 0.6rem; border-radius: 999px; margin-right: 0.4rem; }
.back-link { display: inline-block; margin-top: 2.5rem; font-size: 0.95rem; font-weight: 500; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 2rem; padding: 2.5rem 0; }
.foot-cats { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin-bottom: 1rem; }
.foot-cats a { color: var(--muted); font-size: 0.9rem; }
.foot-cats a:hover { color: var(--accent); }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 0.6rem; }
.site-footer .links a { color: var(--muted); font-size: 0.9rem; }
.copy { color: var(--muted); font-size: 0.85rem; margin: 0; }

/* ---------- reveal animation ---------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 70ms); }
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .featured-link { grid-template-columns: 1fr; }
  .featured-cover { min-height: 200px; }
  .featured-body { padding: 1.6rem; }
}
