/* ABOUTME: Main stylesheet for Notes from Wienerville */
/* ABOUTME: Implements warm, print-friendly design with vernacular signage aesthetic */

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */

:root {
  /* Colors */
  --color-bg: #FAF9F6;
  --color-text: #1A1A1A;
  --color-accent: #A0522D;
  --color-accent-hover: #C1440E;
  --color-muted: #6B6B6B;
  --color-rule: #A0522D;

  /* Typography */
  --font-display: 'Zilla Slab', serif;
  --font-body: 'Fira Sans', sans-serif;
  --font-mono: 'Fira Mono', monospace;

  /* Sizing */
  --content-width: 700px;
  --body-size: 1.125rem;
  --line-height: 1.6;
}

/* ============================================
   Base Reset and Body
   ============================================ */

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

body {
  font-family: var(--font-body);
  font-size: var(--body-size);
  font-weight: 400;
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-bg);
  margin: 0;
  padding: 0;
}

/* ============================================
   Layout
   ============================================ */

.wrapper {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  margin-top: 0;
  margin-bottom: 1em;
}

/* ============================================
   Links
   ============================================ */

a {
  color: var(--color-accent);
  text-decoration: none;
}

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

/* ============================================
   Site Header
   ============================================ */

.site-header {
  padding: 2rem 0 0;
}

.header-lockup {
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--color-accent);
}

.site-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.1;
}

.site-title a {
  color: var(--color-text);
}

.site-title a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.site-description {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-muted);
  margin: 0.25rem 0 0;
}

/* ============================================
   Navigation
   ============================================ */

.site-nav {
  text-align: center;
  padding: 1rem 0;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text);
  margin: 0 1rem;
}

.nav-link:hover {
  color: var(--color-accent);
}

/* ============================================
   Post Layout
   ============================================ */

.post {
  margin-top: 2rem;
}

.post-header {
  margin-bottom: 2rem;
}

.post-title {
  font-size: 2.25rem;
  margin: 0 0 0.5rem;
}

.post-title a {
  color: var(--color-text);
}

.post-title a:hover {
  color: var(--color-accent);
}

.post-meta {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin: 0;
}

.post-meta-separator {
  margin: 0 0.25rem;
}

.post-tag {
  color: var(--color-muted);
}

.post-tag:hover {
  color: var(--color-accent);
}

.post-content {
  margin-top: 1.5rem;
}

.post-content h1:first-child,
.post-content h2:first-child,
.post-content h3:first-child {
  margin-top: 0;
}

/* ============================================
   Drop Caps
   ============================================ */

.post-content > p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.5em;
  float: left;
  line-height: 0.8;
  margin: 0.1em 0.15em 0 0;
  color: var(--color-accent);
}

/* ============================================
   Blockquotes
   ============================================ */

blockquote {
  margin: 1.5em 0;
  padding: 0.5em 0 0.5em 1.5em;
  border-left: 4px solid var(--color-accent);
  font-style: italic;
}

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

/* ============================================
   Horizontal Rules
   ============================================ */

hr {
  border: none;
  border-top: 2px solid var(--color-accent);
  width: 40%;
  margin: 2rem auto;
}

/* ============================================
   Code
   ============================================ */

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background-color: #F0EFEB;
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

pre {
  background-color: #F0EFEB;
  padding: 1rem;
  overflow-x: auto;
  border-radius: 4px;
}

pre code {
  background: none;
  padding: 0;
}

/* ============================================
   Images
   ============================================ */

.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5em 0;
}

/* ============================================
   Index / Post Previews
   ============================================ */

.post-preview {
  margin: 3rem 0;
  padding-bottom: 3rem;
  border-bottom: 1px solid #E0DFDB;
}

.post-preview:last-child {
  border-bottom: none;
}

.post-preview-title {
  font-size: 1.75rem;
  margin: 0 0 0.5rem;
}

.post-preview-title a {
  color: var(--color-text);
}

.post-preview-title a:hover {
  color: var(--color-accent);
}

.post-excerpt {
  margin-top: 1rem;
}

.read-more {
  margin-top: 0.5rem;
}

/* ============================================
   Archive / Tags List Pages
   ============================================ */

.post-list-page {
  margin-top: 2rem;
}

.page-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-list-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.75rem 0;
  border-bottom: 1px solid #E0DFDB;
}

.post-list-item:last-child {
  border-bottom: none;
}

.post-list-title {
  font-weight: 500;
}

.post-list-date {
  font-size: 0.875rem;
  color: var(--color-muted);
  flex-shrink: 0;
  margin-left: 1rem;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
  margin-top: 3rem;
  padding: 2rem 0;
  border-top: 1px solid #E0DFDB;
}

.site-footer p {
  font-size: 0.875rem;
  color: var(--color-muted);
  text-align: center;
  margin: 0;
}

.site-footer a {
  color: var(--color-muted);
}

.site-footer a:hover {
  color: var(--color-accent);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 600px) {
  :root {
    --body-size: 1rem;
  }

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

  .post-title {
    font-size: 1.75rem;
  }

  .post-preview-title {
    font-size: 1.35rem;
  }

  .nav-link {
    margin: 0 0.5rem;
    font-size: 0.8rem;
  }

  .post-list-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-list-date {
    margin-left: 0;
    margin-top: 0.25rem;
  }

  .post-content > p:first-of-type::first-letter {
    font-size: 2.75em;
  }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  .site-nav,
  .site-footer {
    display: none;
  }

  .site-header {
    border-bottom: 1px solid black;
  }

  .header-lockup {
    border-bottom-color: black;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  .post-content > p:first-of-type::first-letter {
    color: black;
  }

  blockquote {
    border-left-color: black;
  }

  hr {
    border-top-color: black;
  }
}
