/* Typography and base styles */
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

:root {
  --text: #292929;
  --muted: #757575;
  --border: #e6e6e6;
  --bg: #ffffff;
  --accent-bg: #f7f7f7;
  --content-max: 680px;
}

body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 18px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 24px 0;
}

.branding { display: flex; align-items: center; gap: 10px; }
.branding .site-logo { height: 28px; width: auto; border-radius: 4px; display: inline-block; }

.branding .site-title {
  color: var(--text);
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Apple Color Emoji', 'Segoe UI Emoji',
    'Segoe UI Symbol', sans-serif;
  font-weight: 650;
  letter-spacing: 0.2px;
}

.branding .tagline {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Apple Color Emoji', 'Segoe UI Emoji',
    'Segoe UI Symbol', sans-serif;
}

.site-nav a {
  margin-left: 16px;
  text-decoration: none;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Apple Color Emoji', 'Segoe UI Emoji',
    'Segoe UI Symbol', sans-serif;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background-color 160ms ease-in-out;
}

.site-nav a:hover, .site-nav a:focus {
  background: var(--accent-bg);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

.footer-inner { padding: 24px 0; color: var(--muted); font-size: 14px; }
.footer-inner a { color: inherit; }

/* Content */
h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  line-height: 1.3;
  margin: 28px 0 12px;
}

h1 { font-size: 34px; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }

p { margin: 0 0 18px; }

a { color: inherit; text-decoration-color: var(--muted); text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--text); }

ul, ol { padding-left: 24px; }

hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }

blockquote {
  margin: 16px 0;
  padding: 8px 16px;
  border-left: 4px solid var(--border);
  color: var(--muted);
  background: #fafafa;
}

pre, code, kbd, samp { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
pre {
  background: var(--accent-bg);
  padding: 12px 14px;
  overflow: auto;
  border-radius: 6px;
  border: 1px solid var(--border);
}
code { background: var(--accent-bg); padding: 1px 4px; border-radius: 4px; }

/* Posts list */
.post-list { padding: 32px 0; }
.post-item { padding: 24px 0; border-bottom: 1px solid var(--border); }
.post-title { margin: 0 0 6px; font-size: 28px; }
.post-title a { text-decoration: none; }
.post-title a:hover { background: var(--accent-bg); }
.post-meta { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.post-excerpt { color: #3b3b3b; }

/* Post page */
.post-header { margin: 28px 0 12px; }
.post-content img { max-width: 100%; height: auto; }
.post-nav { margin-top: 32px; }
.post-nav-inner { display: flex; justify-content: space-between; }
.post-nav a { text-decoration: none; padding: 6px 8px; border-radius: 6px; }
.post-nav a:hover { background: var(--accent-bg); }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 16px 0; }
th, td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
thead th { background: #fafafa; }

/* Responsive */
@media (max-width: 768px) {
  body { font-size: 17px; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .site-nav a { margin-left: 0; margin-right: 12px; }
  h1 { font-size: 30px; }
  h2 { font-size: 24px; }
  h3 { font-size: 20px; }
}

/* Print */
@media print {
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .post-nav { display: none; }
  a { text-decoration: underline; color: #000; }
  pre, code { background: #f2f2f2; border-color: #ddd; }
}

