/* The New Heretics - Main Stylesheet */

:root {
  --bg: #0A0A0A;
  --surface: #111111;
  --text: #F5F5F5;
  --muted: #B3B3B3;
  --accent: #E10600;
  --rule: #222222;
  --max-post: 720px;
  --max-hero: 980px;
}

* {
  box-sizing: border-box;
}

html, body {
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  line-height: 1.6;
}

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

a:hover {
  text-decoration: underline;
}

a:focus {
  outline: 1px solid var(--accent);
  text-decoration: underline;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(10, 10, 10, 0.95);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: saturate(140%) blur(6px);
  z-index: 100;
}

.site-header .wrap {
  max-width: var(--max-hero);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
}

.brand {
  display: flex;
  align-items: center;
  font-family: Inter, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--text);
}

.brand-logo {
  height: 32px;
  width: auto;
  margin-right: 0;
}

.nav {
  display: flex;
  gap: 16px;
}

.nav a {
  font-family: Inter, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

/* Main Content */
.site-main {
  max-width: var(--max-hero);
  margin: 32px auto;
  padding: 0 16px;
  min-height: calc(100vh - 200px);
}

/* Hero */
.hero {
  margin: 48px 0 64px;
  text-align: center;
}

.hero h1 {
  font-family: Inter, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  line-height: 1.25;
  margin: 0;
  color: var(--text);
}

/* Featured Post */
.featured {
  margin: 48px 0;
}

.featured article {
  background: var(--surface);
  padding: 32px;
  border: 1px solid var(--rule);
}

.featured article h2 {
  font-family: Inter, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  line-height: 1.25;
  margin: 0 0 8px;
}

.featured article h2 a {
  color: var(--text);
}

.featured article h2 a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Meta Information */
.meta {
  color: var(--muted);
  font-family: Inter, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.summary {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}

/* Rule/Divider */
.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 48px 0;
}

/* Post List */
.post-list {
  margin: 32px 0;
}

.post-list article {
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}

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

.post-list h3 {
  font-family: Inter, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.25;
  margin: 0 0 8px;
}

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

.post-list h3 a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Post Page */
.post {
  max-width: var(--max-post);
  margin: 0 auto;
  padding: 0 16px;
}

.post header {
  margin: 32px 0;
}

.post h1 {
  font-family: Inter, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 800;
  font-size: 2rem;
  line-height: 1.25;
  margin: 0 0 8px;
  color: var(--text);
}

.post .content {
  font-size: 1.05rem;
  line-height: 1.7;
}

.post .content p {
  margin: 1em 0;
}

.post .content h2 {
  font-family: Inter, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  margin: 1.5em 0 0.5em;
}

.post .content h3 {
  font-family: Inter, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  margin: 1.25em 0 0.5em;
}

.post .content blockquote,
.post .content .pull {
  border-left: 3px solid var(--accent);
  padding: 0.5em 1em;
  color: var(--text);
  background: var(--surface);
  margin: 1.5em 0;
  font-style: italic;
}

/* Share Section */
.share-section {
  margin: 48px 0 32px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.share-label {
  font-family: Inter, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: Inter, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 16px;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--rule);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  letter-spacing: 0.04em;
}

.share-btn:hover {
  background: var(--bg);
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.share-btn svg {
  flex-shrink: 0;
}

/* Continue Reading Section */
.continue-reading {
  max-width: var(--max-post);
  margin: 64px auto 32px;
  padding: 0 16px;
}

.continue-reading h2 {
  font-family: Inter, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
  text-align: center;
}

.related-posts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 32px;
}

.related-post {
  background: var(--surface);
  padding: 24px;
  border: 1px solid var(--rule);
  transition: border-color 0.2s;
}

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

.related-post h3 {
  font-family: Inter, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 8px;
}

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

.related-post h3 a:hover {
  color: var(--accent);
  text-decoration: none;
}

.related-post .meta {
  margin-bottom: 12px;
}

.related-post .excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

@media (min-width: 768px) {
  .related-posts {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

/* Archive Page */
.archive {
  max-width: var(--max-post);
  margin: 0 auto;
  padding: 0 16px;
}

.archive h1 {
  font-family: Inter, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  margin: 32px 0 24px;
}

.archive h2 {
  font-family: Inter, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--muted);
  margin: 24px 0 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.archive li {
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.archive .date {
  color: var(--muted);
  margin-right: 8px;
  font-family: Inter, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 24px 16px;
  margin-top: 64px;
  text-align: center;
  font-family: Inter, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.site-footer a {
  color: var(--muted);
  margin: 0 8px;
}

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

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.tag {
  font-family: Inter, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  background: var(--surface);
  border: 1px solid var(--rule);
  color: var(--muted);
  transition: all 0.2s;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* Responsive */
@media (min-width: 768px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .featured article h2 {
    font-size: 2.2rem;
  }

  .post h1 {
    font-size: 2.4rem;
  }

  .post-list h3 {
    font-size: 1.5rem;
  }

  .brand-logo {
    height: 36px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: var(--text);
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}
