/* Shared styles for research index + paper pages.
   Monet palette + typography, matching index.html. */
:root {
  --c-cream: #f4ecde;
  --c-sky: #b8c9d8;
  --c-lavender: #c2b6cf;
  --c-rose: #e6b9ae;
  --c-sage: #9bb29a;
  --c-deep: #3a4a5c;
  --c-ink: #2a2f3a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%;
  min-height: 100%;
  background: var(--c-cream);
  color: var(--c-ink);
  font-family: 'Cormorant Garamond', Georgia, serif;
  -webkit-font-smoothing: antialiased;
}
body {
  /* soft dawn wash at the top, fading into cream */
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(184,201,216,0.35), rgba(244,236,222,0) 60%),
    var(--c-cream);
  background-attachment: fixed;
  padding: 0 6vw 14vh;
}

/* thin gallery frame, like the home page */
.frame {
  position: fixed;
  inset: 3vh 3vw;
  border: 1px solid rgba(58, 74, 92, 0.18);
  pointer-events: none;
  z-index: 1;
}

/* ── top bar ───────────────────────────────────────── */
.bar {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5.5vh 0 0;
}
.wordmark {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--c-deep);
  opacity: 0.7;
  text-decoration: none;
  transition: opacity 0.3s ease;
}
.wordmark:hover { opacity: 1; }
.wordmark .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--c-sage);
  border-radius: 50%;
  margin-right: 9px;
  vertical-align: middle;
}
.bar-nav { display: flex; gap: 18px; }
.nav-link {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--c-deep);
  opacity: 0.7;
  text-decoration: none;
  padding: 6px 16px;
  border: 1px solid rgba(58, 74, 92, 0.22);
  background: rgba(244, 236, 222, 0.35);
  transition: opacity 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.nav-link:hover {
  opacity: 1;
  background: rgba(58, 74, 92, 0.08);
  border-color: rgba(58, 74, 92, 0.4);
}

/* ── shared content column ─────────────────────────── */
.col {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
}

/* ── research index (9dlabs-style minimal list) ────── */
.index-head { padding: 12vh 0 0; }
.index-head h1 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--c-deep);
  opacity: 0.45;
}
.index-head .lede {
  font-size: clamp(1.02rem, 1.8vw, 1.22rem);
  font-weight: 400;
  line-height: 1.6;
  color: var(--c-deep);
  opacity: 0.85;
  max-width: 56ch;
  margin-top: 28px;
}
.thesis-rule {
  border: 0;
  border-top: 1px solid rgba(58, 74, 92, 0.18);
  width: 220px;
  margin: 5vh 0 0;
}
.research-block { margin-top: 6vh; }
.section-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--c-deep);
  opacity: 0.55;
  margin: 0 0 0.5rem;
}
.papers { list-style: none; }
.paper-item {
  border-bottom: 1px solid rgba(58, 74, 92, 0.12);
}
.paper-link {
  display: flex;
  align-items: baseline;
  gap: 36px;
  padding: 20px 4px;
  text-decoration: none;
  color: var(--c-ink);
  transition: background 0.25s ease, padding-left 0.25s ease;
}
.paper-link:hover {
  background: rgba(58, 74, 92, 0.04);
  padding-left: 12px;
}
.paper-date {
  flex: 0 0 130px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-deep);
  opacity: 0.6;
}
.paper-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--c-ink);
}
.paper-link:hover .paper-title { color: var(--c-deep); }
@media (max-width: 560px) {
  .paper-link { flex-direction: column; gap: 6px; }
  .paper-date { flex-basis: auto; }
}

/* ── article (paper) page ──────────────────────────── */
article { padding-top: 9vh; }
.article-head { margin-bottom: 4vh; }
.article-head h1 {
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.article-head .subtitle {
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-style: italic;
  font-weight: 300;
  color: var(--c-deep);
  margin-top: 16px;
  line-height: 1.35;
}
.article-head .byline {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-deep);
  opacity: 0.7;
  margin-top: 26px;
}
.article-head .byline .sep { margin: 0 10px; opacity: 0.5; }

.toc {
  margin: 5vh 0;
  padding: 22px 26px;
  border: 1px solid rgba(58, 74, 92, 0.16);
  background: rgba(244, 236, 222, 0.4);
}
.toc h2 {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--c-deep);
  opacity: 0.6;
  margin-bottom: 14px;
}
.toc ol { list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; margin: 7px 0; }
.toc a {
  font-size: 1.08rem;
  color: var(--c-ink);
  text-decoration: none;
  opacity: 0.85;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--c-deep);
  opacity: 0.55;
  margin-right: 14px;
}
.toc a:hover { opacity: 1; text-decoration: underline; }

.prose h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 500;
  margin: 6vh 0 0.7em;
  scroll-margin-top: 4vh;
}
.prose p {
  font-size: 1.18rem;
  line-height: 1.72;
  margin: 0 0 1.2em;
  color: var(--c-ink);
}
.prose strong { font-weight: 600; }
.prose em { color: var(--c-deep); }
.prose a { color: var(--c-deep); text-decoration: underline; text-underline-offset: 3px; }
.prose ol, .prose ul { margin: 0 0 1.4em 1.4em; }
.prose li { font-size: 1.18rem; line-height: 1.66; margin-bottom: 0.7em; }
.prose .keywords {
  font-size: 1.02rem;
  font-style: italic;
  color: var(--c-deep);
  border-top: 1px solid rgba(58, 74, 92, 0.14);
  padding-top: 1.2em;
  margin-top: 2.5em;
}

.pdf-cta { margin: 6vh 0 2vh; }
.pdf-cta a {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-cream);
  background: var(--c-deep);
  text-decoration: none;
  padding: 14px 28px;
  transition: background 0.3s ease;
}
.pdf-cta a:hover { background: var(--c-ink); }

.citation {
  margin-top: 5vh;
}
.citation h2 {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--c-deep);
  opacity: 0.6;
  margin-bottom: 14px;
}
.citation pre {
  font-family: 'Inter', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--c-ink);
  background: rgba(58, 74, 92, 0.05);
  border: 1px solid rgba(58, 74, 92, 0.14);
  padding: 20px 22px;
  overflow-x: auto;
  white-space: pre;
}

footer {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 12vh auto 0;
  padding-top: 3vh;
  border-top: 1px solid rgba(58, 74, 92, 0.16);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-deep);
  opacity: 0.6;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  text-align: center;
}
footer .sep { opacity: 0.5; }
footer a { color: inherit; text-decoration: none; }
footer a:hover { text-decoration: underline; }
