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

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

:root {
  --color-primary: #18181B;
  --color-on-primary: #FFFFFF;
  --color-secondary: #3F3F46;
  --color-accent: #D97706;
  --color-accent-hover: #B45309;
  --color-accent-light: #FEF3C7;
  --color-background: #FAFAFA;
  --color-foreground: #09090B;
  --color-muted: #71717A;
  --color-muted-bg: #F4F4F5;
  --color-border: #E4E4E7;
  --color-card: #FFFFFF;
  --color-tag-bg: #F4F4F5;
  --color-tag-text: #3F3F46;
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  --max-width: 1200px;
  --content-width: 720px;
  --radius: 8px;
  --transition: 200ms ease;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

/* ── NAVBAR ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-primary);
}

.navbar-brand .brand-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-brand .brand-icon svg,
.navbar-brand .brand-icon img {
  width: 38px;
  height: 38px;
  color: var(--color-accent);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.navbar-links a {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-secondary);
  letter-spacing: 0.01em;
  position: relative;
  padding: 4px 0;
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--color-primary);
}

.navbar-links a:hover::after,
.navbar-links a.active::after {
  width: 100%;
}

.navbar-cta {
  background: var(--color-primary);
  color: var(--color-on-primary) !important;
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.8125rem;
  transition: background var(--transition);
  cursor: pointer;
}

.navbar-cta:hover {
  background: var(--color-secondary);
}

.navbar-cta::after {
  display: none !important;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
}

/* ── HERO ── */
.hero {
  padding: 80px 24px 60px;
  text-align: center;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero h1 {
  margin-bottom: 20px;
}

.hero h1 .accent {
  color: var(--color-accent);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--color-muted);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.hero-newsletter {
  display: flex;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
}

.hero-newsletter input {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  background: var(--color-card);
  transition: border-color var(--transition);
  outline: none;
}

.hero-newsletter input:focus {
  border-color: var(--color-accent);
}

.hero-newsletter input::placeholder {
  color: var(--color-muted);
}

.hero-newsletter button {
  padding: 14px 28px;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
}

.hero-newsletter button:hover {
  background: var(--color-accent-hover);
}

.hero-trust {
  margin-top: 20px;
  font-size: 0.8125rem;
  color: var(--color-muted);
}

/* ── SECTIONS ── */
.section {
  padding: 80px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-header h2 {
  position: relative;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--color-accent);
  margin-top: 12px;
  border-radius: 2px;
}

.section-link {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.section-link:hover {
  color: var(--color-accent-hover);
}

.section-link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition);
}

.section-link:hover svg {
  transform: translateX(4px);
}

/* ── FEATURED POST ── */
.featured-post {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 48px;
}

.featured-post-image {
  height: 100%;
  min-height: 360px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.featured-post-image .pattern {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image: radial-gradient(circle, var(--color-accent) 1px, transparent 1px);
  background-size: 24px 24px;
}

.featured-post-image svg {
  width: 80px;
  height: 80px;
  color: var(--color-accent);
  position: relative;
  z-index: 1;
}

.featured-post-content {
  padding: 48px 48px 48px 0;
}

.featured-badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.featured-post-content h3 {
  font-size: 1.75rem;
  margin-bottom: 16px;
  line-height: 1.3;
}

.featured-post-content h3 a:hover {
  color: var(--color-accent);
}

.featured-post-content p {
  color: var(--color-muted);
  margin-bottom: 24px;
  line-height: 1.8;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.post-meta .divider {
  width: 4px;
  height: 4px;
  background: var(--color-border);
  border-radius: 50%;
}

/* ── POST GRID ── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.post-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.post-card-image {
  height: 200px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.post-card-image .pattern {
  position: absolute;
  inset: 0;
  opacity: 0.08;
}

.post-card-image svg {
  width: 48px;
  height: 48px;
  color: var(--color-accent);
  position: relative;
  z-index: 1;
}

.post-card-body {
  padding: 24px;
}

.post-card-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-tag-text);
  background: var(--color-tag-bg);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.post-card-body h3 {
  font-size: 1.125rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

.post-card-body h3 a:hover {
  color: var(--color-accent);
}

.post-card-body p {
  font-size: 0.875rem;
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── TOPICS BAR ── */
.topics-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 24px 40px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.topic-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 8px 20px;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  color: var(--color-secondary);
  background: var(--color-card);
  cursor: pointer;
  transition: all var(--transition);
}

.topic-pill:hover,
.topic-pill.active {
  background: var(--color-primary);
  color: var(--color-on-primary);
  border-color: var(--color-primary);
}

.topic-pill svg {
  width: 14px;
  height: 14px;
}

/* ── NEWSLETTER CTA SECTION ── */
.newsletter-section {
  background: var(--color-primary);
  padding: 80px 24px;
  text-align: center;
}

.newsletter-section .newsletter-inner {
  max-width: 560px;
  margin: 0 auto;
}

.newsletter-section h2 {
  color: var(--color-on-primary);
  margin-bottom: 16px;
}

.newsletter-section p {
  color: #A1A1AA;
  margin-bottom: 32px;
  font-size: 1.0625rem;
  line-height: 1.7;
}

.newsletter-section .hero-newsletter input {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--color-on-primary);
}

.newsletter-section .hero-newsletter input::placeholder {
  color: #71717A;
}

.newsletter-section .hero-newsletter input:focus {
  border-color: var(--color-accent);
}

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 64px 24px 32px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand p {
  color: var(--color-muted);
  font-size: 0.875rem;
  line-height: 1.7;
  margin-top: 16px;
  max-width: 300px;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul a {
  font-size: 0.875rem;
  color: var(--color-muted);
}

.footer-col ul a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-links a {
  color: var(--color-muted);
  transition: color var(--transition);
}

.social-links a:hover {
  color: var(--color-accent);
}

.social-links svg {
  width: 20px;
  height: 20px;
}

/* ── PAGE HERO (inner pages) ── */
.page-hero {
  padding: 64px 24px 48px;
  text-align: center;
  max-width: var(--content-width);
  margin: 0 auto;
}

.page-hero h1 {
  margin-bottom: 16px;
}

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

/* ── ABOUT PAGE ── */
.about-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 64px;
  align-items: start;
}

.about-photo {
  width: 320px;
  height: 400px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 96px;
}

.about-photo svg {
  width: 80px;
  height: 80px;
  color: var(--color-accent);
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 16px;
}

.about-text h2 {
  margin-bottom: 20px;
}

.about-text h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--color-accent);
  margin-top: 12px;
  border-radius: 2px;
}

