@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg:           #FAFAF8;
  --text:         #1C1917;
  --text-muted:   #78716C;
  --accent:       #C8993A;
  --accent-light: #F5EDD8;
  --border:       #E7E2DB;
  --max-width:    680px;
  --toggle-bg:    #E7E2DB;
}

html.dark {
  --bg:           #0D0D0D;
  --text:         #E8E2D9;
  --text-muted:   #6B6459;
  --accent:       #D4A843;
  --accent-light: #1A1508;
  --border:       #1C1C1C;
  --toggle-bg:    #1C1C1C;
}

body, header, footer, nav, .post-item, .post-content p,
.post-content h2, .post-content blockquote {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

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

html {
  direction: ltr;
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.85;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #E8B96A, var(--accent));
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
}

a { color: inherit; text-decoration: none; }

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

/* Header */
header {
  padding: 0;
  border-bottom: 1px solid var(--border);
  margin-top: 12px;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 16px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

nav a, .nav-links a {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 400;
  transition: color 0.2s ease;
  position: relative;
}

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

.nav-links a.active::after {
  content: '';
  display: block;
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.theme-toggle {
  background: var(--toggle-bg);
  border: none;
  cursor: pointer;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: background 0.3s ease, transform 0.2s ease;
  flex-shrink: 0;
}
.theme-toggle:hover { transform: scale(1.1); }
html.dark .theme-toggle { background: #2A2A2A; }

/* Social icons */
.social-links { display: flex; align-items: center; gap: 10px; }

.social-link {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  transition: background 0.2s ease, transform 0.2s ease;
}
.social-link:hover { background: var(--accent); color: var(--bg); transform: scale(1.1); }
.social-link svg { width: 14px; height: 14px; fill: currentColor; }

.ar-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  width: auto;
  padding: 0 10px;
  border-radius: 20px;
}

/* Hero */
.hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 56px;
}
.hero-name {
  font-family: 'EB Garamond', serif;
  font-size: 3.8rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}
.hero-bio {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 14px;
  font-weight: 300;
  line-height: 1.7;
}

/* Sections */
.section-block { margin-bottom: 64px; }

.section-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}
.section-heading h2 {
  font-family: 'EB Garamond', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}
.section-heading-line { flex: 1; height: 1px; background: var(--border); }

/* Posts list */
.posts-list { list-style: none; }

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

.post-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-tag {
  background: var(--accent-light);
  color: var(--accent);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 500;
}

.read-time { color: var(--text-muted); font-size: 0.75rem; font-weight: 300; }

.post-title {
  font-family: 'EB Garamond', serif;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.5;
}
.post-title a { color: var(--text); transition: color 0.2s ease; }
.post-title a:hover { color: var(--accent); }

.post-excerpt {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-top: 10px;
  line-height: 1.8;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
  transition: gap 0.2s ease;
}
.read-more:hover { gap: 10px; }

/* Post page */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 52px;
  margin-top: 12px;
  transition: color 0.2s ease, gap 0.2s ease;
}
.back-link:hover { color: var(--accent); gap: 12px; }

.post-header { margin-bottom: 52px; }
.post-header .post-meta { margin-bottom: 18px; }
.post-header h1 {
  font-family: 'EB Garamond', serif;
  font-size: 2.5rem;
  line-height: 1.4;
  font-weight: 700;
  color: var(--text);
}

.post-divider {
  width: 36px; height: 2.5px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 24px;
}

.post-content { font-size: 1.05rem; line-height: 1.95; }
.post-content p { margin-bottom: 1.6rem; color: var(--text); }
.post-content h2 {
  font-family: 'EB Garamond', serif;
  font-size: 1.55rem;
  font-weight: 700;
  margin: 2.8rem 0 1.1rem;
  color: var(--text);
  line-height: 1.4;
}
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 4px 22px;
  margin: 2.2rem 0;
  font-family: 'EB Garamond', serif;
  font-size: 1.2rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.7;
}

.post-footer {
  margin-top: 72px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.post-footer-label { font-size: 0.82rem; color: var(--text-muted); }
.post-footer-link { font-size: 0.85rem; color: var(--accent); font-weight: 500; }
.post-footer-link:hover { text-decoration: underline; }

/* Footer */
footer {
  padding: 52px 0 40px;
  margin-top: 100px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 300;
}
.footer-inner a { color: var(--text-muted); transition: color 0.2s ease; }
.footer-inner a:hover { color: var(--accent); }

@media (max-width: 600px) {
  html { font-size: 16px; }
  header { padding: 44px 0 28px; }
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}
