/* rama.xicnet.com — shared styles
   Direction B (hacklab: mono structure, hairline rules, one acid accent)
   with direction C's photo treatment (plates interleaved through the content). */

:root {
  --bg: #f2f1ed;
  --bg-raised: #e9e8e2;
  --ink: #0b0d10;
  --ink-dim: #4a515b;
  --rule: #cfd2cc;
  --accent: #0b0d10;
  --hi: #d9f24a;
  --hi-ink: #14161a;
}
:root:not([data-theme="light"]) {
  @media (prefers-color-scheme: dark) {
    --bg: #0e1013;
    --bg-raised: #15181c;
    --ink: #f4f7f9;
    --ink-dim: #b9c2cd;
    --rule: #262b31;
    --accent: #f4f7f9;
    --hi: #c8e33c;
    --hi-ink: #0e1013;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1013;
  --bg-raised: #15181c;
  --ink: #f4f7f9;
  --ink-dim: #b9c2cd;
  --rule: #262b31;
  --accent: #f4f7f9;
  --hi: #c8e33c;
  --hi-ink: #0e1013;
}

* { box-sizing: border-box; }

/* Type scale is relative to the reader's own browser font size (default 16px) —
   never a fixed px on html/body, which would override an accessibility setting.
   Body steps up to 1.0625rem (17px at default) and grows a little on wide
   viewports; every other size below is a ratio of that. */
html {
  text-size-adjust: 100%;
  font-size: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* On a laptop and up, nudge the base size rather than only widening the column:
   a longer line at the same size is harder to read, not easier. */
@media (min-width: 1100px) {
  body { font-size: 1.1875rem; }
}

/* Column and prose caps are in `em`, not `ch`: `ch` is the width of "0" in the
   element's OWN font, and this page mixes Plex Mono (wide) with Plex Sans, so a
   `ch` cap lands at a different real width per element. 52em ≈ 884px at the 17px
   base; the prose inside caps at 36em ≈ 72 characters, the readable range. */
.page {
  max-width: 52em;
  margin: 0 auto;
  padding: 3.5rem 1.75rem 5rem;
}
.mono { font-family: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace; }

/* ---- masthead ---- */
header.site { margin-bottom: 2.2rem; }
.prompt {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .82em; color: var(--ink-dim); margin-bottom: 1.1rem;
}
.prompt b { color: var(--ink); font-weight: 500; }
h1 {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: clamp(2.1em, 5.2vw, 3.4em); font-weight: 600; margin: 0 0 .7rem;
  letter-spacing: -.03em; line-height: 1.1; text-wrap: balance;
}
h1 mark { background: var(--hi); color: var(--hi-ink); padding: 0 .18em; }
.tagline { color: var(--ink-dim); margin: 0 0 1.3rem; max-width: 26em; font-size: 1.02em; }
.meta {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .85em; display: flex; gap: 1.2rem; flex-wrap: wrap; color: var(--ink-dim);
}
.meta a { color: var(--ink); }

/* ---- nav ---- */
nav.site {
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: .7rem 0; margin-bottom: 2.8rem;
  display: flex; gap: 1.4rem; flex-wrap: wrap;
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .88em;
}
nav.site a {
  color: var(--ink-dim);
  text-decoration: none;
  /* Symmetric padding so the focus ring is a box around the word rather than a
     tight band on the text's line box (which reads as vertically off-centre,
     because the mono ascent/descent are not symmetric around the glyphs). */
  padding: .34em .5em .26em;
  margin: -.3em -.5em;
  border-radius: 2px;
}
nav.site a::before { content: "/"; color: var(--rule); margin-right: .15em; }
nav.site a:hover { color: var(--ink); }
nav.site a[aria-current="page"] { color: var(--ink); }
nav.site a[aria-current="page"]::before { color: var(--hi); }

/* Visible, consistent keyboard focus everywhere — never remove it.
   The acid accent reads clearly on both themes; 2px so it does not swamp the
   small mono nav labels. */
:focus-visible {
  outline: 2px solid var(--hi);
  outline-offset: 2px;
  border-radius: 2px;
}
nav.site a:focus-visible { outline-offset: 0; }

/* ---- headings & text ---- */
h2 {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 1.24em; font-weight: 600; margin: 3.6rem 0 1.5rem;
  letter-spacing: -.01em; scroll-margin-top: 1rem;
}
h2::before { content: "## "; color: var(--ink-dim); }
h3 {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .98em; font-weight: 600; margin: 2.2rem 0 .9rem; color: var(--ink);
}
h3::before { content: "### "; color: var(--ink-dim); }
p { margin: 0 0 1rem; max-width: 36em; }
.lede { font-size: 1.12em; max-width: 32em; }
a { color: var(--accent); text-underline-offset: 3px; }

/* ---- catalogue entries ---- */
.entry {
  border-left: 2px solid var(--rule);
  padding: .1rem 0 .1rem 1.1rem;
  margin-bottom: 1.5rem;
  max-width: 40em;
  transition: border-color .12s;
}
.entry:hover { border-color: var(--hi); }
.entry .year {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .82em; color: var(--ink-dim); letter-spacing: .04em;
}
.entry .title { font-weight: 600; display: block; margin-top: .1rem; }
.entry .place { color: var(--ink-dim); font-size: .96em; }
.entry .desc { margin: .35rem 0 0; font-size: .98em; color: var(--ink); }
.entry .desc a { color: var(--ink); }
.prize {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .78em; background: var(--hi); color: var(--hi-ink);
  padding: .1em .45em; letter-spacing: .03em; margin-left: .4em;
}

/* ---- photo plates (direction C treatment, B palette) ---- */
figure.plate {
  margin: 2.4rem 0;
  background: var(--bg-raised);
  border: 1px solid var(--rule);
}
figure.plate img { width: 100%; height: auto; display: block; }
figure.plate figcaption {
  padding: .65rem .9rem;
  border-top: 1px solid var(--rule);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .82em; color: var(--ink-dim); line-height: 1.5;
}
figure.plate figcaption b { color: var(--ink); font-weight: 500; }

/* hero plate sits tighter to the masthead */
figure.plate.hero { margin-top: 0; }

/* two-up plates */
.plates-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2.4rem 0; }
.plates-2 figure.plate { margin: 0; display: flex; flex-direction: column; }
.plates-2 figure.plate img { height: 190px; object-fit: cover; }
.plates-2 figure.plate figcaption { flex: 1; }
@media (max-width: 560px) { .plates-2 { grid-template-columns: 1fr; } }

/* Photos align to the same left edge as the text and the nav rule — one margin
   down the whole page. A "breakout" (photos hanging past the text) was tried and
   removed: nothing else on the page aligns to that wider edge, so it read as a
   mistake rather than as emphasis. They just get taller on wide screens. */
@media (min-width: 1180px) {
  .plates-2 figure.plate img { height: 260px; }
}

/* ---- skills ---- */
.stack { display: flex; flex-wrap: wrap; gap: .4rem; margin: .9rem 0 0; }
.stack span {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .82em; border: 1px solid var(--rule);
  padding: .18em .5em; color: var(--ink-dim);
}
.callout {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--hi);
  background: var(--bg-raised);
  padding: 1.2rem 1.3rem;
  margin: 1.6rem 0 2rem;
}
.callout h3 { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

/* ---- footer ---- */
footer.site {
  margin-top: 4.5rem; padding-top: 1.2rem; border-top: 1px solid var(--rule);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .84em; color: var(--ink-dim);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
footer.site a { color: var(--ink-dim); }

/* ---- contact page ---- */
.address {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 1.5em;
  font-weight: 500;
  color: var(--ink);
  margin: .2rem 0 .9rem;
  user-select: all;            /* one click/drag selects the whole address */
  word-break: break-word;
}
.address .addr-at { color: var(--ink-dim); font-weight: 400; }
.addr-inline .at { color: var(--ink-dim); }
