/* Wasteland Wares — Whitepapers
   Dark academic theme, arXiv aesthetics */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Serif:ital,wght@0,300;0,400;0,500;0,600;1,400&family=IBM+Plex+Mono:wght@400;500&family=JetBrains+Mono:wght@300;400;600&display=swap');

:root {
  --bg: #0a0a10;
  --bg-surface: #10101a;
  --bg-code: #14141e;
  --text: #d8d8e8;
  --text-dim: #6a6a80;
  --text-secondary: #9090a8;
  --heading: #e8e8f0;
  --green: #00e88f;
  --green-glow: rgba(0, 232, 143, 0.15);
  --cyan: #22d3ee;
  --blue: #4ea8ff;
  --border: #1e1e2e;
  --border-light: #2a2a3e;
  --link: #4ea8ff;
  --link-hover: #22d3ee;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Serif', 'Georgia', serif;
  line-height: 1.75;
  min-height: 100vh;
}

/* Layout */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 2rem;
  background: var(--bg-surface);
}

.site-header a {
  color: var(--text-dim);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.site-header a:hover {
  color: var(--green);
}

.container {
  max-width: 740px;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--heading);
  font-family: 'IBM Plex Serif', serif;
  line-height: 1.3;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

h2 {
  font-size: 1.3rem;
  font-weight: 500;
  margin-top: 3rem;
}

h3 {
  font-size: 1.1rem;
  font-weight: 500;
}

p {
  margin-bottom: 1.25rem;
}

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

a:hover {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
}

/* Paper metadata */
.paper-meta {
  margin: 1.5rem 0 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
}

.paper-meta .author {
  color: var(--heading);
  font-weight: 500;
  font-size: 1rem;
}

.paper-meta .affiliation {
  color: var(--text-dim);
  font-style: italic;
}

.paper-meta .date {
  color: var(--text-secondary);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.paper-meta .links {
  margin-top: 0.75rem;
  display: flex;
  gap: 1rem;
}

.paper-meta .links a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--green);
  transition: all 0.2s;
}

.paper-meta .links a:hover {
  background: var(--green-glow);
  border-color: var(--green);
}

/* Abstract */
blockquote {
  border-left: 3px solid var(--green);
  padding: 0.75rem 1.25rem;
  margin: 1.25rem 0;
  background: var(--bg-surface);
  border-radius: 0 4px 4px 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

blockquote em {
  color: var(--text);
}

/* Code */
code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85em;
  background: var(--bg-code);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--cyan);
}

pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.25rem 0;
  line-height: 1.5;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

th {
  background: var(--bg-surface);
  color: var(--heading);
  font-weight: 500;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--border-light);
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tr:hover {
  background: rgba(14, 14, 20, 0.5);
}

/* Lists */
ul, ol {
  margin: 1rem 0 1.25rem 1.5rem;
}

li {
  margin-bottom: 0.4rem;
}

/* Strong / emphasis */
strong {
  color: var(--heading);
  font-weight: 600;
}

em {
  color: var(--text-secondary);
}

/* Horizontal rule */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* Table of contents */
nav#TOC {
  margin: 1.5rem 0 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}

nav#TOC > ul {
  margin: 0;
  list-style: none;
  padding: 0;
}

nav#TOC li {
  margin-bottom: 0.3rem;
}

nav#TOC a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-bottom: none;
}

nav#TOC a:hover {
  color: var(--green);
}

nav#TOC ul ul {
  margin: 0.2rem 0 0.2rem 1.25rem;
  list-style: none;
  padding: 0;
}

nav#TOC::before {
  content: 'Contents';
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.site-footer a {
  color: var(--text-dim);
}

.site-footer a:hover {
  color: var(--green);
}

/* Responsive */
@media (max-width: 640px) {
  html { font-size: 15px; }
  .container { padding: 2rem 1.25rem 4rem; }
  h1 { font-size: 1.5rem; }
}

/* Print styles */
@media print {
  body { background: white; color: #111; }
  .site-header, .site-footer { display: none; }
  a { color: #111; border-bottom: none; }
  blockquote { border-left-color: #333; background: #f5f5f5; }
}