.about-text p {
  color: var(--color-secondary);
  margin-bottom: 24px;
  line-height: 1.8;
  font-size: 1.0625rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 40px 0;
  padding: 32px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.stat {
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-accent);
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin-top: 4px;
}

/* ── SPEAKING PAGE ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 80px;
}

.service-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 40px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.service-icon {
  width: 56px;
  height: 56px;
  background: var(--color-accent-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.service-icon svg {
  width: 28px;
  height: 28px;
  color: var(--color-accent);
}

.service-card h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.service-card p {
  color: var(--color-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.service-card .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 10px 24px;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius);
  color: var(--color-primary);
  cursor: pointer;
  transition: all var(--transition);
}

.service-card .btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

/* ── RESOURCES PAGE ── */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 80px;
}

.resource-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.resource-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

.resource-card-image {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resource-card-body {
  padding: 24px;
}

.resource-type {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.resource-card-body h3 {
  font-size: 1.0625rem;
  margin-bottom: 8px;
}

.resource-card-body p {
  font-size: 0.8125rem;
  color: var(--color-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.resource-card-body .btn-small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  cursor: pointer;
}

.resource-card-body .btn-small:hover {
  color: var(--color-accent-hover);
}

.resource-card-body .btn-small svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition);
}

.resource-card-body .btn-small:hover svg {
  transform: translateX(3px);
}

/* ── BLOG POST PAGE ── */
.post-header {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 64px 24px 32px;
  text-align: center;
}

.post-header .post-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 20px;
}

