/* =====================================================================
   Hari Krishan Mayer — warm storybook-literary theme
   ===================================================================== */

:root {
  --paper:      #FBF7EF;
  --paper-2:    #F4ECDD;
  --card:       #FFFDF8;
  --ink:        #2B2A28;
  --ink-soft:   #55504A;
  --muted:      #857C6E;
  --line:       #E7DDC9;
  --teal:       #216B67;
  --teal-deep:  #184F4C;
  --marigold:   #E1913B;
  --marigold-2: #F2C572;
  --coral:      #D96A4A;
  --plum:       #6B3B52;
  --shadow:     0 14px 40px -18px rgba(43, 42, 40, 0.35);
  --shadow-sm:  0 6px 18px -10px rgba(43, 42, 40, 0.35);
  --radius:     18px;
  --radius-sm:  12px;
  --serif:      "Fraunces", Georgia, "Times New Roman", serif;
  --sans:       "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(1200px 500px at 85% -10%, rgba(226, 197, 114, 0.20), transparent 60%),
    radial-gradient(900px 500px at -10% 5%, rgba(33, 107, 103, 0.10), transparent 55%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

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

.wrap { width: min(1120px, 92vw); margin: 0 auto; }

/* ---- Header / nav ------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 247, 239, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--serif); font-weight: 600; font-size: 1.15rem;
  color: var(--ink); letter-spacing: 0.2px;
}
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  background: var(--teal); color: #fff; border-radius: 11px;
  box-shadow: var(--shadow-sm);
}
.brand .mark svg { width: 22px; height: 22px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  color: var(--ink-soft); font-weight: 600; font-size: 0.96rem;
  padding: 8px 14px; border-radius: 999px; transition: all .18s ease;
}
.nav-links a:hover { background: var(--paper-2); color: var(--ink); text-decoration: none; }
.nav-links a.active { background: var(--teal); color: #fff; }

/* ---- Buttons ----------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-weight: 700; font-size: 0.98rem;
  padding: 12px 22px; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--teal); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--teal-deep); }
.btn-accent { background: var(--marigold); color: #3a2a12; box-shadow: var(--shadow-sm); }
.btn-accent:hover { background: #d0812c; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

/* ---- Hero -------------------------------------------------------- */
.hero { padding: 78px 0 56px; }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 54px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase;
  font-size: 0.72rem; color: var(--coral); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--coral); border-radius: 2px; }
h1.display {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.5rem, 6vw, 4.1rem); line-height: 1.02;
  margin: 0 0 20px; letter-spacing: -0.5px;
}
h1.display em { font-style: italic; color: var(--teal); }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 44ch; margin: 0 0 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* Portrait card */
.portrait {
  position: relative; border-radius: 26px; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait .placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background:
    radial-gradient(120% 120% at 30% 10%, rgba(242,197,114,.5), transparent 55%),
    linear-gradient(160deg, #2b6f6b, #184f4c);
  color: #fbf7ef;
}
.portrait .placeholder svg { width: 44%; height: 44%; opacity: .92; }
.portrait::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 8px rgba(255,255,255,.35); border-radius: 26px;
}
.portrait-tag {
  position: absolute; left: 16px; bottom: 16px;
  background: rgba(251,247,239,.94); color: var(--ink);
  padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: .85rem;
  box-shadow: var(--shadow-sm);
}

/* ---- Section scaffolding ---------------------------------------- */
section.block { padding: 62px 0; }
.section-head { max-width: 60ch; margin-bottom: 38px; }
.section-head h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin: 8px 0 12px; letter-spacing: -0.3px;
}
.section-head p { color: var(--ink-soft); font-size: 1.08rem; margin: 0; }
.divider-leaf { display: flex; align-items: center; gap: 14px; color: var(--marigold); margin: 6px 0 34px; }
.divider-leaf::before, .divider-leaf::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.divider-leaf svg { width: 26px; height: 26px; }

