@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600&display=swap');

:root {
  --bg:      #ffffff;
  --text:    #111111;
  --muted:   #666666;
  --accent:  #b5451b;
  --border:  #e8e8e8;
  --sans:    'Outfit', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
}

/* ─── Wrapper ─── */
.site-wrapper {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 3rem;
}

/* ─── Header ─── */
header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.site-title {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 2.8rem;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--text);
  text-decoration: none;
}

nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-top: 0.5rem;
}

nav a {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s;
}

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

.nav-icon {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-icon:hover { color: var(--accent); }
.nav-icon svg { width: 16px; height: 16px; fill: currentColor; }

/* ─── Home: image left, text right ─── */
.home-columns {
  display: flex;
  gap: 3.5rem;
  align-items: flex-start;
  margin-bottom: 3.5rem;
}

.home-image {
  flex: 0 0 36%;
  max-width: 380px;
}

.home-image img {
  width: 100%;
  display: block;
}

.home-image figcaption {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.5rem;
  font-style: italic;
}

.home-text {
  flex: 1;
  min-width: 0;
  padding-top: 0.5rem;
}

.home-text p {
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 1.2rem;
}

.home-text a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

/* ─── Writing section on homepage ─── */
.home-writing h2 {
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.post-list { list-style: none; }

.post-item {
  display: flex;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.post-item:first-child { border-top: 1px solid var(--border); }

.post-date {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  min-width: 88px;
  font-variant-numeric: tabular-nums;
}

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

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

/* ─── Inner pages ─── */
.inner { max-width: 680px; padding-bottom: 5rem; }

.inner h1 {
  font-weight: 300;
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}

.inner h2 {
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2.5rem 0 1rem;
}

.inner p { font-size: 0.97rem; margin-bottom: 1.2rem; }
.inner a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.inner a:hover { color: var(--accent); }

/* ─── Paper list ─── */
.paper-list { list-style: none; }
.paper-item { padding: 1.5rem 0; border-bottom: 1px solid var(--border); }
.paper-item:first-child { border-top: 1px solid var(--border); }
.paper-title { font-weight: 500; font-size: 0.97rem; margin-bottom: 0.2rem; }
.paper-meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.5rem; }
.paper-abstract { font-size: 0.88rem; color: var(--muted); margin-bottom: 0.6rem; }
.paper-links a { font-size: 0.82rem; margin-right: 1rem; color: var(--accent); text-decoration: none; }
.paper-links a:hover { text-decoration: underline; }

/* ─── Post page ─── */
.post-header { margin-bottom: 2.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.post-header h1 { font-weight: 300; font-size: 2rem; margin-bottom: 0.5rem; }
.post-header .post-date { font-size: 0.8rem; color: var(--muted); }

.post-content { font-size: 0.97rem; }
.post-content p { margin-bottom: 1.3rem; }
.post-content strong { font-weight: 600; }
.post-content blockquote { border-left: 2px solid var(--border); padding-left: 1.25rem; color: var(--muted); font-style: italic; margin: 1.5rem 0; }
.post-content hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ─── Footnotes ─── */
.post-content sup {
  font-size: 0.7em;
  vertical-align: super;
  line-height: 0;
}

.post-content sup a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.post-content sup a:hover { text-decoration: underline; }

.footnotes {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
}

.footnotes ol { padding-left: 1.25rem; }
.footnotes li { margin-bottom: 0.75rem; line-height: 1.6; }

.footnotes a {
  color: var(--accent);
  text-decoration: none;
}

.footnotes a:hover { text-decoration: underline; }

.footnote-backref {
  margin-left: 0.4rem;
  font-size: 0.85em;
  color: var(--muted);
  text-decoration: none;
}

.footnote-backref:hover { color: var(--accent); }

/* ─── Footer ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 3rem;
}

footer p { font-size: 0.8rem; color: var(--muted); }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { font-size: 0.8rem; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* ─── Responsive ─── */
@media (max-width: 720px) {
  .site-wrapper { padding: 0 1.5rem; }
  .site-title { font-size: 2rem; }
  header { flex-direction: column; gap: 1.25rem; }
  .home-columns { flex-direction: column; }
  .home-image { max-width: 100%; }
  .post-item { flex-direction: column; gap: 0.2rem; }
}
