/* Grammatizator — Literary Web */

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

:root {
  --bone: #faf6f1;
  --ink: #2c2417;
  --warm-gray: #6b5e50;
  --rust: #a0522d;
  --faded-rust: #c4956c;
  --rule: #d4c8b8;
  --cream: #f5ede3;
  --shadow: rgba(44, 36, 23, 0.08);
}

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

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

body {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  background: var(--bone);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Layout */
.site-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.5rem;
}

.site-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-title:hover {
  color: var(--rust);
}

.site-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: var(--warm-gray);
  margin-top: 0.3rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Navigation */
nav.site-nav {
  margin-top: 1rem;
}

nav.site-nav a {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: var(--warm-gray);
  text-decoration: none;
  margin-right: 1.5rem;
  letter-spacing: 0.02em;
}

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

/* Article List (Homepage) */
.article-list {
  list-style: none;
}

.article-list li {
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
}

.article-list li:last-child {
  border-bottom: none;
}

.article-list .article-date {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: var(--faded-rust);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 0.4rem;
}

.article-list h2 {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.article-list h2 a {
  color: var(--ink);
  text-decoration: none;
}

.article-list h2 a:hover {
  color: var(--rust);
}

.article-list .excerpt {
  color: var(--warm-gray);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Article Page */
.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.article-header .article-date {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: var(--faded-rust);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 0.6rem;
}

.article-header h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}

.article-header .subtitle {
  font-size: 1.1rem;
  color: var(--warm-gray);
  font-style: italic;
  line-height: 1.5;
}

/* Article Body */
.article-body {
  margin-bottom: 3rem;
}

.article-body p {
  margin-bottom: 1.3rem;
}

.article-body h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 0.8rem;
  color: var(--ink);
}

.article-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

.article-body blockquote {
  border-left: 3px solid var(--faded-rust);
  padding: 0.3rem 0 0.3rem 1.3rem;
  margin: 1.8rem 0;
  color: var(--warm-gray);
  font-style: italic;
}

.article-body blockquote p:last-child {
  margin-bottom: 0;
}

.article-body a {
  color: var(--rust);
  text-decoration: underline;
  text-decoration-color: var(--faded-rust);
  text-underline-offset: 2px;
}

.article-body a:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

.article-body ul, .article-body ol {
  margin: 1.3rem 0;
  padding-left: 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85em;
  background: var(--cream);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

.article-body pre {
  background: var(--ink);
  color: var(--bone);
  padding: 1.2rem 1.5rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1.8rem 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

.article-body pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.article-body hr {
  border: none;
  height: 1px;
  background: var(--rule);
  margin: 2.5rem 0;
}

.article-body .drop-cap::first-letter {
  float: left;
  font-size: 3.5em;
  line-height: 0.8;
  padding-right: 0.08em;
  margin-top: 0.05em;
  color: var(--rust);
  font-weight: 700;
}

/* Footer */
.site-footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--rule);
  margin-top: 2rem;
  text-align: center;
}

.site-footer p {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: var(--warm-gray);
  letter-spacing: 0.02em;
}

/* Responsive */
@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  .site-container {
    padding: 0 1rem;
  }

  .article-header h1 {
    font-size: 1.6rem;
  }

  .site-title {
    font-size: 1.5rem;
  }
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
