/* =============================================
   THE CHAOS THAT CONTROLS MY MIND — rebuild
   ============================================= */

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

:root {
  --bg:       #282828;
  --text:     #ffffff;
  --accent:   #9b0601;
  --muted:    rgba(255,255,255,0.55);
  --card-bg:  #1e1e1e;
  --radius:   3px;
  --max-w:    1200px;
  --header-h: 74px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
}

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

img { max-width: 100%; display: block; }

/* =============================================
   HEADER
   ============================================= */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  background: transparent;
  transition: background 0.3s, box-shadow 0.3s;
}

#site-header.scrolled {
  background: rgba(28, 28, 28, 0.97);
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.logo-link { display: flex; align-items: center; }
.site-logo  { height: 54px; width: auto; filter: brightness(0) invert(1); }

#main-nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

#main-nav a {
  font-family: 'Roboto Slab', serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text);
  position: relative;
  padding-bottom: 2px;
}

#main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.25s;
}

#main-nav a:hover::after,
#main-nav a.active::after { width: 100%; }
#main-nav a:hover, #main-nav a.active { color: var(--text); }

/* Hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.menu-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  transition: all 0.25s;
}
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================
   HERO (home)
   ============================================= */
.hero {
  position: relative;
  height: 100vh;
  min-height: 500px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.video-bg-local {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto; height: auto;
  object-fit: cover;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
}

.hero-title {
  font-family: 'Roboto Slab', serif;
  font-weight: 300;
  font-size: clamp(28px, 5vw, 52px);
  line-height: 1.3;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 28px;
}

.hero-divider {
  width: 60px; height: 1px;
  background: var(--text);
  margin: 0 auto 32px;
}

.animate-in .btn {
  animation: zoomIn 0.8s ease both;
  animation-delay: 0.3s;
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

/* =============================================
   BUTTONS — paint stroke border
   ============================================= */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Roboto Slab', serif;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  background: transparent;
  border: none;
  padding: 14px 36px;
  cursor: pointer;
  text-decoration: none;
  isolation: isolate;
  transition: color 0.25s;
}

/* The paint-stroke border lives on ::before so text stays crisp */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 2.5px solid rgba(255,255,255,0.9);
  filter: url('#roughen');
  pointer-events: none;
  transition: background 0.25s;
}

.btn:hover::before {
  background: rgba(255,255,255,0.10);
}

.btn-lg {
  font-size: 14px;
  padding: 18px 52px;
  letter-spacing: 3px;
}

.btn-lg::before {
  border-width: 3px;
}

/* =============================================
   BLOG HERO
   ============================================= */
.blog-hero {
  position: relative;
  height: 320px;
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--header-h);
  background-image: linear-gradient(135deg, #1a1a1a 0%, #2e1010 100%);
  overflow: hidden;
}

.blog-hero .hero-overlay {
  background: rgba(0,0,0,0.3);
}

.blog-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px;
}

.blog-tagline {
  font-family: 'Roboto Slab', serif;
  font-weight: 300;
  font-size: clamp(16px, 3vw, 26px);
  font-style: italic;
  letter-spacing: 1px;
  color: var(--text);
}

/* =============================================
   POEM GRID
   ============================================= */
.blog-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.poem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}

.poem-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}

.poem-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}

.card-link {
  display: block;
  color: var(--text);
}

.card-img {
  width: 100%;
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s;
}

.poem-card:hover .card-img { transform: scale(1.04); }

.card-img-placeholder {
  background: linear-gradient(135deg, #1c1c1c 0%, #2a1010 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card-placeholder-title {
  font-family: 'Roboto Slab', serif;
  font-weight: 300;
  font-size: 15px;
  font-style: italic;
  color: var(--muted);
  text-align: center;
}

.card-body {
  padding: 20px 20px 24px;
  position: relative;
}

.lang-badge {
  position: absolute;
  top: -14px; right: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 7px;
  border-radius: 2px;
}

.card-title {
  font-family: 'Roboto Slab', serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
  margin-bottom: 6px;
  color: var(--text);
}

.card-date {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}

.card-read-more {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--muted);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}

.poem-card:hover .card-read-more {
  color: var(--text);
  border-color: var(--text);
}

/* =============================================
   SINGLE POEM PAGE
   ============================================= */
.poem-hero {
  position: relative;
  height: 420px;
  background: var(--card-bg);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-top: var(--header-h);
}

.poem-hero.has-bg .hero-overlay {
  background: rgba(0,0,0,0.5);
}

.poem-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px 48px;
  width: 100%;
}

.poem-title {
  font-family: 'Roboto Slab', serif;
  font-weight: 400;
  font-size: clamp(22px, 4vw, 42px);
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.poem-date {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 1px;
}

.poem-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.poem-content-inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Text poem */
.poem-text-wrap {
  font-family: 'Roboto Slab', serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.85;
  color: var(--text);
}

.poem-heading {
  font-family: 'Roboto Slab', serif;
  font-weight: 400;
  font-size: 20px;
  letter-spacing: 1px;
  margin-bottom: 28px;
}

.stanza {
  margin-bottom: 28px;
}

.stanza span {
  display: block;
}

/* Image poem */
.poem-as-image {
  max-width: 100%;
  margin: 0 auto;
  display: block;
}

/* Photo */
.poem-photo {
  width: 100%;
  border-radius: var(--radius);
  display: block;
}

/* Caption */
.poem-caption {
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
  line-height: 1.7;
  padding-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* Share row */
.share-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.share-label {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 4px;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  color: var(--muted);
  font-size: 14px;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.share-btn:hover {
  border-color: var(--text);
  color: var(--text);
  background: rgba(255,255,255,0.08);
}

/* Prev/Next nav */
.poem-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
}

.poem-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  max-width: 45%;
  line-height: 1.4;
  transition: color 0.2s;
}

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

.poem-nav-next {
  margin-left: auto;
  text-align: right;
}

/* =============================================
   FOOTER
   ============================================= */
#site-footer {
  background: #1a1a1a;
  padding: 60px 24px 40px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
}

.footer-divider {
  width: 80px; height: 1px;
  background: rgba(255,255,255,0.3);
  margin: 20px auto;
}

.footer-heading {
  font-family: 'Roboto Slab', serif;
  font-weight: 300;
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text);
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 24px 0;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  font-size: 16px;
  color: var(--muted);
  transition: border-color 0.2s, color 0.2s;
}

.social-icons a:hover {
  border-color: var(--text);
  color: var(--text);
}

.footer-cols {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-top: 32px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-col-icon {
  font-size: 20px;
  color: var(--muted);
  margin-bottom: 4px;
}

.footer-col ul { list-style: none; }

.footer-col ul li {
  font-size: 13px;
  color: var(--muted);
  line-height: 2;
}

.footer-col ul li a {
  color: var(--muted);
}

.footer-col ul li a:hover { color: var(--text); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .poem-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .menu-toggle { display: flex; }

  #main-nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0; bottom: 0;
    background: rgba(20,20,20,0.98);
    flex-direction: column;
    justify-content: center;
    gap: 36px;
    font-size: 18px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  #main-nav.open { transform: translateX(0); }

  #main-nav a { font-size: 16px; }

  .poem-grid { grid-template-columns: 1fr; gap: 24px; }

  .hero-title { font-size: 24px; }

  .poem-hero { height: 300px; }

  .footer-cols { flex-direction: column; gap: 32px; align-items: center; }

  .poem-nav { flex-direction: column; gap: 12px; }
  .poem-nav-next { text-align: left; margin-left: 0; }
}
