@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600&family=DM+Mono:wght@400&display=swap');

:root {
  --bg: #0a0b10;
  --surface: #12131a;
  --text: #e0e2ed;
  --text-dim: #6b7094;
  --accent: #448aff;
  --border: #1e2035;
}

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

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.post-nav {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

.post-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
}

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

article {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

header { margin-bottom: 32px; }

header h1 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

header time {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: var(--text-dim);
}

.content h2, .content h3, .content h4 {
  margin: 32px 0 12px;
  font-weight: 500;
}

.content p { margin-bottom: 16px; }

.content img {
  max-width: 100%;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.content a { color: var(--accent); }

.content figure {
  margin: 24px 0;
}

.content figcaption {
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 8px;
}

.content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  margin: 16px 0;
  color: var(--text-dim);
  font-style: italic;
}

.content ul, .content ol {
  margin: 16px 0;
  padding-left: 24px;
}

.content li { margin-bottom: 8px; }

.content video, .content audio {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 24px 0;
  border-radius: 6px;
}

@media (max-width: 600px) {
  article { padding: 24px 16px 60px; }
  header h1 { font-size: 22px; }
}


/* ── Masonry Gallery ── */
.wp-block-gallery {
  display: block;
  column-count: 3;
  column-gap: 10px;
  margin: 24px 0;
}

.wp-block-gallery .wp-block-image {
  break-inside: avoid;
  margin: 0 0 10px 0;
  border-radius: 6px;
  overflow: hidden;
  display: block;
}

.wp-block-gallery .wp-block-image a {
  display: block;
  line-height: 0;
}

.wp-block-gallery .wp-block-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  margin: 0;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.wp-block-gallery .wp-block-image img:hover {
  transform: scale(1.03);
  filter: brightness(1.1);
}

.wp-block-gallery.columns-default {
  column-count: 2;
}

.wp-block-gallery.columns-4 {
  column-count: 4;
}

/* Single image in a gallery — show full width */
.wp-block-gallery .wp-block-image:only-child {
  column-span: all;
}

/* Standalone images (not in gallery) */
.content > .wp-block-image {
  margin: 24px 0;
  border-radius: 6px;
  overflow: hidden;
}

.content > .wp-block-image img {
  width: 100%;
  height: auto;
}


/* ── Self-hosted Video ── */
.wp-block-video {
  margin: 24px 0;
  max-width: 100%;
  overflow: hidden;
  border-radius: 6px;
}

.wp-block-video video {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* ── Video Embeds ── */
.wp-block-embed-youtube {
  margin: 24px 0;
}

.wp-block-embed__wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 6px;
}

.wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 6px;
}


/* ── Two-Column Layout ── */
.wp-block-columns {
  display: flex;
  gap: 20px;
  margin: 24px 0;
}

.wp-block-column {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.wp-block-column img,
.wp-block-column video {
  max-width: 100%;
  width: 100%;
  height: auto;
}

@media (max-width: 600px) {
  .wp-block-columns {
    flex-direction: column;
    gap: 16px;
  }
}


/* ── Responsive Gallery ── */
@media (max-width: 900px) {
  .wp-block-gallery.columns-4 {
    column-count: 3;
  }
}

@media (max-width: 600px) {
  .wp-block-gallery {
    column-count: 2;
    column-gap: 8px;
  }

  .wp-block-gallery .wp-block-image {
    margin-bottom: 8px;
  }

  .wp-block-gallery.columns-default {
    column-count: 2;
  }

  .wp-block-gallery.columns-4 {
    column-count: 2;
  }
}

@media (max-width: 380px) {
  .wp-block-gallery,
  .wp-block-gallery.columns-default,
  .wp-block-gallery.columns-4 {
    column-count: 1;
  }
}

/* ── Post Hero ─────────────────────────────────── */
.post-hero {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
}
.post-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  animation: heroReveal 1s ease-out;
}
@keyframes heroReveal {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 1; transform: scale(1); }
}
.post-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 80px 40px 36px;
  background: linear-gradient(
    to top,
    var(--bg, #0a0b10) 0%,
    rgba(10, 11, 16, 0.6) 50%,
    transparent 100%
  );
}
.post-hero-category {
  font-family: 'Source Sans 3', 'Outfit', 'Barlow', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c9a84c;
  margin-bottom: 14px;
}
.post-hero-overlay h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 36px;
  font-weight: 400;
  color: #eaecf2;
  margin: 0 0 14px;
  line-height: 1.25;
  max-width: 680px;
}
.post-hero-overlay time {
  font-family: 'DM Mono', 'Barlow', monospace;
  font-size: 11px;
  color: rgba(200, 205, 220, 0.4);
  letter-spacing: 0.04em;
}
/* Hide original header when hero present */
.post-hero ~ article > header,
.post-hero ~ article > section:first-child {
  display: none;
}
@media (max-width: 768px) {
  .post-hero { height: 320px; }
  .post-hero-overlay { padding: 60px 24px 28px; }
  .post-hero-overlay h1 { font-size: 26px; }
}
@media (max-width: 480px) {
  .post-hero { height: 260px; }
  .post-hero-overlay h1 { font-size: 22px; }
  .post-hero-category { font-size: 9px; letter-spacing: 0.12em; }
}
