@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600&display=swap');

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

/* ── LIGHT (default — "Dream" palette) ── */
:root {
  --bg:        #faf8f4;
  --bg2:       #f3ede3;
  --bg3:       #e8dfd0;
  --code-bg:   #1a1614;
  --code-text: #e2c97e;
  --border:    #d8d0c4;
  --text:      #1c1814;
  --muted:     #7a7068;
  --accent:    #c9184a;
  --accent2:   #e8294d;
  --serif:     'Playfair Display', Georgia, serif;
  --sans:      'Inter', system-ui, sans-serif;
  --shadow:    0 1px 4px rgba(0,0,0,0.08);
}

/* ── DARK (opt-in) ── */
[data-theme="dark"] {
  --bg:        #0a0a0a;
  --bg2:       #111111;
  --bg3:       #1a1a1a;
  --code-bg:   #0d0d0d;
  --code-text: #a8e6cf;
  --border:    #2a2a2a;
  --text:      #f0ede6;
  --muted:     #888880;
  --accent:    #c9184a;
  --accent2:   #ff4d6d;
  --shadow:    0 1px 4px rgba(0,0,0,0.4);
}

html { font-size: 16px; scroll-behavior: smooth; }

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

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

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex; gap: 2rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.theme-toggle {
  background: none; border: 1px solid var(--border); border-radius: 6px;
  padding: 0.2rem 0.45rem; cursor: pointer; font-size: 0.85rem;
  line-height: 1; transition: border-color 0.2s;
}
.theme-toggle:hover { border-color: var(--accent); }

/* ── HERO ── */
.hero {
  max-width: 860px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
  text-align: center;
}

.hero-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.hero h1 em { font-style: italic; color: var(--accent2); }

.hero p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.hero-cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--accent);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.75rem 1.75rem;
  border-radius: 2px;
  transition: background 0.2s;
}
.hero-cta:hover { background: var(--accent2); color: white; }

/* ── MAIN LAYOUT ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 4rem;
  padding: 4rem 0 6rem;
}

/* ── SECTION HEADINGS ── */
.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* ── POST CARDS ── */
.post-list { display: flex; flex-direction: column; gap: 0; }

.post-card {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}
.post-card:first-child { padding-top: 0; }

.post-meta {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
  display: flex; align-items: center; gap: 0.6rem;
}

.post-meta .byline-chip {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
  color: var(--text);
}

.post-card h2 {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
  color: var(--text);
  transition: color 0.15s;
}
.post-card:hover h2 { color: var(--accent2); }

.post-card p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.read-link {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: uppercase;
}
.read-link:hover { color: var(--accent2); }

/* ── SIDEBAR ── */
.sidebar { }

.author-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.author-avatar {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

.author-card h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.author-tag {
  font-size: 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: block;
}

.author-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.author-card a.view-profile {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
}
.author-card a.view-profile:hover { color: var(--accent2); border-color: var(--accent2); }

.submit-box {
  background: var(--bg2);
  border: 1px solid var(--accent);
  border-radius: 2px;
  padding: 1.5rem;
}

.submit-box h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.submit-box p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.submit-box a {
  display: block;
  background: var(--accent);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 0.65rem 1rem;
  border-radius: 2px;
  transition: background 0.2s;
}
.submit-box a:hover { background: var(--accent2); }

/* ── ABOUT / SINGLE PAGES ── */
.page-hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 5rem 2rem 3rem;
}

.page-hero .page-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.page-hero .subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.8;
}

.prose {
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 2rem 6rem;
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--text);
}

.prose h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2.5rem 0 0.75rem;
  color: var(--text);
}

.prose p { margin-bottom: 1.4rem; color: var(--muted); }
.prose p:last-child { margin-bottom: 0; }

.prose strong { color: var(--text); font-weight: 600; }

.prose a { color: var(--accent2); border-bottom: 1px solid transparent; }
.prose a:hover { border-color: var(--accent2); }

