/* lilygeidelberg.com — tokens and rules from ../design-brief.md */

:root {
  /* Ink */
  --ink-accent:       #121417;
  --ink-accent-hover: #2a2e35;
  --ink:              #26282c;
  --ink-muted:        #5c5f66;
  --on-accent:        rgba(255,255,255,0.96);

  /* Planes */
  --paper:      #f4f3f1;
  --paper-warm: #f5f4f0;
  --card:       #ffffff;
  --field:      var(--paper);

  /* Rules */
  --line:        #e2e2e0;
  --line-strong: #adaeab;
  --row-rule:    #ececea;
  --reference:   #8a8c91;

  /* Washes */
  --wash-hover:    rgba(18,20,23,0.04);
  --wash-selected: rgba(18,20,23,0.06);
  --wash-press:    rgba(18,20,23,0.09);

  /* Type */
  --font-body:    "Söhne", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:    "Berkeley Mono", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-display: "IBM Plex Serif", Georgia, "Times New Roman", serif;

  --leading-display: 1.18;
  --leading-body:    1.5;
  --leading-data:    1.35;
  --tracking-label:  0.06em;

  --fs-2xs: 0.66rem;
  --fs-xs:  0.72rem;
  --fs-s:   0.78rem;
  --fs-m:   0.82rem;
  --fs-l:   0.85rem;
  --fs-xl:  1.15rem;
  --fs-2xl: 1.32rem;
  --fs-3xl: 1.9rem;

  /* Space */
  --sp-h: 2px;  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px;
  --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;
  --gutter: 24px;
  --ctl-h: 28px;
  --report-max: 860px;
  --page-pad: 2.5rem 1.5rem;

  --radius-ctl: 3px;
  --radius-m:   6px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --dur-fade: 140ms;
}

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

html { background: var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: var(--leading-body);
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin-block: 0;
  font-family: var(--font-body);
  font-weight: 600;
  line-height: var(--leading-display);
  letter-spacing: -0.012em;
  text-wrap: balance;
}
h1 { letter-spacing: -0.018em; }
p { margin: 0; }
strong { font-weight: 500; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.15em;
  transition: text-decoration-color 120ms var(--ease-out), color 120ms var(--ease-out);
}
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink-accent); outline-offset: 2px; }

.eyebrow {
  color: var(--ink-muted);
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}
.muted { color: var(--ink-muted); }
.fill  { color: var(--ink-muted); }   /* placeholder text, to be replaced */

/* ---- header ------------------------------------------------------- */
.top { background: var(--paper); border-bottom: 1px solid var(--line-strong); }
.top-inner {
  max-width: var(--report-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  flex-wrap: wrap;
  column-gap: var(--sp-6);
}
.wordmark {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-m);
  color: var(--ink);
  text-decoration: none;
}
.nav { display: flex; gap: var(--sp-5); margin-bottom: -1px; }
.nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--fs-m);
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink-accent); }

/* ---- page --------------------------------------------------------- */
main { max-width: var(--report-max); margin: 0 auto; padding: var(--page-pad); }
section + section { margin-top: var(--sp-6); padding-top: var(--sp-6); border-top: 1px solid var(--line); }

.lead {
  font-size: var(--fs-3xl);
  max-width: 24ch;
}
.about {
  display: grid;
  grid-template-columns: 120px 1fr;
  column-gap: var(--sp-6);
  align-items: stretch;           /* portrait spans the text block exactly */
}
.portrait { margin: 0; width: 120px; }
.portrait .img {
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--card);
  overflow: hidden;
}
.portrait .img > * { display: block; width: 100%; height: 100%; object-fit: cover; }
.portrait figcaption { margin-top: var(--sp-2); font-size: var(--fs-xs); line-height: var(--leading-data); color: var(--ink-muted); }
@media (max-width: 30rem) {
  .about { grid-template-columns: 1fr; row-gap: var(--sp-4); }
  .portrait .img { height: auto; aspect-ratio: 1; }
}

.prose { max-width: 66ch; }
.prose + .prose { margin-top: var(--sp-3); }
.prov { margin-top: var(--sp-2); font-size: var(--fs-xs); color: var(--ink-muted); }

.loves { list-style: none; margin: 0; padding: 0; max-width: 66ch; display: flex; flex-wrap: wrap; column-gap: var(--sp-2); }
.loves li:not(:last-child)::after { content: "\00b7"; margin-left: var(--sp-2); color: var(--ink-muted); }
.about .loves { margin-top: var(--sp-3); font-size: var(--fs-m); color: var(--ink-muted); }

/* ---- ledger ------------------------------------------------------- */
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li {
  display: grid;
  grid-template-columns: 7rem 1fr;
  column-gap: var(--sp-4);
  padding: var(--sp-3) 0;
}
.ledger li + li { border-top: 1px solid var(--row-rule); }
.ledger li:first-child { padding-top: 0; }
.when {
  font-family: var(--font-mono);
  font-size: var(--fs-s);
  color: var(--ink-muted);
  line-height: var(--leading-body);
  padding-top: 1px;
}
.what { font-size: var(--fs-m); font-weight: 500; letter-spacing: 0; line-height: var(--leading-body); }
.note { margin-top: var(--sp-h); font-size: var(--fs-m); color: var(--ink-muted); max-width: 66ch; }
.ledger + .note { margin-top: var(--sp-4); }
.src  { margin-top: var(--sp-1); font-size: var(--fs-xs); color: var(--ink-muted); }
.sub { margin-top: var(--sp-6); }
@media (max-width: 30rem) {
  .ledger li { grid-template-columns: 1fr; row-gap: var(--sp-1); }
}

/* ---- article (writing/<slug>/) ------------------------------------ */
.article { max-width: 66ch; }
.article-title { font-size: var(--fs-2xl); }
.article > .prov { margin-bottom: var(--sp-8); }
.article-body p { margin: 0 0 var(--sp-4); }
.article-body > :last-child { margin-bottom: 0; }
.article-body h2 { font-size: var(--fs-xl); margin: var(--sp-8) 0 var(--sp-3); }
.article-body h3 { font-size: var(--fs-l); margin: var(--sp-6) 0 var(--sp-2); }
.article-body ul, .article-body ol { margin: 0 0 var(--sp-4); padding-left: var(--gutter); }
.article-body li + li { margin-top: var(--sp-1); }
.article-body blockquote {
  margin: 0 0 var(--sp-4);
  padding: 0 0 0 var(--sp-4);
  border-left: 2px solid var(--line-strong);
  color: var(--ink-muted);
}
.article-body figure { margin: var(--sp-6) 0; }
.article-body img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius-m); }
.article-body figcaption { margin-top: var(--sp-2); font-size: var(--fs-xs); color: var(--ink-muted); }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-8) 0; }
.article-body code { font-family: var(--font-mono); font-size: var(--fs-s); }
.article-body pre {
  font-family: var(--font-mono);
  font-size: var(--fs-s);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: var(--sp-4);
  overflow-x: auto;
}
.article-foot { margin-top: var(--sp-8); padding-top: var(--sp-4); border-top: 1px solid var(--line); font-size: var(--fs-s); }

/* ---- footer ------------------------------------------------------- */
.foot { border-top: 1px solid var(--line); }
.foot-inner {
  max-width: var(--report-max);
  margin: 0 auto;
  padding: var(--sp-6) 1.5rem var(--sp-8);
  font-size: var(--fs-xs);
  color: var(--ink-muted);
}

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