.post-header h1 {
  margin-bottom: 20px;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
}

.post-header .post-meta {
  justify-content: center;
}

.post-hero-image {
  max-width: 900px;
  margin: 0 auto 48px;
  padding: 0 24px;
}

.post-hero-image .image-placeholder {
  height: 420px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.post-hero-image .pattern {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: radial-gradient(circle, var(--color-accent) 1.5px, transparent 1.5px);
  background-size: 32px 32px;
}

.post-hero-image svg {
  width: 64px;
  height: 64px;
  color: var(--color-accent);
  position: relative;
  z-index: 1;
}

.post-body {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px 80px;
}

.post-body p {
  margin-bottom: 24px;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-secondary);
}

.post-body h2 {
  margin: 48px 0 20px;
  font-size: 1.5rem;
}

.post-body h3 {
  margin: 36px 0 16px;
}

.post-body blockquote {
  border-left: 4px solid var(--color-accent);
  padding: 20px 24px;
  margin: 32px 0;
  background: var(--color-muted-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--color-secondary);
  font-size: 1.125rem;
  line-height: 1.7;
}

.post-body ul, .post-body ol {
  margin-bottom: 24px;
  padding-left: 24px;
}

.post-body li {
  margin-bottom: 8px;
  line-height: 1.7;
  color: var(--color-secondary);
}

.post-body img {
  border-radius: 12px;
  margin: 32px 0;
}

.post-body .callout {
  padding: 24px;
  background: var(--color-accent-light);
  border-radius: 12px;
  margin: 32px 0;
  border-left: 4px solid var(--color-accent);
}

.post-body .callout p {
  margin-bottom: 0;
  font-style: normal;
  color: var(--color-primary);
}

/* ── AUTHOR BOX ── */
.author-box {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 32px;
  background: var(--color-muted-bg);
  border-radius: 16px;
  margin-top: 48px;
}

.author-box .author-avatar {
  width: 80px;
  height: 80px;
  background: var(--color-primary);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-box .author-avatar svg {
  width: 36px;
  height: 36px;
  color: var(--color-accent);
}

.author-box h4 {
  font-family: var(--font-heading);
  margin-bottom: 6px;
}

.author-box p {
  font-size: 0.875rem;
  color: var(--color-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ── BLOG LISTING PAGE ── */
.blog-filters {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 32px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .featured-post {
    grid-template-columns: 1fr;
  }

  .featured-post-image {
    min-height: 240px;
  }

  .featured-post-content {
    padding: 32px;
  }

  .post-grid,
  .blog-grid,
  .resources-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .about-content {
    grid-template-columns: 1fr;
  }

  .about-photo {
    width: 100%;
    height: 300px;
    position: static;
  }
}

@media (max-width: 768px) {
  .navbar-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-background);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
  }

  .navbar-links.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    padding: 48px 24px 40px;
  }

  .hero-newsletter {
    flex-direction: column;
  }

  .post-grid,
  .blog-grid,
  .resources-grid {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .section {
    padding: 48px 24px;
  }

  .about-stats {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ── FOCUS STATES ── */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ── SKIP LINK ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--color-primary);
  color: var(--color-on-primary);
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  z-index: 200;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 16px;
}

/* ── AI FEATURES LAYER (injected by js/features.js) ── */

/* Search trigger in navbar */
.search-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-card);
  color: var(--color-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.search-trigger:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Search overlay */
.ai-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(24, 24, 27, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 14vh 24px 0;
}

.ai-search-box {
  width: 100%;
  max-width: 620px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
}

.ai-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-accent);
}

.ai-search-row input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--color-foreground);
}

.ai-search-close {
  border: 1px solid var(--color-border);
  background: none;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-muted);
  padding: 4px 8px;
  cursor: pointer;
}

