/* arsvitae.design — the wall and the plates.
   Wall: charcoal from the wax seal. Plates: bone paper stock from the placeholder envelope.
   Oxblood (the ribbons) only for links and the active page; gilt for hairlines and Latin labels. */

@font-face {
  font-family: "EB Garamond";
  src: url("/fonts/eb-garamond-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("/fonts/eb-garamond-latin-wght-italic.woff2") format("woff2");
  font-weight: 400 800; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --wall: #121214;
  --wall-up: #19191c;
  --hair: rgba(226, 196, 140, .16);
  --hair-strong: rgba(226, 196, 140, .42);
  --bone: #e7dcc4;
  --bone-hi: #f4ecdb;
  --bone-dim: #b9ad94;
  --gilt: #cfa968;
  --oxblood: #8a1d38;        /* on paper */
  --oxblood-hi: #d0607a;     /* on the wall: 5:1 against it */
  --sheet: #e7dcc4;
  --sheet-lo: #d3c5a6;
  --ink: #2c231a;
  --ink-2: #4e3f30;
  --mount: #1c1c1f;
  --serif: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --fibre: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='f'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4'/><feColorMatrix type='saturate' values='0'/></filter><rect width='160' height='160' filter='url(%23f)' opacity='0.55'/></svg>");
  --mottle: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='420' height='420'><filter id='m'><feTurbulence type='fractalNoise' baseFrequency='0.012' numOctaves='4'/><feColorMatrix type='saturate' values='0'/></filter><rect width='420' height='420' filter='url(%23m)' opacity='0.5'/></svg>");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -8%, rgba(226, 196, 140, .07), transparent 70%),
    var(--wall);
  color: var(--bone);
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.6;
  font-variant-numeric: oldstyle-nums;
}
img { max-width: 100%; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

a { color: inherit; text-decoration-color: var(--oxblood-hi); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--bone-hi); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--gilt); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 10px; padding: 8px 14px; background: var(--bone); color: var(--wall); z-index: 10; }
.skip:focus { left: 16px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }

.latin {
  display: block;
  font-size: .75rem; letter-spacing: .34em; text-transform: uppercase;
  color: var(--gilt);
  font-variant-numeric: normal;
}

