@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:wght@400;700&family=Noto+Sans+Mono:wght@400;700&display=swap');

:root {
  --bg: #fcfcfa;
  --text: #111;
  --text-secondary: #555;
  --link: #111;
  --code-bg: #f4f3ef;
  --code-border: #e0dfd8;
  --border: #111;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1c1e;
    --text: #d4d4d4;
    --text-secondary: #999;
    --link: #d4d4d4;
    --code-bg: #252527;
    --code-border: #3a3a3c;
    --border: #d4d4d4;
  }
}

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

body {
  font-family: 'Noto Serif', serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

h1, h2, h3 {
  hyphens: none;
  -webkit-hyphens: none;
}

h1 {
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 0.3em;
}

h2 {
  font-size: 1.2rem;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

h3 {
  font-size: 1rem;
  margin-top: 1em;
  margin-bottom: 0.3em;
}


p, ul, ol { margin-bottom: 0.8em; }
ul, ol { padding-left: 2em; }

a { color: var(--link); text-decoration: underline; }
a:hover { text-decoration: none; }

code {
  font-family: 'Noto Sans Mono', monospace;
  font-size: 1rem;
}

pre {
  font-family: 'Noto Sans Mono', monospace;
  font-size: 1rem;
  line-height: 1.4;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 0;
  padding: 0.8em 1em;
  overflow-x: auto;
  margin: 1.5em 0;
  text-align: left;
}

pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

blockquote {
  margin: 1em 2em;
  font-style: italic;
}

img { max-width: 100%; }

.date {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
  display: block;
  margin-bottom: 1.5em;
}

.post-list { list-style: none; padding: 0; text-align: left; }
.post-list li { margin-bottom: 0.5em; }
.post-list .date { display: inline; margin-right: 0.5em; }

nav {
  margin-bottom: 1.5em;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
nav a { margin-right: 1em; }

hr {
  border: none;
  border-top: 0.5pt solid var(--border);
  margin: 1.5em 0;
}

mjx-container[display="true"],
.MathJax_Display {
  margin: 1em 0 !important;
}

/* Rouge syntax highlighting — monochrome, arxiv-style */
.highlight, .highlight * { color: inherit; }
.highlight .k, .highlight .kd, .highlight .kn,
.highlight .kp, .highlight .kr, .highlight .kt,
.highlight .o, .highlight .ow { font-weight: bold; }
.highlight .c, .highlight .c1, .highlight .cm,
.highlight .cs, .highlight .cp { font-style: italic; opacity: 0.65; }
.highlight .s, .highlight .s1, .highlight .s2,
.highlight .sb, .highlight .sc, .highlight .sd,
.highlight .sh, .highlight .sx { opacity: 0.8; }
