:root {
  --bg: #f7f1e6;
  --bg-soft: #efe5d3;
  --card: #fffcf6;
  --ink: #2a2118;
  --ink-soft: #6b5c4b;
  --line: #e1d3bc;
  --accent: #b5651d;      /* marigold / saffron, muted */
  --accent-ink: #ffffff;
  --gold: #c99a3c;
  --error: #a33a2a;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 6px 24px rgba(60, 40, 20, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17130f;
    --bg-soft: #201a14;
    --card: #231d16;
    --ink: #f1e8da;
    --ink-soft: #b9a990;
    --line: #3a3026;
    --accent: #d9893c;
    --accent-ink: #1a120a;
    --gold: #e0b45a;
    --error: #ef8a77;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 24px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 Inter, system-ui, sans-serif;
}
h1, h2, h3 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; line-height: 1.15; margin: 0; }
a { color: var(--accent); }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 24px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: "Tiro Devanagari Hindi", serif; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
.topbar nav { display: flex; gap: 20px; }
.topbar nav a { color: var(--ink-soft); text-decoration: none; font-size: .9rem; font-weight: 500; }
.topbar nav a:hover, .topbar nav a[aria-current="page"] { color: var(--accent); }
.topbar nav { margin-left: auto; }
.topbar-signout {
  font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
  color: var(--accent); background: transparent;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 999px; padding: 6px 14px; white-space: nowrap;
}
.topbar-signout:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }

.hero {
  text-align: center;
  padding: 64px 16px 72px;
  background:
    radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.portrait {
  position: relative;
  width: 200px; height: 240px; margin: 0 auto 28px;
  border-radius: 100px 100px 12px 12px;
  overflow: hidden;
  border: 3px solid var(--gold);
  box-shadow: var(--shadow), 0 0 0 8px color-mix(in srgb, var(--gold) 15%, transparent);
  background: var(--bg-soft);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.portrait-fallback { display: none; }
.portrait.no-photo .portrait-fallback {
  display: grid; place-items: center; height: 100%;
  font-family: "Tiro Devanagari Hindi", serif; font-size: 5rem; color: var(--gold);
}
.eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: .78rem; color: var(--ink-soft); margin: 0 0 8px; }
.hero h1 { font-size: clamp(2.6rem, 8vw, 4.5rem); }
.birth-name { margin: 4px 0 0; color: var(--ink-soft); font-style: italic; font-family: "Cormorant Garamond", serif; font-size: 1.2rem; }
.dates { margin: 12px 0 0; font-weight: 500; letter-spacing: .04em; }
.hindi-line { font-family: "Tiro Devanagari Hindi", serif; color: var(--accent); margin: 14px 0 0; font-size: 1.1rem; }
.lede { max-width: 560px; margin: 20px auto 0; color: var(--ink-soft); }
.hero-stats { display: flex; justify-content: center; gap: 40px; margin: 28px 0; }
.hero-stats strong { display: block; font-family: "Cormorant Garamond", serif; font-size: 2rem; color: var(--accent); }
.hero-stats span { font-size: .82rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .1em; }

.panel { max-width: 780px; margin: 0 auto; padding: 64px 16px; }
.panel + .panel { border-top: 1px solid var(--line); }
.panel h2 { font-size: 2.3rem; margin-bottom: 20px; text-align: center; }
.prose p { margin: 0 0 1em; }
.prose h3 { font-size: 1.4rem; margin: 1.6em 0 .4em; }
.section-sub { text-align: center; color: var(--ink-soft); max-width: 560px; margin: -8px auto 28px; }

.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 0 0 22px 20px; position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 8px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--gold);
}
.timeline span { font-weight: 600; color: var(--accent); padding-top: 2px; }
.timeline h3 { font-size: 1.35rem; }
.timeline p { margin: 2px 0 0; color: var(--ink-soft); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 600; cursor: pointer;
  border-radius: 999px; padding: 12px 24px; border: 1px solid transparent;
  text-decoration: none; transition: transform .1s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); display: flex; margin: 20px auto 0; }
