/* ── RESET & BASE ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #1C1C1C;
  --surface:      #232323;
  --surface-hover:#282828;
  --border:       #2e2e2e;
  --border-strong:#3d3d3d;
  --text:         #F8F0E3;
  --muted:        #BFB09E;
  --pink:         #EC90C1;
  --pink-dim:     rgba(236, 144, 193, 0.10);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Nunito Sans', system-ui, sans-serif;
  --max-w:        1080px;
  --side-pad:     clamp(20px, 5vw, 56px);
  --post-w:       680px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── NAV ────────────────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(28, 28, 28, 0.90);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--side-pad);
}
nav.scrolled { border-color: var(--border); }

.nav-brand {
  font-size: 20px; font-weight: 600;
  color: var(--text); text-decoration: none;
}
.nav-links {
  list-style: none; display: flex; gap: 36px;
}
.nav-links a {
  font-size: 20px; color: var(--pink);
  text-decoration: none;
  transition: color 0.18s;
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 1px; background: var(--text);
  transition: width 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

/* ── SECTION LABEL ──────────────────────────────────────────── */
.section-label {
  font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; font-weight: 600;
  color: var(--muted); margin-bottom: 32px;
  display: flex; align-items: center; gap: 12px;
}
.section-label::before {
  content: ''; display: block; width: 24px; height: 1px; background: var(--muted);
}

/* ── HOMEPAGE ───────────────────────────────────────────────── */
.featured-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 72px var(--side-pad) 64px;
  border-bottom: 1px solid var(--border);
}

.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.featured-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  transform: translateY(-4px);
}
.featured-card:not(:has(.featured-image)) { grid-template-columns: 1fr; }

.featured-image {
  width: 100%; aspect-ratio: 4/3;
  overflow: hidden; background: var(--border);
}
.featured-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.8s ease;
}
.featured-card:hover .featured-image img { transform: scale(1.04); }

.featured-body {
  padding: 40px 44px;
  display: flex; flex-direction: column; justify-content: center; gap: 20px;
}

.featured-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 44px);
  font-weight: 400; line-height: 1.15;
  letter-spacing: -0.02em; color: var(--text);
}
.featured-title em { font-style: italic; font-weight: 700; }

.featured-excerpt { font-size: 16px; color: var(--muted); line-height: 1.7; }

.featured-meta {
  display: flex; align-items: center; justify-content: space-between; margin-top: 4px;
}
.featured-meta time { font-size: 13px; color: var(--muted); }

.read-link {
  font-size: 14px; font-weight: 600; color: var(--pink);
  display: inline-flex; align-items: center; gap: 4px; transition: gap 0.2s;
}
.featured-card:hover .read-link { gap: 8px; }
.read-link .arrow { display: inline-block; transition: transform 0.2s; }
.featured-card:hover .read-link .arrow { transform: translateX(3px); }

/* ── LATEST POSTS ───────────────────────────────────────────── */
.latest-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 64px var(--side-pad) 96px;
}

.posts-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.post-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  text-decoration: none; color: inherit;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.post-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transform: translateY(-3px);
}

.post-card-image {
  width: 100%; aspect-ratio: 16/9;
  overflow: hidden; background: var(--border);
}
.post-card-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s ease;
}
.post-card:hover .post-card-image img { transform: scale(1.04); }

.post-card-body {
  padding: 24px 28px 28px;
  display: flex; flex-direction: column; gap: 10px;
}

.post-card-title {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 400; line-height: 1.25; letter-spacing: -0.01em;
  color: var(--text);
  border-left: 2px solid transparent; padding-left: 0;
  transition: border-color 0.2s, padding-left 0.2s;
}
.post-card:hover .post-card-title { border-color: var(--pink); padding-left: 10px; }

.post-card-excerpt { font-size: 14px; color: var(--muted); line-height: 1.65; }
.post-card-date { display: block; font-size: 12px; color: var(--muted); letter-spacing: 0.03em; margin-top: 4px; }
.no-posts { color: var(--muted); font-size: 15px; }

/* ── TAGS ───────────────────────────────────────────────────── */
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--pink);
  background: var(--pink-dim);
  border-radius: 4px;
  padding: 3px 8px;
}

/* ── POST PAGE ──────────────────────────────────────────────── */
.post-page {
  max-width: var(--post-w);
  margin: 0 auto;
  padding: 60px var(--side-pad) 100px;
}

.post-header { margin-bottom: 48px; }

.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--muted);
  text-decoration: none; margin-bottom: 32px;
  transition: color 0.18s;
}
.back-link:hover { color: var(--text); }

/* ── SNIPPET CARD ───────────────────────────────────────────── */
.snippet-card {
  /* Override all colour tokens so every var(--x) resolves to dark values */
  --text:         #111111;
  --muted:        #6b3a55;
  --pink:         #9b1060;
  --pink-dim:     rgba(155, 16, 96, 0.10);
  --border:       rgba(0, 0, 0, 0.12);
  --border-strong:rgba(0, 0, 0, 0.22);

  background: #F8D5EA;
  border-radius: 16px;
  padding: 44px 52px 40px;
  color: #111111;
}

.snippet-card .post-header { margin-bottom: 0; }

.snippet-tag {
  background: rgba(0, 0, 0, 0.08);
  color: #6b0f40;
}

