/* ============================================================
   Franziska Mager — single-page
   MuseoModerno · IBM Plex Mono · Literata
   (note: "IBM Plex Typewriter" is not a real Google font — it
   silently fell back to thin Courier New. IBM Plex Mono is the
   genuine, readable monospace.)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=MuseoModerno:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=Literata:ital,wght@0,400;1,400&display=swap');

:root {
  --ground: #ece3da;
  --ground-2: #e4dbd2;
  --ink: #232f3e;
  --ink-2: #1a5694;
  --ink-3: #5c6f87;
  --line: #cbc1b2;
  --oxford: #0e4078;
  --accent: #b04d74;
  --mauve: #946b8a;
  --amber: #d4894a;
  --cool: #0e4078;

  --font-display: "MuseoModerno", system-ui, sans-serif;
  --font-text: "IBM Plex Mono", "Courier New", monospace;
  --font-rare: "Literata", Georgia, serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --rail: 268px;
  --maxw: 1080px;
  --pad: 56px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  position: relative;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-text);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.66;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* artwork motifs — circle, blocks, grain (from the portrait) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  left: var(--rail);
  z-index: -2;
  pointer-events: none;
  opacity: .7;
  background-image: url("artwork-bg.svg");
  background-repeat: repeat;
  background-size: 900px 1100px;
}

/* fine paper grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .55;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

a { color: inherit; }

::selection { background: rgba(176,77,116,.22); }

em.mauve { font-style: italic; color: var(--mauve); }
em.amber { font-style: italic; color: var(--amber); }
em.accent { font-style: italic; color: var(--accent); }
em.cool { font-style: italic; color: var(--cool); }

/* ---- shared label primitive ----------------------------- */
.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.mono.lead { color: var(--ink-2); }
.mono.accent { color: var(--accent); }
.mono.mauve { color: var(--mauve); }
.mono.amber { color: var(--amber); }
.mono.cool { color: var(--cool); }
.mono.blue { color: var(--ink-2); }

.hair { height: 1px; background: var(--line); border: 0; }

/* ============================================================
   LAYOUT SHELL — sticky left rail + scrolling content
   ============================================================ */
.layout {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  align-items: start;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

/* ---- sidebar -------------------------------------------- */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 34px 30px 28px;
  border-right: 1px solid var(--line);
  background: var(--ground);
  z-index: 5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -.02em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.05;
}
.brand .dot { color: var(--accent); }

/* subject avatar — reusable icon */
.avatar {
  border-radius: 50%;
  background: var(--ground-2);
  object-fit: cover;
  object-position: 50% 34%;
  border: 1px solid var(--line);
}
.brand .avatar { width: 42px; height: 42px; flex: none; }

/* rail nav — the only navigation */
.rail {
  margin-top: 44px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.rail a {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-decoration: none;
  padding: 9px 10px 9px 16px;
  border-left: 2px solid transparent;
  transition: color .15s, border-color .15s, background .15s;
}
.rail a .n {
  font-size: 10px;
  color: var(--ink-3);
  opacity: .65;
}
.rail a:hover { color: var(--ink); background: var(--ground-2); }
/* current section — faint magenta highlight (consistent, not per-section blue) */
.rail a.current {
  color: var(--ink);
  background: rgba(176, 77, 116, .12);
  border-left-color: var(--accent);
}
.rail a.current .n { opacity: 1; color: var(--accent); }

/* rail footer — external links + colophon */
.rail-meta { margin-top: auto; padding-top: 26px; }
.rail-meta .links { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; }
.rail-meta .links a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--ink-2);
  text-decoration: none;
}
.rail-meta .links a:hover { color: var(--accent); }
.rail-meta .colo {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.7;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.rail-meta .colo .dot { color: var(--accent); }

/* ---- content column ------------------------------------- */
.content { min-width: 0; }

/* a top-level page section */
.block {
  padding: clamp(72px, 10vh, 128px) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 0;
}
.block:first-child { border-top: 0; }

.block-head { margin-bottom: 44px; }
.block-eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.block-eyebrow .bar { flex: 1; height: 1px; background: var(--line); }
.block-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 60px);
  letter-spacing: -.02em;
  line-height: 1;
  color: var(--ink);
}
.block-lede {
  font-family: var(--font-text);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 680px;
  margin-top: 24px;
}
.block-lede + .block-lede { margin-top: 16px; font-size: clamp(16px, 1.6vw, 17px); color: var(--ink-3); }

/* ============================================================
   INTRO (home block)
   ============================================================ */
