:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #666666;
  --accent: #000000;
  --link: #0056b3;
  --border: #eeeeee;
  --code-bg: #f8f9fa;
  --max-width: 680px; /* Narrower for better readability */
  --spacing: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Georgia", "Source Serif 4", "Noto Serif KR", "Nanum Myeongjo", serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-size: 19px; /* Slightly larger for a book-like feel */
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: #ccc;
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

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

/* Layout */
.site-header,
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing);
}

/* Header */
.site-header {
  padding-top: 80px;
  padding-bottom: 40px;
}

.site-header .title {
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: var(--text);
}

.site-header .tagline {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 4px;
  font-style: italic;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.nav {
  margin-top: 32px;
  display: flex;
  gap: 20px;
  font-size: 0.8rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
}

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

/* Main Content */
.container {
  margin-bottom: 120px;
}

h1, h2, h3, h4 {
  color: var(--accent);
  line-height: 1.3;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

h1 { font-size: 2.2rem; margin-top: 0; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }

/* Posts List */
.post-list {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
}

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

.post-list li:first-child {
  border-top: none;
}

.post-title {
  font-size: 1.4rem;
  margin: 0 0 8px;
  font-weight: 700;
}

.post-title a {
  text-decoration: none;
}

.post-meta {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-excerpt {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.6;
}

/* Typography in Posts */
.post-content p {
  margin-bottom: 1.6rem;
}

.post-content blockquote {
  margin: 3rem 0;
  padding: 0 0 0 24px;
  border-left: 2px solid var(--text);
  color: #444;
  font-style: italic;
}

.post-content img {
  max-width: 100%;
  height: auto;
  margin: 3rem 0;
  display: block;
}

/* Code */
pre {
  background: var(--code-bg);
  padding: 24px;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 2.5rem 0;
  font-family: "SF Mono", "Menlo", "Monaco", "Consolas", monospace;
  border: 1px solid var(--border);
}

code {
  background: var(--code-bg);
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 0.85em;
  font-family: "SF Mono", "Menlo", "Monaco", "Consolas", monospace;
  border: 1px solid var(--border);
}

/* Footer */
.footer {
  margin-top: 100px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
  :root {
    --spacing: 24px;
    --max-width: 100%;
  }
  
  body {
    font-size: 18px;
  }

  .site-header {
    padding-top: 60px;
    padding-bottom: 20px;
  }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
}
