/* Astra Buzz — shared base styles */

/* Typography */
body#collection, body#subpage, body#post {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  color: #1a1a1a;
  background: #fafaf8;
}

/* All content uses consistent horizontal padding */
article,
#wrapper,
#official-writing,
body#collection header:not(.collection-header),
body#post header,
body#subpage header,
body header:not(.collection-header),
body#collection header.collection-header {
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 1.5em !important;
  padding-right: 1.5em !important;
  box-sizing: border-box !important;
}

/* Nested containers shouldn't double up padding */
#official-writing #wrapper {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Headings */
article h1, article h2, article h3, article h4 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.01em;
}

article h2 { margin-top: 2em; }
article h3 { margin-top: 1.5em; }

/* Header layout — site nav */
body#collection header:not(.collection-header),
body#post header,
body#subpage header,
body header:not(.collection-header) {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 0.5em;
  margin: 1em 0 !important;
  text-align: left !important;
}

/* Admin nav — always on its own line */
header nav#user-nav {
  display: flex !important;
  align-items: center !important;
  gap: 0.5em;
  margin: 0 !important;
  white-space: nowrap;
  font-size: 0.9em;
  width: 100%;
  order: 3;
}

header nav#user-nav a {
  margin: 0 !important;
  margin-left: 0.5em !important;
}

/* Site name in header */
body#collection header:not(.collection-header) h1,
body#collection header:not(.collection-header) h2,
body#post header h1, body#post header h2,
body header:not(.collection-header) h1,
body header:not(.collection-header) h2 {
  margin: 0 !important;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.3em !important;
}

/* Tab nav */
body#collection header:not(.collection-header) nav,
body#post header nav.tabs,
body header:not(.collection-header) nav.tabs {
  display: inline !important;
  margin: 0 !important;
  white-space: nowrap;
}

body#collection header:not(.collection-header) nav a,
body#post header nav.tabs a,
body header:not(.collection-header) nav.tabs a {
  margin: 0 0 0 0.8em !important;
}

/* Blog title header on collection pages */
body#collection header.collection-header {
  display: block !important;
  text-align: left !important;
  margin: 0 !important;
}

#blog-title {
  font-size: 1.1em !important;
  font-weight: normal !important;
}

#blog-title a {
  color: #555;
  text-decoration: none;
}

body#collection header.collection-header p.description {
  color: #555;
  font-style: italic;
  font-size: 1em;
  margin: 0.3em 0 0;
}

/* Navigation */
header nav a {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9em;
  text-transform: lowercase;
  letter-spacing: 0.03em;
  color: #666;
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}

header nav a:hover {
  color: #111;
}

/* Post titles on collection/reader pages */
.post-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.6em;
  line-height: 1.3;
  margin-bottom: 0.3em;
}

.post-title a {
  color: #1a1a1a;
  text-decoration: none;
}

/* Post body text */
article .e-content,
article .entry-content {
  font-size: 1.15em;
  line-height: 1.75;
  color: #2a2a2a;
}

article .e-content p {
  margin-bottom: 1.3em;
}

/* Post preview on collection page */
.e-content.preview {
  color: #444;
  font-size: 1em;
  line-height: 1.6;
}

/* Read more link */
a.read-more {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  font-weight: 600;
}

/* Post metadata / date */
time, .dt-published, article .meta-note, .post-meta {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.8em;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Blockquotes */
blockquote {
  margin: 1.5em 0;
  padding: 0.5em 1.5em;
  color: #444;
  background: #f5f4f0;
  font-style: italic;
}

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

/* Code blocks */
pre {
  background: #282c34;
  color: #abb2bf;
  padding: 1.2em 1.5em;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.88em;
  line-height: 1.5;
  margin: 1.5em 0;
}

code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.9em;
}

p code, li code {
  background: #f0eeea;
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

/* Links */
article .e-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Horizontal rule */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, #ccc, transparent);
  max-width: 20em;
  margin: 3em auto;
}

/* Lists */
article .e-content ul, article .e-content ol {
  line-height: 1.75;
  margin-bottom: 1.3em;
}

article .e-content li + li {
  margin-top: 0.4em;
}

/* Images */
article img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1.5em 0;
}

/* Footer */
footer {
  display: none !important;
}

/* Post separator on collection pages */
article + article {
  border-top: 1px solid #eee;
  padding-top: 2em;
  margin-top: 2em;
}

/* Responsive */
@media (max-width: 600px) {
  article,
  #wrapper,
  body#collection header:not(.collection-header),
  body#post header,
  body header:not(.collection-header),
  body#collection header.collection-header {
    padding-left: 1em !important;
    padding-right: 1em !important;
  }

  .post-title {
    font-size: 1.3em;
  }

  article .e-content {
    font-size: 1.05em;
  }
}
