/* Layout: a light page, one reading column for poems, colour only where the palette board places it. */
:root {
  /* रंग-पट्टिका */
  --ground: #FCFBF8;      /* उजला: पृष्ठ */
  --ink: #241D2E;         /* स्याही: पाठ, फ़ुटर */
  --name: #4E2F7A;        /* बैंगनी: सिर्फ़ नाम */
  --accent: #A4471F;      /* ज़ंग: एक बटन, लिंक */
  --accent-deep: #8A3A18;
  --leaf: #3E6B4F;        /* पत्ती: सिर्फ़ बेल की रेखा */
  --lavender: #F3EEF7;    /* कविता का खंड */
  --peach: #F7ECE5;       /* तस्वीरों की पृष्ठभूमि */
  --mint: #EDF2EC;        /* तस्वीरों की पृष्ठभूमि */
  --photo: #E7E2EA;
  --muted: #5D5568;
  --line: #DCD6E0;
  --on-accent: #FFFFFF;
  --on-dark: #F5F1F8;
  --on-dark-muted: #BDB4C8;
  --on-dark-name: #CDBDE3;
  --on-dark-line: #4A3F57;
  --on-dark-field: #8A7F99;

  /* अक्षर: बदलने हों तो यहाँ और build.js की FONTS_URL पंक्ति में */
  --font-name: 'Poppins', 'Noto Sans Devanagari', 'Kohinoor Devanagari', 'Nirmala UI', sans-serif;
  --font-text: var(--font-name);
  --font-hand: 'Kalam', var(--font-name);
  --font-ui: var(--font-name);

  --gutter: 24px;
  --section: clamp(64px, 10vw, 112px);
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 19px;
  line-height: 1.7;
}

main { flex: 1; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 500; text-wrap: balance; }

a { color: var(--ink); text-underline-offset: 5px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--name); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: var(--gutter); top: -80px; z-index: 5;
  padding: 10px 16px; background: var(--ink); color: var(--on-dark);
  font-family: var(--font-ui); font-size: 16px;
}
.skip:focus { top: 12px; color: var(--on-dark); }