.snippet-prose { font-size: 17px; line-height: 1.8; }
.snippet-prose p { margin-bottom: 1.4rem; }
.snippet-prose blockquote { border-left-color: #9b1060; }

.snippet-share {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  margin-top: 32px;
}
.snippet-share-btn {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 600;
  background: none; border: 1px solid rgba(0, 0, 0, 0.2);
  color: #4a1a35; border-radius: 6px;
  padding: 5px 12px; cursor: pointer;
  text-decoration: none; line-height: 1.5;
  transition: border-color 0.18s, background 0.18s;
}
.snippet-share-btn:hover {
  border-color: rgba(0, 0, 0, 0.4);
  background: rgba(0, 0, 0, 0.06);
}
.snippet-share-btn.copied { border-color: #166534; color: #166534; }

.post-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 400; line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 16px 0 20px;
}
.post-title em { font-style: italic; font-weight: 700; }

.post-meta-row {
  font-size: 13px; color: var(--muted);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 28px;
}

/* ── SHARE BAR ──────────────────────────────────────────────── */
.share-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.share-label {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); margin-right: 2px;
}

.share-btn {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 600;
  background: none; border: 1px solid var(--border-strong);
  color: var(--muted); border-radius: 6px;
  padding: 5px 12px; cursor: pointer;
  text-decoration: none;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
  line-height: 1.5;
}
.share-btn:hover {
  border-color: var(--pink);
  color: var(--pink);
  background: var(--pink-dim);
}
.share-btn.copied {
  border-color: #4ade80;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.08);
}

/* ── POST COVER IMAGE ────────────────────────────────────────── */
.post-cover {
  margin: 40px 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--border);
}
.post-cover img { width: 100%; display: block; }

/* ── PROSE ──────────────────────────────────────────────────── */
.prose {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
}

.prose p { margin-bottom: 1.6rem; }

.prose h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 400; letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 3rem 0 1.2rem;
  color: var(--text);
}
.prose h3 {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 400; letter-spacing: -0.01em;
  margin: 2.5rem 0 1rem;
  color: var(--text);
}
.prose h4 {
  font-size: 15px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); margin: 2rem 0 0.75rem;
}

.prose a { color: var(--pink); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { text-decoration: none; }

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

.prose ul, .prose ol {
  padding-left: 1.5rem; margin-bottom: 1.6rem;
}
.prose li { margin-bottom: 0.5rem; }

.prose blockquote {
  border-left: 3px solid var(--pink);
  margin: 2.5rem 0;
  padding: 4px 0 4px 1.5rem;
  color: var(--muted);
  font-style: italic;
  font-size: 18px;
}
.prose blockquote p { margin-bottom: 0; }

.prose hr {
  border: none;
  border-top: 1px solid var(--border-strong);
  margin: 3rem 0;
}

.prose img {
  width: 100%; border-radius: 8px;
  margin: 2.5rem 0; display: block;
}
.prose figure { margin: 2.5rem 0; }
.prose figcaption {
  font-size: 13px; color: var(--muted); text-align: center; margin-top: 10px;
}

.prose code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.88em;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 0.15em 0.45em;
  color: var(--text);
}
.prose pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 2rem 0;
}
.prose pre code {
  background: none; border: none; padding: 0;
  font-size: 0.9em; line-height: 1.6;
}

/* ── POST FOOTER ─────────────────────────────────────────────── */
.post-footer { margin-top: 64px; }
.post-rule { border: none; border-top: 1px solid var(--border); margin-bottom: 32px; }

/* ── ABOUT PAGE ──────────────────────────────────────────────── */
.about-page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 72px var(--side-pad) 100px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0 80px;
  align-items: start;
}

.about-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 400; line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text);
  position: sticky; top: 100px;
}

.about-content .prose { font-size: 17px; }
.about-content .prose p { margin-bottom: 1.5rem; }

.about-links {
  display: flex; gap: 24px; margin-top: 40px;
  flex-wrap: wrap;
}

.about-link {
  font-size: 16px; font-weight: 700;
  color: var(--text); text-decoration: none;
  border-bottom: 2px solid var(--border-strong);
  padding-bottom: 2px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color 0.2s, border-color 0.2s;
}
.about-link span { transition: transform 0.2s; display: inline-block; }
.about-link:hover { color: var(--pink); border-color: var(--pink); }
.about-link:hover span { transform: translate(2px, -2px); }

/* ── LIST PAGE ───────────────────────────────────────────────── */
.list-page {
  max-width: var(--max-w); margin: 0 auto;
  padding: 72px var(--side-pad) 96px;
}
.list-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 400; letter-spacing: -0.02em;
  margin-bottom: 48px; color: var(--text);
}

/* ── FOOTER ──────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px var(--side-pad);
}
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-copy { font-size: 12px; color: var(--muted); }
.footer-links { display: flex; align-items: center; gap: 12px; }
.footer-links a { font-size: 12px; color: var(--muted); transition: color 0.18s; }
.footer-links a:hover { color: var(--text); }
.footer-dot { color: var(--border-strong); }

/* ── ANIMATIONS & REVEALS ────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s cubic-bezier(.22,1,.36,1),
              transform 0.5s cubic-bezier(.22,1,.36,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 860px) {
  .featured-card { grid-template-columns: 1fr; }
  .featured-image { aspect-ratio: 16/9; }
  .featured-body { padding: 28px 28px 32px; }
  .featured-title { font-size: clamp(24px, 6vw, 36px); }

  .posts-list { grid-template-columns: 1fr; }

  .about-page { grid-template-columns: 1fr; gap: 40px; }
  .about-title { position: static; }
}

@media (max-width: 560px) {
  .post-page { padding: 40px var(--side-pad) 72px; }
  .featured-body { padding: 24px 20px 28px; }
  .post-card-body { padding: 20px 20px 24px; }
  .snippet-card { padding: 28px 24px 32px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .share-bar { gap: 8px; }
}
