@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --bg-color: #fcfbf9;
  --text-primary: #191919;
  --text-secondary: #5c534e;
  --text-muted: #8a7e78;
  --accent-color: #b05c3c; /* Claude/Anthropic Coral/Terracotta */
  --accent-light: #f4f0ea;
  --border-color: #e5dfd3;
  --max-width: 680px;
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html[data-theme="dark"] {
  --bg-color: #161514;
  --text-primary: #e6e3df;
  --text-secondary: #a8a09a;
  --text-muted: #78706a;
  --accent-color: #d97756;
  --accent-light: #242220;
  --border-color: #2e2c2a;
}

html[data-theme="light"] {
  --bg-color: #fcfbf9;
  --text-primary: #191919;
  --text-secondary: #5c534e;
  --text-muted: #8a7e78;
  --accent-color: #b05c3c;
  --accent-light: #f4f0ea;
  --border-color: #e5dfd3;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg-color: #161514;
    --text-primary: #e6e3df;
    --text-secondary: #a8a09a;
    --text-muted: #78706a;
    --accent-color: #d97756;
    --accent-light: #242220;
    --border-color: #2e2c2a;
  }
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.85;
  padding: 3rem 1.5rem;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

header {
  margin-bottom: 4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.site-title {
  font-family: var(--font-sans);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.site-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: opacity 0.2s;
}

.site-title a:hover {
  opacity: 0.8;
}

.site-description {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 400;
}

main {
  min-height: 60vh;
}

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

.post-item {
  margin-bottom: 3.5rem;
}

.post-meta {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  gap: 1rem;
  font-weight: 500;
}

.post-item-title {
  font-size: 1.7rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.post-item-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}

.post-item-title a:hover {
  color: var(--accent-color);
  border-bottom: 1px solid var(--accent-color);
}

.post-excerpt {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.read-more {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-bottom 0.2s;
}

.read-more:hover {
  border-bottom: 1px solid var(--accent-color);
}

/* Article detail pages */
article .post-meta {
  margin-bottom: 1.5rem;
}

article h1 {
  font-size: 2.4rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

article p {
  margin-bottom: 1.8rem;
}

article h2 {
  font-family: var(--font-sans);
  font-size: 1.45rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

article h3 {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

article ul, article ol {
  margin-bottom: 1.8rem;
  padding-left: 1.5rem;
}

article li {
  margin-bottom: 0.5rem;
}

article blockquote {
  border-left: 3px solid var(--accent-color);
  padding-left: 1.25rem;
  font-style: italic;
  color: var(--text-secondary);
  margin: 2.5rem 0;
  font-size: 1.2rem;
}

article code {
  font-family: monospace;
  background-color: var(--accent-light);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
}

article pre {
  background-color: var(--accent-light);
  padding: 1.25rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1.8rem;
}

article pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
}

.back-to-home {
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color 0.2s;
  font-weight: 500;
}

.back-to-home:hover {
  color: var(--text-primary);
}

/* Footer */
footer {
  margin-top: 5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-color);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

footer a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-bottom 0.2s;
  font-weight: 500;
}

footer a:hover {
  border-bottom: 1px solid var(--text-secondary);
}

.copyright {
  margin-top: 0.75rem;
}

/* Theme Toggle Button */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.theme-toggle-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.25s, border-color 0.25s, color 0.25s, transform 0.25s;
  outline: none;
}

.theme-toggle-btn:hover {
  background-color: var(--accent-light);
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: scale(1.08) rotate(15deg);
}

.theme-toggle-btn svg {
  display: block;
  transition: transform 0.3s ease;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container {
  animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Micro-interactions */
.read-more, .back-to-home {
  display: inline-flex;
  align-items: center;
  transition: color 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.read-more:hover {
  transform: translateX(4px);
}

.back-to-home:hover {
  transform: translateX(-4px);
}

/* Search Box Container */
.search-container {
  margin-bottom: 3rem;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.8rem 1.6rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  background-color: var(--accent-light);
  border: 1px solid transparent;
  border-radius: 9999px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, background-color 0.2s;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  border-color: var(--accent-color);
  background-color: var(--bg-color);
}

