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

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

/* ------------------------------------------------------------------ */
/* Design tokens                                                       */
/* ------------------------------------------------------------------ */
:root {
  --bg:           #0f0f0f;
  --surface:      #1a1a1a;
  --border:       #2a2a2a;
  --text:         #e2e2e2;
  --text-muted:   #888888;
  --accent:       #7B2FBE;
  --accent-hover: #9B4FDE;

  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: 'Playfair Display', Georgia, "Times New Roman", serif;

  --measure:     720px;
  --measure-wide: 1200px;
  --lh:          1.8;
}

/* ------------------------------------------------------------------ */
/* Base                                                                */
/* ------------------------------------------------------------------ */
html { font-size: 18px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: var(--lh);
  padding: 0;
}

.container {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.container--wide {
  max-width: var(--measure-wide);
}

/* ------------------------------------------------------------------ */
/* Site hero (index page top)                                          */
/* ------------------------------------------------------------------ */
.site-hero-link {
  display: block;
  width: 100%;
  text-decoration: none;
}
.site-hero-link:hover { text-decoration: none; }

.site-hero {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.hero-content {
  position: relative;
  z-index: 1;
  text-align: left;
  padding: 0 1.25rem 0 60px;
}

@keyframes hero-slide-in {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-title {
  font-family: var(--font-sans);
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #ffffff;
  text-shadow: -2px -2px 0 #7B2FBE, 2px -2px 0 #7B2FBE, -2px 2px 0 #7B2FBE, 2px 2px 0 #7B2FBE;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  line-height: 1.1;
  animation: hero-slide-in 0.8s ease both;
}

.hero-subtitle {
  font-family: var(--font-sans);
  font-size: 1.6rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: -2px -2px 0 #7B2FBE, 2px -2px 0 #7B2FBE, -2px 2px 0 #7B2FBE, 2px 2px 0 #7B2FBE;
  text-transform: uppercase;
  letter-spacing: normal;
  word-spacing: normal;
  animation: hero-slide-in 0.8s ease 0.3s both;
}

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

/* ------------------------------------------------------------------ */
/* Post banner — colored stripe at top of post pages                  */
/* ------------------------------------------------------------------ */
.post-banner {
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #5A189A 0%, #7B2FBE 40%, #9B4FDE 100%);
}

/* ------------------------------------------------------------------ */
/* Navigation (back link on post pages)                               */
/* ------------------------------------------------------------------ */
nav {
  margin-bottom: 2.5rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
}

nav a {
  color: var(--text-muted);
  transition: color 0.15s;
}
nav a:hover { color: var(--text); text-decoration: none; }

/* ------------------------------------------------------------------ */
/* Site header (index page) — now just a spacing divider              */
/* ------------------------------------------------------------------ */
header {
  display: none;
}

/* ------------------------------------------------------------------ */
/* Post grid (index page) — 3-column responsive card layout           */
/* ------------------------------------------------------------------ */
.post-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.post-card {
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
}

/* ------------------------------------------------------------------ */
/* Article (post pages)                                                */
/* ------------------------------------------------------------------ */
article {
  padding-top: 0.5rem;
}

article h1 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
  color: #ffffff;
}

.post-author {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  display: block;
}

article h2 {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 2.25rem;
  margin-bottom: 0.65rem;
  color: #ffffff;
}

article p {
  margin-bottom: 1.25rem;
  color: #c4c4c4;
}

/* Lead paragraph — slightly larger */
article p:first-of-type {
  font-size: 1.1rem;
  color: #d6d6d6;
}

article ul, article ol {
  margin: 0 0 1.25rem 1.75rem;
  color: #c4c4c4;
}
article li { margin-bottom: 0.4rem; }

article strong { font-weight: 700; color: #e2e2e2; }
article em     { font-style: italic; }

/* ------------------------------------------------------------------ */
/* CTA block                                                           */
/* ------------------------------------------------------------------ */
.cta {
  margin-top: 3.5rem;
  padding: 2.5rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  font-family: var(--font-sans);
}

.cta h2 {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: #ffffff;
  font-family: var(--font-sans);
  margin-top: 0;
}

.cta p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 1rem;
  font-family: var(--font-sans);
}

.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
  font-family: var(--font-sans);
}

.cta-btn:hover {
  background: var(--accent-hover);
  text-decoration: none;
  color: #fff;
}

/* ------------------------------------------------------------------ */
/* Post thumbnail (post pages)                                         */
/* ------------------------------------------------------------------ */
.post-thumbnail-link {
  display: block;
  margin-bottom: 2rem;
}

.post-thumbnail {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* ------------------------------------------------------------------ */
/* Card thumbnail (index page)                                         */
/* ------------------------------------------------------------------ */
.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--text);
  text-decoration: none;
}
.card-link:hover { color: var(--accent); text-decoration: none; }
.card-link:hover .card-title { color: var(--accent-hover); }

.card-thumbnail {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  background: var(--border);
}

.card-title {
  padding: 0.875rem 1rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: #ffffff;
  text-align: center;
  transition: color 0.15s;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ------------------------------------------------------------------ */
/* Search bar (index page)                                             */
/* ------------------------------------------------------------------ */
.search-wrapper {
  margin-bottom: 2rem;
}

#search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

#search-input::placeholder {
  color: var(--text-muted);
}

#search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(123, 47, 190, 0.2);
}

.search-no-results {
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 1rem;
  text-align: center;
  padding: 3rem 0;
  display: none;
}

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

@media (max-width: 600px) {
  html { font-size: 16px; }
  article h1 { font-size: 1.7rem; }
  .cta { padding: 2rem 1.25rem; }
  .post-grid {
    grid-template-columns: 1fr;
  }
  .card-thumbnail { height: 200px; }
  .site-hero { height: 220px; }
  .hero-content { padding-left: 24px; }
  .hero-title { font-size: 2.8rem; }
  .hero-subtitle { font-size: 1rem; }
}
