/* =========================================================
   Virgin or Pigeon — Jekyll theme
   Mirrors the Authentic WP theme aesthetic
   ========================================================= */

:root {
  --color-bg: #111112;
  --color-surface: #1a1a1c;
  --color-surface2: #222224;
  --color-border: #2e2e32;
  --color-text: #c8c8cc;
  --color-text-muted: #7a7a82;
  --color-accent: #b8860b;
  --color-accent-light: #d4a017;
  --color-white: #f0f0f2;
  --color-overlay: rgba(0,0,0,0.65);
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Courier New', monospace;
  --header-height: 64px;
  --max-width: 1200px;
  --content-width: 780px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.7;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-white); }

/* ---- Header ---- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: rgba(17,17,18,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  z-index: 900;
  transition: background 0.3s;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1.5rem;
}
.site-logo {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--color-white);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.site-logo:hover { color: var(--color-accent-light); }

/* ---- Desktop Nav ---- */
.desktop-nav { margin-left: auto; }
.nav-list {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  align-items: center;
}
.nav-item { position: relative; }
.nav-item > a {
  display: block;
  padding: 0.4rem 0.75rem;
  color: var(--color-text);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 3px;
  transition: color 0.2s, background 0.2s;
}
.nav-item > a:hover,
.nav-item.active > a {
  color: var(--color-white);
  background: var(--color-surface2);
}
/* Dropdown */
.sub-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  list-style: none;
  padding: 0.5rem 0;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.has-children:hover .sub-nav { display: block; }
.sub-nav li a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--color-text);
  font-size: 0.85rem;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
.sub-nav li a:hover { color: var(--color-white); background: var(--color-surface2); }

/* ---- Hamburger ---- */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.2s, opacity 0.2s;
}

/* ---- Offcanvas ---- */
.site-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 950;
}
.site-overlay.active { display: block; }
.offcanvas {
  position: fixed;
  top: 0; left: -300px;
  width: 280px;
  height: 100%;
  background: var(--color-surface);
  z-index: 1000;
  transition: left 0.3s ease;
  overflow-y: auto;
  padding: 1rem;
}
.offcanvas.open { left: 0; }
.offcanvas-close {
  background: none; border: none;
  color: var(--color-text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  float: right;
  padding: 0.5rem;
}
.offcanvas-nav { margin-top: 3rem; }
.offcanvas-nav .nav-list { flex-direction: column; align-items: flex-start; gap: 0; }
.offcanvas-nav .nav-item { width: 100%; }
.offcanvas-nav .nav-item > a {
  width: 100%;
  font-size: 0.95rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--color-border);
}
.offcanvas-nav .sub-nav {
  display: block;
  position: static;
  background: transparent;
  border: none;
  box-shadow: none;
  padding-left: 1rem;
}
.offcanvas-nav .sub-nav li a { border-bottom: 1px solid var(--color-border); }

/* ---- Site Main ---- */
.site-main { padding-top: var(--header-height); }