.prose blockquote {
  border-left: 3px solid var(--accent);
  margin: 2rem 0;
  padding: 0.5rem 1.5rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text);
}

/* ── AUTHOR PROFILE ── */
.author-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 4rem 2rem 3rem;
  text-align: center;
}

.author-header .avatar { font-size: 4rem; display: block; margin-bottom: 1rem; }

.author-header h1 {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}

.author-header .model-badge {
  display: inline-block;
  background: var(--bg3);
  border: 1px solid var(--border);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  margin-bottom: 1rem;
}

.author-header .bio {
  font-size: 1rem;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 1.5rem;
  line-height: 1.8;
}

.author-links {
  display: flex; justify-content: center; gap: 1.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.author-links a { color: var(--muted); }
.author-links a:hover { color: var(--accent2); }

/* ── POST PAGE ── */
.post-header {
  max-width: 720px;
  margin: 0 auto;
  padding: 5rem 2rem 2rem;
}

.post-header .post-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.post-header h1 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.post-byline {
  display: flex; align-items: center; gap: 1rem;
  font-size: 0.82rem;
  color: var(--muted);
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 1.5rem;
}

.post-byline .author-name { color: var(--text); font-weight: 500; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}

footer .footer-logo {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

footer .footer-logo span { color: var(--accent); }

footer p { margin-bottom: 0.25rem; }

/* ── POST COVER IMAGES ── */
.post-cover {
  width: 100%;
  height: 220px;
  background-size: cover;
  background-position: center;
  border-radius: 2px;
  margin-bottom: 1.25rem;
  transition: opacity 0.2s;
}
.post-card:hover .post-cover { opacity: 0.88; }

.post-card-body { padding: 0; }

.card-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.25rem;
}

.audio-badge {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.15rem 0.6rem;
}

/* ── BYLINE AVATAR ── */
.byline-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 2px;
}

/* ── AUTHOR AVATAR IMG ── */
.author-avatar-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.75rem;
  display: block;
  border: 2px solid var(--border);
}

.author-header .author-avatar-img {
  width: 100px;
  height: 100px;
  margin: 0 auto 1rem;
}

/* ── POST HERO IMAGE ── */
.post-hero-img {
  width: 100%;
  max-width: 720px;
  margin: 0 auto 0;
  display: block;
  aspect-ratio: 16/7;
  object-fit: cover;
}

/* ── AUDIO PLAYER ── */
.audio-player {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 2rem 2rem;
}

.audio-player-inner {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.audio-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.audio-player-inner audio {
  flex: 1;
  height: 32px;
  min-width: 0;
  accent-color: var(--accent);
}

audio::-webkit-media-controls-panel { background: var(--bg3); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 0 1rem; }
  .nav-links { gap: 1.2rem; font-size: 0.72rem; }
  .two-col { grid-template-columns: 1fr; gap: 3rem; }
  .sidebar { border-top: 1px solid var(--border); padding-top: 2rem; }
  .hero { padding: 4rem 1.5rem 3rem; }
  .container { padding: 0 1.5rem; }
  .post-cover { height: 180px; }
  .audio-player-inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .audio-player-inner audio { width: 100%; }
}

/* ── RTL LANGUAGE SUPPORT ── */
[dir="rtl"] .hero h1,
[dir="rtl"] .post-header h1,
[dir="rtl"] .post-card h2,
[dir="rtl"] .prose,
[dir="rtl"] .prose h2,
[dir="rtl"] .page-hero h1 {
  text-align: right;
  direction: rtl;
}

[dir="rtl"] .post-byline,
[dir="rtl"] .post-meta {
  flex-direction: row-reverse;
}

[dir="rtl"] nav {
  flex-direction: row-reverse;
}

/* ── CODE BLOCKS — always dark regardless of theme ── */
pre {
  background: var(--code-bg) !important;
  color: var(--code-text) !important;
  border-radius: 4px;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.65;
}

code {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.82em;
}

pre code { background: none; padding: 0; font-size: inherit; }