.wrap {
  width: 100%;
  max-width: calc(1192px + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.wrap.narrow { max-width: calc(640px + 2 * var(--gutter)); }
.wrap.narrow-wide { max-width: calc(712px + 2 * var(--gutter)); }

.eyebrow { font-family: var(--font-ui); font-size: 16px; line-height: 1.5; color: var(--muted); }

/* शीर्ष */
.bar {
  padding: 22px 0;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 32px;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-family: var(--font-name); font-weight: 600; font-size: 30px; line-height: 1.3;
  text-decoration: none; color: var(--name);
}
.wordmark:hover { color: var(--name); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 30px; font-size: 19px; }
.nav a { text-decoration: none; padding: 12px 0; }
.nav a[aria-current] { color: var(--accent); }
.nav .with-tag { display: inline-flex; align-items: center; gap: 8px; }
.soon {
  display: inline-block;
  font-family: var(--font-ui); font-size: 13px; line-height: 1.6;
  padding: 1px 8px; border: 1px solid var(--accent); color: var(--accent);
}
.icons { display: flex; }
.icons a { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
@media (max-width: 900px) {
  .nav { order: 3; flex-basis: 100%; gap: 0 26px; }
}

/* मुख्य भाग */
.hero {
  padding-block: clamp(48px, 8vw, 88px) clamp(72px, 11vw, 120px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: clamp(48px, 6vw, 72px);
  align-items: center;
}
.hero-text { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.hero h1 {
  font-family: var(--font-name); font-weight: 600;
  font-size: clamp(84px, 11vw, 168px); line-height: 1.15; letter-spacing: -0.01em; color: var(--name);
}
.rule { width: 56px; height: 2px; background: var(--accent); }
.tagline { font-family: var(--font-hand); font-weight: 400; font-size: clamp(24px, 6.2vw, 31px); line-height: 1.6; max-width: 17em; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; margin-top: 6px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 32px; border: 0; border-radius: 2px;
  background: var(--accent); color: var(--on-accent);
  text-decoration: none; font-family: var(--font-ui); font-size: 18px; font-weight: 500;
  cursor: pointer;
}
.btn:hover { background: var(--accent-deep); color: var(--on-accent); }
.arrow-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-family: var(--font-ui); font-size: 18px; text-underline-offset: 6px;
}

.portrait { margin: 0; justify-self: center; width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 14px; }
.portrait .frame { position: relative; width: 100%; aspect-ratio: 440 / 560; }
.portrait .photo {
  position: absolute; top: 22px; right: 22px; bottom: 0; left: 22px;
  border-radius: 999px 999px 0 0; overflow: hidden;
  background: var(--photo);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-ui); font-size: 16px; color: var(--muted);
}
.portrait .photo img { width: 100%; height: 100%; object-fit: cover; }
.portrait svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; color: var(--leaf); }
.portrait svg .bud { fill: var(--accent); }
.portrait figcaption { font-family: var(--font-ui); font-size: 14px; color: var(--muted); padding-left: 22px; }

/* कविता */
.band-lavender { background: var(--lavender); }
.poem-block { padding-block: clamp(72px, 12vw, 120px); display: flex; flex-direction: column; gap: 22px; }
.poem-title { font-size: clamp(32px, 7.4vw, 42px); line-height: 1.4; }
.poem-body { margin-top: 8px; font-weight: 300; font-size: clamp(20px, 5.4vw, 24px); line-height: 1.95; }
/* हर पंक्ति वैसी ही जैसी लिखी गई; लंबी पंक्ति मुड़े तो थोड़ा भीतर से शुरू हो */
.poem-body .l { display: block; white-space: pre-wrap; overflow-wrap: break-word; padding-left: 1.5em; text-indent: -1.5em; }
.signature { margin-top: 8px; font-family: var(--font-name); font-weight: 600; font-size: 26px; line-height: 1.4; color: var(--name); }
.poem-block .arrow-link { align-self: flex-start; }

/* खंड */
.section { padding-block: var(--section); display: flex; flex-direction: column; gap: 40px; }
.section + .section { padding-top: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 16px; }
.section-head.underlined { border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.section-head h1, .section-head h2, .col-intro h2 { font-size: clamp(34px, 7.4vw, 42px); line-height: 1.3; }
.section-head .more { font-family: var(--font-ui); font-size: 17px; color: var(--accent); padding: 10px 0; }
.section-head .more:hover { color: var(--accent-deep); }
.section-head .note { font-family: var(--font-ui); font-size: 16px; line-height: 1.5; color: var(--muted); }
.page-top { padding-top: clamp(48px, 7vw, 80px); }

.poem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 40px 48px; }
.poem-card { display: flex; flex-direction: column; gap: 12px; padding-top: 22px; border-top: 1px solid var(--ink); text-decoration: none; min-width: 0; }
.poem-card .meta {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-family: var(--font-ui); font-size: 15px; line-height: 1.5; color: var(--accent);
}
.poem-card .title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.poem-card .title { font-size: 27px; line-height: 1.4; min-width: 0; }
.poem-card .title-row svg { flex: none; margin-top: 11px; color: var(--accent); }
.poem-card .line { font-weight: 300; font-size: 19px; line-height: 1.9; color: var(--muted); }
.poem-card:hover .title { color: var(--accent); }

/* यात्रा */
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 40px 64px; }
.col-intro { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.col-intro p { font-size: 21px; line-height: 1.8; }
.section.ruled .two-col { border-top: 1px solid var(--line); padding-top: var(--section); }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; min-width: 0; }
.timeline li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 24px; padding: 24px 0; border-top: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline .when { font-family: var(--font-ui); font-size: 16px; color: var(--accent); padding-top: 6px; }
.timeline div { display: flex; flex-direction: column; gap: 6px; }
.timeline h3 { font-size: 25px; line-height: 1.4; }
.timeline p { font-size: 18px; line-height: 1.8; }
@media (max-width: 480px) { .timeline li { grid-template-columns: 64px minmax(0, 1fr); gap: 16px; } }

/* डायरी */
.diary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 40px; }
.diary-card { display: flex; flex-direction: column; gap: 14px; text-decoration: none; min-width: 0; }
.diary-card .thumb { display: block; aspect-ratio: 3 / 2; background: var(--peach); overflow: hidden; }
.diary-card:nth-child(3n + 2) .thumb { background: var(--lavender); }
.diary-card:nth-child(3n) .thumb { background: var(--mint); }
.diary-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.diary-card .kind { font-family: var(--font-ui); font-size: 15px; line-height: 1.5; color: var(--muted); }
.diary-card .title { font-size: 26px; line-height: 1.4; }

/* प्रकाशित + परिचय */
.section.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 56px 64px; }
.pair-col { display: flex; flex-direction: column; gap: 20px; border-top: 1px solid var(--ink); padding-top: 32px; min-width: 0; }
.pair-col h2 { font-size: clamp(32px, 7vw, 38px); line-height: 1.3; }
.pair-col p { font-size: 21px; line-height: 1.8; }
.rows { display: flex; flex-direction: column; }
.row { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 22px; line-height: 1.5; }
.row.quiet { color: var(--muted); }

