/* Atman Blog — Minimalist Theme */

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

:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #374151;
  --link: #1d4ed8;
  --link-hover: #1e3a8a;
  --code-bg: #f3f4f6;
  --max-width: 680px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111827;
    --fg: #f9fafb;
    --muted: #9ca3af;
    --border: #374151;
    --accent: #d1d5db;
    --link: #60a5fa;
    --link-hover: #93c5fd;
    --code-bg: #1f2937;
  }
}

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

html {
  font-size: 17px;
  line-height: 1.7;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.2s, color 0.2s;
}

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

/* ─── Layout ─── */
.site-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  flex: 1;
  width: 100%;
}

/* ─── Header ─── */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}

.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
}
.site-title:hover {
  text-decoration: none;
  color: var(--fg);
  opacity: 0.75;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav a {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 400;
}
.site-nav a:hover {
  color: var(--fg);
  text-decoration: none;
}

/* Language switcher */
.lang-switcher {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}
.lang-switcher a {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  color: var(--muted);
  transition: background 0.15s;
}
.lang-switcher a:hover,
.lang-switcher a.active {
  background: var(--border);
  color: var(--fg);
  text-decoration: none;
}

/* ─── Main ─── */
main {
  padding: 3rem 0 4rem;
}

/* ─── Home ─── */
.home-greeting {
  margin-bottom: 3rem;
}

.home-greeting p {
  color: var(--muted);
  font-size: 1rem;
  white-space: pre-line;
  line-height: 1.8;
}

.home-posts h2 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

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

.post-list-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.post-list-item:first-child {
  border-top: 1px solid var(--border);
}

.post-list-item .post-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--fg);
  display: block;
  margin-bottom: 0.15rem;
}
.post-list-item .post-title:hover {
  text-decoration: underline;
}

.post-list-item .post-date {
  font-size: 0.8rem;
  color: var(--muted);
}

.post-list-item .post-summary {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.35rem;
  line-height: 1.6;
}

.btn-start {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--fg);
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}
.btn-start:hover {
  background: var(--border);
  text-decoration: none;
  color: var(--fg);
}

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

.post-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.post-header .post-date {
  font-size: 0.85rem;
  color: var(--muted);
}

.post-content {
  font-size: 1rem;
  line-height: 1.85;
}

.post-content p { margin-bottom: 1.25rem; }
.post-content h2 { font-size: 1.3rem; margin: 2rem 0 0.75rem; font-weight: 600; }
.post-content h3 { font-size: 1.1rem; margin: 1.75rem 0 0.5rem; font-weight: 600; }
.post-content blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1.25rem;
  color: var(--muted);
  margin: 1.5rem 0;
  font-style: italic;
}
.post-content code {
  font-family: 'SF Mono', 'Fira Mono', monospace;
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.875em;
}

/* Post navigation */
.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
}

.post-nav a {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
}
.post-nav a:hover {
  color: var(--fg);
  text-decoration: none;
}

/* ─── Archive ─── */
.archive-year {
  margin-bottom: 2.5rem;
}
.archive-year h2 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

/* ─── Page title ─── */
.page-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 2.5rem;
  letter-spacing: -0.02em;
}

/* ─── Footer ─── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}

.site-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1rem;
}
.footer-links a {
  color: var(--muted);
}
.footer-links a:hover {
  color: var(--fg);
  text-decoration: none;
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .site-header-inner, .site-footer-inner { flex-wrap: wrap; gap: 0.75rem; }
  .post-nav { flex-direction: column; }
  .post-header h1 { font-size: 1.4rem; }
}
