/* =========================================================
   AUTHOR PAGE — style.css
   Sections:
   1. Colors & basic setup
   2. Hero (upar ka photo + naam)
   3. Buttons
   4. Tabs
   5. Layout (main + Quick Facts)
   6. About, Quotes, Syllabus, Videos, Books
   7. Poem list (kavitayein)
   8. Popups (Share + Kavita padhne wala)
   9. Today's Sootradhar
   10. Mobile / Tablet (responsive)
   ========================================================= */


/* ---------------------------------------------------------
   1. COLORS & BASIC SETUP
   Rang badalna ho to sirf yahi values badlo
   --------------------------------------------------------- */
:root {
  --bg: #FFFDF9;         /* page ka background */
  --surface: #FFFDF9;    /* card ka background */
  --soft: #F0E4D2;       /* halka brown (tag, quote card) */
  --ink: #493321;        /* heading ka gehra rang */
  --text: #30271F;       /* normal text */
  --mute: #6b5846;       /* halka text (chhoti details) */
  --line: #e0d0b8;       /* border / line */
  --sun: #805633;        /* main brown rang */
  --sun-ink: #805633;    /* link ka rang */
  --btn: #805633;        /* button ka background */
  --btn-text: #fff;      /* button ka text */
  --hero: #F0E4D2;       /* hero ka background */

  --serif: "Noto Serif Devanagari", Cambria, Georgia, serif;  /* heading font */
  --sans: "Hind", Calibri, Arial, sans-serif;                 /* normal font */

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Dark mode (phone/computer dark ho to) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1610;
    --surface: #1c1610;
    --soft: #2b2118;
    --ink: #f3e6d3;
    --text: #e8dccb;
    --mute: #b9a78f;
    --line: #41342a;
    --sun: #c99564;
    --sun-ink: #d9ab7c;
    --btn: #c99564;
    --btn-text: #1c1610;
    --hero: #2b2118;
  }
}

/* Dark mode (Theme button dabane par) */
:root[data-theme="dark"] {
  --bg: #1c1610;
  --surface: #1c1610;
  --soft: #2b2118;
  --ink: #f3e6d3;
  --text: #e8dccb;
  --mute: #b9a78f;
  --line: #41342a;
  --sun: #c99564;
  --sun-ink: #d9ab7c;
  --btn: #c99564;
  --btn-text: #1c1610;
  --hero: #2b2118;
}

*, *::before, *::after {
  box-sizing: inherit;
}

html {
  height: 100%;
  scroll-padding-top: env(safe-area-inset-top, 0px);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.7 var(--sans);
  overflow-x: clip;   /* side scroll band, par sticky kaam karta rehta hai */
}

button, a {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
}

/* Page ka beech wala container (left-right space yahi se aata hai) */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: clamp(16px, 4vw, 44px);
  padding-right: clamp(16px, 4vw, 44px);
}

/* section {
  margin-bottom: 44px;
} */

h2 {
  margin: 0 0 14px;
  font: 700 clamp(22px, 3vw, 28px)/1.3 var(--serif);
  color: var(--ink);
}

.head {                      /* heading + "View all" ek line me */
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.more {                      /* "View all" jaisa link-button */
  background: none;
  border: 0;
  color: var(--sun-ink);
  font-weight: 600;
  padding: 4px 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.meta {
  margin: 2px 0 0;
  color: var(--mute);
  font-size: 14.5px;
}

.pane[hidden] {              /* band tab chhupa rahe */
  display: none;
}


/* ---------------------------------------------------------
   2. HERO (photo, naam, stats)
   --------------------------------------------------------- */
.hero {
  background: var(--hero);
  position: relative;
  overflow: hidden;
  padding: 48px 0 40px;
}

.hero .wrap {
  position: relative;
  display: flex;
  gap: 32px;
  align-items: center;
}

.sun {                       /* gol photo ka ring */
  flex: none;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  padding: 5px;
  background: var(--btn);
}

.sun img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 4px solid var(--hero);
  filter: grayscale(1) contrast(1.05);   /* black & white photo */
}

.role {
  margin: 0 0 6px;
  color: var(--sun);
  font-weight: 600;
  font-size: 15px;
}

h1 {
  margin: 0;
  font: 800 clamp(30px, 5vw, 52px)/1.15 var(--serif);
}

.en {
  margin: 2px 0 0;
  font: 500 clamp(17px, 2.4vw, 22px) var(--serif);
  opacity: .85;
}

.dates {
  margin: 10px 0 0;
  color: var(--mute);
  font-size: 16px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 16px 0 20px;
}

.stats b {
  font: 700 24px var(--serif);
  color: var(--sun);
  margin-right: 6px;
}

.stats span {
  color: var(--mute);
  font-size: 15px;
}

/* Theme button (upar right me) */
.theme {
  position: absolute;
  right: 20px;
  top: 16px;
  z-index: 2;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 14px;
}


/* ---------------------------------------------------------
   3. BUTTONS
   --------------------------------------------------------- */
/* Bhara hua brown button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 10px 20px;
  background: var(--btn);
  color: var(--btn-text);
  font-weight: 600;
}

.btn:hover {
  filter: brightness(1.07);
}

/* Sirf border wala button (Copy, Share, Close) */
.btn.ghost {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--text);
  padding: 6px 14px;
  font-size: 15px;
}

