/* rohitshah.in — reading-edition stylesheet */
:root {
  --paper: #fbf9f4;
  --ink: #1a1a1a;
  --ink-soft: #4a4744;
  --muted: #8a857e;
  --rule: #d9d4ca;
  --accent: #a3241b;
  --display: "Libre Caslon Display", "Georgia", serif;
  --text: "Libre Caslon Text", "Georgia", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --measure: 34rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img, svg { display: block; max-width: 100%; }

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Masthead ---------- */
.masthead {
  text-align: center;
  padding: 2.75rem 0 0;
}
.masthead .kicker {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .9rem;
}
.masthead .name {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.8rem, 8vw, 5.2rem);
  letter-spacing: -.01em;
  line-height: 1;
  margin: 0;
}
.masthead .name a:hover { color: var(--ink); }
.masthead .tagline {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.02rem;
  margin: .9rem 0 1.6rem;
}
nav.sections {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .25rem 2.4rem;
  padding: .85rem 0 .8rem;
  font-family: var(--sans);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}
nav.sections a[aria-current="page"] { color: var(--accent); }

/* ---------- Labels & rules ---------- */
.label {
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-top: 2px solid var(--ink);
  padding-top: .7rem;
  margin: 4rem 0 1.8rem;
}
.section-head h2 {
  font-family: var(--sans);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin: 0;
}
.section-head a {
  font-family: var(--sans);
  font-size: .75rem;
  letter-spacing: .08em;
  color: var(--muted);
}
.byline {
  font-family: var(--sans);
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Lead story ---------- */
.lead {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 3.5rem;
  align-items: center;
  padding: 3.5rem 0 1rem;
}
.lead .art {
  aspect-ratio: 4 / 3.2;
  background: #efe9dc;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
}
.lead .art svg { width: 72%; height: auto; }
.lead h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  line-height: 1.05;
  margin: .7rem 0 1rem;
}
.lead .dek {
  font-size: 1.22rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 1.3rem;
}

/* ---------- Essay list ---------- */
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 2.5rem;
}
.card { padding: 0 0 2rem; }
.card + .card { border-left: 1px solid var(--rule); padding-left: 2.5rem; margin-left: -1.25rem; }
.grid3 .card:nth-child(n) { border-left: none; padding-left: 0; margin-left: 0; }
.card h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.65rem;
  line-height: 1.15;
  margin: .55rem 0 .6rem;
}
.card p {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 .8rem;
}
.card p.byline { font-size: .72rem; color: var(--muted); }

/* ---------- Two columns: reviews + poem ---------- */
.split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4rem;
}
.review {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  gap: 1.3rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--rule);
}
.review:first-of-type { padding-top: 0; }
.review .spine {
  aspect-ratio: 2 / 3;
  border: 1px solid var(--ink);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 1.6rem;
}
.review h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 1.2;
  margin: .3rem 0 .35rem;
}
.review h3 em { font-style: italic; }
.review p { font-size: .98rem; line-height: 1.55; color: var(--ink-soft); margin: 0; }

.poem-box {
  background: #f3efe5;
  padding: 2.2rem 2.2rem 2rem;
  border-top: 2px solid var(--ink);
}
.poem-box h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.7rem;
  margin: .5rem 0 1.2rem;
}
.poem-box .verse {
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.85;
  white-space: pre-line;
  margin: 0 0 1.4rem;
}

/* ---------- Article page ---------- */
.article-head {
  max-width: 46rem;
  margin: 0 auto;
  text-align: center;
  padding: 4rem 0 2.5rem;
}
.article-head h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1.04;
  margin: .9rem 0 1.1rem;
}
.article-head .dek {
  font-size: 1.32rem;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 0 auto 1.6rem;
  max-width: 38rem;
}
.article-art {
  max-width: 52rem;
  margin: 0 auto 3rem;
  background: #efe9dc;
  border: 1px solid var(--rule);
  aspect-ratio: 16 / 7;
  display: grid;
  place-items: center;
}
.article-art svg { width: 46%; height: auto; }
.article-art + .caption {
  max-width: 52rem;
  margin: -2.4rem auto 3rem;
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--muted);
  text-align: right;
}
.prose {
  max-width: var(--measure);
  margin: 0 auto;
}
.prose p { margin: 0 0 1.35rem; hyphens: auto; }
.prose > p:first-of-type::first-letter {
  font-family: var(--display);
  float: left;
  font-size: 4.6rem;
  line-height: .82;
  padding: .35rem .6rem 0 0;
  color: var(--ink);
}
.prose h2 {
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-align: center;
  margin: 2.8rem 0 1.6rem;
}
.prose blockquote {
  margin: 2.4rem -3rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-family: var(--display);
  font-size: 1.75rem;
  line-height: 1.3;
  text-align: center;
}
.prose .end::after {
  content: "";
  display: inline-block;
  width: .55em;
  height: .55em;
  background: var(--accent);
  margin-left: .35em;
  vertical-align: baseline;
}
.ornament { text-align: center; color: var(--muted); letter-spacing: 1em; margin: 2.4rem 0; }

