/*
Theme Name:   Ravindr — Founder
Theme URI:    https://ravindr.com/
Description:  Block theme for ravindr.com, the personal site of Ravindr Siwach. Built for long-form founder essays, student success stories and industry commentary, in English and Hindi. Design language: the Indian ruled ledger — red margin rule, numbered entries, paper.
Author:       Ravindr Siwach
Author URI:   https://ravindr.com/
Version:      1.0.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  ravindr
Tags:         blog, one-column, block-patterns, full-site-editing, translation-ready
*/

/* ==========================================================================
   THE IDEA
   An Indian businessman's ledger: warm paper, blue-grey rules, a single red
   margin line down the left of every essay. Entries are numbered. Nothing
   decorative — this is a record, not a brochure.
   ========================================================================== */

/* ---------- base ---------- */
body{ -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; }
a{ text-decoration:none }

.entry-content a,
.wp-block-post-content a{
  border-bottom:1px solid var(--wp--preset--color--red);
  padding-bottom:1px;
}
.entry-content a:hover,
.wp-block-post-content a:hover{ border-bottom-width:2px }

:focus-visible{
  outline:2.5px solid var(--wp--preset--color--red);
  outline-offset:3px;
}

/* Devanagari sits lower and needs more room than Latin.
   Polylang puts lang="hi-IN" on <html> for the Hindi edition. */
