/* EMGOR — NIME-style paper pages
   Dark space palette on screen, classic white NIME look in print. */

:root {
  --bg: #0D0221;
  --bg-soft: #130530;
  --ink: #F2EFF9;
  --ink-dim: #B9B0CF;
  --accent: #A855F7;
  --accent-soft: #C084FC;
  --rule: rgba(242, 239, 249, 0.18);
  --rule-strong: rgba(242, 239, 249, 0.35);
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background:
    radial-gradient(1100px 500px at 70% -10%, rgba(168, 85, 247, 0.09), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- chrome ---------- */

.paper-nav {
  max-width: 62rem;
  margin: 0 auto;
  padding: 1.1rem 1.5rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.paper-nav a {
  color: var(--accent-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.paper-nav a:hover { border-bottom-color: var(--accent); }

.paper-footer {
  max-width: 62rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-dim);
  letter-spacing: 0.05em;
}

/* ---------- the paper sheet ---------- */

article.paper {
  max-width: 62rem;
  margin: 1.2rem auto 2.5rem;
  padding: 2.8rem 3rem 3rem;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: 4px;
}

/* ---------- title block ---------- */

header.titleblock {
  text-align: center;
  margin-bottom: 1.8rem;
}

header.titleblock h1 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1.25;
  margin: 0 0 1.1rem;
  color: var(--ink);
}

header.titleblock .authors {
  font-family: var(--serif);
  font-size: 1.05rem;
  margin: 0 0 0.25rem;
}

header.titleblock .affil {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--ink-dim);
  margin: 0 0 0.9rem;
}

header.titleblock .draft-marker {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 0.3rem 0.7rem;
  margin: 0;
}

header.titleblock::after {
  content: "";
  display: block;
  margin: 1.6rem auto 0;
  width: 100%;
  border-bottom: 1px solid var(--rule-strong);
}

/* ---------- two-column body ---------- */

.paper-body {
  columns: 2;
  column-gap: 2.2rem;
  column-rule: 1px solid var(--rule);
  font-size: 0.95rem;
  text-align: justify;
  hyphens: auto;
}

.paper-body > section { break-inside: avoid-column; }
.paper-body > section.flow { break-inside: auto; }

.paper-body h2 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 1.4rem 0 0.5rem;
  break-after: avoid-column;
}

.paper-body section:first-child h2 { margin-top: 0; }

.paper-body h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.85rem;
  font-style: italic;
  margin: 1rem 0 0.35rem;
  color: var(--ink);
  break-after: avoid-column;
}

.paper-body p { margin: 0 0 0.75rem; }

.paper-body a {
  color: var(--accent-soft);
  text-decoration: none;
  border-bottom: 1px solid rgba(168, 85, 247, 0.45);
}

.paper-body a:hover { border-bottom-color: var(--accent-soft); }

/* abstract: bold-italic lead, NIME style */
section.abstract p {
  font-weight: 700;
  font-style: italic;
  font-size: 0.93rem;
}

section.abstract .abstract-note {
  font-weight: 400;
  font-style: italic;
  color: var(--ink-dim);
  font-size: 0.82rem;
}

/* keywords line */
.keywords {
  font-size: 0.85rem;
  color: var(--ink-dim);
}
.keywords strong {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink);
}

.paper-body ul, .paper-body ol {
  margin: 0 0 0.75rem;
  padding-left: 1.2rem;
}
.paper-body li { margin-bottom: 0.3rem; }

.paper-body code {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82em;
  color: var(--accent-soft);
  background: rgba(168, 85, 247, 0.10);
  padding: 0.05em 0.3em;
  border-radius: 3px;
}