.btn.ghost:hover {
  border-color: var(--btn);
  background: var(--bg);
}


/* ---------------------------------------------------------
   4. TABS (All / About / Poetry ...)
   --------------------------------------------------------- */
.tabs {
  position: sticky;          /* scroll par upar chipka rahe */
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.tabs .wrap {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs .wrap::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: none;
  background: none;
  border: 0;
  padding: 15px 14px 12px;
  color: var(--mute);
  font-weight: 500;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

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

/* Jo tab khula hai */
.tab[aria-selected=true] {
  color: var(--ink);
  font-weight: 600;
  border-bottom-color: var(--sun);
}

/* Tab ke andar chhota number (jaise 23) */
.tab i {
  font-style: normal;
  font-size: 13px;
  background: var(--soft);
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 6px;
}

.tab i.hot,
.tab[aria-selected=true] i {
  background: var(--btn);
  color: var(--btn-text);
}


/* ---------------------------------------------------------
   5. LAYOUT (left me content, right me Quick Facts)
   --------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;   /* left | right 300px */
  gap: 36px;
  padding: 32px 0 64px;
  align-items: start;
}

aside {                      /* Quick Facts scroll par fixed rahe */
  position: sticky;
  top: 76px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
}

.facts h3 {
  margin: 0 0 10px;
  font: 700 18px var(--serif);
  color: var(--ink);
}

.facts dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  font-size: 15px;
}

.facts dt {
  color: var(--mute);
}

.facts dd {
  margin: 0;
  font-weight: 600;
}


/* ---------------------------------------------------------
   6. ABOUT, QUOTES, SYLLABUS, VIDEOS, BOOKS
   --------------------------------------------------------- */

/* About */
.prose {
  max-width: 68ch;
}

/* Quick Answers (+ / – wale sawal) */
details {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  font: 700 22px/1 var(--sans);
  color: var(--sun-ink);
}

details[open] summary::after {
  content: "–";
}

details p {
  margin: 8px 0 0;
  color: var(--mute);
}

