/* The Vaishvik Exports LLP blog. One stylesheet, no framework, no JavaScript.
   Same type, colours and square corners as vaishviks.com, plus a dark mode
   built from the site's own night colours. */

@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fbfbf9;
  --bg-2: #f2f2ef;
  --ink: #121417;
  --muted: #5f636a;
  --rule: #dcdcd8;
  --accent: #c9a26b;
  --accent-ink: #7a5f36;
  --link: #121417;
  --font: "Source Serif 4", Georgia, "Times New Roman", serif;
  --measure: 66ch;
  --gutter: clamp(1rem, 4.5vw, 3rem);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1114;
    --bg-2: #24272d;
    --ink: #f1f0ec;
    --muted: #b7b4ad;
    --rule: #34373e;
    --accent: #d9b57e;
    --accent-ink: #d9b57e;
    --link: #f1f0ec;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(1.05rem, 1rem + 0.25vw, 1.15rem);
  line-height: 1.6;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 0.5rem;
  background: var(--bg);
  color: var(--ink);
  padding: 0.5rem 0.75rem;
  outline: 2px solid var(--accent);
  z-index: 10;
}

a { color: var(--link); text-decoration-color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-thickness: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }

.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.wordmark { font-weight: 650; font-size: 1.2rem; text-decoration: none; letter-spacing: 0.01em; }
.wordmark span { font-weight: 400; color: var(--muted); }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-header nav a { text-decoration: none; display: inline-block; padding: 0.35rem 0; }
.site-header nav a:hover { text-decoration: underline; text-decoration-color: var(--accent); }

main { padding: clamp(2rem, 5vw, 4rem) 0; }

.page { max-width: var(--measure); }

.crumbs { font-size: 0.9rem; color: var(--muted); margin: 0 0 1.5rem; }
.crumbs a { color: var(--muted); }

h1 {
  font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3rem);
  line-height: 1.15;
  font-weight: 650;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}
h2 { font-size: clamp(1.3rem, 1.15rem + 0.8vw, 1.7rem); line-height: 1.25; margin: 2.5rem 0 0.75rem; font-weight: 620; }
h3 { font-size: 1.15rem; margin: 2rem 0 0.5rem; }

.lede { font-size: 1.2em; color: var(--muted); margin: 0 0 1.5rem; }

.meta { font-size: 0.92rem; color: var(--muted); border-top: 3px solid var(--accent); padding-top: 0.75rem; margin: 0 0 2rem; }

.answer {
  background: var(--bg-2);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 0 0 2rem;
}
.answer p { margin: 0; }
.answer strong { display: block; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 0.35rem; }

.prose p, .prose li { max-width: var(--measure); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: 0.35rem 0; }

.sources { margin-top: 3rem; border-top: 1px solid var(--rule); padding-top: 1rem; font-size: 0.95rem; }
.sources h2 { font-size: 1.15rem; margin-top: 0.5rem; }
.sources li { margin: 0.6rem 0; }
.sources .why { color: var(--muted); display: block; }

.byline { margin-top: 2.5rem; padding: 1rem 1.25rem; background: var(--bg-2); font-size: 0.95rem; }
.byline p { margin: 0.25rem 0; }

.post-list { list-style: none; padding: 0; margin: 2rem 0 0; max-width: var(--measure); }
.post-list li { border-top: 1px solid var(--rule); padding: 1.25rem 0; }
.post-list h2 { margin: 0 0 0.35rem; font-size: 1.35rem; }
.post-list h2 a { text-decoration: none; }
.post-list h2 a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.post-list p { margin: 0.25rem 0; }
.post-list .date { color: var(--muted); font-size: 0.9rem; }

.site-footer { border-top: 1px solid var(--rule); background: var(--bg-2); font-size: 0.95rem; }
.site-footer .wrap { padding-top: 2rem; padding-bottom: 2rem; }
.site-footer p { margin: 0.35rem 0; }
.foot-name { font-weight: 650; }
.site-footer a { display: inline-block; padding: 0.15rem 0; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

@media print {
  .site-header nav, .skip, .site-footer { display: none; }
}

.related { margin-top: 2.5rem; border: 1px solid var(--rule); border-top: 3px solid var(--accent); padding: 0.75rem 1.25rem 1rem; }
.related h2 { font-size: 1.15rem; margin: 0.5rem 0; }
.related ul { padding-left: 1.2rem; margin: 0; }
.related li { margin: 0.5rem 0; }
