:root {
  /* Brand palette (tweak these to match your existing colors) */
  --color-primary: #0b1b3a; /* deep navy */
  --color-primary-light: #152a57;
  --color-accent: #ffb400; /* bold amber/gold */
  --color-bg: #050814;
  --color-surface: #0f172a;
  --color-surface-alt: #111827;
  --color-border: #1f2937;
  --color-text-main: #f9fafb;
  --color-text-muted: #9ca3af;
  --color-danger: #ef4444;

  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;

  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;

  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.45);

  --container-width: 1120px;

  --transition-fast: 0.18s ease-out;
}

/* Reset-ish */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-main);
  background: radial-gradient(circle at top, #111827 0, #020617 50%, #020617 100%);
  color: var(--color-text-main);
  line-height: 1.6;
}

/* Utilities */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 3.5rem 0;
}

.section.bg-alt {
  background: radial-gradient(circle at top, #111827 0, #020617 80%);
}

.section-header {
  max-width: 640px;
  margin: 0 auto 2.25rem;
  text-align: center;
}

.section-header h2 {
  font-size: 1.9rem;
  margin-bottom: 0.6rem;
}

.section-header p {
  margin: 0;
  color: var(--color-text-muted);
}

/* Grid helpers */
.grid {
  display: grid;
  gap: 1.75rem;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 960px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.text-link {
  color: var(--color-accent);
  font-weight: 500;
  text-decoration: none;
}

.text-link:hover,
.text-link:focus-visible {
  text-decoration: underline;
}

/* Header & nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(22px);
  background: linear-gradient(to bottom, rgba(5, 8, 20, 0.9), rgba(5, 8, 20, 0.7), transparent);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--color-text-main);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.logo img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.site-nav {
  position: relative;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  padding: 0.4rem 0;
  position: relative;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--color-text-main);
}

.nav-links a.active {
  color: var(--color-accent);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.3rem;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), #ffe38b);
  border-radius: 999px;
}

/* Nav toggle (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 999px;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
}

.nav-toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-text-main);
  border-radius: 999px;
  margin: 3px 0;
}

@media (max-width: 780px) {
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
  }

  .nav-links {
    position: absolute;
    top: 110%;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: rgba(15, 23, 42, 0.98);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    min-width: 12rem;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity var(--transition-fast), transform var(--transition-fast);
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
}

/* Hero */
.hero {
  padding: 3.5rem 0 3rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2.75rem;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(2.1rem, 4vw, 2.7rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero-text p {
  color: var(--color-text-muted);
  max-width: 540px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.hero-media img {
  width: 100%;
  max-width: 460px;
  border-radius: 1.25rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

@media (max-width: 920px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-media {
    order: -1;
    display: flex;
    justify-content: center;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent), #ffe38b);
  color: #111827;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border-color: rgba(249, 250, 251, 0.2);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: rgba(15, 23, 42, 0.9);
  border-color: var(--color-accent);
}

.btn-full {
  width: 100%;
}

/* Cards */
.card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.98));
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.45rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: var(--shadow-soft);
}

.card h3 {
  margin-top: 0.4rem;
  margin-bottom: 0.4rem;
  font-size: 1.15rem;
}

.card p {
  margin-top: 0;
  color: var(--color-text-muted);
}

.card a {
  text-decoration: none;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-accent);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

/* Category cards */
.category-grid {
  margin-top: 1rem;
}

.category-card {
  background: linear-gradient(150deg, rgba(15, 23, 42, 0.97), rgba(24, 35, 64, 0.96));
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: var(--shadow-soft);
}

.category-card h3 {
  margin: 0 0 0.5rem;
}

.category-card p {
  margin: 0 0 1rem;
  color: var(--color-text-muted);
}

.category-about {
  background: linear-gradient(150deg, #111827, #020617);
}

/* About & Newsletter */
.about-newsletter {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}

.about-block p {
  color: var(--color-text-muted);
}

.newsletter-block {
  background: rgba(15, 23, 42, 0.9);
  border-radius: var(--radius-lg);
  padding: 1.7rem 1.6rem;
  border: 1px solid rgba(148, 163, 184, 0.26);
  box-shadow: var(--shadow-soft);
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.newsletter-form input {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.6rem 0.9rem;
  background: rgba(15, 23, 42, 0.95);
  color: var(--color-text-main);
}

.newsletter-form input:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.form-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Blog listing */
.page-hero {
  padding: 2.4rem 0 1.7rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: radial-gradient(circle at top, #111827 0, #020617 70%);
}

.page-hero h1 {
  margin: 0 0 0.3rem;
  font-size: 2rem;
}

.page-hero p {
  margin: 0;
  color: var(--color-text-muted);
}

.blog-filter-header {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 1.5rem;
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.95);
  color: var(--color-text-muted);
  padding: 0.3rem 0.9rem;
  font-size: 0.82rem;
  cursor: pointer;
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--color-accent), #ffe38b);
  color: #111827;
  border-color: transparent;
}

.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.blog-card {
  padding: 0;
  overflow: hidden;
}

.blog-card img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.blog-card .card-content {
  padding: 1.1rem 1.2rem 1.3rem;
}

.blog-card h3 {
  margin-top: 0.5rem;
}

.blog-card h3 a {
  color: var(--color-text-main);
  text-decoration: none;
}

.blog-card h3 a:hover,
.blog-card h3 a:focus-visible {
  text-decoration: underline;
}

.blog-card .meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Sidebar */
.blog-sidebar,
.post-sidebar {
  background: rgba(15, 23, 42, 0.9);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.3rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: var(--shadow-soft);
}

.sidebar-section + .sidebar-section {
  margin-top: 1.4rem;
}

.sidebar-section h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-list li + li {
  margin-top: 0.4rem;
}

.sidebar-list a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

.sidebar-list a:hover,
.sidebar-list a:focus-visible {
  color: var(--color-text-main);
}

/* Post page */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.1fr);
  gap: 2rem;
  align-items: start;
}

.post-category-tag {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--color-accent);
}

.post-meta {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.post-content {
  max-width: 720px;
}

.post-content .lead {
  font-size: 1.02rem;
  color: var(--color-text-muted);
}

.post-content h2 {
  margin-top: 2rem;
  margin-bottom: 0.4rem;
}

.post-content p {
  color: var(--color-text-muted);
}

.post-content ul,
.post-content ol {
  padding-left: 1.3rem;
  color: var(--color-text-muted);
}

.post-toc {
  background: rgba(15, 23, 42, 0.9);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  margin: 1.4rem 0;
}

.post-toc h2 {
  margin-top: 0;
  font-size: 1rem;
}

.post-toc a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.post-toc a:hover,
.post-toc a:focus-visible {
  color: var(--color-text-main);
}

.post-cta {
  margin-top: 2.2rem;
  padding: 1.4rem 1.5rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(24, 35, 64, 0.97));
  border: 1px solid rgba(249, 250, 251, 0.12);
}

.post-cta h2 {
  margin-top: 0;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

/* Podcast */
.podcast-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr);
  gap: 2.2rem;
  align-items: start;
}