.ai-search-results {
  max-height: 50vh;
  overflow-y: auto;
  padding: 10px;
}

.ai-search-item,
.ai-recommend-card {
  display: block;
  padding: 14px 16px;
  border-radius: 10px;
  transition: background var(--transition);
}

.ai-search-item:hover,
.ai-recommend-card:hover {
  background: var(--color-muted-bg);
}

.ai-search-item strong,
.ai-recommend-card strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.975rem;
  color: var(--color-primary);
  margin: 4px 0 2px;
}

.ai-search-tag {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.ai-search-excerpt {
  display: block;
  font-size: 0.8rem;
  color: var(--color-muted);
  line-height: 1.5;
}

.ai-search-hint {
  padding: 24px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-muted);
}

/* Post toolbar */
.ai-toolbar {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px 8px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.ai-toolbar button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  background: var(--color-card);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.ai-toolbar button:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.ai-toolbar button.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* Summary panel */
.ai-summary {
  max-width: var(--content-width);
  margin: 16px auto 0;
  padding: 20px 24px;
  background: var(--color-accent-light);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 12px 12px 0;
}

.ai-summary h4 {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.ai-summary ul {
  list-style: none;
}

.ai-summary li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 0.925rem;
  line-height: 1.6;
  color: var(--color-primary);
}

.ai-summary li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

/* Share modal */
.ai-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(24, 24, 27, 0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.ai-modal-box {
  width: 100%;
  max-width: 520px;
  background: var(--color-card);
  border-radius: 14px;
  padding: 28px;
  border: 1px solid var(--color-border);
}

.ai-modal-box h3 {
  margin-bottom: 16px;
}

.ai-quote-card {
  background: var(--color-primary);
  border-radius: 10px;
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 14px;
}

.ai-quote-card p {
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.6;
  color: #fff;
  margin-bottom: 10px;
}

.ai-quote-card span {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.ai-linkedin-text {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--color-secondary);
  background: var(--color-muted-bg);
  resize: vertical;
  margin-bottom: 14px;
}

.ai-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ai-modal-actions button {
  padding: 9px 16px;
  border-radius: 100px;
  border: 1px solid var(--color-border);
  background: var(--color-card);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.ai-modal-actions button:first-child {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.ai-modal-actions button:hover {
  border-color: var(--color-accent);
}

/* Recommendations */
.ai-recommend {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px 64px;
}

.ai-recommend h2 {
  font-size: 1.35rem;
  margin-bottom: 20px;
}

.ai-recommend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ai-recommend-card {
  border: 1px solid var(--color-border);
  background: var(--color-card);
}

@media (max-width: 640px) {
  .ai-recommend-grid {
    grid-template-columns: 1fr;
  }
}

/* Chat widget */
.ai-chat {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 250;
}

.ai-chat-fab {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition);
}

.ai-chat-fab:hover {
  transform: scale(1.06);
}

.ai-chat-panel {
  position: absolute;
  bottom: 66px;
  right: 0;
  width: min(340px, calc(100vw - 40px));
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
}

.ai-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.85rem;
}

.ai-chat-x {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.2rem;
  cursor: pointer;
}

.ai-chat-log {
  max-height: 280px;
  min-height: 140px;
  overflow-y: auto;
  padding: 14px;
}

.ai-msg {
  font-size: 0.82rem;
  line-height: 1.55;
  padding: 9px 12px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.ai-msg.bot {
  background: var(--color-muted-bg);
  color: var(--color-secondary);
  border-bottom-left-radius: 3px;
}

.ai-msg.user {
  background: var(--color-primary);
  color: #fff;
  margin-left: 32px;
  border-bottom-right-radius: 3px;
}

.ai-chat-form {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--color-border);
}

.ai-chat-form input {
  flex: 1;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  outline: none;
}

.ai-chat-form input:focus {
  border-color: var(--color-accent);
}

.ai-chat-form button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--color-accent);
  color: #fff;
  cursor: pointer;
}

