/* ==========================================================================
   maximromanov.github.io — site stylesheet
   Hand-written; no framework. Tokens first, then layout, then components.
   ========================================================================== */

/* ---------- fonts (self-hosted; latin + latin-ext subsets) ---------- */
@font-face { font-family: "Literata"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("/assets/fonts/Literata-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url("/assets/fonts/Literata-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 300 900; font-display: swap;
  src: url("/assets/fonts/Literata-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 300 900; font-display: swap;
  src: url("/assets/fonts/Literata-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/assets/fonts/Inter-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/assets/fonts/Inter-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/assets/fonts/JetBrainsMono-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/assets/fonts/JetBrainsMono-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

@font-face { font-family: "Amiri"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/Amiri-400-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC4, U+10EFC-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1; }

/* ---------- tokens ---------- */
:root {
  --paper: #F6F1E8;        /* page background: warm, slightly aged paper */
  --paper-2: #EEE7DA;      /* bands and panels */
  --panel: #FBF8F2;        /* raised cards */
  --rule: #D6CBB9;         /* hairlines */
  --rule-soft: #E5DCCD;
  --ink: #1F1A15;          /* text */
  --muted: #5F564B;        /* secondary text */
  --faint: #8B8174;        /* labels */
  --red: #B5140E;          /* accent, from the RM mark */
  --red-soft: #D14A40;
  --red-wash: #F4E2DE;
  --link: #9E1B14;
  --link-underline: rgba(158, 27, 20, .35);
  --gold: #B8923F;          /* jadwal inner line, ornaments */
  --grain-opacity: .055;
  --f-text: "Literata", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-ui: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --f-ar: "Amiri", "Scheherazade New", "Noto Naskh Arabic", "Geeza Pro", "Traditional Arabic", serif;
  --measure: 66ch;
  --wrap: 960px;
  --gutter: 16px;
  --label-w: 148px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #161311; --paper-2: #1E1A17; --panel: #211D19; --rule: #3B342D; --rule-soft: #2E2924;
    --ink: #EAE2D6; --muted: #B7AC9C; --faint: #857A6D;
    --red: #E2574B; --red-soft: #F07A6F; --red-wash: #3A211E; --link: #EC7B70; --link-underline: rgba(236, 123, 112, .4);
    --gold: #C9A65A; --grain-opacity: .07;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #161311; --paper-2: #1E1A17; --panel: #211D19; --rule: #3B342D; --rule-soft: #2E2924;
  --ink: #EAE2D6; --muted: #B7AC9C; --faint: #857A6D;
  --red: #E2574B; --red-soft: #F07A6F; --red-wash: #3A211E; --link: #EC7B70; --link-underline: rgba(236, 123, 112, .4);
  --gold: #C9A65A; --grain-opacity: .07;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-text); font-size: 17px; line-height: 1.62;
  font-optical-sizing: auto; text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1 0 auto; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.25 0 0 0 0 0.12 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
body::after { content: ""; position: fixed; top: 0; left: 0; right: 0; height: 3px; background: var(--red); z-index: 5; }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: underline; text-decoration-color: var(--link-underline); text-underline-offset: .16em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3, h4 { font-family: var(--f-text); font-weight: 600; line-height: 1.18; letter-spacing: -.012em; margin: 0; text-wrap: balance; }
h1 { font-weight: 700; letter-spacing: -.03em; }
h1 { font-size: clamp(34px, 5vw, 54px); }
h2 { font-size: clamp(24px, 3vw, 30px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.4em 0; }
code, pre { font-family: var(--f-mono); font-size: .86em; }
code { background: var(--paper-2); padding: .05em .35em; border-radius: 3px; }
pre { background: var(--paper-2); padding: 14px 16px; overflow: auto; border-radius: 4px; line-height: 1.5; }
pre code { background: none; padding: 0; }
blockquote { margin: 1.4em 0; padding: .2em 0 .2em 1.2em; border-left: 3px solid var(--red); color: var(--muted); }
table { border-collapse: collapse; width: 100%; margin: 1.2em 0; font-size: 15.5px; }
th, td { text-align: left; vertical-align: top; padding: .5em .7em; border-bottom: 1px solid var(--rule-soft); }
th { font-family: var(--f-ui); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
[lang="ar"] { font-family: var(--f-ar); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(var(--gutter), 4vw, 40px); width: 100%; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--red); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* small uppercase label */
.app { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin: 0 0 12px; }
.app a { color: inherit; text-decoration: none; }
.app a:hover { color: var(--red); }

/* ---------- header ---------- */
.site-head { border-bottom: 1px solid var(--rule-soft); background: var(--paper); }
.head-inner { display: flex; align-items: center; gap: 24px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand .mark { width: 42px; height: 42px; border-radius: 3px; display: block; box-shadow: 0 1px 0 rgba(0,0,0,.15); }
.brand-name { font-family: var(--f-text); font-weight: 600; font-size: 19px; letter-spacing: -.01em; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-family: var(--f-ui); font-size: 14.5px; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--ink); }
.site-nav a.active { color: var(--ink); border-bottom-color: var(--red); }
.nav-num { font-family: var(--f-ar); color: var(--red); margin-right: .42em; font-size: 1.05em; }
.theme-toggle { background: none; border: 1px solid var(--rule); color: var(--muted); border-radius: 999px; width: 32px; height: 32px; display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.theme-toggle:hover { color: var(--red); border-color: var(--red); }
@media (max-width: 720px) {
  .head-inner { flex-wrap: wrap; gap: 12px 16px; }
  .brand { margin-right: 0; flex: 1 1 auto; }
  .site-nav { order: 3; flex-basis: 100%; gap: 2px 16px; font-size: 14px; }
}

/* ---------- page head ---------- */
.page-head { padding: clamp(36px, 6vw, 64px) 0 20px; max-width: 760px; }
.page-head h1 { font-size: clamp(34px, 5.2vw, 52px); }
.lede { font-size: clamp(18px, 2.1vw, 21px); font-style: italic; font-weight: 400; color: var(--muted); line-height: 1.5; margin: 18px 0 0; max-width: 58ch; text-wrap: pretty; }
.intro { margin-top: 12px; }

/* ---------- illustrations (manuscript-style) ---------- */
.illus { margin: 0; }
.illus img { display: block; width: 100%; height: auto; border: 1px solid var(--gold); outline: 1px solid var(--red); outline-offset: 4px; box-shadow: 0 12px 30px rgba(60, 40, 20, .16); background: var(--paper); }
.illus { padding: 5px; }
:root[data-theme="dark"] .illus img { filter: brightness(.92); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .illus img { filter: brightness(.92); } }
.illus figcaption { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-top: 12px; text-align: right; }
.page-head-illus { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 36px; align-items: end; max-width: none; }
.page-head-illus .page-head-text { max-width: 760px; }
.home-head-illus { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 40px; align-items: center; }
.illus-home img { transform: rotate(-1deg); }
.portrait { justify-self: end; width: 300px; max-width: 100%; }
.portrait img { display: block; width: 100%; height: auto; }
.portrait .portrait-ar { font-family: var(--f-ar); font-size: clamp(30px, 3.6vw, 44px); color: var(--red); text-align: center; text-transform: none; letter-spacing: 0; margin-top: 14px; line-height: 1.2; }
@media (max-width: 720px) { .portrait { justify-self: start; width: 240px; } }
.hd-ar-wrap { display: flex; justify-content: flex-end; align-items: center; height: 100%; }
.hd-ar { font-family: var(--f-ar); font-size: clamp(64px, 9vw, 124px); line-height: 1.1; color: var(--red); opacity: .92; margin: 0; text-align: right; font-weight: 400; text-shadow: 0 1px 0 rgba(255,255,255,.4); }
@media (max-width: 720px) { .hd-ar-wrap { justify-content: flex-start; } .hd-ar { font-size: 56px; text-align: left; opacity: .85; } }
@media (max-width: 860px) {
  .page-head-illus { grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; }
  .home-head-illus { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 720px) {
  .page-head-illus, .home-head-illus { grid-template-columns: 1fr; gap: 22px; }
  .page-head-illus .illus, .illus-home { max-width: 460px; }
  .illus-home img { transform: none; }
}

/* ---------- home ---------- */
.home-head { padding: clamp(44px, 8vw, 96px) 0 28px; }
.home-head h1 { font-size: clamp(42px, 7vw, 76px); letter-spacing: -.028em; line-height: 1.02; }
.hd-standing { font-size: clamp(19px, 2.5vw, 26px); font-weight: 400; color: var(--red); margin: 22px 0 0; line-height: 1.34; max-width: 30ch; letter-spacing: -.008em; text-wrap: balance; }
.hd-position { font-family: var(--f-ui); font-size: 15.5px; color: var(--muted); margin: 18px 0 0; max-width: 60ch; line-height: 1.5; }
.hd-links { font-family: var(--f-ui); font-size: 14px; margin: 14px 0 0; color: var(--faint); }
.hd-links a { color: var(--muted); text-decoration: none; }
.hd-links a:hover { color: var(--red); }

.rail { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 28px 0 40px; }
.rail-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.rail-list li + li { border-left: 1px solid var(--rule-soft); }
.rail-list a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; text-decoration: none; color: var(--ink); height: 100%; }
.rail-list a:hover { background: var(--panel); }
.rail-abbr { font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.rail-label { font-family: var(--f-ui); font-size: 13.5px; color: var(--muted); line-height: 1.35; }
@media (max-width: 720px) {
  .rail-list { grid-template-columns: 1fr 1fr; }
  .rail-list li:nth-child(3) { border-left: 0; }
  .rail-list li:nth-child(n+3) { border-top: 1px solid var(--rule-soft); }
}

/* featured book (home) */
.feature-book { display: grid; grid-template-columns: 150px 1fr; gap: 26px; align-items: start; background: var(--panel); border: 1px solid var(--rule-soft); border-left: 3px solid var(--red); border-radius: 4px; padding: 22px 26px; margin: 0 0 44px; max-width: 820px; }
.fb-cover img { display: block; width: 150px; height: auto; border-radius: 2px; box-shadow: 0 6px 18px rgba(0,0,0,.22); }
.fb-text .app { margin-bottom: 8px; color: var(--red); }
.fb-title { font-size: clamp(20px, 2.4vw, 25px); font-weight: 600; margin: 0 0 10px; line-height: 1.22; }
.fb-title em { font-style: italic; }
.fb-blurb { font-size: 15.5px; color: var(--muted); margin: 0 0 8px; line-height: 1.5; max-width: 60ch; }
.feature-book .it-links { margin-top: 10px; }
@media (max-width: 560px) { .feature-book { grid-template-columns: 1fr; gap: 16px; padding: 18px; } .fb-cover img { width: 120px; } }

/* publication with a cover */
.it-with-cover { display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: start; }
.it-cover img { display: block; width: 120px; height: auto; border-radius: 2px; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.it-toc { margin: .5em 0 0; padding-left: 1.2em; }
.it-toc li { margin-bottom: .3em; }
@media (max-width: 560px) { .it-with-cover { grid-template-columns: 1fr; } .it-cover img { width: 100px; } }

/* ---------- prose ---------- */
.prose { max-width: var(--measure); font-size: 17.5px; }
.prose-wide { max-width: 820px; }
.prose p { margin: 0 0 1.15em; text-wrap: pretty; }
.prose h2 { margin: 2.2em 0 .7em; padding-top: .6em; border-top: 1px solid var(--rule); font-size: clamp(22px, 2.6vw, 27px); }
.prose h2:first-child { margin-top: 1em; border-top: 0; padding-top: 0; }
.prose h3 { margin: 1.8em 0 .5em; font-size: 19.5px; }
.prose h4 { margin: 1.4em 0 .4em; font-size: 16.5px; font-family: var(--f-ui); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.15em; }
.prose li { margin-bottom: .35em; }
.prose li p { margin-bottom: .5em; }
.prose img { display: block; margin: 1.2em auto; border-radius: 3px; }
.prose figure, .prose .figure { margin: 1.6em 0; }
.prose figcaption, .prose .caption, .prose p.caption { font-family: var(--f-ui); font-size: 13.5px; color: var(--muted); text-align: center; margin-top: .5em; }
.prose sup { line-height: 0; }
.prose .footnote { font-size: 15px; color: var(--muted); border-top: 1px solid var(--rule); margin-top: 2.5em; padding-top: 1em; }
.prose .footnotes, .prose .footnote ol { font-size: 15px; color: var(--muted); }
.prose .footnotes { border-top: 1px solid var(--rule); margin-top: 2.5em; padding-top: 1em; }
.prose .footnote-backref, .prose a.reversefootnote { text-decoration: none; }
.prose hr.footnotes-sep { display: none; }
.prose .lead { font-size: 1.12em; color: var(--muted); }
.home-essay { margin-bottom: 40px; }
.home-essay > p:first-of-type::first-letter { float: left; font-size: 4.6em; line-height: .78; padding: .08em .1em 0 0; color: var(--red); font-weight: 700; font-family: var(--f-text); }
.home-essay h2 { font-size: 21px; margin: 2em 0 .6em; border-top: 0; padding-top: 0; }
.home-essay h2:first-child { margin-top: 0; }
.prose .aside { font-family: var(--f-ui); font-size: 14.5px; color: var(--muted); border-left: 2px solid var(--rule); padding-left: 14px; margin: 1.4em 0; }

/* project blocks on the research page */
.project { margin: 2.4em 0 2.8em; padding-top: 1.6em; border-top: 1px solid var(--rule); scroll-margin-top: 24px; }
.project:first-of-type { border-top: 0; padding-top: 0; }
.project h2 { border-top: 0; padding-top: 0; margin: 0 0 .35em; }
.project .meta { font-family: var(--f-ui); font-size: 14px; color: var(--muted); margin: 0 0 1em; line-height: 1.5; }
.project .meta b { color: var(--red); font-weight: 600; }
.project .meta a { color: var(--muted); }
.project .links { font-family: var(--f-ui); font-size: 14px; margin-top: .4em; }
.project .links a { margin-right: 14px; }

/* table of contents (long pages) */
.toc { font-family: var(--f-ui); font-size: 14px; background: var(--panel); border: 1px solid var(--rule-soft); padding: 14px 18px; margin: 18px 0 28px; max-width: var(--measure); border-radius: 4px; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc ul ul { padding-left: 14px; }
.toc li { margin: 3px 0; }
.toc a { text-decoration: none; color: var(--muted); }
.toc a:hover { color: var(--red); }

/* ---------- item lists (publications, talks, courses) ---------- */
.subnav { font-family: var(--f-ui); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 20px 0 8px; padding: 12px 0; border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); box-shadow: 0 3px 0 -2px var(--rule), 0 -3px 0 -2px var(--rule); }
.subnav a { text-decoration: none; color: var(--muted); }
.subnav a:hover { color: var(--red); }
.legend { font-family: var(--f-ui); font-size: 13px; color: var(--faint); margin: 10px 0 0; }
.items-section { margin-top: 40px; scroll-margin-top: 24px; }
.items-section > h2 { margin-bottom: 8px; }
.items-section > h2::before, .home-essay h2::before, .project h2::before { content: ""; display: inline-block; width: .62em; height: .62em; margin-right: .4em; vertical-align: -.02em; background-color: var(--red); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5c1.4 2.6 1.4 5.2 0 7.8-1.4-2.6-1.4-5.2 0-7.8zm0 21c-1.4-2.6-1.4-5.2 0-7.8 1.4 2.6 1.4 5.2 0 7.8zM1.5 12c2.6-1.4 5.2-1.4 7.8 0-2.6 1.4-5.2 1.4-7.8 0zm21 0c-2.6 1.4-5.2 1.4-7.8 0 2.6-1.4 5.2-1.4 7.8 0zM4.6 4.6c2.8.8 4.7 2.7 5.5 5.5-2.8-.8-4.7-2.7-5.5-5.5zm14.8 14.8c-2.8-.8-4.7-2.7-5.5-5.5 2.8.8 4.7 2.7 5.5 5.5zM19.4 4.6c-.8 2.8-2.7 4.7-5.5 5.5.8-2.8 2.7-4.7 5.5-5.5zM4.6 19.4c.8-2.8 2.7-4.7 5.5-5.5-.8 2.8-2.7 4.7-5.5 5.5z'/%3E%3Ccircle cx='12' cy='12' r='2.2'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5c1.4 2.6 1.4 5.2 0 7.8-1.4-2.6-1.4-5.2 0-7.8zm0 21c-1.4-2.6-1.4-5.2 0-7.8 1.4 2.6 1.4 5.2 0 7.8zM1.5 12c2.6-1.4 5.2-1.4 7.8 0-2.6 1.4-5.2 1.4-7.8 0zm21 0c-2.6 1.4-5.2 1.4-7.8 0 2.6-1.4 5.2-1.4 7.8 0zM4.6 4.6c2.8.8 4.7 2.7 5.5 5.5-2.8-.8-4.7-2.7-5.5-5.5zm14.8 14.8c-2.8-.8-4.7-2.7-5.5-5.5 2.8.8 4.7 2.7 5.5 5.5zM19.4 4.6c-.8 2.8-2.7 4.7-5.5 5.5.8-2.8 2.7-4.7 5.5-5.5zM4.6 19.4c.8-2.8 2.7-4.7 5.5-5.5-.8 2.8-2.7 4.7-5.5 5.5z'/%3E%3Ccircle cx='12' cy='12' r='2.2'/%3E%3C/svg%3E") center / contain no-repeat; }
.rosette { display: inline-block; width: 22px; height: 22px; background-color: var(--red); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5c1.4 2.6 1.4 5.2 0 7.8-1.4-2.6-1.4-5.2 0-7.8zm0 21c-1.4-2.6-1.4-5.2 0-7.8 1.4 2.6 1.4 5.2 0 7.8zM1.5 12c2.6-1.4 5.2-1.4 7.8 0-2.6 1.4-5.2 1.4-7.8 0zm21 0c-2.6 1.4-5.2 1.4-7.8 0 2.6-1.4 5.2-1.4 7.8 0zM4.6 4.6c2.8.8 4.7 2.7 5.5 5.5-2.8-.8-4.7-2.7-5.5-5.5zm14.8 14.8c-2.8-.8-4.7-2.7-5.5-5.5 2.8.8 4.7 2.7 5.5 5.5zM19.4 4.6c-.8 2.8-2.7 4.7-5.5 5.5.8-2.8 2.7-4.7 5.5-5.5zM4.6 19.4c.8-2.8 2.7-4.7 5.5-5.5-.8 2.8-2.7 4.7-5.5 5.5z'/%3E%3Ccircle cx='12' cy='12' r='2.2'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5c1.4 2.6 1.4 5.2 0 7.8-1.4-2.6-1.4-5.2 0-7.8zm0 21c-1.4-2.6-1.4-5.2 0-7.8 1.4 2.6 1.4 5.2 0 7.8zM1.5 12c2.6-1.4 5.2-1.4 7.8 0-2.6 1.4-5.2 1.4-7.8 0zm21 0c-2.6 1.4-5.2 1.4-7.8 0 2.6-1.4 5.2-1.4 7.8 0zM4.6 4.6c2.8.8 4.7 2.7 5.5 5.5-2.8-.8-4.7-2.7-5.5-5.5zm14.8 14.8c-2.8-.8-4.7-2.7-5.5-5.5 2.8.8 4.7 2.7 5.5 5.5zM19.4 4.6c-.8 2.8-2.7 4.7-5.5 5.5.8-2.8 2.7-4.7 5.5-5.5zM4.6 19.4c.8-2.8 2.7-4.7 5.5-5.5-.8 2.8-2.7 4.7-5.5 5.5z'/%3E%3Ccircle cx='12' cy='12' r='2.2'/%3E%3C/svg%3E") center / contain no-repeat; }
.items-section > h2 .count { font-family: var(--f-mono); font-size: 12px; color: var(--faint); letter-spacing: .08em; margin-left: 8px; vertical-align: middle; }
.section-blurb { font-family: var(--f-ui); font-size: 14.5px; color: var(--muted); margin: 0 0 8px; max-width: 70ch; }
.year-head { font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .14em; color: var(--red); text-transform: uppercase; margin: 26px 0 4px; }
.items { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: var(--label-w) 1fr; gap: 6px 22px; padding: 16px 0; border-top: 1px solid var(--rule-soft); scroll-margin-top: 24px; }
.items > .item:first-child { border-top: 0; }
.it-label { display: flex; flex-direction: column; gap: 3px; padding-top: 3px; }
.it-year { font-family: var(--f-mono); font-size: 13px; color: var(--ink); letter-spacing: .04em; }
.it-where, .it-status { font-family: var(--f-ui); font-size: 12.5px; color: var(--faint); line-height: 1.35; }
.it-status { color: var(--red); }
.it-body { min-width: 0; }
.it-title { font-size: 18px; font-weight: 600; letter-spacing: -.01em; line-height: 1.32; margin: 0; text-wrap: pretty; }
.it-title a { color: inherit; text-decoration: none; }
.it-title a:hover { color: var(--red); }
.it-meta, .it-text { font-family: var(--f-ui); font-size: 14.5px; color: var(--muted); line-height: 1.55; margin: 5px 0 0; max-width: 78ch; }
.it-text { color: var(--ink); font-family: var(--f-text); font-size: 16px; }
.it-note { font-family: var(--f-ui); font-size: 13.5px; color: var(--faint); margin: 6px 0 0; max-width: 78ch; }
.it-links { font-family: var(--f-ui); font-size: 13.5px; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.it-link { display: inline-block; text-decoration: none; color: var(--ink); background: var(--paper-2); padding: 2px 9px; border-radius: 999px; border: 1px solid transparent; }
.it-link:hover { border-color: var(--red); color: var(--red); background: var(--paper); }
.it-abstract { font-family: var(--f-ui); font-size: 14.5px; color: var(--muted); margin: 8px 0 0; max-width: 72ch; }
.it-abstract summary { cursor: pointer; color: var(--faint); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.it-abstract p { margin: .5em 0 0; }
.badges { display: inline-flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.badge { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 1px 7px; border-radius: 3px; border: 1px solid var(--rule); color: var(--faint); }
.badge-key { color: var(--red); border-color: var(--red-soft); background: var(--red-wash); }
.badge-eis1600 { color: var(--ink); }
.items-compact .item { padding: 11px 0; }
@media (max-width: 640px) {
  .item { grid-template-columns: 1fr; gap: 4px; }
  .it-label { flex-direction: row; flex-wrap: wrap; gap: 10px; padding-top: 0; }
  .it-year { font-size: 12.5px; }
}

/* CV page */
.cv-top { display: grid; grid-template-columns: var(--label-w) 1fr; gap: 8px 22px; margin: 12px 0 8px; font-size: 16px; }
.cv-top dt { font-family: var(--f-mono); font-size: 12.5px; letter-spacing: .06em; color: var(--faint); text-transform: uppercase; padding-top: 4px; }
.cv-top dd { margin: 0; }
@media (max-width: 640px) { .cv-top { grid-template-columns: 1fr; gap: 2px; } .cv-top dd { margin-bottom: 10px; } }
.cv-section > h2 { font-size: 22px; }
.cv-section .item { padding: 12px 0; }
.cv-section .it-title { font-size: 16.5px; }

/* ---------- notes ---------- */
.note-head { max-width: 760px; }
.cover { margin: 8px 0 32px; }
.cover img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 4px; display: block; }
.cover figcaption { font-family: var(--f-ui); font-size: 13px; color: var(--faint); margin-top: 8px; }
.note-body { margin-bottom: 48px; }
.note-body p.caption, .note-body .caption { font-family: var(--f-ui); font-size: 13.5px; color: var(--muted); }
.tags { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .06em; color: var(--faint); display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 40px; }
.tag { border: 1px solid var(--rule); border-radius: 3px; padding: 1px 7px; }
.notes-list .it-title { font-size: 19px; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--gold); box-shadow: inset 0 3px 0 var(--paper), inset 0 4px 0 var(--rule); margin-top: 48px; background: var(--paper-2); }
.foot-ornament { grid-column: 1 / -1; text-align: center; margin: 0 0 6px; line-height: 1; }
.foot-inner { padding-top: 22px; padding-bottom: 32px; display: grid; grid-template-columns: 1fr auto; gap: 10px 24px; align-items: baseline; font-family: var(--f-ui); font-size: 13.5px; color: var(--muted); }
.foot-left { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.foot-name { font-family: var(--f-text); font-weight: 600; color: var(--ink); font-size: 16px; }
.foot-ar { font-size: 20px; color: var(--red); line-height: 1; }
.foot-old { color: var(--faint); }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--red); }
.views { color: var(--faint); }
.foot-note { grid-column: 1 / -1; margin: 6px 0 0; color: var(--faint); font-size: 12.5px; }
@media (max-width: 640px) { .foot-inner { grid-template-columns: 1fr; } }

/* ---------- print ---------- */
@media print {
  .site-head, .site-foot, .theme-toggle, .subnav, .skip { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  a { color: #000; text-decoration: none; }
  .item { break-inside: avoid; }
  .page-head { padding-top: 0; }
}