.btn-social { width: 100%; max-width: 320px; border-color: var(--line); }
.btn-social svg { width: 20px; height: 20px; }
.btn-social.google { background: #fff; color: #1f1f1f; border-color: #dadce0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); }
.auth-card { text-align: center; }
.auth-card > p:first-child { margin: 0 0 16px; font-weight: 500; }
.auth-buttons { display: flex; flex-direction: column; align-items: center; gap: 10px; }

.notice {
  background: color-mix(in srgb, var(--gold) 14%, var(--card));
  border: 1px solid color-mix(in srgb, var(--gold) 40%, var(--line));
  border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-size: .9rem;
}
.notice code { font-size: .85em; }

.form-card { display: flex; flex-direction: column; gap: 8px; }
.who { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.who strong { display: block; }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; font-size: .85rem; }
label { font-size: .88rem; font-weight: 500; margin-top: 6px; }
.optional { color: var(--ink-soft); font-weight: 400; }
input, textarea {
  font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%;
}
input:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); border-color: var(--accent); }
textarea { resize: vertical; min-height: 120px; }
.form-foot { display: flex; justify-content: space-between; align-items: center; font-size: .85rem; color: var(--ink-soft); margin-bottom: 8px; }
.diya-check { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; color: var(--ink); cursor: pointer; }
.diya-check input { width: auto; }
.error { color: var(--error); font-size: .88rem; margin: 8px 0 0; }

.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--bg-soft); flex: none; }
.avatar.initials { display: grid; place-items: center; font-weight: 600; color: var(--accent); border: 1px solid var(--line); }

.wall-head { display: flex; justify-content: space-between; align-items: baseline; margin: 44px 0 14px; }
.wall-head h3 { font-size: 1.6rem; }
.wall-head span { color: var(--ink-soft); font-size: .88rem; }
.wall { display: flex; flex-direction: column; gap: 14px; }
.empty { text-align: center; color: var(--ink-soft); padding: 24px; }
.msg { display: grid; grid-template-columns: 44px 1fr; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.msg-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.msg-head strong { font-weight: 600; }
.msg-meta { color: var(--ink-soft); font-size: .8rem; }
.msg-body { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: .82rem; color: var(--ink-soft); }
.msg-diya { color: var(--gold); }

.footer { text-align: center; padding: 40px 16px 56px; color: var(--ink-soft); font-size: .82rem; border-top: 1px solid var(--line); }
.footer p { margin: 4px 0; }

@media (max-width: 560px) {
  .topbar { padding: 10px 16px; }
  .topbar nav { gap: 14px; }
  .topbar nav a { font-size: .82rem; }
  .brand { font-size: 1.05rem; }
  .topbar nav a { white-space: nowrap; }
  .panel { padding: 48px 16px; }
  .timeline li { grid-template-columns: 48px 1fr; gap: 10px; }
  .card { padding: 18px; }
  .msg { padding: 14px; gap: 10px; grid-template-columns: 36px 1fr; }
  .msg .avatar { width: 36px; height: 36px; }
}

/* Links from His Work to the extra pages */
.more-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 32px; }
.more-card {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  padding: 20px 44px 20px 20px; border-radius: 14px; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: border-color .15s, transform .15s;
}
.more-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.more-card strong { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.5rem; font-weight: 600; }
.more-card span { color: var(--ink-soft); font-size: .9rem; }
.more-card .more-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; color: var(--accent); }
.more-arrow { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--accent) !important; }

/* Inner pages (service, loved) */
.hero-slim { padding: 56px 16px 48px; }
.hero-slim .lede { max-width: 620px; }
.service-gap { margin-top: 56px; }
.service-card {
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: 14px; padding: 20px 22px; margin: 0 0 16px; box-shadow: var(--shadow);
}
.service-card h3 { font-size: 1.45rem; margin: 2px 0 8px !important; }
.service-card p:last-child { margin-bottom: 0; }
.service-year { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.service-quote {
  margin: 40px 0; padding: 8px 0 8px 20px; border-left: 3px solid var(--accent);
  font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-size: 1.4rem; line-height: 1.4;
}
.service-quote p { margin: 0; }
.service-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 32px 0; }
.btn-ghost-inline { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.sources { margin-top: 24px; font-size: .88rem; color: var(--ink-soft); }
.sources summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.sources ul { padding-left: 18px; }
.sources li { margin: 4px 0; }

.loved-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.loved-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.loved-card h3 { font-size: 1.45rem; margin: 10px 0 8px !important; }
.loved-card p { margin: 0; color: var(--ink-soft); }
.loved-card a { white-space: nowrap; }
.loved-icon { font-size: 1.8rem; line-height: 1; }

/* Phones: the top-bar links scroll sideways instead of wrapping */
@media (max-width: 760px) {
  .topbar nav {
    flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 16px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 16px), transparent 100%);
    padding: 4px 12px;
  }
  .topbar nav::-webkit-scrollbar { display: none; }
  .topbar nav a { white-space: nowrap; flex: none; }
  .topbar .brand, .topbar-signout { flex: none; }
  .topbar { gap: 8px; }
}
.more-links-top { margin: 0 0 36px; }