/* hidden must win over the display:flex rules above, or these never close */
.ai-search-overlay[hidden],
.ai-modal[hidden],
.ai-chat-panel[hidden] {
  display: none;
}

/* ── VIDEO EMBEDS ── */
/* Responsive 16:9 wrapper for YouTube/Vimeo iframes inside posts.
   Usage: <div class="video-embed"><iframe …></iframe></div> */
.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 32px 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-primary);
}

.video-embed iframe,
.video-embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-caption {
  margin: -20px 0 32px;
  font-size: 0.8125rem;
  color: var(--color-muted);
  text-align: center;
}

/* ── ANIMATIONS (editorial: calm, fast, never blocking reading) ── */

/* Hero entrance: label, headline, subtitle, form arrive in sequence */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero > * {
  animation: rise-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero > *:nth-child(2) { animation-delay: 0.08s; }
.hero > *:nth-child(3) { animation-delay: 0.16s; }
.hero > *:nth-child(4) { animation-delay: 0.24s; }
.hero > *:nth-child(5) { animation-delay: 0.32s; }

/* Post pages: header eases in so opening an article feels intentional */
.post-header > * {
  animation: rise-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.post-header > *:nth-child(2) { animation-delay: 0.07s; }
.post-header > *:nth-child(3) { animation-delay: 0.14s; }

/* Scroll reveal: js/features.js adds .reveal, then .visible in view.
   Initial state only applies when JS has run (html.anim-ready),
   so content is never hidden if JS fails. */
html.anim-ready .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

html.anim-ready .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger siblings inside grids so cards cascade rather than pop together */
html.anim-ready .reveal.visible:nth-child(2) { transition-delay: 0.08s; }
html.anim-ready .reveal.visible:nth-child(3) { transition-delay: 0.16s; }
html.anim-ready .reveal.visible:nth-child(4) { transition-delay: 0.24s; }

/* Reading progress bar on posts: thin amber line under the navbar */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--color-accent);
  z-index: 150;
}

/* Micro-interactions */
.hero-newsletter button:active,
.navbar-cta:active,
.topic-pill:active {
  transform: scale(0.97);
}

