/* davidwoodruff.co.uk — one column, text first. Change the accent colour on the --accent line. */
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url("fonts/source-serif-4-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("fonts/source-serif-4-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url("fonts/source-serif-4-latin-ext-wght-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap;
  src: url("fonts/source-serif-4-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url("fonts/source-serif-4-cyrillic-wght-italic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --accent: #3d3166;      /* indigo of the guilloche on the 1922 chervonets */
  --serial: #b5432e;      /* red of its serial numbers */
  --paper: #f8f1e1;
  --ink: #231d28;
  --muted: #655a56;
  --rule: #d9cdb4;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 19px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0 auto; padding: 0 1.25rem; max-width: 38rem;   /* about 720px, ~70 characters */
  background: var(--paper); color: var(--ink);
  font-family: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  line-height: 1.55; font-optical-sizing: auto;
  font-variant-numeric: oldstyle-nums; text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: 0.25rem 0.5rem; }

.site-header {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: 0.25rem 1.5rem; padding: 1.6rem 0 0.8rem; border-bottom: 1px solid var(--rule); margin-bottom: 2.4rem;
}
.site-name { font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: 0.01em; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.15rem 1.1rem; font-size: 0.9rem; }
.site-header nav a { color: var(--muted); text-decoration: none; padding: 0.15rem 0; }
.site-header nav a:hover { color: var(--accent); }
.page-research .nav-research, .page-publications .nav-publications, .page-writing .nav-writing,
.page-teaching .nav-teaching, .page-cv .nav-cv, .page-ru .nav-ru { color: var(--ink); border-bottom: 2px solid var(--serial); }
.page-home .site-name { visibility: hidden; }

h1 { font-size: 1.9rem; line-height: 1.15; font-weight: 600; margin: 0 0 0.3rem; letter-spacing: -0.005em; }
h2 { font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted);
     margin: 2.6rem 0 0.8rem; padding-top: 0.9rem; border-top: 1px solid var(--rule); }
h3 { font-size: 1.05rem; font-weight: 600; margin: 1.8rem 0 0.4rem; }
p { margin: 0 0 1rem; }
.lede { font-size: 1.05rem; color: var(--muted); margin-bottom: 1.6rem; }

/* Home */
.role { color: var(--muted); margin: 0 0 0.9rem; }
.links ul { list-style: none; padding: 0; margin: 0 0 2rem; display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; font-size: 0.92rem; }
.links li { margin: 0; }
.portrait { float: right; width: 11rem; max-width: 40%; height: auto; margin: 0.3rem 0 1rem 1.5rem; border-radius: 2px; }
.news ul { list-style: none; padding: 0; }
.news li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.8rem; margin-bottom: 0.6rem; }
.news time { color: var(--muted); font-size: 0.9rem; }

/* Lists of work */
.pubs ul, .courses ul { list-style: none; padding: 0; margin: 0; }
.pubs li { margin: 0 0 0.95rem; padding-left: 3.2rem; position: relative; }
.pubs li > .yr, .pubs li > p > .yr { position: absolute; left: 0; color: var(--serial); font-variant-numeric: tabular-nums lining-nums; font-size: 0.9rem; top: 0.08rem; }
.pubs li p { margin: 0; }
.pubs .more { font-size: 0.86rem; white-space: nowrap; }
.pubs .note { display: block; color: var(--muted); font-size: 0.9rem; }
.courses li { margin-bottom: 0.7rem; }
.courses .code { font-variant-numeric: lining-nums; font-weight: 600; margin-right: 0.4rem; }

.pubs .yr.wide { position: static; display: block; }
.posts li { padding-left: 4.2rem; margin-bottom: 0.45rem; }
.courses .note { display: block; color: var(--muted); font-size: 0.9rem; }
.site-header { border-bottom: 3px double var(--rule); }
.banknote { clear: both; margin: 2.6rem 0 0; }
.banknote img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); box-shadow: 0 1px 6px rgba(35,29,40,0.12); }
.banknote p { margin: 0.6rem 0 0; font-size: 0.82rem; color: var(--muted); }
.portrait { border: 1px solid var(--rule); }

.cv-frame { width: 100%; height: 80vh; border: 1px solid var(--rule); background: #fff; }

.site-footer { margin: 4rem 0 2rem; padding-top: 0.9rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.82rem; }
.site-footer p { margin: 0; }

@media (max-width: 34rem) {
  html { font-size: 18px; }
  .site-header { flex-direction: column; }
  .portrait { float: none; display: block; width: 9rem; max-width: 60%; margin: 0 0 1.2rem; }
  .pubs li { padding-left: 0; }
  .pubs li > .yr, .pubs li > p > .yr { position: static; display: block; }
  .news li { grid-template-columns: 1fr; gap: 0; }
}
@media print { .site-header nav, .skip { display: none; } body { background: #fff; } }
