/* rishi.at */

:root {
  --paper: #fcfcfb;
  --ink:   #1a1d21;
  --muted: #6b7480;
  --rule:  #e3e5e8;
  --blue:  #1b4dff;
  --blue-d:#0f36c4;
  --pad:   clamp(1.4rem, 5vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
  font-synthesis-weight: none;
}

.wrap {
  max-width: 43rem;
  margin: 0 auto;
  padding: 0 var(--pad) 5rem;
}

/* ---------- masthead ---------- */

.site {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 4rem 0 0;
}

.site-name {
  font-family: Archivo, system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.9rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  margin: 0;
  line-height: 1;
}

.site nav {
  font-family: Archivo, system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
}

.site nav a { color: var(--muted); text-decoration: none; margin-left: 1.3rem; }
.site nav a:first-child { margin-left: 0; }
.site nav a:hover, .site nav a[aria-current] { color: var(--blue); }
.site nav a.handle { color: var(--blue); font-weight: 600; }
.site nav a.handle:hover { color: var(--blue-d); text-decoration: underline; text-underline-offset: 0.18em; }

.intro {
  margin: 1.7rem 0 3rem;
  max-width: 58ch;
  color: var(--ink);
  font-size: 1.14rem;
  line-height: 1.62;
}

.intro p { margin: 0; }
.intro p + p { margin-top: 1.05rem; }

.intro a { color: var(--ink); text-decoration: underline; text-underline-offset: 0.16em; text-decoration-color: var(--blue); }
.intro a:hover { color: var(--blue); }

/* ---------- series ---------- */

.series { border-top: 2px solid var(--ink); padding-top: 2.2rem; }

.series-kicker {
  font-family: Archivo, system-ui, sans-serif;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.series-title {
  font-family: Archivo, system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0;
}

.series-note {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.55;
  max-width: 56ch;
}

.series-list { list-style: none; margin: 1.9rem 0 0; padding: 0; counter-reset: ep; }

.series-list li {
  counter-increment: ep;
  display: grid;
  grid-template-columns: 1.9rem 1fr auto;
  gap: 0 0.7rem;
  align-items: baseline;
  padding: 0.95rem 0;
  border-top: 1px solid var(--rule);
}

.series-list li::before {
  content: counter(ep);
  font-family: Archivo, system-ui, sans-serif;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
}

.series-list a {
  font-family: Archivo, system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.12rem;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--ink);
  text-decoration: none;
}
.series-list a:hover { color: var(--blue); }

.series-list .ep-meta {
  font-family: Archivo, system-ui, sans-serif;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.series-list li.upcoming { color: var(--muted); }
.series-list li.upcoming .ep-name {
  font-family: Archivo, system-ui, sans-serif;
  font-weight: 500;
  font-size: 1.12rem;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--muted);
}

/* ---------- writing list ---------- */

.list { margin: 0; border-top: 2px solid var(--ink); }

.item {
  display: block;
  padding: 2.2rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
}

.item:hover .item-title { color: var(--blue); }

.item-date {
  font-family: Archivo, system-ui, sans-serif;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 0.45rem;
}

.item-title {
  font-family: Archivo, system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.42rem;
  line-height: 1.24;
  letter-spacing: -0.022em;
  margin: 0;
}

.item-stand {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.55;
  max-width: 56ch;
}

.colophon {
  font-family: Archivo, system-ui, sans-serif;
  font-size: 0.87rem;
  color: var(--muted);
  margin: 2.6rem 0 0;
}
.colophon a { color: var(--blue); text-decoration: underline; text-underline-offset: 0.16em; }
.colophon a:hover { color: var(--blue); }

/* ---------- article ---------- */

.article-head { margin: 3.6rem 0 2.6rem; }

.article-head h1 {
  font-family: Archivo, system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.85rem, 5vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0;
}

.article-head .stand {
  margin: 1.1rem 0 0;
  font-size: 1.12rem;
  color: var(--muted);
  line-height: 1.55;
}

.article-head .dateline {
  font-family: Archivo, system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  margin: 1.6rem 0 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
}

.prose > * { margin: 0; }
.prose > * + * { margin-top: 1.4rem; }

.prose h2 {
  font-family: Archivo, system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.24rem;
  line-height: 1.3;
  letter-spacing: -0.018em;
}

.prose > * + h2 { margin-top: 2.9rem; }
.prose h2 + * { margin-top: 0.8rem; }

.prose strong { font-weight: 600; }

.prose a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 0.17em;
  text-decoration-thickness: 1px;
}
.prose a:hover { color: var(--blue-d); }

.prose code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.85em;
  background: #f1f2f4;
  padding: 0.12em 0.36em;
  border-radius: 3px;
}

.prose ul { padding-left: 1.2rem; }
.prose li + li { margin-top: 0.5rem; }

.pull {
  font-family: Archivo, system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.32rem;
  line-height: 1.32;
  letter-spacing: -0.02em;
  border-left: 2px solid var(--blue);
  padding-left: 1.2rem;
  margin-top: 2.4rem !important;
  margin-bottom: 2.4rem !important;
}

.endnote {
  font-size: 0.97rem;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  padding-top: 1.3rem;
  margin-top: 3rem !important;
}

.back {
  font-family: Archivo, system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  display: inline-block;
  margin-top: 2.6rem;
}
.back:hover { color: var(--blue); }

/* ---------- a11y / responsive ---------- */

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

@media (max-width: 34rem) {
  .site { padding-top: 2.5rem; }
  .site-name { font-size: 1.6rem; }
  .intro { font-size: 1.08rem; }
  .item-title { font-size: 1.24rem; }
}

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