.post-card-image .pattern,
.featured-post-image .pattern {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.post-card:hover .pattern,
.featured-post:hover .pattern {
  transform: scale(1.06);
}

/* Respect reduced motion: the global rule above already zeroes
   durations; also drop the reveal offset so nothing shifts. */
@media (prefers-reduced-motion: reduce) {
  html.anim-ready .reveal {
    opacity: 1;
    transform: none;
  }
  .hero > *, .post-header > * {
    animation: none;
  }
}

/* ── POLISH PASS ── */

/* Cross-page transitions: pages crossfade instead of flashing white.
   Browsers without View Transitions support simply ignore this. */
@view-transition {
  navigation: auto;
}

/* Balanced headlines: prevents one-word orphan lines in titles */
h1, h2, h3 {
  text-wrap: balance;
}

/* Editorial drop cap on the opening paragraph of every article */
.post-body > p:first-of-type::first-letter {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 3.4em;
  line-height: 0.85;
  float: left;
  padding: 6px 10px 0 0;
  color: var(--color-accent);
}

/* Compass mark gently swings on hover - small brand moment */
.brand-icon img {
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.navbar-brand:hover .brand-icon img {
  transform: rotate(35deg);
}

/* Back-to-top: appears after a screen of scrolling */
.back-top {
  position: fixed;
  left: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-card);
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 200;
}

.back-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-top:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* Selection color in brand amber */
::selection {
  background: var(--color-accent-light);
  color: var(--color-accent-hover);
}

/* ── ARTICLE IMAGES ── */
/* Usage in a post:
   <figure class="post-figure">
     <img src="../images/posts/my-photo.jpg" alt="What the image shows" loading="lazy" width="1200" height="675">
     <figcaption>Optional caption, credit, or source.</figcaption>
   </figure> */
.post-figure {
  margin: 32px 0;
}

.post-figure img {
  width: 100%;
  border-radius: 12px;
  margin: 0;
}

.post-figure figcaption {
  margin-top: 10px;
  font-size: 0.8125rem;
  color: var(--color-muted);
  text-align: center;
}

/* Wide variant: breaks out of the 720px text column for impact */
.post-figure.wide {
  width: min(900px, calc(100vw - 48px));
  margin-left: 50%;
  transform: translateX(-50%);
}

/* Two images side by side (stacks on mobile) */
.post-figure.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.post-figure.pair figcaption {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .post-figure.pair {
    grid-template-columns: 1fr;
  }
}

/* ── DARK MODE ── */
/* Tokens flip via html[data-theme="dark"]; js/features.js owns the
   toggle, persists choice in localStorage, defaults to the system
   preference. Zinc surfaces, amber accent unchanged for brand. */
html[data-theme="dark"] {
  --color-primary: #F4F4F5;          /* headings/dark-text role -> light */
  --color-on-primary: #18181B;
  --color-secondary: #C5C5CC;
  --color-accent: #F59E0B;           /* slightly brighter amber for contrast */
  --color-accent-hover: #FBBF24;
  --color-accent-light: rgba(245, 158, 11, 0.14);
  --color-background: #101013;
  --color-foreground: #F4F4F5;
  --color-muted: #9D9DA6;
  --color-muted-bg: #1B1B20;
  --color-border: #2A2A31;
  --color-card: #18181B;
  --color-tag-bg: #26262C;
  --color-tag-text: #C5C5CC;
  color-scheme: dark;
}

/* Surfaces that use the primary color as a *background* need their own
   dark values, since --color-primary now means "light text". */
html[data-theme="dark"] .navbar {
  background: rgba(16, 16, 19, 0.92);
}

html[data-theme="dark"] .navbar-cta,
html[data-theme="dark"] .topic-pill:hover,
html[data-theme="dark"] .topic-pill.active,
html[data-theme="dark"] .skip-link {
  background: var(--color-accent);
  color: #18181B !important;
  border-color: var(--color-accent);
}

html[data-theme="dark"] .navbar-cta:hover {
  background: var(--color-accent-hover);
}

html[data-theme="dark"] .newsletter-section,
html[data-theme="dark"] .ai-chat-head,
html[data-theme="dark"] .ai-quote-card,
html[data-theme="dark"] .author-box .author-avatar {
  background: #1B1B20;
}

html[data-theme="dark"] .newsletter-section h2 {
  color: var(--color-foreground);
}

html[data-theme="dark"] .featured-post-image,
html[data-theme="dark"] .post-card-image,
html[data-theme="dark"] .post-hero-image .image-placeholder,
html[data-theme="dark"] .resource-card-image,
html[data-theme="dark"] .about-photo {
  background: linear-gradient(135deg, #1B1B20 0%, #26262C 100%);
}

html[data-theme="dark"] .ai-msg.user {
  background: var(--color-accent);
  color: #18181B;
}

html[data-theme="dark"] .ai-chat-fab,
html[data-theme="dark"] .chat-send {
  color: #18181B;
}

html[data-theme="dark"] .hero-newsletter button,
html[data-theme="dark"] .ai-modal-actions button:first-child {
  color: #18181B;
}

html[data-theme="dark"] ::selection {
  background: rgba(245, 158, 11, 0.3);
  color: #FBBF24;
}

/* The brand compass mark has hardcoded zinc strokes - brighten it */
html[data-theme="dark"] .brand-icon img {
  filter: invert(0.85) hue-rotate(180deg) saturate(1.4);
}

/* Theme toggle button (injected next to search) */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-card);
  color: var(--color-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.theme-toggle:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* Smooth surface transitions when switching themes */
body, .navbar, .post-card, .featured-post, .footer,
.ai-search-box, .ai-chat-panel, .ai-modal-box {
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
