/* EB Garamond. License: assets/fonts/OFL.txt */
/* latin-ext */
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  src: url(assets/fonts/eb-garamond-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  src: url(assets/fonts/eb-garamond-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;
}

/* latin-ext */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(assets/fonts/eb-garamond-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(assets/fonts/eb-garamond-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;
}

:root {
  --paper: #f5f1e8;
  --paper-grain-opacity: 0.12;
  color-scheme: light;
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.65;
  color: #202020;
  background: var(--paper);
}

* { box-sizing: border-box; }
body { font-size: 20px; display: flow-root; margin: 0; min-height: 100vh; position: relative; isolation: isolate; }
/* Static paper grain sits behind the page; text stays crisp and selectable. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("assets/paper-texture.svg") repeat;
  background-size: 180px 180px;
  opacity: var(--paper-grain-opacity);
  mix-blend-mode: multiply;
}
.page { max-width: 48rem; margin: 3.5rem auto; padding: 0 1.5rem; }
a { color: #254b73; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #102e4d; }
a:focus-visible { outline: 2px solid #254b73; outline-offset: 5px; }
.skip-link { position: fixed; z-index: 2; top: .5rem; left: 1rem; transform: translateY(-200%); background: var(--paper); padding: .25rem; }
.skip-link:focus { transform: translateY(0); }
header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem 2rem; border-bottom: 1px solid #d7d0c3; padding-bottom: 1rem; }
.name { font-size: 1.35rem; color: inherit; text-decoration: none; }
nav { display: flex; gap: 1.5rem; flex-wrap: wrap; font-size: 1rem; }
nav a[aria-current="page"] { color: inherit; text-decoration: none; }
main { padding-top: 2.2rem; }
h1, h2 { font-weight: normal; line-height: 1.3; }
h1 { margin: 0 0 1.3rem; font-size: 1.7rem; }
h2 { margin: 0 0 .7rem; font-size: 1.25rem; }
p { margin: 0 0 1rem; overflow-wrap: anywhere; }
.about { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 2.5rem; align-items: start; }
.about-photo { display: block; width: 100%; height: auto; }
.contact { font-size: 1rem; }
.papers { margin: 0; padding-left: 1.4rem; }
.papers li { padding-left: .4rem; margin-bottom: 2rem; }
.papers h2 { margin-bottom: .35rem; font-size: 1.1rem; }
.papers p { margin-bottom: .15rem; }
.papers .paper-summary { margin: .75rem 0; }

@media (min-width: 900px) {
  body { font-size: 22px; }
  .name { font-size: 27px; }
  nav, .contact { font-size: 20px; }
  h1 { font-size: 34px; }
  h2 { font-size: 25px; }
  .papers h2 { font-size: 22px; }
}

@media (max-width: 560px) {
  .page { margin: 1.5rem auto; padding: 0 1.2rem; }
  header { flex-direction: column; gap: .6rem; }
  main { padding-top: 1.6rem; }
  .about { grid-template-columns: 1fr; gap: 1.2rem; }
  .about-photo { grid-row: 1; }
}

@media print {
  :root { background: #fff; }
  body { min-height: 0; }
  body::before { display: none; }
  .page { margin: 0; max-width: none; }
  nav, .skip-link { display: none; }
  a { color: inherit; }
}
