/* nmace.frama.io — single-column layout, Roboto Slab + Roboto */

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --text-2: #4a4a4a;
  --muted: #6b6b6b;
  --accent: #996666;        /* dusty rose, from the previous theme */
  --accent-hover: #6e4444;
  --accent-bg: rgba(153, 102, 102, 0.08);
  --border: #e6dfdc;
  --border-soft: #f0ebe9;
  --code-bg: #f7f4f3;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17181a;
    --text: #e8e6e3;
    --text-2: #c4c0bb;
    --muted: #9a958f;
    --accent: #d4a3a3;
    --accent-hover: #ecc4c4;
    --accent-bg: rgba(212, 163, 163, 0.10);
    --border: #34312f;
    --border-soft: #2a2826;
    --code-bg: #222324;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 50px 20px 40px;
}

strong, b { font-weight: 500; }

h1, h2, h3, h4, h5 {
  font-family: 'Roboto Slab', Georgia, serif;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text);
}

::selection { background: var(--accent-bg); }

/* ---------- links ---------- */
a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1.5px solid var(--border);
  transition: color .2s, border-color .2s, background .2s;
}
a:hover, a:focus {
  color: var(--accent-hover);
  border-bottom-color: var(--accent);
  background: var(--accent-bg);
}
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* ---------- header & nav ---------- */
.site-header {
  margin-bottom: 1.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.site-title {
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1.3;
  margin: 0 0 0.3rem;
}
.site-title a { color: var(--text); border-bottom: none; }
.site-title a:hover { color: var(--accent); background: none; }

.site-header nav { display: flex; flex-wrap: wrap; gap: 0 1.4rem; }
.site-header nav a {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  padding: 6px 0;
}
.site-header nav a:hover { color: var(--accent); background: none; }
.site-header nav a.active { color: var(--accent); font-weight: 500; border-bottom-color: var(--accent); }

/* ---------- home ---------- */
.headshot {
  float: right;
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 3px;
  margin: 6px 0 1rem 1.5rem;
}
@media (max-width: 520px) {
  .headshot { width: 120px; height: 120px; margin-left: 1rem; }
}

.contact {
  clear: both;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}
.contact ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; }

/* ---------- page titles ---------- */
.page-title { font-size: 1.5rem; margin: 0 0 0.75rem; }
.subtitle { margin: -0.25rem 0 1.5rem; color: var(--text-2); font-style: italic; }
.post-meta, .post-date {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.post-meta a { color: var(--muted); border-bottom: none; }
.post-meta a:hover { color: var(--accent); }

/* ---------- prose (markdown content) ---------- */
.prose p { margin: 0 0 1em; }
.prose h2 { font-size: 1.3rem; margin: 2rem 0 0.6rem; }
.prose h3 { font-size: 1.15rem; margin: 2rem 0 0.5rem; }
.prose h4 { font-size: 1.02rem; margin: 1.5rem 0 0.4rem; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.4em; }
.prose li { margin-bottom: 0.35em; }
.prose img { max-width: 100%; height: auto; }
.prose blockquote {
  margin: 1.25em 0;
  padding-left: 1rem;
  border-left: 2px solid var(--border);
  color: var(--text-2);
  font-style: italic;
}
.prose code {
  font-size: 0.85em;
  background: var(--code-bg);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}
.prose pre { background: var(--code-bg); padding: 0.9rem 1rem; overflow-x: auto; border-radius: 4px; line-height: 1.5; }
.prose pre code { background: none; padding: 0; }
.prose pre code.hljs { background: none; padding: 0; }
.prose table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; font-size: 0.95rem; }
.prose th, .prose td { border-bottom: 1px solid var(--border); padding: 0.35em 0.6em; text-align: left; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.prose .footnotes, .prose section.footnotes { font-size: 0.88rem; color: var(--text-2); }
.prose .katex-display { overflow-x: auto; overflow-y: hidden; }

/* ---------- publications: markdown list restyled ---------- */
.page-publications .prose h2 {
  font-family: 'Roboto', sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2.25rem 0 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}
.page-publications .prose ul { list-style: none; padding: 0; margin: 0; }
.page-publications .prose li {
  margin: 0 0 1.1em;
  padding: 0 0 1em;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-2);
}
.page-publications .prose li p { margin: 0; }
.page-publications .prose li strong:first-child,
.page-publications .prose h2 + p > strong:first-child {
  display: inline-block;
  font-family: 'Roboto Slab', Georgia, serif;
  font-weight: 500;
  font-size: 1.1em;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 0.15em;
}
.page-publications .me { font-weight: 500; color: var(--text); }

/* ---------- blog list ---------- */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list > li { margin: 0 0 2rem; padding: 0 0 1.5rem; border-bottom: 1px solid var(--border); }
.post-list > li:last-child { border-bottom: 0; }
.post-title { font-size: 1.25rem; margin: 0 0 0.5rem; }
.post-title a { border-bottom: none; }
.post-title a:hover { border-bottom: 1.5px solid var(--accent); }
.post-excerpt { color: var(--text-2); font-size: 0.95rem; line-height: 1.65; margin: 0 0 0.5rem; }
.read-more { font-size: 0.9rem; }

.back { margin-top: 2.5rem; font-size: 0.95rem; }

/* ---------- footer ---------- */
.site-footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