.paper-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin: 0 0 0.8rem;
}
.paper-body th, .paper-body td {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0.3rem 0.4rem;
  text-align: left;
}
.paper-body th {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* clearly-marked working-additions section */
section.working-additions {
  border: 1px dashed var(--accent);
  border-radius: 3px;
  padding: 0.9rem 1rem 0.4rem;
  margin-top: 1.4rem;
  background: rgba(168, 85, 247, 0.06);
}
section.working-additions h2 { margin-top: 0; color: var(--accent-soft); }
section.working-additions .marker {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 0.5rem;
}

/* references */
section.refs ol {
  padding-left: 1.5rem;
  font-size: 0.85rem;
  color: var(--ink-dim);
}
section.refs li { margin-bottom: 0.45rem; }

/* ---------- index page ---------- */

.nime-index {
  max-width: 46rem;
  margin: 1.5rem auto 3rem;
  padding: 0 1.5rem;
}
.nime-index h1 {
  font-family: var(--sans);
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  margin: 1.5rem 0 0.3rem;
}
.nime-index .index-sub {
  color: var(--ink-dim);
  font-style: italic;
  margin: 0 0 1.8rem;
}
.nime-index ol { list-style: none; margin: 0; padding: 0; }
.nime-index li {
  border-top: 1px solid var(--rule);
  padding: 1rem 0.2rem;
}
.nime-index li:last-child { border-bottom: 1px solid var(--rule); }
.nime-index .idx-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
}
.nime-index .idx-title a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.nime-index .idx-title a:hover { border-bottom-color: var(--accent); }
.nime-index .idx-meta {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-top: 0.25rem;
}
.nime-index .idx-blurb {
  font-size: 0.9rem;
  color: var(--ink-dim);
  margin-top: 0.3rem;
}

/* ---------- responsive ---------- */

@media (max-width: 820px) {
  article.paper { padding: 2rem 1.3rem; margin: 0.8rem 0.6rem 2rem; }
  .paper-body { columns: 1; }
  header.titleblock h1 { font-size: 1.25rem; }
}

/* ---------- print: classic white NIME look ---------- */

@media print {
  :root {
    --bg: #ffffff;
    --bg-soft: #ffffff;
    --ink: #000000;
    --ink-dim: #333333;
    --accent: #000000;
    --accent-soft: #000000;
    --rule: #999999;
    --rule-strong: #000000;
  }
  html, body { background: #ffffff; }
  body { font-size: 10pt; }
  .paper-nav, .paper-footer { display: none; }
  article.paper {
    max-width: none;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
  }
  .paper-body { column-gap: 0.33in; column-rule: none; }
  .paper-body a { color: #000; border-bottom: none; }
  .paper-body code { background: none; color: #000; }
  header.titleblock .draft-marker { border-color: #000; color: #000; }
  section.working-additions {
    border-color: #000;
    background: none;
  }
}

/* editorial note — site-only aside inside a rendered paper */
.editorial-note {
  border-left: 2px solid currentColor;
  padding: 0.6em 0 0.6em 1em;
  margin: 1.6em 0;
  opacity: 0.72;
  font-size: 0.92em;
}
.editorial-note strong { letter-spacing: 0.02em; }

/* untitled marker in a title block */
.titleblock .untitled { opacity: 0.55; font-weight: 400; }

/* downloads block */
.downloads-block ul { list-style: none; padding-left: 0; }
.downloads-block li { padding: 0.3em 0; border-bottom: 1px solid rgba(128,128,128,0.18); }
.downloads-block li:last-child { border-bottom: none; }

/* read-the-paper button */
.read-block { margin: 2rem 0 2.5rem; }
.read-btn {
  display: inline-block;
  padding: 0.7em 1.4em;
  border: 1px solid currentColor;
  border-radius: 3px;
  text-decoration: none;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
  transition: opacity 0.15s ease;
}
.read-btn:hover { opacity: 0.65; }
.read-btn.disabled { opacity: 0.35; border-style: dashed; cursor: default; }

/* planned structure list */
.structure-list { padding-left: 1.4rem; }
.structure-list li { margin-bottom: 0.45rem; opacity: 0.85; }