.intro { padding-top: clamp(28px, 5vh, 64px); }
.intro-eyebrow { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.intro-eyebrow .mono { font-weight: 500; color: var(--ink-2); }
.intro-eyebrow .bar { flex: 1; min-width: 40px; height: 1px; background: linear-gradient(to right, var(--cool), var(--mauve), var(--amber)); opacity: .5; }

.intro-head {
  display: grid;
  grid-template-columns: 1fr minmax(170px, 280px);
  gap: clamp(24px, 4vw, 52px);
  align-items: end;
}
.intro-img {
  display: block;
  width: 100%;
  max-width: 264px;
  height: auto;
  justify-self: end;
  /* the image's paper background already matches the page ground (~5/255),
     so instead of a blend mode we just feather the rectangle's edges to
     transparent — the boundary dissolves and the portrait sits on the page. */
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0, #000 5%, #000 92%, transparent 100%),
    linear-gradient(to right,  transparent 0, #000 5%, #000 95%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, transparent 0, #000 5%, #000 92%, transparent 100%),
    linear-gradient(to right,  transparent 0, #000 5%, #000 95%, transparent 100%);
  mask-composite: intersect;
}
.intro-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 5.2vw, 62px);
  line-height: .96;
  letter-spacing: -.025em;
  color: var(--ink);
}
.intro-name .l2 { color: var(--mauve); }
.intro-subtitle {
  font-family: var(--font-text);
  font-size: clamp(14px, 1.4vw, 15px);
  line-height: 1.6;
  color: var(--ink-2);
  margin-top: 16px;
  max-width: 48ch;
}

.intro-lead {
  margin-top: clamp(18px, 3vh, 34px);
  max-width: 600px;
}
.intro-lead p { font-size: 15.5px; color: var(--ink); line-height: 1.6; }

/* stitched thread motif from the portrait */
.art-thread {
  display: block;
  width: 100%;
  max-width: 640px;
  height: 56px;
  margin-top: 40px;
  background: url("artwork-thread.svg") no-repeat left center;
  background-size: 100% auto;
  opacity: .5;
  pointer-events: none;
}
.art-thread--wide { max-width: none; height: 64px; margin-top: 32px; opacity: .42; }

/* ============================================================
   PROSE / SPLIT sub-sections
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}
.split:first-of-type { border-top: 0; padding-top: 0; }
.split > h3 {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding-top: 6px;
}
.prose { max-width: 64ch; }
.prose p { margin-bottom: 18px; font-size: 18.5px; line-height: 1.66; }
.prose p:last-child { margin-bottom: 0; }
.prose a.inline,
a.inline {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
  transition: color .15s;
}
.prose a.inline:hover, a.inline:hover { color: var(--accent); }
.prose .btn { margin-top: 8px; }

.pull {
  font-family: var(--font-text);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.35;
  color: var(--ink);
  max-width: 30ch;
}

/* facts list (definition list) */
.facts { display: grid; gap: 0; }
.facts .row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px dotted var(--line);
}
.facts .row:first-child { border-top: 1px solid var(--line); }
.facts .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding-top: 4px;
}
.facts .v { font-size: 17.5px; color: var(--ink); }

/* services (working together) */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  margin-bottom: 8px;
}
.service {
  padding: 32px 28px 38px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.service .num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--accent);
  display: block;
  margin-bottom: 22px;
}
.service:nth-child(2) .num { color: var(--mauve); }
.service:nth-child(3) .num { color: var(--amber); }
.service h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -.01em;
  line-height: 1.12;
}
.service p { font-size: 16.5px; color: var(--ink-2); margin-top: 12px; line-height: 1.55; }

/* curriculum vitae download */
.cv-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.cv-note {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .03em;
  padding: 13px 24px;
  background: var(--ink);
  color: var(--ground);
  border: 1px solid var(--ink);
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--mauve); border-color: var(--mauve); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--ground); border-color: var(--ink); }

/* ============================================================
   MEDIA & PUBLICATIONS — themes, clusters, media types
   ============================================================ */
.cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.cat-nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cat-nav a:hover { color: var(--ink); }
.cat-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--c, var(--accent));
  display: inline-block;
  flex: none;
}

.theme { padding: 48px 0; border-bottom: 1px solid var(--line); }
.theme-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.theme-head h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 29px;
  letter-spacing: -.01em;
}
.theme-head .theme-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c, var(--accent));
}
.theme-blurb {
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 64ch;
  margin-bottom: 30px;
}

/* an entry = a primary work plus its associated media */
.entries { display: flex; flex-direction: column; }
.entry { padding: 24px 0; border-top: 1px solid var(--line); }
.entry:first-child { border-top: 0; padding-top: 6px; }

