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

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

:root {
  --bg: #0d0d0d;
  --surface: #161616;
  --card: #1a1a1a;
  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --gold-dim: #7a6330;
  --text: #e8dcc8;
  --text-muted: #9e9480;
  --border: #2a2a2a;
  --radius: 12px;
}

html { direction: rtl; scroll-behavior: smooth; }
body { font-family: 'Vazirmatn', sans-serif; background: var(--bg); color: var(--text); line-height: 1.8; font-size: 16px; }

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,13,13,0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-brand { font-size: 1.25rem; font-weight: 700; color: var(--gold); letter-spacing: -0.5px; }
.nav-links { display: flex; gap: 0.25rem; list-style: none; }
.nav-links a { color: var(--text-muted); text-decoration: none; padding: 0.4rem 0.85rem; border-radius: 8px; font-size: 0.9rem; transition: all 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--gold); background: rgba(201,168,76,0.08); }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; }

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 64px; right: 0; left: 0; background: var(--surface); flex-direction: column; padding: 1rem; border-bottom: 1px solid var(--border); gap: 0; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 1rem; font-size: 1rem; }
}

/* ── HERO ── */
.hero {
  min-height: 55vh; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 5rem 2rem;
  background: radial-gradient(ellipse at center top, rgba(201,168,76,0.07) 0%, transparent 70%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a84c' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-inner { max-width: 800px; position: relative; }
.hero-label { font-size: 0.8rem; letter-spacing: 3px; color: var(--gold); text-transform: uppercase; margin-bottom: 1.5rem; opacity: 0.8; }
.hero-poem {
  font-size: clamp(1.2rem, 3vw, 1.8rem); font-weight: 300; line-height: 2.2; color: var(--text);
  border: 1px solid rgba(201,168,76,0.2); border-radius: var(--radius);
  padding: 2.5rem 3rem; margin: 1.5rem 0;
  background: rgba(201,168,76,0.03);
  position: relative;
}
.hero-poem::before, .hero-poem::after {
  content: '❧'; position: absolute; color: var(--gold); opacity: 0.3; font-size: 2rem;
}
.hero-poem::before { top: 1rem; right: 1.5rem; }
.hero-poem::after { bottom: 1rem; left: 1.5rem; }
.hero-attribution { color: var(--gold); font-size: 0.9rem; margin-top: 0.5rem; }

/* ── STATS ── */
.stats-bar {
  display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap;
  padding: 2rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.stat { text-align: center; }
.stat-num { font-size: 1.8rem; font-weight: 700; color: var(--gold); display: block; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ── SECTIONS ── */
.section { padding: 4rem 2rem; max-width: 1200px; margin: 0 auto; }
.section-header { margin-bottom: 2.5rem; }
.section-title { font-size: 1.6rem; font-weight: 700; color: var(--text); }
.section-title span { color: var(--gold); }
.section-line { width: 40px; height: 3px; background: var(--gold); border-radius: 2px; margin-top: 0.5rem; }
.section-subtitle { color: var(--text-muted); font-size: 0.95rem; margin-top: 0.75rem; }

/* ── POEM CARDS ── */
.poems-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.poem-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.75rem; transition: border-color 0.2s, transform 0.2s;
  cursor: default; position: relative; overflow: hidden;
}
.poem-card::before {
  content: ''; position: absolute; top: 0; right: 0; width: 3px; height: 0;
  background: var(--gold); transition: height 0.3s; border-radius: 0 var(--radius) 0 0;
}
.poem-card:hover { border-color: rgba(201,168,76,0.3); transform: translateY(-2px); }
.poem-card:hover::before { height: 100%; }
.poem-text { font-size: 1rem; line-height: 2; color: var(--text); margin-bottom: 1.25rem; font-weight: 400; }
.poem-text em { color: var(--gold-light); font-style: normal; }
.poem-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.poem-poet { font-size: 0.85rem; color: var(--gold); font-weight: 500; }
.poem-source { font-size: 0.75rem; color: var(--text-muted); background: rgba(255,255,255,0.04); padding: 0.2rem 0.6rem; border-radius: 20px; }
.poem-century { font-size: 0.75rem; color: var(--text-muted); }

/* ── POET CARDS ── */
.poets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.25rem; }
.poet-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; text-align: center; text-decoration: none; color: var(--text);
  transition: all 0.2s; display: block;
}
.poet-card:hover { border-color: var(--gold); transform: translateY(-3px); background: rgba(201,168,76,0.05); }
.poet-avatar {
  width: 70px; height: 70px; border-radius: 50%; background: rgba(201,168,76,0.1);
  border: 2px solid rgba(201,168,76,0.3); display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin: 0 auto 1rem;
}
.poet-name { font-size: 1.1rem; font-weight: 600; color: var(--text); margin-bottom: 0.25rem; }
.poet-dates { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.poet-city { font-size: 0.8rem; color: var(--gold); }

/* ── DAILY POEM ── */
.daily-poem-section {
  background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 4rem 2rem; text-align: center;
}
.daily-badge {
  display: inline-block; background: rgba(201,168,76,0.1); color: var(--gold);
  border: 1px solid rgba(201,168,76,0.3); border-radius: 20px;
  padding: 0.3rem 1rem; font-size: 0.8rem; margin-bottom: 1.5rem;
}
.daily-poem-text { font-size: 1.3rem; line-height: 2.3; max-width: 700px; margin: 0 auto 1rem; font-weight: 300; }
.daily-poem-attr { color: var(--gold); font-size: 0.9rem; }

/* ── ABOUT ── */
.about-section { background: var(--surface); padding: 4rem 2rem; }
.about-inner { max-width: 800px; margin: 0 auto; }
.about-text { color: var(--text-muted); line-height: 2; font-size: 1rem; }

/* ── BIO PAGE ── */
.bio-section { display: grid; grid-template-columns: 1fr 2fr; gap: 3rem; margin-bottom: 3rem; }
.bio-portrait {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; text-align: center;
}
.bio-avatar { width: 120px; height: 120px; border-radius: 50%; background: rgba(201,168,76,0.1); border: 3px solid rgba(201,168,76,0.4); display: flex; align-items: center; justify-content: center; font-size: 3rem; margin: 0 auto 1rem; }
.bio-poet-name { font-size: 1.8rem; font-weight: 700; color: var(--text); margin-bottom: 0.25rem; }
.bio-dates { color: var(--gold); font-size: 0.9rem; }
.bio-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; justify-content: center; }
.bio-tag { background: rgba(201,168,76,0.08); color: var(--gold); border: 1px solid rgba(201,168,76,0.2); border-radius: 20px; padding: 0.2rem 0.75rem; font-size: 0.78rem; }
.bio-text h2 { font-size: 1.3rem; color: var(--gold); margin-bottom: 1rem; }
.bio-text p { color: var(--text-muted); line-height: 2; margin-bottom: 1rem; }
.bio-works { list-style: none; }
.bio-works li { padding: 0.4rem 0; color: var(--text-muted); font-size: 0.9rem; }
.bio-works li::before { content: '◈ '; color: var(--gold); }

@media (max-width: 768px) {
  .bio-section { grid-template-columns: 1fr; }
}

/* ── BREADCRUMB ── */
.breadcrumb { padding: 1rem 2rem; max-width: 1200px; margin: 0 auto; }
.breadcrumb-inner { display: flex; gap: 0.5rem; align-items: center; font-size: 0.85rem; color: var(--text-muted); }
.breadcrumb-inner a { color: var(--text-muted); text-decoration: none; }
.breadcrumb-inner a:hover { color: var(--gold); }
.breadcrumb-sep { color: var(--border); }

/* ── SEARCH ── */
.search-section { padding: 3rem 2rem; max-width: 900px; margin: 0 auto; }
.search-input-wrap { position: relative; margin-bottom: 2rem; }
.search-input {
  width: 100%; padding: 1rem 1.25rem; font-size: 1.1rem; font-family: 'Vazirmatn', sans-serif;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); outline: none; direction: rtl;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--gold); }