/* Quotes (2 column me cards) */
.quotes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.q {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.q::before {                 /* bada " nishan */
  content: "“";
  position: absolute;
  top: 2px;
  left: 16px;
  font: 800 64px/1 var(--serif);
  color: var(--sun);
}

.q blockquote {
  margin: 26px 0 0;
  font: 500 19px/1.8 var(--serif);
  color: var(--ink);
}

.q cite {
  font-style: normal;
  font-weight: 600;
  color: var(--sun-ink);
  font-size: 15px;
}

.acts {                      /* Copy / Share / Download buttons ki row */
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

/* "Load more" / "View more" button ki jagah */
.moreWrap {
  text-align: center;
  margin-top: 24px;
}

.moreWrap .btn[hidden] {
  display: none;
}

/* Syllabus */
.sy {
  display: grid;
}

.sy > div {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.sy h4 {
  margin: 0;
  font: 700 18px/1.4 var(--serif);
  color: var(--ink);
}

.cls {                       /* number wala chhota dabba */
  background: var(--btn);
  color: var(--btn-text);
  border-radius: 8px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  padding: 4px 6px;
}

.board {
  margin: 22px 0 4px;
  font: 700 14px var(--sans);
  color: var(--sun-ink);
}

.en2 {
  font: 500 15px var(--sans);
  color: var(--mute);
}

.src {
  color: var(--btn);
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
}

.src:hover {
  text-decoration: underline;
}

.rt {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

/* Videos */
.vids {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.vid {
  display: block;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.vid:hover {
  border-color: var(--sun);
}

.thumb {
  aspect-ratio: 16 / 9;
  background: var(--soft);
  display: grid;
  place-items: center;
}

.thumb::after {             /* play ka triangle */
  content: "";
  border-left: 26px solid var(--sun);
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  margin-left: 8px;
}

.vid p {
  margin: 0;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--ink);
}

/* Books */
.shelf {
  text-align: center;
  padding: 36px 22px;
}


/* ---------------------------------------------------------
   7. POEM LIST (kavitayein)
   Ek kavita = title + 2 lines + neeche tag / read / share
   --------------------------------------------------------- */
.pfeed {
  display: block;
  border-top: 1px solid var(--line);
  text-align: left;
}

.pi {                        /* ek kavita ka poora dabba */
  display: block;
  width: 100%;
  margin: 0;
  padding: 22px 4px 20px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.pi-t {                      /* kavita ka title */
  display: block;
  margin: 0 0 8px;
  font: 700 21px/1.4 var(--serif);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.pi-t:hover {
  color: var(--sun-ink);
}

.pi-x {                      /* pehli 2 lines (left me brown line ke saath) */
  margin: 0 0 12px;
  padding-left: 14px;
  border-left: 3px solid var(--sun);
  font: 500 17.5px/1.9 var(--serif);
  color: var(--text);
  cursor: pointer;
  overflow-wrap: anywhere;
}

.pi-f {                      /* neeche ki row: tag, min read, link, Share */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0;
}

.pi-tag {                    /* "कविता" wala chhota tag */
  display: inline-block;
  background: var(--soft);
  color: var(--text);
  border-radius: 6px;
  padding: 0 8px;
  font-size: 13.5px;
}

.pi-m {                      /* "1 min read" */
  color: var(--mute);
  font-size: 14px;
}

.pi-r {                      /* "पूरी कविता पढ़ें →" */
  color: var(--sun-ink);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}

.pi-r:hover {
  text-decoration: underline;
}

.pi-s {                      /* Share button (right side me) */
  margin-left: auto;
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 14.5px;
  font-weight: 600;
}

.pi-s:hover {
  border-color: var(--btn);
  background: var(--soft);
}


/* ---------------------------------------------------------
   8. POPUPS (screen ke bilkul beech me)
   #dlg = Share popup,  #rd = kavita padhne wala popup
   --------------------------------------------------------- */
dialog {
  position: fixed;
  inset: 0;
  margin: auto;                          /* beech me laata hai */
  width: min(440px, calc(100% - 32px));
  max-width: calc(100% - 32px);
  max-height: calc(100% - 32px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 60px -12px rgba(30, 20, 10, .45);
}

dialog[open] {
  animation: dpop .22s ease-out;         /* halka upar aane ka effect */
}

dialog::backdrop {                       /* peeche ka dhundhla parda */
  background: rgba(20, 14, 8, .55);
  backdrop-filter: blur(3px);
}

@keyframes dpop {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

/* Share popup ke andar */
.apps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.apps a {
  text-align: center;
  text-decoration: none;
  background: var(--soft);
  border-radius: 12px;
  padding: 12px 6px;
  font-weight: 600;
  font-size: 15px;
}

.apps a:hover {
  outline: 2px solid var(--sun);
}

.copy {
  display: flex;
  gap: 8px;
}

.copy input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
}

/* Kavita padhne wala popup */
#rd {
  width: min(640px, calc(100% - 32px));
  max-height: min(86vh, 820px);
  padding: 0;
  overflow: hidden;
}

#rd[open] {
  display: flex;
  flex-direction: column;
}

#rd .head {                  /* upar ki patti: title + Close */
  align-items: center;
  padding: 16px 20px 14px 26px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}

#rd .head h2 {
  font: 700 clamp(19px, 3vw, 24px)/1.35 var(--serif);
  color: var(--ink);
}

.lines {
  margin: 4px 0 0;
  font: 500 16px/1.7 var(--serif);
  white-space: pre-line;                 /* kavita ki lines jaisi hain waisi */
}

#rd .lines {                 /* kavita ka text (lambi ho to sirf ye scroll hota hai) */
  flex: 1;
  overflow-y: auto;
  margin: 0;
  padding: 26px 26px 30px;
  text-align: center;
  font: 500 clamp(17px, 2.4vw, 20px)/2 var(--serif);
  color: var(--text);
  -webkit-overflow-scrolling: touch;
}

/* Neeche aane wala chhota "Copied" message */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 30px);
  background: var(--ink);
  color: var(--bg);
  padding: 10px 20px;
  border-radius: 999px;
  opacity: 0;
  transition: .25s;
  pointer-events: none;
  z-index: 99;
  font-weight: 600;
}

#toast.on {
  opacity: 1;
  transform: translate(-50%, 0);
}