html[lang^="hi"] body{ line-height:1.85; }
html[lang^="hi"] h1,
html[lang^="hi"] h2,
html[lang^="hi"] h3,
html[lang^="hi"] .wp-block-post-title{
  letter-spacing:0;
  line-height:1.3;
  font-weight:600;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.rv-header{
  border-bottom:1px solid var(--wp--preset--color--rule);
  background:var(--wp--preset--color--white);
}
.rv-header .wp-block-navigation__container{ gap:1.6rem }
.rv-header .wp-block-navigation-item__content{
  font-size:0.9375rem;
  color:var(--wp--preset--color--ink);
  border-bottom:1.5px solid transparent;
  padding-bottom:2px;
}
.rv-header .wp-block-navigation-item__content:hover,
.rv-header .current-menu-item .wp-block-navigation-item__content{
  color:var(--wp--preset--color--red);
  border-bottom-color:var(--wp--preset--color--red);
}
.rv-kicker{
  display:block;
  font-size:0.625rem;
  letter-spacing:0.2em;
  text-transform:uppercase;
  color:var(--wp--preset--color--red);
  font-weight:600;
}

/* ==========================================================================
   THE SIGNATURE — ledger margin rule
   Applied to the essay body. One red vertical line at the left, the way a
   register has a margin. Section numbers hang in that margin.
   ========================================================================== */
.rv-ledger{
  position:relative;
  padding-left:clamp(18px, 4vw, 34px);
}
.rv-ledger::before{
  content:"";
  position:absolute;
  left:0; top:0.35em; bottom:0.5em;
  width:1.5px;
  background:var(--wp--preset--color--red);
  opacity:0.55;
}

/* numbered H2s — the entries in the register */
.rv-ledger > h2{
  counter-increment:rvEntry;
  position:relative;
  margin-top:3.2rem;
  padding-top:1.5rem;
  border-top:1px solid var(--wp--preset--color--rule);
}
.rv-ledger{ counter-reset:rvEntry }
.rv-ledger > h2::before{
  content:counter(rvEntry, decimal-leading-zero);
  position:absolute;
  left:clamp(-34px, -4vw, -18px);
  top:1.65rem;
  font-size:0.6875rem;
  letter-spacing:0.08em;
  font-weight:600;
  color:var(--wp--preset--color--faint);
  font-variant-numeric:tabular-nums;
}

@media (max-width: 600px){
  .rv-ledger > h2::before{ display:none }
}

/* ==========================================================================
   POST CONTENT
   ========================================================================== */
.wp-block-post-content > p{ margin-block:0 1.35rem }

.wp-block-post-content > p:first-of-type{
  font-size:1.28rem;
  line-height:1.55;
  color:var(--wp--preset--color--ink);
}

.wp-block-post-content h3{ margin-top:2.2rem }

.wp-block-post-content ul,
.wp-block-post-content ol{ margin-block:0 1.5rem; padding-left:1.4rem }
.wp-block-post-content li{ margin-bottom:0.55rem }

.wp-block-post-content strong{ color:var(--wp--preset--color--ink); font-weight:600 }

/* blockquote — the student's own words */
.wp-block-quote{
  border-left:2px solid var(--wp--preset--color--red);
  padding-left:1.6rem;
  font-style:italic;
}
.wp-block-quote cite{
  display:block;
  margin-top:0.7rem;
  font-style:normal;
  font-size:0.875rem;
  letter-spacing:0.04em;
  color:var(--wp--preset--color--faint);
}

/* figures */
figure{ margin-block:2.4rem }
figcaption{ margin-top:0.6rem; line-height:1.5 }

/* video embeds — student interviews */
.wp-block-embed__wrapper{ position:relative }
.wp-block-embed.is-type-video iframe{ width:100%; aspect-ratio:16/9; height:auto; display:block }

/* ==========================================================================
   EDITORIAL FURNITURE
   ========================================================================== */

/* .rv-eyebrow — small red label */
.rv-eyebrow{
  font-size:0.6875rem !important;
  letter-spacing:0.19em;
  text-transform:uppercase;
  color:var(--wp--preset--color--red);
  font-weight:600;
  margin-bottom:0.7rem;
}

/* .rv-standfirst — the deck under a headline */
.rv-standfirst{
  font-size:1.28rem;
  line-height:1.55;
  color:var(--wp--preset--color--ink-muted);
}

/* .rv-meta — byline row */
.rv-meta{
  font-size:0.8125rem;
  letter-spacing:0.02em;
  color:var(--wp--preset--color--faint);
}
.rv-meta a{ color:var(--wp--preset--color--faint) }
.rv-meta a:hover{ color:var(--wp--preset--color--red) }

/* "Ravindr's take" — his position, marked as opinion.
   Block style on core/group, so the pipeline can emit it as a class. */
.is-style-rv-take,
.rv-take{
  background:var(--wp--preset--color--white);
  border:1px solid var(--wp--preset--color--rule);
  border-left:3px solid var(--wp--preset--color--red);
  padding:1.5rem 1.7rem;
  margin-block:2.4rem;
}
.is-style-rv-take::before,
.rv-take::before{
  content:"Ravindr's take";
  display:block;
  font-size:0.6875rem;
  letter-spacing:0.19em;
  text-transform:uppercase;
  color:var(--wp--preset--color--red);
  font-weight:600;
  margin-bottom:0.6rem;
}
html[lang^="hi"] .is-style-rv-take::before,
html[lang^="hi"] .rv-take::before{ content:"रविंद्र की राय" }
.is-style-rv-take > *:last-child,
.rv-take > *:last-child{ margin-bottom:0 }

/* Attributed statement — for student income figures.
   Never an institute claim. Always the student's own words. */
.rv-attributed{
  border:1px dashed var(--wp--preset--color--rule);
  background:var(--wp--preset--color--white);
  padding:1.1rem 1.3rem;
  margin-block:1.8rem;
  font-size:1.0625rem;
}
.rv-attributed::before{
  content:"In her own words";
  display:block;
  font-size:0.625rem;
  letter-spacing:0.19em;
  text-transform:uppercase;
  color:var(--wp--preset--color--faint);
  font-weight:600;
  margin-bottom:0.45rem;
}
html[lang^="hi"] .rv-attributed::before{ content:"उनके अपने शब्दों में" }

/* Review-flag highlight. The pipeline wraps unverified spans in <mark>.
   Loud on purpose — the publisher refuses posts that still contain these. */
.wp-block-post-content mark{
  background:#fff3a3;
  padding:0.1em 0.25em;
  box-shadow:0 0 0 1px #e0cc4a;
}

/* ==========================================================================
   POST LISTS
   ========================================================================== */
.rv-list .wp-block-post{
  padding-block:2rem;
  border-bottom:1px solid var(--wp--preset--color--rule);
}
.rv-list .wp-block-post-title{
  font-size:1.4rem;
  line-height:1.25;
  margin-block:0.35rem 0.5rem;
}
.rv-list .wp-block-post-title a:hover{ color:var(--wp--preset--color--red) }
.rv-list .wp-block-post-excerpt__excerpt{
  font-size:1rem;
  color:var(--wp--preset--color--ink-muted);
}
.rv-list .wp-block-post-featured-image img{
  aspect-ratio:16/10;
  object-fit:cover;
}

/* category tag */
.rv-list .wp-block-post-terms,
.rv-terms{
  font-size:0.6875rem;
  letter-spacing:0.17em;
  text-transform:uppercase;
  font-weight:600;
}
.rv-list .wp-block-post-terms a,
.rv-terms a{ color:var(--wp--preset--color--red); border:0 }

/* pagination */
.wp-block-query-pagination{ margin-top:3rem; gap:0.5rem }
.wp-block-query-pagination-numbers .page-numbers{
  display:inline-grid; place-items:center;
  min-width:2.4rem; height:2.4rem; padding:0 0.6rem;
  border:1px solid var(--wp--preset--color--rule);
  background:var(--wp--preset--color--white);
  font-size:0.9375rem; color:var(--wp--preset--color--ink);
}
.wp-block-query-pagination-numbers .page-numbers.current{
  background:var(--wp--preset--color--ink);
  color:var(--wp--preset--color--white);
  border-color:var(--wp--preset--color--ink);
}

/* ==========================================================================
   AUTHOR BOX — E-E-A-T. This is a founder site; the author matters.
   ========================================================================== */
.rv-author{
  border-top:1px solid var(--wp--preset--color--rule);
  border-bottom:1px solid var(--wp--preset--color--rule);
  padding-block:2rem;
  margin-block:3.5rem;
}
.rv-author .wp-block-avatar img{ border-radius:50%; }
.rv-author .wp-block-post-author-name{
  font-weight:600;
  color:var(--wp--preset--color--ink);
  font-size:1.0625rem;
}
.rv-author .wp-block-post-author-biography{
  font-size:0.9375rem;
  color:var(--wp--preset--color--ink-muted);
  line-height:1.65;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.rv-footer{
  background:var(--wp--preset--color--ink);
  color:#9aa0ae;
  font-size:0.9375rem;
}
.rv-footer a{ color:#9aa0ae; border:0 }
.rv-footer a:hover{ color:#fff }
.rv-footer h2,.rv-footer h3,.rv-footer .wp-block-heading{
  color:#fff;
  font-size:0.6875rem;
  letter-spacing:0.19em;
  text-transform:uppercase;
  font-weight:600;
}
.rv-footer .wp-block-navigation__container{ flex-direction:column; gap:0.55rem }
.rv-footer-note{
  border-top:1px solid #2a2e38;
  padding-top:1.4rem;
  font-size:0.8125rem;
  color:#6f7583;
}

/* ==========================================================================
   PILLAR CARDS — "not only the Institute". These make the three
   content territories visible on the front page.
   ========================================================================== */
.rv-pillar{
  background:var(--wp--preset--color--white);
  border:1px solid var(--wp--preset--color--rule);
  padding:1.6rem 1.7rem;
  position:relative;
}
.rv-pillar::before{
  content:"";
  position:absolute; left:0; top:0; bottom:0; width:2px;
  background:var(--wp--preset--color--red);
}
.rv-pillar h3{ font-size:1.15rem; margin:0 0 0.4rem }
.rv-pillar p{ font-size:0.9375rem; margin:0; color:var(--wp--preset--color--ink-muted) }

/* ==========================================================================
   PRINT — founders get asked for PDFs of their essays
   ========================================================================== */
@media print{
  .rv-header,.rv-footer,.wp-block-query-pagination,.rv-author{ display:none }
  body{ background:#fff; font-size:11pt }
  .rv-ledger::before{ background:#000 }
}

@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; animation:none !important }
}
