/* ---- Fonts ---- */
@font-face {
  font-family: 'iA Writer Quattro';
  src: url('../fonts/iAWriterQuattroS-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'iA Writer Quattro';
  src: url('../fonts/iAWriterQuattroS-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'iA Writer Quattro';
  src: url('../fonts/iAWriterQuattroS-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'iA Writer Quattro';
  src: url('../fonts/iAWriterQuattroS-BoldItalic.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/IBMPlexMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/IBMPlexMono-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

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

/* ---- Base ---- */
:root {
  --bg: #111;
  --text: #ccc;
  --text-dim: #777;
  --text-bright: #e0e0e0;
  --accent: #999;
  --rule: #222;
  --serif: 'iA Writer Quattro', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
}

html {
  font-size: 18px;
}

body {
  font-family: var(--serif);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  max-width: 38rem;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  -webkit-font-smoothing: antialiased;
}

/* ---- Typography ---- */
h1, h2, h3 {
  color: var(--text-bright);
  font-weight: normal;
  line-height: 1.3;
}

h1 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.2rem;
}

p {
  margin-bottom: 1.4rem;
}

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

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

.post-content a {
  color: #e8e8e8;
  border-bottom: 1px solid #444;
}

.post-content a:hover {
  border-color: var(--accent);
}

blockquote {
  border-left: 2px solid var(--rule);
  padding-left: 1.2rem;
  color: var(--text-dim);
  margin: 1.8rem 0;
  font-style: italic;
}

code {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: #1a1a1a;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

pre {
  background: #1a1a1a;
  padding: 1.2rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1.8rem 0;
}

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

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

em {
  font-style: italic;
}

strong {
  font-weight: 600;
  color: var(--text-bright);
}

ul, ol {
  margin-bottom: 1.4rem;
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.4rem;
}

/* ---- Header ---- */
.site-header {
  margin-bottom: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.site-nav a {
  font-size: 0.85rem;
  color: var(--text-dim);
  border-bottom: none;
  letter-spacing: 0.03em;
}

.site-nav a:hover {
  color: var(--text);
}

.site-title {
  font-size: 1rem;
  color: var(--text-dim);
  text-transform: lowercase;
  letter-spacing: normal;
  border-bottom: none;
}

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

/* ---- Home ---- */
.site-description {
  color: var(--text-dim);
  font-style: italic;
  margin-bottom: 3rem;
}

/* ---- Post list ---- */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.post-summary time {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--mono);
}

.post-summary h2 {
  margin-top: 0.2rem;
}

.post-summary h2 a {
  border-bottom: none;
}

.post-summary h2 a:hover {
  color: var(--text);
}

.subtitle {
  color: var(--text-dim);
  font-style: italic;
  font-size: 0.95rem;
  margin-top: 0.3rem;
}

/* ---- Single post ---- */
.post-header {
  margin-bottom: 2.5rem;
}

.post-header time {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--mono);
}

.post-header h1 {
  margin-top: 0.4rem;
}

.post-content {
  margin-bottom: 3rem;
}

/* ---- Footer ---- */
.site-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.site-footer p {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--mono);
}

.footer-link {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--mono);
  border-bottom: none;
  letter-spacing: 0.03em;
}

.footer-link:hover {
  color: var(--text);
}

/* ---- 404 ---- */
.not-found {
  margin-top: 4rem;
}

.not-found p {
  color: var(--text-dim);
  font-style: italic;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  html {
    font-size: 16px;
  }
  body {
    padding: 2rem 1rem;
  }
}