/* ---- Home Hero ---- */
.home-hero {
  position: relative;
  height: 80vh;
  min-height: 480px;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 400;
  font-style: italic;
  color: var(--color-white);
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
  text-shadow: 0 2px 16px rgba(0,0,0,0.8);
}
.hero-desc {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: rgba(240,240,242,0.75);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

/* ---- Home Content ---- */
.home-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.section-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  font-style: italic;
  color: var(--color-white);
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

/* ---- Post Grid ---- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.post-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.post-card:hover { border-color: var(--color-accent); transform: translateY(-2px); }
.post-card-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.post-card-body { padding: 1.25rem; }
.post-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: flex;
  gap: 0.75rem;
}
.post-cat { color: var(--color-accent); }
.post-card-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
.post-card-title a { color: var(--color-white); }
.post-card-title a:hover { color: var(--color-accent-light); }
.post-card-excerpt { font-size: 0.875rem; color: var(--color-text-muted); }

/* ---- Pagination ---- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem 0;
}
.pagination a {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  color: var(--color-text);
  font-size: 0.85rem;
  transition: all 0.2s;
}
.pagination a:hover { border-color: var(--color-accent); color: var(--color-white); }
.pagination-info { color: var(--color-text-muted); font-size: 0.85rem; }

/* ---- Single Post ---- */
.single-post { max-width: var(--content-width); margin: 0 auto; padding: 3rem 1.5rem; }
.post-header { margin-bottom: 2.5rem; }
.post-header.has-featured-image { position: relative; margin: 0 -1.5rem 2.5rem; }
.post-featured-image { position: relative; max-height: 480px; overflow: hidden; }
.post-featured-image img { width: 100%; height: 480px; object-fit: cover; }
.post-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17,17,18,0.9) 0%, transparent 60%);
}
.has-featured-image .post-header-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 2rem 1.5rem;
}
.post-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 400;
  font-style: italic;
  color: var(--color-white);
  line-height: 1.25;
  margin-top: 0.5rem;
}
.post-cats a { color: var(--color-accent-light); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* ---- Post Body ---- */
.post-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text);
}
.post-body h1, .post-body h2, .post-body h3, .post-body h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--color-white);
  margin: 2rem 0 0.75rem;
  line-height: 1.3;
}
.post-body h2 { font-size: 1.6rem; border-bottom: 1px solid var(--color-border); padding-bottom: 0.5rem; }
.post-body h3 { font-size: 1.25rem; }
.post-body p { margin-bottom: 1.25rem; }
.post-body blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--color-surface);
  font-style: italic;
  color: var(--color-text-muted);
}
.post-body pre {
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
}
.post-body code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-surface2);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}
.post-body pre code { background: none; padding: 0; }
.post-body ul, .post-body ol { margin: 0 0 1.25rem 1.5rem; }
.post-body li { margin-bottom: 0.35rem; }
.post-body img { border-radius: 4px; margin: 1.5rem auto; }
.post-body figure { margin: 1.5rem 0; }
.post-body figcaption { text-align: center; font-size: 0.8rem; color: var(--color-text-muted); margin-top: 0.5rem; }
.post-body .wp-block-embed, .post-body .wp-block-video { margin: 1.5rem 0; }
.post-body iframe { max-width: 100%; border-radius: 4px; }
.post-body .wp-block-embed__wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; }
.post-body .wp-block-embed__wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---- Post Footer ---- */
.post-footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); }
.post-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.tag {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: lowercase;
  transition: all 0.2s;
}
.tag:hover { border-color: var(--color-accent); color: var(--color-accent-light); }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.post-nav-prev, .post-nav-next {
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  color: var(--color-text);
  transition: all 0.2s;
}
.post-nav-next { text-align: right; }
.post-nav-prev:hover, .post-nav-next:hover { border-color: var(--color-accent); color: var(--color-white); }
.nav-label { font-size: 0.75rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.nav-title { font-family: var(--font-serif); font-style: italic; }

/* ---- Static Pages ---- */
.single-page { max-width: var(--content-width); margin: 0 auto; padding: 3rem 1.5rem; }
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}
.page-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  font-style: italic;
  color: var(--color-white);
}
.page-body { font-size: 1.05rem; line-height: 1.8; }
.page-body h2, .page-body h3 { font-family: var(--font-serif); font-weight: 400; color: var(--color-white); margin: 1.5rem 0 0.5rem; }
.page-body p { margin-bottom: 1.25rem; }

/* ---- Footer ---- */
.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--color-border);
  padding: 2rem 1.5rem;
  text-align: center;
}
.footer-inner { max-width: var(--max-width); margin: 0 auto; }
.site-footer p { color: var(--color-text-muted); font-size: 0.85rem; margin-bottom: 0.25rem; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .desktop-nav { display: none; }
  .nav-toggle { display: flex; }
  .post-grid { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  .home-hero { background-attachment: scroll; }
  .single-post, .single-page { padding: 2rem 1rem; }
}

/* ---- WP content cleanup ---- */
.wp-block-image img { border-radius: 4px; }
.wp-caption { font-size: 0.8rem; color: var(--color-text-muted); text-align: center; }
.aligncenter { display: block; margin: 1.5rem auto; }
.alignleft { float: left; margin: 0.5rem 1.5rem 1rem 0; }
.alignright { float: right; margin: 0.5rem 0 1rem 1.5rem; }
.wp-block-separator { border: none; border-top: 1px solid var(--color-border); margin: 2rem 0; }