/* ---- About band -------------------------------------------------- */
.about { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.prose p { font-size: 1.1rem; color: var(--ink-soft); margin: 0 0 18px; }
.prose p:first-of-type::first-letter {
  font-family: var(--serif); font-size: 3.4rem; line-height: .8; float: left;
  padding: 6px 12px 0 0; color: var(--teal);
}
.stat-cards { display: grid; gap: 16px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow-sm);
  display: flex; align-items: baseline; gap: 16px;
}
.stat .num { font-family: var(--serif); font-size: 1.9rem; color: var(--teal); font-weight: 600; }
.stat .lab { color: var(--muted); font-weight: 700; letter-spacing: .3px; }

/* ---- Books ------------------------------------------------------- */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 30px; }
.book {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease;
  display: flex; flex-direction: column;
}
.book:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.book-cover { aspect-ratio: 3 / 4; overflow: hidden; background: var(--paper-2); }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover .ph {
  width: 100%; height: 100%; display: grid; place-items: center; text-align: center;
  padding: 20px;
  background: linear-gradient(160deg, var(--marigold-2), var(--marigold));
  color: #4a3413;
}
.book-cover .ph .ph-title { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; }
.book-cover .ph svg { width: 40px; height: 40px; opacity: .8; margin-bottom: 10px; }
.book-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.book-body h3 { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; margin: 0; }
.book-year { color: var(--coral); font-weight: 800; font-size: .82rem; letter-spacing: .5px; }
.book-body p { color: var(--ink-soft); font-size: .96rem; margin: 2px 0 0; }
.book-link { margin-top: auto; padding-top: 10px; font-weight: 700; }

/* ---- Press / Archive -------------------------------------------- */
.press-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.clip {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.clip:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.clip-img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-2); position: relative; }
.clip-img img { width: 100%; height: 100%; object-fit: cover; }
.clip-img .ph {
  width: 100%; height: 100%; display: grid; place-items: center;
  background:
    repeating-linear-gradient(90deg, rgba(133,124,110,.10) 0 2px, transparent 2px 7px),
    var(--paper-2);
  color: var(--muted);
}
.clip-img .ph svg { width: 46px; height: 46px; opacity: .6; }
.clip-pub {
  position: absolute; top: 12px; left: 12px;
  background: rgba(43,42,40,.82); color: #fbf7ef; backdrop-filter: blur(4px);
  padding: 5px 12px; border-radius: 999px; font-size: .78rem; font-weight: 800; letter-spacing: .3px;
}
.clip-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.clip-date { color: var(--muted); font-weight: 700; font-size: .8rem; letter-spacing: .4px; text-transform: uppercase; }
.clip-body h3 { font-family: var(--serif); font-weight: 600; font-size: 1.22rem; margin: 0; line-height: 1.2; }
.clip-body p { color: var(--ink-soft); font-size: .96rem; margin: 0; }
.clip-link { margin-top: auto; padding-top: 12px; display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
.clip-link svg { width: 15px; height: 15px; }

/* ---- Empty state ------------------------------------------------- */
.empty {
  text-align: center; padding: 70px 24px; color: var(--muted);
  border: 2px dashed var(--line); border-radius: var(--radius); background: var(--card);
}
.empty svg { width: 54px; height: 54px; opacity: .5; margin-bottom: 14px; }
.empty h3 { font-family: var(--serif); color: var(--ink-soft); margin: 0 0 6px; }

/* ---- CTA band ---------------------------------------------------- */
.cta-band {
  background: linear-gradient(150deg, var(--teal), var(--teal-deep));
  color: #fbf7ef; border-radius: 26px; padding: 46px 44px; box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
}
.cta-band h2 { font-family: var(--serif); font-weight: 600; font-size: 1.9rem; margin: 0 0 8px; }
.cta-band p { margin: 0; opacity: .9; max-width: 46ch; }

/* ---- Footer ------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--line); margin-top: 20px; padding: 40px 0; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot .brand { font-size: 1.05rem; }
.foot small { color: var(--muted); }
.foot-links { display: flex; gap: 18px; }
.foot-links a { color: var(--ink-soft); font-weight: 600; }

/* ---- Responsive -------------------------------------------------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .portrait { max-width: 360px; }
  .about-grid { grid-template-columns: 1fr; gap: 30px; }
  .nav-links a { padding: 8px 10px; font-size: .9rem; }
  .brand span.full { display: none; }
}
@media (max-width: 520px) {
  .hero { padding: 46px 0 34px; }
  .cta-band { padding: 32px 26px; }
}

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