.podcast-cover {
  width: 100%;
  max-width: 320px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: var(--shadow-soft);
}

.podcast-intro {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  align-items: flex-start;
}

.podcast-intro p {
  color: var(--color-text-muted);
}

.podcast-episodes h2 {
  margin-top: 0;
}

.podcast-episode {
  background: rgba(15, 23, 42, 0.92);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.3rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: var(--shadow-soft);
}

.podcast-episode + .podcast-episode {
  margin-top: 1rem;
}

.episode-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.episode-category {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

audio {
  width: 100%;
  margin-top: 0.6rem;
}

/* Video */
.video-grid .video-card {
  padding: 0;
}

.video-thumb img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.video-card .card-content {
  padding: 1rem 1.2rem 1.3rem;
}

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr);
  gap: 2.2rem;
  align-items: start;
}

.contact-info p {
  color: var(--color-text-muted);
}

.contact-details {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.contact-details li + li {
  margin-top: 0.4rem;
}

.contact-details a {
  color: var(--color-accent);
  text-decoration: none;
}

.contact-details a:hover,
.contact-details a:focus-visible {
  text-decoration: underline;
}

.contact-form-wrapper {
  background: rgba(15, 23, 42, 0.92);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: var(--shadow-soft);
}

.contact-form .form-group {
  margin-bottom: 0.9rem;
}

.contact-form label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border-radius: 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.55rem 0.85rem;
  background: rgba(15, 23, 42, 0.95);
  color: var(--color-text-main);
  resize: vertical;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  margin-top: 2.5rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 2rem;
  padding: 2.3rem 0 1.6rem;
}

.footer-brand p {
  color: var(--color-text-muted);
  max-width: 360px;
}

.footer-links h4 {
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li + li {
  margin-top: 0.3rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--color-text-main);
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  padding: 0.7rem 0 1.1rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* Misc */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive adjustments */
@media (max-width: 960px) {
  .blog-layout,
  .post-layout,
  .podcast-layout,
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .blog-sidebar,
  .post-sidebar {
    margin-top: 1.2rem;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .about-newsletter {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding-top: 2.5rem;
  }
.post-media {
  margin: 1.5rem 0;
}

.post-media img {
  width: 100%;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.post-media figcaption {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
}

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}
.video-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 14px;
  margin: 1.2rem 0 1.8rem;
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Standard blog featured image */
.post-featured-image {
  width: 100%;
  max-height: 420px; /* consistent hero height */
  overflow: hidden;
  border-radius: 16px;
  margin: 2rem 0;
}

.post-featured-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

@media (min-width: 1024px) {
  .post-featured-image {
    max-height: 480px;
  }
}

.contact-form-embed iframe {
  width: 100% !important;
  max-width: 100%;
  border-radius: 12px;
}

.contact-form-wrapper,
.contact-form-embed {
  height: auto;
  overflow: visible;
}

.contact-form-embed iframe {
  width: 100%;
  height: 500px;
  border: none;
  border-radius: 12px;
}

/* Ensure contact form container grows with iframe */
.contact-form-wrapper {
  height: auto;
  max-height: none;
  overflow: visible;
}