.more {
  max-width: var(--measure);
  margin: 4rem auto 0;
  border-top: 2px solid var(--ink);
  padding-top: .8rem;
}
.more a { display: block; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.more .t { font-family: var(--display); font-size: 1.35rem; display: block; }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4.5rem;
  padding: 4rem 0 0;
  align-items: start;
}
.about .portrait {
  aspect-ratio: 4 / 5;
  background: #e8e1d2;
  border: 1px solid var(--rule);
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.about h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  line-height: 1.05;
  margin: .6rem 0 1.6rem;
}
.about .prose { margin: 0; }
.about .prose > p:first-of-type::first-letter { all: unset; }
.about .prose > p:first-of-type { font-size: 1.28rem; line-height: 1.55; }
.facts { margin: 2.4rem 0 0; border-top: 1px solid var(--ink); }
.facts div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 1rem;
}
.facts dt {
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: .3rem;
}
.facts dd { margin: 0; }

/* ---------- Newsletter / contact ---------- */
.letter {
  margin: 5rem 0 0;
  padding: 3rem 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.letter h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 2rem;
  line-height: 1.15;
  margin: .4rem 0 .4rem;
}
.letter p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.letter form { display: flex; gap: 0; }
.letter input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 1rem;
  padding: .85rem 1rem;
  border: 1px solid var(--ink);
  border-right: none;
  background: #fff;
}
.letter button {
  font-family: var(--sans);
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 0 1.4rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
}
.letter button:hover { background: var(--accent); border-color: var(--accent); }
.letter .note { font-family: var(--sans); font-size: .78rem; color: var(--accent); margin-top: .6rem; min-height: 1.2em; }

/* ---------- Footer ---------- */
footer {
  padding: 2.5rem 0 3rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--sans);
  font-size: .74rem;
  letter-spacing: .1em;
  color: var(--muted);
}
footer .sig { font-family: var(--display); font-size: 1.3rem; letter-spacing: 0; color: var(--ink); }
footer nav { display: flex; gap: 1.6rem; text-transform: uppercase; letter-spacing: .16em; }

.draft-note {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
  padding: .55rem 1rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .lead, .split, .about, .letter { grid-template-columns: 1fr; gap: 2rem; }
  .grid3 { grid-template-columns: 1fr; }
  .card { border-bottom: 1px solid var(--rule); padding-top: 1.4rem; }
  .card:first-child { padding-top: 0; }
  .prose blockquote { margin: 2rem 0; font-size: 1.45rem; }
  .about .portrait { max-width: 20rem; }
  nav.sections { gap: .25rem 1.4rem; }
}
@media (max-width: 520px) {
  body { font-size: 1.06rem; }
  .facts div { grid-template-columns: 1fr; gap: .1rem; }
  footer { flex-direction: column; }
}

/* ---------- Additions for the live site ---------- */
.masthead.small { padding-top: 2rem; }
.masthead.small .name { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 1.2rem; }
.masthead .name a { color: var(--ink); }

/* Hindi / Devanagari */
.lang-hi, .lang-hi h1, .lang-hi h3, .lang-hi .t, .lang-hi .verse {
  font-family: "Noto Serif Devanagari", var(--text);
}
.lang-hi { line-height: 1.85; }
.prose.lang-hi > p:first-of-type::first-letter { all: unset; }

.article-head h1 em, .archive em { font-style: italic; }
.article-head .verdict {
  font-style: italic;
  max-width: 34rem;
  margin: 0 auto 1.4rem;
  color: var(--ink);
}
.article-figure { max-width: 52rem; margin: 0 auto 3rem; }
.article-figure img { width: 100%; height: auto; border: 1px solid var(--rule); }
.article-figure figcaption {
  font-family: var(--sans); font-size: .72rem; letter-spacing: .06em;
  color: var(--muted); text-align: right; margin-top: .5rem;
}
.lead .art img { width: 100%; height: 100%; object-fit: cover; }
.lead .art { overflow: hidden; }
.poem-box h3 a:hover, .card h3 a:hover { color: var(--accent); }

/* Poem page */
.poem {
  max-width: 30rem;
  margin: 0 auto;
  font-size: 1.2rem;
  line-height: 1.9;
}
.poem p { margin: 0 0 1.6rem; }

/* Section archive pages */
.archive {
  list-style: none;
  max-width: 50rem;
  margin: 0 auto;
  padding: 0;
  border-top: 2px solid var(--ink);
}
.archive li {
  display: grid;
  grid-template-columns: 9rem 1fr 6rem;
  gap: 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.archive .t { font-family: var(--display); font-size: 1.55rem; line-height: 1.2; }
.archive p { margin: .35rem 0 0; font-size: 1rem; line-height: 1.5; color: var(--ink-soft); }
.archive .label { text-align: right; }
.archive li.empty, .empty { display: block; color: var(--muted); font-style: italic; }

/* About */
.portrait-img { width: 100%; height: auto; border: 1px solid var(--rule); }
.about-prose > p:first-of-type::first-letter { all: unset; }
.facts a { border-bottom: 1px solid var(--rule); }

@media (max-width: 640px) {
  .archive li { grid-template-columns: 1fr; gap: .2rem; }
  .archive .label { text-align: left; order: -1; }
}
footer { border-top: 1px solid var(--rule); margin-top: 5rem; }