/* ── header ─────────────────────────────────────────────── */
.site-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 28px; padding: 16px 0 14px;
  border-bottom: 1px solid var(--hair);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .mark { height: 50px; width: auto; display: block; filter: url(#bone-bold); }
.brand-name { font-size: .98rem; letter-spacing: .4em; text-transform: uppercase; font-weight: 500; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-nav a {
  text-decoration: none; font-size: .82rem; letter-spacing: .18em; text-transform: uppercase;
  padding: 6px 0 4px; border-bottom: 1px solid transparent; color: var(--bone-dim);
}
.site-nav a:hover { color: var(--bone-hi); border-bottom-color: var(--hair-strong); }
.site-nav a[aria-current] { color: var(--bone); border-bottom-color: var(--oxblood-hi); }
@media (max-width: 520px) {
  .site-nav { gap: 4px 13px; }
  .site-nav a { font-size: .72rem; letter-spacing: .1em; }
}

/* ── contact ────────────────────────────────────────────── */
.contact-head { text-align: center; margin: 46px 0 0; }
.contact-head h1 { margin: .2em 0 0; font-size: clamp(2rem, 4.6vw, 2.8rem); font-weight: 500; }
.contact-line { text-align: center; margin: 0; font-size: 1.3rem; }
.contact-note { text-align: center; margin: 6px 0 0; color: var(--bone-dim); }

/* ── footer ─────────────────────────────────────────────── */
.site-foot {
  margin-top: 96px; padding: 28px 0 40px; border-top: 1px solid var(--hair);
  display: grid; gap: 6px; text-align: center; color: var(--bone-dim); font-size: .95rem;
}
.site-foot p { margin: 0; }
.site-foot .latin { margin-bottom: 6px; }
.source-note { font-style: italic; }

/* ── home: hero ─────────────────────────────────────────── */
.hero { text-align: center; padding: 52px 0 8px; }
.seal-emblem { position: relative; width: min(230px, 52vw); margin: 0 auto 30px; isolation: isolate; }
/* decoration only: its glow reaches up over the header, so it must never take a click */
.seal-emblem, .seal-emblem::before { pointer-events: none; }
.seal-emblem::before {
  content: ""; position: absolute; inset: -55%; z-index: -1;
  background: radial-gradient(circle, rgba(226, 196, 140, .13) 0%, rgba(226, 196, 140, .04) 38%, transparent 62%);
}
.seal-emblem .ribbons {
  position: absolute; z-index: 0; left: 50%; top: 64%; width: 74%; height: auto;
  transform: translateX(-50%); filter: drop-shadow(6px 8px 8px rgba(0, 0, 0, .5));
}
.seal-emblem .seal {
  position: relative; z-index: 1; display: block; width: 100%; height: auto;
  filter: drop-shadow(5px 8px 12px rgba(0, 0, 0, .65));
}
/* the ribbon tails hang about 1.1 seal-widths below the wax; the wordmark starts under them */
.wordmark { margin: calc(min(230px, 52vw) * .74) 0 0; line-height: 0; }
.wordmark img { width: min(480px, 86vw); height: auto; filter: url(#bone); }
.motto { margin: 14px 0 2px; font-style: italic; font-size: 1.3rem; color: var(--bone-dim); }
.theme { margin: 0 0 16px; font-size: clamp(1.75rem, 3.6vw, 2.35rem); line-height: 1.2; letter-spacing: .015em; color: var(--bone-hi); }
.lede { max-width: 34em; margin: 0 auto; color: var(--bone-dim); font-size: 1.1rem; }

/* ── home: the three doors ──────────────────────────────── */
.doors { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 52px; }
@media (min-width: 780px) { .doors { grid-template-columns: repeat(3, 1fr); } }
.door {
  display: block; padding: 20px 22px 22px; text-decoration: none;
  border: 1px solid var(--hair); background: rgba(255, 255, 255, .012);
  transition: border-color .25s ease, background-color .25s ease;
}
.door:hover { border-color: var(--hair-strong); background: rgba(255, 255, 255, .03); }
.door h2 { margin: .3em 0 .25em; font-size: 1.5rem; font-weight: 500; line-height: 1.2; }
.door p { margin: 0; color: var(--bone-dim); font-size: 1.02rem; line-height: 1.5; }
.door .go { display: inline-block; margin-top: 10px; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--oxblood-hi); }
.door-lead { border-top: 2px solid var(--oxblood-hi); }

/* ── home: the workshop in numbers ──────────────────────── */
.asof { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--bone-dim); font-variant-numeric: normal; }
.figures { margin: 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .figures { grid-template-columns: repeat(3, 1fr); } }
.figures > div { padding: 18px 22px 20px; border: 1px solid var(--hair); background: rgba(255, 255, 255, .012); }
.figures dt { font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gilt); }
.figures dd { margin: 10px 0 0; color: var(--bone-dim); font-size: 1.02rem; line-height: 1.5; }
.figures .big {
  display: block; margin-bottom: 6px; color: var(--bone-hi);
  font-size: clamp(2.2rem, 4vw, 2.9rem); line-height: 1.05; font-variant-numeric: lining-nums;
}

/* ── section heads ──────────────────────────────────────── */
.section-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px;
  margin: 84px 0 24px; padding-bottom: 10px; border-bottom: 1px solid var(--hair);
}
.section-head h2 { margin: 0; font-weight: 500; font-size: clamp(1.7rem, 3.2vw, 2.2rem); line-height: 1.15; }
.more { font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; }

/* ── the paper stock (plates) ───────────────────────────── */
.sheet {
  background-color: var(--sheet);
  background-image:
    linear-gradient(154deg, rgba(255, 255, 255, .34) 0%, rgba(255, 255, 255, .06) 34%, rgba(96, 74, 48, .07) 72%, rgba(72, 54, 32, .15) 100%),
    var(--fibre), var(--mottle);
  background-size: auto, 160px 160px, 420px 420px;
  background-blend-mode: normal, multiply, multiply;
  color: var(--ink);
  border-radius: 2px;
  box-shadow: 0 22px 44px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .45);
}
.sheet a { text-decoration-color: var(--oxblood); }
.sheet a:hover { color: var(--oxblood); }
.sheet :focus-visible { outline-color: var(--oxblood); }

/* ── plate cards ────────────────────────────────────────── */
.plates { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .plates { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .plates { grid-template-columns: repeat(3, 1fr); } }
.plates > li { display: flex; }
.plate-card {
  position: relative; display: flex; flex-direction: column; width: 100%;
  padding: 20px 20px 22px; text-decoration: none;
  transition: transform .35s cubic-bezier(.22, .7, .2, 1), box-shadow .35s ease;
}
.plate-card::after {
  content: ""; position: absolute; inset: 7px; pointer-events: none;
  border: 1px solid rgba(88, 70, 50, .3);
}
.plate-card:hover { color: var(--ink); transform: translateY(-3px); box-shadow: 0 30px 54px rgba(0, 0, 0, .6), 0 3px 8px rgba(0, 0, 0, .45); }
.plate-top {
  display: flex; justify-content: space-between; gap: 10px;
  font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2);
  font-variant-numeric: normal;
}
.plate-card h3 { margin: 0 0 .3em; font-size: 1.38rem; font-weight: 500; line-height: 1.2; }
.plate-card p { margin: 0 0 14px; font-size: 1rem; line-height: 1.45; }
.plate-card .credit { margin-top: -6px; font-size: .86rem; font-style: italic; color: var(--ink-2); }
.status {
  margin-top: auto; padding-top: 10px; border-top: 1px solid rgba(88, 70, 50, .22);
  font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2);
  font-variant-numeric: normal;
}

