/* rayslu.com — the entire design of the site is in this file.
   Edit the values in :root and everything else follows. */

:root {
  --paper:  #ECEAE3;   /* very light warm gray */
  --ink:    #16181b;   /* body text */
  --muted:  #6f6f6a;   /* dates, footnotes, captions */
  --rule:   #dcdad3;   /* hairlines */
  --accent: #6b2737;   /* oxblood — link hover + footnote markers only */

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino,
           "Book Antiqua", Georgia, serif;
  --sans:  ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial,
           sans-serif;

  --measure: 34rem;    /* ~65 characters per line */
}

body.home { --measure: 29rem; }
body.post { --measure: 36rem; }

@media (prefers-color-scheme: dark) {
  :root {
    --paper:  #ECEAE3;
    --ink:    #16181b;
    --muted:  #6f6f6a;
    --rule:   #dcdad3;
    --accent: #6b2737;
  }
}

/* ---------- page ---------- */

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

body {
  max-width: var(--measure);
  margin: 6rem auto 8rem;
  padding: 0 1.25rem;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

@media (max-width: 34rem) {
  body { margin: 3rem auto 5rem; font-size: 1.0625rem; }
}

/* ---------- type ---------- */

h1 {
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.35rem;
}

h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 2.75rem 0 0.75rem;
}

p { margin: 0 0 1.35rem; }

/* the small letterspaced sans line under a title — dates, bylines */
.meta {
  font-family: var(--serif);
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 2.5rem;
}

/* small label above a heading — "Pillar 1" */
.eyebrow {
  font-family: var(--serif);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 3.25rem 0 0.4rem;
}

.eyebrow + h2 { margin-top: 0; }

/* the display equation — the one moment of scale in the piece */
.equation {
  font-size: 1.2rem;
  text-align: center;
  margin: 2.25rem 0;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

/* closing statement */
.thesis {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 1.05rem;
}

.tagline {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--muted);
}

blockquote {
  margin: 1.75rem 0;
  padding-left: 1.1rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
  font-style: italic;
}

ul, ol { margin: 0 0 1.35rem; padding-left: 1.2rem; }
li { margin-bottom: 0.4rem; }

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

code {
  font-size: 0.9em;
  background: rgba(0, 0, 0, 0.05);
  padding: 0.1em 0.3em;
  border-radius: 2px;
}

/* ---------- links ---------- */

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--rule);
}

a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ---------- images ---------- */

img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 0 0.6rem;
}

figure { margin: 0 0 2.5rem; }

figcaption {
  font-family: var(--serif);
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- index list ---------- */

.index { margin-top: 3rem; }

.index p {
  margin: 0 0 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.index time {
  font-family: var(--serif);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 0.4em;
}

/* ---------- footnotes ---------- */

sup { line-height: 0; }  /* stops markers from rippling the line spacing */

sup a {
  color: var(--accent);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 0.72em;
}

.footnotes {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--muted);
}

.footnotes ol { padding-left: 1.1rem; }
.footnotes li { margin-bottom: 0.6rem; }

/* ---------- footer ---------- */

footer {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-family: var(--serif);
  font-size: 0.78rem;
  color: var(--ink);
}