.item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 20px;
  text-decoration: none;
  color: var(--ink);
  align-items: baseline;
}
.item .yr { font-family: var(--font-mono); font-size: 13px; color: var(--ink-3); }
.item-body { min-width: 0; }
.kind {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 2px 7px;
  border: 1px solid currentColor;
  color: var(--ink-3);
  margin-bottom: 9px;
}
.kind-report  { color: var(--cool); }
.kind-paper   { color: var(--ink-2); }
.kind-podcast { color: var(--accent); }
.kind-video   { color: var(--mauve); }
.kind-radio   { color: var(--amber); }
.kind-essay   { color: var(--mauve); }
.item-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -.005em;
  color: var(--ink);
  display: block;
}
a.item:hover .item-title { color: var(--accent); }
.item-title .ext { color: var(--ink-3); font-size: 13px; margin-left: 4px; }
.item-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 7px;
}
.item-meta .org { color: var(--ink-2); }

/* related/associated media, bracketed under the primary */
.related {
  margin: 16px 0 4px 58px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.related .item { grid-template-columns: 1fr; gap: 0; }
.related .item-title { font-size: 16.5px; font-weight: 500; }
.related .kind { margin-bottom: 7px; }

/* embedded media (video / podcast player) — placeholder ready for an iframe */
.embed { max-width: 540px; }
.embed-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  border: 1px dashed var(--ink-3);
  background: var(--ground-2);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.embed-frame.audio { aspect-ratio: auto; height: 120px; }
.embed iframe { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); display: block; }
.embed figcaption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--ink-3);
  margin-top: 9px;
}

.pub-note { font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; margin: 34px 0 0; color: var(--ink-3); }

/* ============================================================
   PERSONAL WRITING — Substack
   ============================================================ */
/* section head carries the kept stylised portrait */
.writing-head {
  display: grid;
  grid-template-columns: 1fr minmax(190px, 280px);
  gap: clamp(28px, 4vw, 56px);
  align-items: end;
}
.writing-portrait { display: block; width: 100%; max-width: 280px; height: auto; justify-self: end; }

.essays { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.essay {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.essay .yr { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--ink-3); }
.essay .title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.28;
  letter-spacing: -.005em;
}
.essay .title a { color: var(--ink); text-decoration: none; }
.essay .title a:hover { color: var(--accent); }
.essay .title .ext { color: var(--ink-3); font-size: 13px; margin-left: 4px; }
.essay .dek { font-size: 16.5px; color: var(--ink-2); margin-top: 9px; line-height: 1.55; max-width: 60ch; }

.substack {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 30px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  background: var(--ground-2);
  position: relative;
}
.substack::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; bottom: -1px;
  width: 3px;
  background: var(--amber);
}
.substack .sub-t { font-family: var(--font-display); font-weight: 500; font-size: 20px; letter-spacing: -.01em; }
.substack .sub-d {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 5px;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.contact-grid .lede {
  font-family: var(--font-text);
  font-size: clamp(20px, 2.4vw, 24px);
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 30px;
  max-width: 26ch;
}
.contact-links { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.contact-links a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  font-size: 18px;
  transition: color .15s;
}
.contact-links a:hover { color: var(--accent); }
.contact-links a .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ============================================================
   PAGE-FOOT colophon (content bottom)
   ============================================================ */
.page-foot {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
}
.page-foot::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, var(--mauve), var(--amber), var(--cool));
  opacity: .5;
}
.page-foot .mono { color: var(--ink-3); }
.page-foot .dot { color: var(--accent); }

/* ============================================================
   RESPONSIVE — rail collapses to a sticky top strip
   ============================================================ */
@media (max-width: 920px) {
  :root { --pad: 24px; }

  .layout { grid-template-columns: 1fr; }

  body::before { left: 0; }

  .sidebar {
    position: sticky;
    top: 0;
    height: auto;
    flex-direction: column;
    padding: 14px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: var(--ground);
  }
  .rail {
    margin-top: 12px;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .rail::-webkit-scrollbar { display: none; }
  .rail a {
    border-left: 0;
    border-bottom: 2px solid transparent;
    padding: 6px 12px 8px;
    white-space: nowrap;
  }
  .rail a .n { display: none; }
  .rail a.current { border-left-color: transparent; border-bottom-color: var(--accent); }
  .rail-meta { display: none; }

  .block { scroll-margin-top: 96px; }
  .intro-head { grid-template-columns: 1fr; gap: 24px; }
  .intro-img { order: -1; justify-self: start; max-width: 200px; }
  .intro-name { font-size: clamp(30px, 10vw, 50px); }

  .services { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 16px; padding: 28px 0; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .facts .row { grid-template-columns: 1fr; gap: 4px; }
  .theme-head { flex-wrap: wrap; gap: 10px; }
  .theme-head .theme-count { margin-left: 0; }
  .item { grid-template-columns: 1fr; gap: 6px; }
  .related { margin-left: 0; }
  .essay { grid-template-columns: 1fr; gap: 6px; }

  .writing-head { grid-template-columns: 1fr; gap: 24px; }
  .writing-portrait { max-width: 200px; justify-self: start; order: -1; }
}