/* pictures: engraving = a render on white, multiplied into the paper; mounted = a framed print */
.media { display: block; aspect-ratio: 3 / 2; margin: 12px 0 16px; overflow: hidden; }
.media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.engrave img { mix-blend-mode: multiply; }
.mounted { background: var(--mount); outline: 1px solid rgba(44, 35, 26, .55); outline-offset: 0; box-shadow: 0 1px 0 rgba(255, 255, 255, .35); }

/* ── method strip ───────────────────────────────────────── */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .steps { grid-template-columns: repeat(5, 1fr); } }
.steps li { border-top: 1px solid var(--hair-strong); padding-top: 12px; }
.steps .num { display: block; color: var(--gilt); letter-spacing: .2em; font-size: .9rem; }
.steps h3 { margin: .15em 0 .25em; font-size: 1.2rem; font-weight: 500; line-height: 1.25; }
.steps p { margin: 0; color: var(--bone-dim); font-size: 1rem; line-height: 1.5; }
.method .more { display: inline-block; margin-top: 22px; }

/* ── analog: paintings hung on the wall as framed prints ── */
.page-head { margin: 46px 0 34px; max-width: 46em; }
.page-head h1 { margin: .2em 0 .3em; font-size: clamp(2.1rem, 4.6vw, 3rem); font-weight: 500; line-height: 1.1; }
.page-head p { margin: 0; color: var(--bone-dim); font-size: 1.12rem; }
.gallery { columns: 1; column-gap: 26px; }
@media (min-width: 640px) { .gallery { columns: 2; } }
@media (min-width: 1020px) { .gallery { columns: 3; } }
.art { break-inside: avoid; margin: 0 0 30px; }
.frame {
  display: block; padding: 9px; background: var(--mount);
  box-shadow: 0 18px 36px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(226, 196, 140, .2);
}
.frame img { display: block; width: 100%; height: auto; }
.art figcaption { margin-top: 10px; font-family: var(--serif); font-size: 1.05rem; letter-spacing: 0; text-transform: none; color: var(--bone); }
.art figcaption span { display: block; color: var(--bone-dim); font-size: .95rem; font-style: italic; }
.strip { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 860px) { .strip { grid-template-columns: repeat(4, 1fr); } }
.strip a { display: block; }
.strip .frame { padding: 7px; }
.strip img { aspect-ratio: 1; object-fit: cover; }

/* ── workflows: the loop, the sections, the skills ──────── */
.loop { margin: 0 auto 10px; max-width: 560px; color: var(--gilt); }
.loop svg { display: block; width: 100%; height: auto; }
.loop .ring { fill: none; stroke: currentColor; stroke-width: 1.5; opacity: .55; }
.loop .arrow { fill: currentColor; }
.loop .node { fill: var(--wall); stroke: currentColor; stroke-width: 1.5; }
.loop .num { fill: var(--gilt); font-family: var(--serif); font-size: 13px; letter-spacing: .08em; text-anchor: middle; }
.loop .label { fill: var(--bone); font-family: var(--serif); font-size: 22px; }
.loop .centre { fill: var(--bone-dim); font-family: var(--serif); font-size: 13px; letter-spacing: .3em; text-anchor: middle; text-transform: uppercase; }
.wf { margin-top: 64px; max-width: 46em; }
.wf h2 { margin: .25em 0 .4em; font-size: clamp(1.6rem, 3vw, 2.05rem); font-weight: 500; line-height: 1.15; }
.wf p { margin: 0 0 1em; color: var(--bone); }
.wf .figure-line { color: var(--bone-dim); font-style: italic; }
.skills { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--hair); }
.skills li { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--hair); line-height: 1.45; }
.skills b { font-weight: 500; color: var(--gilt); letter-spacing: .04em; }
@media (max-width: 560px) { .skills li { grid-template-columns: 1fr; gap: 2px; } }