/* ---------------------------------------------------------
   9. TODAY'S SOOTRADHAR (cards ka slider)
   --------------------------------------------------------- */
.soot {
  padding-top: 8px;
  padding-bottom: 64px;
}

.soot .top {                 /* heading (left) + arrows (right) */
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.soot .eyebrow {             /* "TODAY'S SOOTRADHAR" chhota text */
  margin: 0 0 4px;
  font: 700 12px var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sun-ink);
}

.soot h2 em {                /* "सूत्रधार" brown rang me */
  font-style: normal;
  color: var(--sun);
}

.soot .ctl {
  display: flex;
  align-items: center;
  gap: 12px;
}

.soot .ctl .more {
  padding: 0;
}

.nav {                       /* gol arrow buttons ‹ › */
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  flex: none;
  background: var(--btn);
  color: var(--btn-text);
  font-size: 20px;
  line-height: 1;
}

.nav:hover {
  filter: brightness(1.1);
}

.track {                     /* cards ki row jo side me scroll hoti hai */
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 16px 2px 28px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.track::-webkit-scrollbar {
  display: none;
}

.sc {                        /* ek card */
  --n: 5;                    /* ek saath kitne cards dikhen (desktop: 5) */
  flex: 0 0 calc((100% - 16px * (var(--n) - 1)) / var(--n));
  min-width: 0;
  scroll-snap-align: start;
  position: relative;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 30px 14px 16px;
  text-align: center;
  box-shadow: 0 10px 18px -12px rgba(73, 51, 33, .45);
  transform: rotate(-.6deg);             /* halka tirchha (tag jaisa look) */
}

.sc:nth-child(even) {
  transform: rotate(.5deg);
}

.sc::before {                /* upar ka chhota chhed */
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 11px;
  height: 11px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
}

.ring {                      /* naam ka pehla akshar gol me */
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 12px;
  border-radius: 50%;
  border: 2px solid var(--sun);
  outline: 2px solid var(--sun);
  outline-offset: 3px;
  background: var(--bg);
}

.ring b {
  font: 500 28px var(--serif);
  color: var(--ink);
}

.sc h3 {                     /* kavi ka naam */
  margin: 0 0 12px;
  min-height: 3em;
  font: 500 16px/1.5 var(--serif);
  color: var(--ink);
  overflow-wrap: anywhere;
}

.sc dl {                     /* जन्म / निधन ki rows */
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 8px;
  font-size: 13.5px;
  text-align: left;
}

.sc dt {
  color: var(--mute);
  border-top: 1px dotted var(--line);
  padding-top: 6px;
}

.sc dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
  border-top: 1px dotted var(--line);
  padding-top: 6px;
}

/* "See All" dabane par saare cards grid me khul jate hain */
.soot.all .track {
  flex-wrap: wrap;
  overflow: visible;
  scroll-snap-type: none;
}

.soot.all .nav {
  display: none;
}


/* ---------------------------------------------------------
   10. MOBILE / TABLET (responsive)
   --------------------------------------------------------- */

/* Tablet (900px se chhoti screen) */
@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;          /* ek hi column */
    gap: 24px;
    padding-top: 24px;
  }

  aside {                                /* Quick Facts upar aa jata hai */
    position: static;
    order: -1;
  }

  .sc {
    --n: 3;                              /* 3 cards */
  }
}

/* Mobile (640px se chhoti screen) */
@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .hero {
    padding: 56px 0 28px;
  }

  .hero .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .sun {
    width: 112px;
    height: 112px;
  }

  .quotes {
    grid-template-columns: 1fr;          /* quotes ek ke neeche ek */
  }

  .sy > div {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .rt {
    flex-direction: row;
    align-items: center;
  }

  .pi {
    padding: 18px 0;
  }

  .pi-t {
    font-size: 19px;
  }

  .pi-x {
    font-size: 16.5px;
  }

  .sc {
    --n: 2;                              /* 2 cards */
    padding: 28px 10px 14px;
  }

  .ring {
    width: 56px;
    height: 56px;
  }

  .ring b {
    font-size: 23px;
  }

  .sc h3 {
    font-size: 15px;
  }

  .soot {
    padding-bottom: 48px;
  }
}

/* Bahut chhota phone (380px se chhota) */
@media (max-width: 380px) {
  .sc {
    --n: 1;                              /* 1 card */
  }
}

/* Jinhe animation pasand nahi (phone ki setting) */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }

  dialog[open] {
    animation: none;
  }
}