@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #101c20;
  --deep: #14282e;
  --paper: #f7f5ee;
  --sheet: #fffdf7;
  --text: #17292d;
  --muted: #4b5e61;
  --line: #d4dbd4;
  --accent: #8dd4df;
  --accent-strong: #075768;
  --dark-line: #395057;
  --width: 1184px;
  --display: "Instrument Serif", Georgia, serif;
  font: 100%/1.65 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img { display: block; width: 100%; height: auto; }
a { color: var(--accent-strong); text-underline-offset: .22em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid #16849a; outline-offset: 5px; }
h1, h2, h3 { font: 400 1em/1.04 var(--display); text-wrap: balance; margin: 0; }
h1 { font-size: clamp(3.7rem, 8vw, 7rem); }
h2 { font-size: clamp(2.5rem, 5vw, 4.3rem); }
h3 { font-size: clamp(2rem, 3vw, 3rem); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul { padding-inline-start: 1.25rem; }
li + li { margin-top: .55rem; }
.wrap { width: min(calc(100% - 4rem), var(--width)); margin-inline: auto; }
.skip { position: fixed; z-index: 5; inset: .8rem auto auto .8rem; background: var(--sheet); padding: .6rem 1rem; transform: translateY(-180%); }
.skip:focus { transform: translateY(0); }

.site-header, .site-footer { color-scheme: dark; background: var(--ink); color: #f4f7f3; }
.site-header { border-bottom: 1px solid var(--dark-line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: .65rem 1.5rem; padding-block: .75rem; }
.brand { flex: none; width: 126px; }
.brand img { border-radius: .2rem; }
.site-header nav, .site-footer nav { display: flex; align-items: center; flex-wrap: wrap; gap: .15rem 1.55rem; }
.site-header nav a { color: #dce8e7; font-size: .91rem; font-weight: 550; text-decoration: none; white-space: nowrap; padding-block: .55rem; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .5em; }
.site-header :focus-visible, .site-footer :focus-visible, .hero :focus-visible { outline-color: var(--accent); }
.site-footer { margin-top: clamp(4rem, 8vw, 7rem); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .65rem 1.5rem; min-height: 6rem; padding-block: 1.1rem; font-size: .9rem; }
.site-footer nav a { color: #dce8e7; }
.site-footer nav a:hover { color: var(--accent); }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  background: var(--ink);
  color: #f6f5ee;
  border-bottom: 4px solid var(--accent);
}
.hero-inner {
  display: grid;
  align-items: center;
  min-height: clamp(30rem, 47vw, 41rem);
  padding-block: clamp(3rem, 7vw, 6rem);
}
.hero-copy { position: relative; }
.hero h1 { font-size: clamp(4.3rem, 9.8vw, 8.6rem); line-height: .86; letter-spacing: -.028em; text-wrap: initial; }
.hero h1 em { display: block; color: var(--accent); font-weight: 400; }
.hero p { max-width: 22rem; margin: 1.7rem 0 1.75rem; font-size: clamp(1.08rem, 1.8vw, 1.26rem); color: #e1ebeb; }
.hero-art { position: absolute; z-index: -1; inset: 0; }
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #101c20f2 0%, #101c20dc 24%, #101c2066 55%, #101c2010 90%);
}
.hero-art img { height: 100%; object-fit: cover; object-position: 64% 48%; }

.actions, .paper-download { display: flex; align-items: center; gap: .7rem .9rem; flex-wrap: wrap; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.85rem;
  padding: .52rem 1.05rem; border: 1px solid transparent; border-radius: .25rem; background: var(--accent-strong);
  color: white; font: inherit; font-size: .91rem; font-weight: 670; text-decoration: none; cursor: pointer;
}
.button:hover { background: var(--deep); color: white; }
.hero .button { background: var(--accent); color: var(--ink); }
.hero .button:hover { background: #b4e7ec; }
.hero .button.outline { background: transparent; border-color: #63818b; color: #f6f5ee; }
.hero .button.outline:hover { border-color: var(--accent); color: var(--accent); }
.text-link { font-size: .96rem; font-weight: 660; }
.home-papers { padding-top: clamp(2.6rem, 5.2vw, 4.5rem); }
.section-heading {
  display: flex; justify-content: space-between; gap: .7rem 1.5rem; align-items: baseline; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); padding-bottom: 1rem; margin-bottom: 1.45rem;
}
.page-intro { padding-block: clamp(2.8rem, 6.3vw, 5.4rem) clamp(1.75rem, 3.5vw, 3rem); }
.page-intro p { font-size: clamp(1.06rem, 2vw, 1.23rem); color: var(--muted); margin: .8rem 0 0; }

.paper-grid { display: grid; gap: 1.25rem; }
.home-paper-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.paper { min-width: 0; border: 1px solid var(--line); border-radius: .35rem; overflow: hidden; background: var(--sheet); scroll-margin-top: 1rem; }
.paper-image { aspect-ratio: 2.1; height: auto; object-fit: cover; border-bottom: 1px solid var(--line); }
.paper-content { min-width: 0; padding: clamp(1.15rem, 3vw, 2rem); }
.paper-content h2 { font-size: clamp(2.3rem, 4vw, 3.3rem); }
.subtitle { color: var(--muted); margin: .45rem 0 0; }
.paper-download { margin-top: 1.15rem; }
.file-size { color: var(--muted); font-size: .88rem; }
.paper-library .paper { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.05fr); align-items: start; }
.paper-library .paper-image { aspect-ratio: 1.35; border: 0; align-self: start; margin: 1.25rem 0 1.25rem 1.25rem; width: calc(100% - 1.25rem); border-radius: .18rem; }
.paper-library .paper-content { max-width: 49rem; }

details { margin-top: 1.15rem; border-top: 1px solid var(--line); color: var(--muted); }
summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: var(--accent-strong); cursor: pointer; padding-top: .75rem; font-weight: 650; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+" / ""; font-size: 1.35rem; line-height: 1; }
details[open] summary::after { content: "−" / ""; }
details > div { padding-top: .9rem; }
details h3 { color: var(--text); margin-block: 1.1rem .6rem; font-size: 1.9rem; }

.about-hero, .split, .contact, .video-layout { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); gap: clamp(1.8rem, 5vw, 4.1rem); align-items: start; }
.about-hero { align-items: center; padding-top: clamp(2.6rem, 6vw, 5.2rem); }
.about-hero img, .split img { border-radius: .35rem; border: 1px solid var(--line); aspect-ratio: 4/3; object-fit: cover; }
.about-hero .page-intro { padding: 0 0 1.4rem; }
.about-hero h1 { font-size: clamp(3.35rem, 6vw, 6rem); }
.split { align-items: center; margin-top: 3.2rem; border-top: 1px solid var(--line); padding-top: 2.8rem; }
.prose { color: var(--muted); }
.prose h1, .prose h2 { color: var(--text); }
.prose h2 { margin-bottom: .75rem; }
.document { max-width: 48rem; margin-inline: auto; }
.document h2 { margin-top: 1.7rem; font-size: clamp(2rem, 4vw, 2.9rem); }
.document dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .65rem 1.5rem; }
.document dt { font-weight: 650; color: var(--text); }
.document dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.credits { columns: 2; }
.video-layout { align-items: center; }
.video-player { aspect-ratio: 16/9; min-height: 14rem; display: grid; grid-template: 1fr / 1fr; border: 1px solid var(--dark-line); border-radius: .35rem; overflow: hidden; background: var(--deep); }
.video-cover { text-align: center; align-self: center; padding: 1rem; color: #e1ebeb; }
.video-cover .button { background: var(--accent); color: var(--ink); }
.video-cover .button:hover { background: #b4e7ec; }
.video-cover :focus-visible { outline-color: var(--accent); }
.video-cover p { margin: .7rem 0 .35rem; }
.video-player iframe { width: 100%; height: 100%; border: 0; }
.contact { padding-top: clamp(2.9rem, 7vw, 5.7rem); }
.contact .page-intro { padding: 0 0 1.25rem; }
.contact-form { padding: clamp(1.25rem, 3vw, 2.3rem); border: 1px solid var(--line); background: var(--sheet); border-radius: .35rem; }
.contact-form h2 { font-size: 2.65rem; margin-bottom: 1.15rem; }
.contact-form label { display: block; margin-bottom: .3rem; font-weight: 610; }
.contact-form :is(input, textarea) { width: 100%; display: block; margin-bottom: 1rem; border: 1px solid #829791; border-radius: .2rem; background: var(--sheet); color: var(--text); font: inherit; padding: .55rem .7rem; }
.contact-form textarea { resize: vertical; }
#compose-help { font-size: .93rem; color: var(--muted); }

@media (max-width: 850px) {
  .wrap { width: calc(100% - 2.5rem); }
  .site-header nav { gap: .05rem 1rem; }
}
@media (max-width: 720px) {
  .wrap { width: calc(100% - 2rem); }
  .header-inner { flex-direction: column; align-items: flex-start; gap: .45rem; }
  .brand { width: 107px; }
  .site-header nav { width: 100%; gap: .05rem .35rem; justify-content: space-between; }
  .site-header nav a { font-size: .875rem; }
  .home-paper-grid, .about-hero, .split, .contact, .video-layout { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(4.15rem, 14vw, 7rem); }
  .hero p { margin: 1.3rem 0 1.4rem; }
  .hero-inner { min-height: 29rem; }
  .hero-art img { object-position: 70% center; }
  .hero-art::after {
    background: linear-gradient(90deg, #101c20ec, #101c2090 56%, #101c2038),
                linear-gradient(0deg, #101c20d9, transparent 65%);
  }
  .paper-library .paper { display: block; }
  .paper-library .paper-image { aspect-ratio: 2.05; width: 100%; margin: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
  .video-layout .prose { grid-row: 1; }
  .credits { columns: 1; }
}

.paper-library .paper-upload { display: block; }
.paper-upload .subtitle { white-space: pre-line; overflow-wrap: anywhere; }
.paper-upload h2 { overflow-wrap: anywhere; }
.cms-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); padding-bottom: 4rem; }
.cms-list { overflow-wrap: anywhere; }
.cms-list h2 { font-size: 2.65rem; margin-bottom: 1rem; }
.cms-error { color: #9d271a; }
@media (max-width: 720px) {
  .cms-layout { grid-template-columns: 1fr; }
}