/* ── about ──────────────────────────────────────────────── */
.about-body { max-width: 40em; }
.about-body h2 { margin: 2em 0 .5em; font-size: .8rem; letter-spacing: .32em; text-transform: uppercase; font-weight: 500; color: var(--gilt); }
.about-body p { margin: 0 0 1em; }
.about-mark { display: block; width: 150px; height: auto; margin: 6px 0 14px; filter: url(#bone); }

/* ── work index ─────────────────────────────────────────── */
.family { margin-top: 56px; }
.family > h2 { margin: 0 0 18px; padding-bottom: 8px; border-bottom: 1px solid var(--hair); font-size: clamp(1.45rem, 2.6vw, 1.8rem); font-weight: 500; }
.plate-card.static:hover { transform: none; box-shadow: 0 22px 44px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .45); }
.plate-card .more-link { margin: 0 0 12px; font-size: .95rem; }
.upcoming { margin-top: 56px; max-width: 46em; color: var(--bone-dim); }

/* ── write line ─────────────────────────────────────────── */
.write { margin-top: 84px; text-align: center; }
.write p { margin: 8px 0 0; font-size: 1.25rem; }

/* ── plate page ─────────────────────────────────────────── */
.crumbs { margin: 30px 0 16px; font-size: .82rem; letter-spacing: .18em; text-transform: uppercase; }
.crumbs a { text-decoration: none; color: var(--bone-dim); }
.crumbs a:hover { color: var(--bone-hi); }
.plate { position: relative; padding: 26px 20px 30px; }
.plate::after { content: ""; position: absolute; inset: 10px; pointer-events: none; border: 1px solid rgba(88, 70, 50, .3); }
@media (min-width: 760px) { .plate { padding: 50px 58px 56px; } .plate::after { inset: 14px; } }
.plate-head h1 { margin: .25em 0 .2em; font-size: clamp(2.1rem, 4.6vw, 3.1rem); font-weight: 500; line-height: 1.08; }
.plate-head .summary { margin: 0; max-width: 34em; font-size: 1.22rem; line-height: 1.5; }
.hero-fig { margin: 26px 0 0; }
.hero-fig .media { margin: 0; }
figcaption {
  margin-top: 8px; font-family: var(--mono); font-size: .74rem; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-2); font-variant-numeric: normal;
}
.plate-body { display: grid; gap: 30px 52px; margin-top: 24px; }
@media (min-width: 920px) { .plate-body { grid-template-columns: minmax(0, 1fr) 310px; } }
.prose h2 {
  margin: 1.9em 0 .55em; font-size: .78rem; letter-spacing: .32em; text-transform: uppercase; font-weight: 600;
  color: var(--oxblood);
}
.prose h2:first-child { margin-top: .4em; }
.prose p { margin: 0 0 1em; max-width: 38em; }
.inline-fig { margin: 6px 0 22px; max-width: 38em; }
.inline-fig .media { margin: 0; }
.versions { list-style: none; margin: 0; padding: 0; max-width: 38em; }
.versions li {
  display: grid; grid-template-columns: 3.6em minmax(0, 1fr); gap: 14px;
  padding: 7px 0; border-bottom: 1px solid rgba(88, 70, 50, .2); line-height: 1.45;
}
.versions .v { font-family: var(--mono); font-size: .78rem; padding-top: .25em; color: var(--ink-2); font-variant-numeric: normal; }
.versions .now .v { color: var(--oxblood); }
.title-block { align-self: start; border: 1.5px solid var(--ink); font-family: var(--mono); font-size: .78rem; line-height: 1.45; font-variant-numeric: normal; }
.title-block .tb-head {
  padding: 7px 10px; background: var(--ink); color: var(--sheet);
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
}
.title-block dl { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); }
.title-block dt, .title-block dd { padding: 8px 10px; border-top: 1px solid rgba(44, 35, 26, .32); }
.title-block dt { border-right: 1px solid rgba(44, 35, 26, .32); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); padding-top: 9px; }
.title-block dd { margin: 0; }
.plate-foot { margin-top: 34px; padding-top: 14px; border-top: 1px solid rgba(88, 70, 50, .25); font-size: .82rem; letter-spacing: .18em; text-transform: uppercase; }

/* ── 404 ────────────────────────────────────────────────── */
.lost { text-align: center; padding: 70px 0 20px; }
.lost .mark { width: min(200px, 46vw); height: auto; filter: url(#bone); opacity: .92; }
.lost h1 { margin: .2em 0 .35em; font-size: clamp(2rem, 5vw, 3rem); font-weight: 500; }
.lost .latin { margin-top: 22px; }

@media (prefers-reduced-motion: reduce) {
  .plate-card, .door { transition: none; }
  .plate-card:hover { transform: none; }
}