/* सादे पन्ने: सौगात, संपर्क, 404 */
.simple { padding-block: clamp(64px, 11vw, 128px); display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.simple h1 { font-size: clamp(40px, 9vw, 56px); line-height: 1.3; }
.simple .lead { font-weight: 300; font-size: clamp(22px, 5.6vw, 27px); line-height: 1.7; }
.simple .plain { font-family: var(--font-ui); font-size: 16px; color: var(--muted); }

.contact-form { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; margin-top: 8px; }
.field { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.field label { font-family: var(--font-ui); font-size: 16px; color: var(--muted); }
.field input, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 16px;
  border: 1px solid var(--muted); border-radius: 2px; background: var(--ground); color: var(--ink);
  font-family: var(--font-ui); font-size: 18px; line-height: 1.6;
}
.field textarea { resize: vertical; }
.trap { position: absolute; left: -9999px; }
.form-note { font-family: var(--font-ui); font-size: 16px; line-height: 1.6; }

/* कविता के नीचे */
.poem-nav { padding-block: 40px 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 24px; }
.poem-nav a { text-decoration: none; display: flex; flex-direction: column; gap: 4px; padding: 10px 0; min-width: 0; }
.poem-nav .title { font-size: 22px; line-height: 1.4; }
.poem-nav .next { text-align: right; align-items: flex-end; }
.poem-nav .all { font-family: var(--font-ui); font-size: 17px; color: var(--accent); text-decoration: underline; text-underline-offset: 5px; }
@media (max-width: 640px) {
  .poem-nav { grid-template-columns: 1fr 1fr; }
  .poem-nav .all { grid-column: 1 / -1; grid-row: 2; align-items: center; }
}

/* चिट्ठियाँ + पाद */
.closing { background: var(--ink); color: var(--on-dark); }
.closing a { color: var(--on-dark); }
.closing a:hover { color: var(--on-dark-name); }
.closing :focus-visible { outline-color: var(--on-dark-name); }
.letters .wrap { padding-block: clamp(64px, 10vw, 96px); display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.letters h2 { font-size: clamp(34px, 7.4vw, 42px); line-height: 1.3; }
.letters-text { font-size: 21px; line-height: 1.8; color: var(--on-dark-muted); }
.letters-form { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; width: 100%; }
.letters-form input {
  flex: 1 1 260px; min-width: 0; min-height: 50px; padding: 0 16px;
  border: 1px solid var(--on-dark-field); border-radius: 0; background: transparent; color: var(--on-dark);
  font-family: var(--font-ui); font-size: 17px;
}
.letters-form input::placeholder { color: var(--on-dark-muted); opacity: 1; }
.letters-form button {
  min-height: 50px; padding: 0 28px; border: 0; border-radius: 0;
  background: var(--on-dark); color: var(--ink);
  font-family: var(--font-ui); font-size: 17px; font-weight: 500; cursor: pointer;
}
.letters-form button:hover { background: var(--on-dark-name); }
.letters-form .form-note { flex-basis: 100%; color: var(--on-dark-muted); }
.letters + .site-footer .foot { border-top: 1px solid var(--on-dark-line); }

.foot { padding-block: 48px 56px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer .wordmark { font-size: 36px; color: var(--on-dark-name); }
.foot-lines { flex-basis: 100%; display: flex; flex-direction: column; gap: 6px; font-family: var(--font-ui); font-size: 15px; line-height: 1.6; color: var(--on-dark-muted); }
.foot-lines a { color: var(--on-dark-muted); }

/* ---------- पूरे पर्दे वाला रूप ---------- */

/* संपर्क: खोखला बटन */
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--ground); }

/* फ़ोन पर मेनू थोड़ा सिमटा हुआ */
@media (max-width: 900px) {
  .bar { padding: 16px 0 10px; gap: 4px 16px; }
  .nav { gap: 0 20px; font-size: 17px; }
  .nav a { padding: 8px 0; }
}

/* मुख्य भाग: तस्वीर लैवेंडर में डूबी हुई, किनारे तक */
.hero-band { background: var(--ground); }
.portrait .photo img { object-position: 50% 0%; }

@media (min-width: 900px) {
  .hero-band { background: linear-gradient(90deg, var(--ground) 50%, var(--lavender) 50%); }
  .hero {
    min-height: calc(100svh - 89px);
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 72px;
    padding-block: 0;
    align-items: stretch;
  }
  .hero-text { align-self: center; padding-block: 64px; }
  .portrait { align-self: end; justify-self: center; width: auto; max-width: none; padding-top: 56px; }
  .portrait .frame {
    height: min(calc(100svh - 150px), 720px, calc((50vw - 60px) * 1.27));
    width: auto;
  }
}

@media (max-width: 899px) {
  .hero { padding-bottom: 0; gap: 48px; }
  .portrait {
    justify-self: stretch;
    width: auto;
    max-width: none;
    margin-inline: calc(-1 * var(--gutter));
    padding: 40px var(--gutter) 0;
    background: var(--lavender);
  }
  .portrait .frame { width: 100%; max-width: 440px; margin-inline: auto; }
}

/* इस मौसम की कविता: पूरा पर्दा, पंक्तियाँ एक-एक कर उभरती हैं */
.feature { min-height: 92svh; display: flex; align-items: center; }
.feature .poem-block { padding-block: clamp(80px, 14vw, 140px); }
.feature .poem-title { font-size: clamp(34px, 8vw, 48px); }
.feature .poem-body { font-size: clamp(21px, 5.6vw, 27px); }

@keyframes rise { from { opacity: 0.12; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .feature .poem-body .l {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 28%;
    }
  }
  .hero-text > * { animation: settle 0.9s ease-out both; }
  .hero-text > :nth-child(2) { animation-delay: 0.08s; }
  .hero-text > :nth-child(4) { animation-delay: 0.2s; }
  .hero-text > :nth-child(5) { animation-delay: 0.3s; }
  .portrait .photo img { animation: unveil 1.4s ease-out both; }
}
@keyframes settle { from { opacity: 0.6; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes unveil { from { transform: scale(1.06); } to { transform: none; } }
@media (max-width: 899px) { .feature { min-height: auto; } .feature .poem-block { padding-top: 56px; } }

/* प्रकाशित: हर पत्रिका के नीचे एक पंक्ति */
.pub { display: flex; flex-direction: column; gap: 4px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.pub .row { border-bottom: 0; padding-bottom: 4px; }
.pair-col .pub-note { font-size: 17px; line-height: 1.7; font-weight: 300; color: var(--muted); }
.pub-extra { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; font-size: 16px; color: var(--accent); text-underline-offset: 4px; }
.pub-extra:hover { color: var(--accent-deep); }

/* चिट्ठियाँ: Substack पर ले जाने वाला बटन */
.closing .letters-link {
  display: inline-flex; align-items: center; min-height: 50px; padding: 0 32px;
  background: var(--on-dark); color: var(--ink); text-decoration: none;
  font-family: var(--font-ui); font-size: 17px; font-weight: 500;
}
.closing .letters-link:hover { background: var(--on-dark-name); color: var(--ink); }

/* सौगात: अभी धुँधला, ऊपर आने पर "Coming soon" */
.nav .with-tag { position: relative; color: var(--muted); opacity: 0.7; }
.nav .with-tag:hover, .nav .with-tag:focus-visible { opacity: 1; color: var(--muted); }
.nav .with-tag .soon {
  position: absolute; left: 50%; top: calc(100% - 4px); transform: translate(-50%, 4px);
  white-space: nowrap; background: var(--ground);
  opacity: 0; pointer-events: none; transition: opacity 0.15s ease, transform 0.15s ease;
}
.nav .with-tag:hover .soon, .nav .with-tag:focus-visible .soon { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .nav .with-tag .soon { transition: none; } }

/* यात्रा: हर पड़ाव एक कड़ी */
.timeline h3 a { text-decoration: none; display: inline; }
.timeline h3 a:hover { color: var(--accent); }
.timeline h3 .out { font-size: 0.7em; margin-left: 8px; color: var(--accent); vertical-align: 0.1em; }

/* डायरी: अकेली पोस्ट हो तो चौड़ा कार्ड */
.diary-card .title { transition: color 0.15s ease; }
a.diary-card:hover .title { color: var(--accent); }
.diary-card .thumb img { object-position: 50% 12%; }
.diary-card .text { display: flex; flex-direction: column; gap: 10px; }
.diary-card .read { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; color: var(--accent); }
@media (min-width: 760px) {
  .diary-grid > .diary-card:only-child {
    grid-column: 1 / -1;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center; gap: 48px;
  }
  .diary-grid > .diary-card:only-child .thumb { aspect-ratio: 4 / 3; }
  .diary-grid > .diary-card:only-child .title { font-size: clamp(28px, 3vw, 36px); }
}

/* डायरी की पोस्ट */
.post { padding-block: clamp(56px, 9vw, 104px); display: flex; flex-direction: column; gap: 24px; }
.post h1 { font-size: clamp(34px, 8vw, 48px); line-height: 1.3; }
.post-body { display: flex; flex-direction: column; gap: 22px; }
.post-body p { font-weight: 300; font-size: clamp(18px, 4.8vw, 20px); line-height: 1.95; }
.post-figure { margin: 16px 0 8px; }
.post-figure a { display: block; }
.post-figure img { width: 100%; height: auto; box-shadow: 0 1px 0 var(--line), 0 18px 40px rgba(36, 29, 46, 0.12); }
.post .arrow-link { align-self: flex-start; }
