/* rhizoMorphic — Minimal light theme */
:root {
  --bg: #f0f0f0;
  --bg-secondary: #f0f0f0;
  --text: #1a1a1a;
  --text-muted: #666666;
  --accent: #222222;
  --accent-hover: #444444;
  --border: #e0e0e0;
  --code-bg: #f0f0f0;
  --max-width: 48rem;
}

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

html {
  font-size: 16px;
}

body {
  font-family: "Georgia", "Cambria", "Times New Roman", Times, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.site-header .wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.site-title:hover {
  color: var(--accent);
}

.site-nav .page-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav .page-link:hover {
  color: var(--accent);
}

/* Main content */
.page-content {
  flex: 1;
  padding: 2rem 0;
}

/* Post list (home) */
.post-list {
  list-style: none;
}

.post-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.post-list li:last-child {
  border-bottom: none;
}

.post-meta {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.post-list h3 {
  margin: 0.25rem 0 0;
}

.post-link {
  color: var(--text);
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 500;
}

.post-link:hover {
  color: var(--accent);
}

/* Post page */
.post-header {
  margin-bottom: 2rem;
}

.post-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.post-content h2 {
  font-size: 1.35rem;
  margin: 1.8rem 0 0.8rem;
}

.post-content h3 {
  font-size: 1.15rem;
  margin: 1.4rem 0 0.6rem;
}

.post-content h4 {
  font-size: 1rem;
  margin: 1.2rem 0 0.4rem;
}

.post-content p {
  margin-bottom: 1rem;
}

.post-content ul,
.post-content ol {
  margin: 0.5rem 0 1rem 1.5rem;
}

.post-content li {
  margin-bottom: 0.3rem;
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border-radius: 0 4px 4px 0;
}

/* Links */
a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

/* Code */
pre,
code {
  font-family: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
  font-size: 0.88rem;
}

code {
  background: var(--code-bg);
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

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

pre code {
  background: none;
  padding: 0;
}

/* Math (rendered as SVG by Typst) */
svg.typst-frame {
  display: inline;
  vertical-align: middle;
  max-width: 100%;
}

/* Display math: wider equations get their own centered block */
p>svg.typst-frame:only-child {
  display: block;
  margin: 1rem auto;
}

svg {
  max-width: 100%;
}

/* About page */
.about-page {}

.page-heading {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

.about-content p {
  margin-bottom: 1rem;
}

.about-photo {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  margin-top: 0rem;
  width: 250px;
  height: 250px;
  overflow: hidden;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

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

.description {
  margin-top: 0.5rem;
}

/* Strong/Bold */
strong,
b {
  font-weight: 600;
}

/* Emphasis */
em,
i {
  font-style: italic;
}

/* Responsive */
@media (max-width: 600px) {
  .about-photo {
    float: none;
    margin: 0 auto 1rem;
    display: block;
  }

  .post-title {
    font-size: 1.4rem;
  }
}