/* Gallery */
.gallery-panel { max-width: 1100px; }
.g-filters { display: flex; justify-content: center; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.g-filter {
  font: inherit; font-size: .9rem; font-weight: 500; cursor: pointer; color: var(--ink-soft);
  background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px;
}
.g-filter.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.g-grid { columns: 3 280px; column-gap: 16px; }
.g-item {
  break-inside: avoid; margin: 0 0 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
}
.g-open { display: block; width: 100%; padding: 0; border: 0; background: var(--bg-soft); cursor: zoom-in; }
.g-open img { display: block; width: 100%; height: auto; transition: transform .25s; }
.g-open:hover img { transform: scale(1.02); }
.g-item figcaption { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.g-cap { font-weight: 500; font-size: .95rem; }
.g-credit { font-size: .75rem; color: var(--ink-soft); }
.g-credit a { color: var(--ink-soft); }
.g-note { text-align: center; color: var(--ink-soft); font-size: .85rem; max-width: 620px; margin: 24px auto 0; }
.g-viewer { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1200px); max-height: 94vh; color: #fff; }
.g-viewer::backdrop { background: rgba(10, 8, 6, .88); }
.g-viewer img { display: block; max-width: 100%; max-height: 84vh; margin: 0 auto; border-radius: 8px; }
.g-viewer p { text-align: center; margin: 10px 0 0; font-size: .95rem; }
.g-close {
  position: fixed; top: 14px; right: 16px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer;
}

/* Background piano button */
.music-btn {
  position: fixed; left: 16px; bottom: 16px; z-index: 20;
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
  color: var(--ink); background: color-mix(in srgb, var(--card) 92%, transparent);
  border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px;
  box-shadow: var(--shadow); backdrop-filter: blur(6px);
}
.music-btn:hover { border-color: var(--accent); }
.music-btn.is-playing { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.music-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.music-bars i { width: 3px; background: currentColor; border-radius: 1px; animation: music-bar 1s ease-in-out infinite; }
.music-bars i:nth-child(2) { animation-delay: -.3s; }
.music-bars i:nth-child(3) { animation-delay: -.6s; }
@keyframes music-bar { 0%, 100% { height: 4px; } 50% { height: 12px; } }
@media (prefers-reduced-motion: reduce) { .music-bars i { animation: none; height: 8px; } }
.music-credit { font-size: .75rem; opacity: .8; }
.footer { padding-bottom: 80px; }

/* Movies */
.movies-panel { max-width: 1000px; }
.m-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.m-card {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; box-shadow: var(--shadow);
}
.m-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--bg-soft); overflow: hidden; }
.m-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.m-thumb:hover img { transform: scale(1.04); }
.m-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .62); color: #fff; font-size: 1.3rem; padding-left: 4px;
}
.m-thumb-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none;
  background: radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--gold) 22%, var(--bg-soft)), var(--bg-soft));
}
.m-thumb-empty span { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.8rem; color: var(--ink); text-align: center; padding: 0 12px; }
.m-thumb-empty small { color: var(--accent); font-weight: 600; letter-spacing: .1em; }
.m-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.m-year { font-size: .78rem; font-weight: 600; letter-spacing: .1em; color: var(--accent); }
.m-body h3 { font-size: 1.5rem; margin: 2px 0 0; }
.m-role { margin: 2px 0 8px; color: var(--ink-soft); font-style: italic; font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.1rem; }
.m-note { margin: 0 0 14px; font-size: .92rem; }
.m-foot { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.m-watch { padding: 9px 18px; font-size: .9rem; }
.m-source { font-size: .75rem; color: var(--ink-soft); }