.search-input::placeholder { color: var(--text-muted); }
.search-results { display: grid; gap: 1rem; }
.search-count { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }
.search-empty { text-align: center; color: var(--text-muted); padding: 3rem; }
mark { background: rgba(201,168,76,0.25); color: var(--gold-light); border-radius: 3px; }

/* ── FOOTER ── */
footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 3rem 2rem 2rem; margin-top: 4rem;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { color: var(--gold); font-size: 0.9rem; margin-bottom: 1rem; }
.footer-col a { display: block; color: var(--text-muted); text-decoration: none; font-size: 0.85rem; margin-bottom: 0.5rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; text-align: center; color: var(--text-muted); font-size: 0.8rem; }

/* ── CTA BUTTON ── */
.btn { display: inline-block; padding: 0.65rem 1.5rem; border-radius: 8px; font-family: 'Vazirmatn', sans-serif; font-size: 0.9rem; cursor: pointer; text-decoration: none; transition: all 0.2s; }
.btn-gold { background: var(--gold); color: #0d0d0d; font-weight: 600; }
.btn-gold:hover { background: var(--gold-light); }
.btn-outline { border: 1px solid var(--gold); color: var(--gold); background: transparent; }
.btn-outline:hover { background: rgba(201,168,76,0.08); }
