/*
Theme Name: Dr. Sagar Portfolio
Theme URI: https://mdsagar.com
Author: Dr. Md. Harun-Ur-Rashid Sagar
Author URI: https://mdsagar.com
Description: Professional medical portfolio and blog theme for Dr. Md. Harun-Ur-Rashid Sagar. Features elegant navy and gold design, animated sections, experience timeline, skills showcase, and full blog integration.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mdsagar
Tags: portfolio, blog, one-page, custom-logo, custom-menu, featured-images, theme-options
*/

/* ============================================================
   Dr. Md. Harun-Ur-Rashid Sagar — Portfolio & Blog
   Design: Medical Scholarly Elegance
   Fonts: Cormorant Garamond (display) + Outfit (body)
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --navy-deep: #0C1B2A;
  --navy-mid: #132238;
  --navy-light: #1A2D45;
  --gold: #C9A961;
  --gold-accessible: #D4B56A;
  --gold-light: #D4B872;
  --gold-pale: #F5EDD6;
  --ivory: #FAF8F5;
  --white: #FFFFFF;
  --font-body: 'Outfit', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --card-bg: #FFFFFF;
  --text-dark: #1A1A2E;
  --text-body: #3A3F4B;
  --text-muted: #6B7280;
  --text-light: #94A3B8;
  --green-medical: #2D7A4F;
  --green-light: #E6F5EC;
  --border: #E5E7EB;
  --border-gold: rgba(201, 169, 97, 0.3);
  --shadow-sm: 0 1px 3px rgba(12, 27, 42, 0.06);
  --shadow-md: 0 4px 16px rgba(12, 27, 42, 0.08);
  --shadow-lg: 0 8px 32px rgba(12, 27, 42, 0.12);
  --shadow-gold: 0 4px 20px rgba(201, 169, 97, 0.15);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Dark Theme Overrides --- */
[data-theme="dark"] {
  --ivory: #09121B;
  /* Deeper than navy-deep for base background */
  --white: #132238;
  /* Use navy-mid for cards and sections */
  --card-bg: #132238;
  --gold-pale: rgba(201, 169, 97, 0.1);
  --text-dark: #F8FAFC;
  --text-body: #CBD5E1;
  --text-muted: #94A3B8;
  --text-light: #64748B;
  --border: rgba(255, 255, 255, 0.08);
  /* Darken borders */
  --border-gold: rgba(201, 169, 97, 0.15);
  --green-light: rgba(45, 122, 79, 0.2);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--ivory);
  line-height: 1.7;
  overflow-x: hidden;
}

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

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

ul,
ol {
  list-style: none;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  color: var(--text-dark);
  line-height: 1.2;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 3.5vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

h4 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

p {
  font-size: 1.05rem;
  color: var(--text-body);
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Section Dividers --- */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.35;
  max-width: 800px;
  margin: 0 auto;
}

/* --- Section --- */
.section {
  padding: 80px 0;
}

.section-white {
  background: var(--white);
}

.section-dark {
  background: var(--navy-deep);
  color: var(--ivory);
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--ivory);
}

.section-dark p {
  color: var(--text-light);
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  margin-bottom: 16px;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.section-header .subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-top: 20px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.section-dark .section-header .subtitle {
  color: var(--text-light);
}

/* --- Scroll Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

.reveal-delay-4 {
  transition-delay: 0.4s;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(12, 27, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.5px;
}

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

/* WordPress menu styling */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-menu li {
  list-style: none;
}

.nav-menu a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
  padding: 4px 0;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: var(--transition);
}

.nav-menu a:hover {
  color: var(--white);
}

.nav-menu a:hover::after,
.nav-menu .current-menu-item a::after,
.nav-menu .current_page_item a::after {
  width: 100%;
}

.nav-menu .menu-item-contact a {
  background: var(--gold) !important;
  color: var(--navy-deep) !important;
  padding: 10px 24px !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
}

.nav-menu .menu-item-contact a::after {
  display: none !important;
}

.nav-menu .menu-item-contact a:hover {
  background: var(--gold-light) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

/* Sub-menus */
.nav-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--navy-deep);
  border-radius: var(--radius-sm);
  padding: 8px 0;
  min-width: 200px;
  box-shadow: var(--shadow-lg);
}

.nav-menu li:hover>.sub-menu {
  display: block;
}

.nav-menu .sub-menu a {
  display: block;
  padding: 8px 20px;
  font-size: 0.88rem;
  text-transform: none;
}

/* Mobile Menu */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
  z-index: 1001;
}

/* Search trigger — base (always in DOM) */
.search-trigger {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}

.search-trigger:hover {
  color: var(--gold);
  background: rgba(201, 169, 97, 0.1);
}

[data-theme="light"] .search-trigger {
  color: rgba(0, 0, 0, 0.55);
}

/* header-actions wraps WA button + theme toggle */
.header-actions {
  flex-shrink: 0;
}


.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy-mid) 50%, var(--navy-light) 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(201, 169, 97, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 20s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(45, 122, 79, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -30px) scale(1.05);
  }

  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image:
    linear-gradient(rgba(201, 169, 97, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 169, 97, 0.5) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(201, 169, 97, 0.12);
  border: 1px solid rgba(201, 169, 97, 0.25);
  color: var(--gold);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
  animation: fadeInUp 0.8s ease-out;
}

.hero-badge .pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--green-medical);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.3);
  }
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 6px;
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

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

.hero-credentials {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  color: var(--gold-light);
  font-weight: 500;
  letter-spacing: 1px;
  margin-bottom: 18px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-description {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.75;
  margin-bottom: 28px;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  animation: fadeInUp 0.8s ease-out 0.5s both;
}

.hero-stat .number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 2px;
}

.hero-stat .label {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

/* Hero Visual (right column) */
.hero-visual {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-visual-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: 40px;
  backdrop-filter: blur(10px);
  width: 100%;
  max-width: 420px;
  position: relative;
}

.hero-visual-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 40px;
  right: 40px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.hero-card-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(201, 169, 97, 0.2);
}

.hero-card-icon svg {
  width: 32px;
  height: 32px;
  color: var(--navy-deep);
}

.hero-card-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-card-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.hero-card-item:hover {
  background: rgba(201, 169, 97, 0.08);
  border-color: rgba(201, 169, 97, 0.15);
}

.hero-card-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(201, 169, 97, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-card-item-icon svg {
  width: 20px;
  height: 20px;
  color: var(--gold);
}

.hero-card-item-text {
  flex: 1;
}

.hero-card-item-text .item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 1px;
}

.hero-card-item-text .item-sub {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.4);
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {

  0%,
  100% {
    transform: scaleY(1);
    opacity: 1;
  }

  50% {
    transform: scaleY(0.5);
    opacity: 0.3;
  }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--gold);
  color: var(--navy-deep);
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

.btn-outline-dark {
  background: transparent;
  color: var(--text-dark);
  border: 1.5px solid var(--border);
}

.btn-outline-dark:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-sm {
  padding: 10px 22px;
  font-size: 0.88rem;
}

.btn svg,
.btn .icon {
  width: 18px;
  height: 18px;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  align-items: start;
}

.about-image-wrapper {
  position: relative;
}

.about-image {
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, var(--navy-deep), var(--navy-mid));
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Profile card placeholder (replaces dark void) */
.about-profile-card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 32px;
}

.about-initials-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--gold), var(--gold-light));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 8px rgba(201, 169, 97, 0.15), 0 0 0 16px rgba(201, 169, 97, 0.07), 0 12px 40px rgba(201, 169, 97, 0.25);
}

.about-initials-circle span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 4rem;
  font-weight: 700;
  color: var(--navy-deep);
  line-height: 1;
}

.about-credential-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.credential-badge {
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.credential-badge-primary {
  background: var(--gold);
  color: var(--navy-deep);
}

.credential-badge-secondary {
  background: rgba(201, 169, 97, 0.2);
  color: var(--gold-light);
  border: 1px solid rgba(201, 169, 97, 0.3);
}

.credential-badge-tertiary {
  background: rgba(45, 122, 79, 0.25);
  color: #7AD4A0;
  border: 1px solid rgba(45, 122, 79, 0.35);
}

/* Legacy placeholder support */
.about-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--gold);
}

.about-image-placeholder svg {
  width: 80px;
  height: 80px;
  opacity: 0.4;
}

.about-image-placeholder span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 500;
}

.about-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(201, 169, 97, 0.2);
  border-radius: var(--radius-lg);
  pointer-events: none;
}

.about-image-accent {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 120px;
  height: 120px;
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  opacity: 0.3;
  z-index: -1;
}

.about-content h2 {
  margin-bottom: 8px;
}

.about-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  color: var(--gold);
  font-style: italic;
  margin-bottom: 24px;
}

.about-text {
  margin-bottom: 32px;
}

.about-text p {
  margin-bottom: 16px;
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.highlight-item:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

/* Colorful highlight tints */
.highlight-emergency {
  background: #FFF5F5;
  border-color: #FED7D7;
}

.highlight-emergency .highlight-icon {
  background: #FED7D7;
}

.highlight-emergency .highlight-icon svg {
  color: #C53030;
}

.highlight-mental {
  background: #F0FFF4;
  border-color: #C6F6D5;
}

.highlight-mental .highlight-icon {
  background: #C6F6D5;
}

.highlight-mental .highlight-icon svg {
  color: #2D7A4F;
}

.highlight-patient {
  background: #FFFFF0;
  border-color: #FEFCBF;
}

.highlight-patient .highlight-icon {
  background: #FEFCBF;
}

.highlight-patient .highlight-icon svg {
  color: #B7791F;
}

.highlight-learning {
  background: #EBF8FF;
  border-color: #BEE3F8;
}

.highlight-learning .highlight-icon {
  background: #BEE3F8;
}

.highlight-learning .highlight-icon svg {
  color: #2B6CB0;
}

.highlight-icon {
  width: 40px;
  height: 40px;
  background: var(--gold-pale);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.highlight-icon svg {
  width: 20px;
  height: 20px;
  color: var(--gold);
}

.highlight-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-dark);
}

/* ============================================================
   EXPERIENCE TIMELINE
   ============================================================ */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), var(--border));
}

.timeline-item {
  position: relative;
  padding-bottom: 36px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -47px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--ivory);
  box-shadow: 0 0 0 2px var(--gold);
}

.timeline-item:first-child .timeline-dot {
  width: 20px;
  height: 20px;
  left: -49px;
  top: 4px;
  animation: pulse 2s infinite;
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* CURRENT badge */
.current-badge {
  display: inline-block;
  background: var(--green-medical);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 50px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  animation: pulse 2s infinite;
}

.timeline-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 32px;
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

/* Current (first) timeline card accent */
.timeline-card-current {
  background: linear-gradient(135deg, #fff 0%, #FAFAFA 100%);
  border-left: 2px solid var(--gold);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.timeline-card:hover {
  border-color: var(--gold);
  box-shadow: 0 15px 50px rgba(201, 169, 97, 0.1);
  transform: translateX(8px);
}

.timeline-card h3 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--navy-deep);
}

.timeline-card .institution {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--gold);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.timeline-card .location {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.timeline-card .location svg {
  width: 14px;
  height: 14px;
}

.timeline-card p {
  font-size: 0.93rem;
  line-height: 1.65;
}

/* ============================================================
   SKILLS SECTION — theme-aware (dark by default, light in light mode)
   ============================================================ */
.section-skills {
  background: var(--navy-deep);
  color: var(--ivory);
}

.section-skills h2,
.section-skills h3,
.section-skills h4 {
  color: var(--ivory);
}

.section-skills .subtitle {
  color: var(--text-light);
}

/* Light mode: switch to ivory background */
[data-theme="light"] .section-skills,
:root:not([data-theme="dark"]) .section-skills {
  background: var(--ivory);
  color: var(--text-dark);
}

[data-theme="light"] .section-skills h2,
[data-theme="light"] .section-skills h3,
[data-theme="light"] .section-skills h4,
:root:not([data-theme="dark"]) .section-skills h2,
:root:not([data-theme="dark"]) .section-skills h3,
:root:not([data-theme="dark"]) .section-skills h4 {
  color: var(--text-dark);
}

[data-theme="light"] .section-skills .subtitle,
:root:not([data-theme="dark"]) .section-skills .subtitle {
  color: var(--text-muted);
}

/* Skill chips inside .section-skills: fix text in light mode */
[data-theme="light"] .section-skills .skill-chip span,
:root:not([data-theme="dark"]) .section-skills .skill-chip span {
  color: var(--text-body);
}

[data-theme="light"] .section-skills .bento-box,
:root:not([data-theme="dark"]) .section-skills .bento-box {
  background: var(--white);
  border-color: var(--border);
}

[data-theme="light"] .section-skills .skill-category,
:root:not([data-theme="dark"]) .section-skills .skill-category {
  border-bottom-color: var(--border);
}

/* About Me highlight chips — fix text visibility in light mode */
[data-theme="light"] .about-highlights-grid .premium-chip,
:root:not([data-theme="dark"]) .about-highlights-grid .premium-chip {
  background: var(--white);
  border-color: var(--border);
  color: var(--text-dark);
}

[data-theme="light"] .about-highlights-grid .chip-text,
:root:not([data-theme="dark"]) .about-highlights-grid .chip-text {
  color: var(--text-dark);
}

/* ============================================================
   EDUCATION
   ============================================================ */
.section-edu {
  background: linear-gradient(180deg, var(--ivory), #F5F0E8);

}


.education-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  /* Thin line separators */
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.edu-card {
  background: var(--white);
  padding: 40px;
  display: grid;
  grid-template-columns: 140px 1fr 200px;
  align-items: center;
  gap: 30px;
  transition: all 0.3s ease;
  border: none;
  text-align: left;
}

.edu-card:hover {
  background: #FAFAFA;
  padding-left: 50px;
}

.edu-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.edu-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--navy-deep), var(--navy-mid));
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.edu-icon svg {
  width: 22px;
  height: 22px;
  color: var(--gold);
}

.edu-card-header .edu-year-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  background: var(--gold-pale);
  padding: 3px 12px;
  border-radius: 50px;
  letter-spacing: 0.5px;
  margin-left: auto;
}

.edu-card h4 {
  font-size: 1.25rem;
  margin-bottom: 6px;
  line-height: 1.3;
}

.edu-card .school {
  font-weight: 600;
  color: var(--text-body);
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.edu-card .year {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.edu-card .subject {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills-categories {
  display: flex;
  flex-direction: column;
}

.skill-category {
  display: grid;
  grid-template-columns: 280px 1fr;
  align-items: start;
  gap: 40px;
  padding: 40px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  /* Sophisticated subtle bottom line */
}

/* Remove top padding for the first element */
.skill-category:first-child {
  padding-top: 10px;
}

.skill-category-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  margin: 0;
  padding: 0;
  border: none;
}

.skill-category-title svg {
  width: 18px;
  height: 18px;
  color: var(--gold);
  flex-shrink: 0;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  column-gap: 40px;
  row-gap: 24px;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.skill-dot {
  width: 5px;
  height: 5px;
  background: var(--gold);
  flex-shrink: 0;
  transform: rotate(45deg);
  /* Elegant diamond separator */
  position: relative;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.skill-chip:hover .skill-dot {
  transform: rotate(135deg) scale(1.6);
  background: var(--white);
}

.skill-chip span {
  font-size: 1.05rem;
  font-weight: 400;
  /* Lighter, more elegant */
  color: rgba(255, 255, 255, 0.70);
  /* Subtle ivory */
  line-height: 1.5;
  font-family: var(--font-body);
  transition: color 0.3s;
}

.skill-chip:hover span {
  color: var(--white);
}

/* Mobile responsiveness: stack the editorial grid */
@media (max-width: 900px) {
  .skill-category {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 0;
  }
}

/* ============================================================
   BLOG CARDS
   ============================================================ */

/* Medical SVG pattern overlays on blog images */
.blog-card-image-pattern-heartbeat::after,
.blog-card-image-pattern-dna::after,
.blog-card-image-pattern-cross::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.07;
  pointer-events: none;
}

.blog-card-image-pattern-heartbeat::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60' viewBox='0 0 120 60'%3E%3Cpolyline points='0,30 20,30 30,10 40,50 50,30 60,30 70,15 80,45 90,30 120,30' fill='none' stroke='%23C9A961' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 120px 60px;
}

.blog-card-image-pattern-dna::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Ccircle cx='30' cy='30' r='12' fill='none' stroke='%23C9A961' stroke-width='1.5'/%3E%3Ccircle cx='30' cy='30' r='6' fill='none' stroke='%23C9A961' stroke-width='1'/%3E%3Ccircle cx='30' cy='30' r='2' fill='%23C9A961'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 60px 60px;
}

.blog-card-image-pattern-cross::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Crect x='17' y='8' width='6' height='24' rx='1' fill='%23C9A961'/%3E%3Crect x='8' y='17' width='24' height='6' rx='1' fill='%23C9A961'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 40px 40px;
}

/* Tech SVG pattern overlays on blog images */
.blog-card-image-pattern-code::after,
.blog-card-image-pattern-blockchain::after,
.blog-card-image-pattern-atom::after,
.blog-card-image-pattern-circuit::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.12;
  pointer-events: none;
}

.blog-card-image-pattern-code::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='none' stroke='%23C9A961' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='16 18 22 12 16 6'/%3E%3Cpolyline points='8 6 2 12 8 18'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 48px 48px;
}

.blog-card-image-pattern-blockchain::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 24 24' fill='none' stroke='%23C9A961' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cline x1='8.59' y1='13.51' x2='15.42' y2='17.49'/%3E%3Cline x1='15.41' y1='6.51' x2='8.59' y2='10.49'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 64px 64px;
}

.blog-card-image-pattern-atom::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 24 24' fill='none' stroke='%23C9A961' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3Cpath d='M20.2 20.2c2.04-2.03.02-7.36-4.5-11.88C11.18 3.8 5.85 1.78 3.82 3.82c-2.04 2.04-.02 7.36 4.5 11.88 4.52 4.52 9.85 6.54 11.88 4.5zm0-16.4c-2.04-2.03-7.36-.02-11.88 4.5C3.8 12.82 1.78 18.15 3.82 20.18c2.04 2.04 7.36.02 11.88-4.5 4.52-4.52 6.54-9.85 4.5-11.88z'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 64px 64px;
}

.blog-card-image-pattern-circuit::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 24 24' fill='none' stroke='%23C9A961' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='16' rx='2' ry='2'/%3E%3Crect x='9' y='9' width='6' height='6'/%3E%3Cline x1='9' y1='1' x2='9' y2='4'/%3E%3Cline x1='15' y1='1' x2='15' y2='4'/%3E%3Cline x1='9' y1='20' x2='9' y2='23'/%3E%3Cline x1='15' y1='20' x2='15' y2='23'/%3E%3Cline x1='20' y1='9' x2='23' y2='9'/%3E%3Cline x1='20' y1='14' x2='23' y2='14'/%3E%3Cline x1='1' y1='9' x2='4' y2='9'/%3E%3Cline x1='1' y1='14' x2='4' y2='14'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 80px 80px;
}

/* Legacy 3-col grid (for WordPress blog archive) */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.blog-list-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  display: block;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-gold);
}

.blog-card-image {
  width: 100%;
  height: 155px;
  background: linear-gradient(135deg, var(--navy-deep), var(--navy-light));
  position: relative;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-image .category-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--gold);
  color: var(--navy-deep);
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.blog-card-image .placeholder-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  color: rgba(201, 169, 97, 0.3);
}

.blog-card-body {
  padding: 20px;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.blog-card-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

.blog-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  transition: var(--transition);
  line-height: 1.35;
}

.blog-card:hover h3 {
  color: var(--gold);
}

.blog-card .excerpt {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card .read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gold);
}

.blog-card .read-more svg {
  width: 16px;
  height: 16px;
  transition: var(--transition);
}

.blog-card:hover .read-more svg {
  transform: translateX(4px);
}

.blog-section-cta {
  text-align: center;
  margin-top: 48px;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-info h2 {
  margin-bottom: 16px;
}

.contact-info>p {
  color: var(--text-muted);
  margin-bottom: 36px;
  font-size: 1.05rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 36px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: var(--gold-pale);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 22px;
  height: 22px;
  color: var(--gold);
}

.contact-item-text .label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 2px;
}

.contact-item-text .value {
  font-size: 1rem;
  color: var(--text-dark);
  font-weight: 500;
}

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

.social-link {
  width: 44px;
  height: 44px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--gold);
  border-color: var(--gold);
}

.social-link:hover svg {
  color: var(--navy-deep);
}

.social-link svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: var(--transition);
}

/* Contact Quote */
.contact-quote {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-style: italic;
  color: var(--text-dark);
  line-height: 1.6;
  padding: 24px 28px;
  margin-bottom: 32px;
  border-left: 3px solid var(--gold);
  background: linear-gradient(135deg, rgba(201, 169, 97, 0.06), transparent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.contact-quote cite {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-style: normal;
  color: var(--text-muted);
  margin-top: 10px;
  font-weight: 500;
}

/* WordPress Contact Form 7 Styling */
.contact-form-wrapper {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--gold);
  position: relative;
}

.contact-form-wrapper .wpcf7-form label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.contact-form-wrapper .wpcf7-form input[type="text"],
.contact-form-wrapper .wpcf7-form input[type="email"],
.contact-form-wrapper .wpcf7-form textarea,
.contact-form-wrapper .wpcf7-form select,
.contact-form-wrapper input[type="text"],
.contact-form-wrapper input[type="email"],
.contact-form-wrapper textarea,
.contact-form-wrapper select {
  width: 100%;
  padding: 14px 18px;
  background: var(--ivory);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  color: var(--text-dark);
  transition: var(--transition);
  outline: none;
  margin-bottom: 20px;
}

.contact-form-wrapper input:focus,
.contact-form-wrapper textarea:focus,
.contact-form-wrapper select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.1);
}

.contact-form-wrapper textarea {
  height: 140px;
  resize: vertical;
}

.contact-form-wrapper input[type="submit"],
.contact-form-wrapper .wpcf7-submit {
  width: 100%;
  padding: 16px;
  background: var(--gold);
  color: var(--navy-deep);
  border: none;
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.contact-form-wrapper input[type="submit"]:hover,
.contact-form-wrapper .wpcf7-submit:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--navy-deep);
  padding: 60px 0 30px;
  color: rgba(255, 255, 255, 0.5);
  position: relative;
}

.footer-separator {
  height: 1px;
  background: radial-gradient(circle at center, rgba(201, 169, 97, 0.5) 0%, transparent 80%);
  opacity: 0.8;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--gold);
  color: var(--navy-deep);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(201, 169, 97, 0.3);
  transition: var(--transition);
  z-index: 100;
  opacity: 0.9;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(201, 169, 97, 0.4);
  opacity: 1;
}

.back-to-top svg {
  width: 22px;
  height: 22px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-brand .nav-logo {
  margin-bottom: 12px;
  display: block;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.92rem;
  max-width: 320px;
  line-height: 1.6;
}

.footer-socials {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.footer-socials .social-link {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.footer-socials .social-link:hover {
  background: rgba(201, 169, 97, 0.1);
  color: var(--gold);
  border-color: rgba(201, 169, 97, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(201, 169, 97, 0.2);
}

.footer-socials .social-link svg {
  width: 18px;
  height: 18px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-links h4 {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.8rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.footer-links a,
.footer-links .widget ul li a {
  display: inline-flex;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.95rem;
  padding: 6px 0;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.footer-links a:hover,
.footer-links .widget ul li a:hover {
  color: var(--gold);
  transform: translateX(6px);
}

.stealth-inline-link {
  color: inherit !important;
  text-decoration: none !important;
  cursor: default;
  /* Keep it really stealthy */
  font-weight: inherit !important;
  transition: opacity 0.3s ease;
}

.stealth-inline-link:hover {
  opacity: 0.9;
  color: inherit !important;
  transform: none !important;
}

/* Footer widget lists */
.footer-links .widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.footer-bottom a {
  color: var(--gold);
}

/* ============================================================
   PAGE HERO (Blog / Archive / Single)
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy-mid) 100%);
  padding: 96px 0 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.025;
  background-image:
    linear-gradient(rgba(201, 169, 97, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 169, 97, 0.5) 1px, transparent 1px);
  background-size: 60px 60px;
}

.page-hero h1 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  color: var(--white);
  margin-bottom: 10px;
  position: relative;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.80);
  font-size: 0.97rem;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  line-height: 1.55;
}

.page-hero .breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.65);
  position: relative;
}

.page-hero .breadcrumb a {
  color: var(--gold);
}

/* Blog Post Hero — consolidated into single definition below (Post Hero section) */

.post-hero-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.post-category {
  display: inline-block;
  background: var(--gold);
  color: var(--navy-deep);
  padding: 4px 16px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

/* .blog-post-hero h1 — consolidated into .post-hero-title below */

.post-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.post-meta .author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.post-meta .author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy-deep);
  overflow: hidden;
}

.post-meta .author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-meta .author-name {
  color: var(--white);
  font-weight: 600;
}

/* ============================================================
   BLOG POST CONTENT (Prose)
   ============================================================ */
.blog-post-content {
  padding: 60px 0 100px;
}

.prose {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-body);
}

/* Lead paragraph — first paragraph after article start */
.prose>p:first-of-type {
  font-size: 1.15rem;
  color: var(--text-dark);
  line-height: 1.8;
  font-weight: 400;
}

.prose h2 {
  margin-top: 52px;
  margin-bottom: 16px;
  font-size: 1.65rem;
  color: var(--text-dark);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.prose h3 {
  margin-top: 36px;
  margin-bottom: 12px;
  font-size: 1.25rem;
  color: var(--navy-light);
}

.prose p {
  margin-bottom: 22px;
  font-size: 1.05rem;
}

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

.prose blockquote {
  border-left: 3px solid var(--gold);
  padding: 18px 24px;
  margin: 32px 0;
  background: var(--gold-pale);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-dark);
  line-height: 1.6;
}

.prose blockquote p {
  margin-bottom: 0;
  font-size: 1.2rem;
}

.prose ul,
.prose ol {
  margin-bottom: 22px;
  padding-left: 22px;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.prose img {
  width: 100%;
  border-radius: var(--radius-md);
  margin: 32px 0;
}

/* Force gold links everywhere in prose — overrides WordPress/browser defaults */
.prose a,
.prose a:link,
.prose a:visited {
  color: var(--gold) !important;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.prose a:hover {
  border-bottom-color: var(--gold) !important;
}

/* Code blocks */
.prose code {
  background: #f0f2f5;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--navy-mid);
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, 'Courier New', monospace;
}

.prose pre {
  background: var(--navy-deep);
  color: var(--ivory);
  padding: 20px 24px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 28px 0;
}

.prose pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 0.9rem;
}

/* Post Navigation */
.post-navigation {
  max-width: 720px;
  margin: 40px auto 0;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.post-nav-link {
  padding: 16px 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
  flex: 1;
  display: block;
}

.post-nav-link:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-sm);
}

.post-nav-link .nav-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 4px;
}

.post-nav-link .nav-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--text-dark);
  font-weight: 600;
}

.post-nav-link.next {
  text-align: right;
}

/* Blog Filter Bar */
.blog-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.blog-filter-bar a {
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 500;
  background: var(--white);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.blog-filter-bar a:hover,
.blog-filter-bar a.active,
.blog-filter-bar .current-cat a {
  background: var(--gold);
  color: var(--navy-deep);
  border-color: var(--gold);
  font-weight: 600;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--gold);
  color: var(--navy-deep);
  border-color: var(--gold);
}

/* ============================================================
   404 PAGE
   ============================================================ */
.error-404 {
  text-align: center;
  padding: 100px 0;
}

.error-404 h1 {
  font-size: 8rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 16px;
}

.error-404 h2 {
  margin-bottom: 16px;
}

.error-404 p {
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* ============================================================
   WORDPRESS SPECIFIC
   ============================================================ */
.wp-block-image img {
  border-radius: var(--radius-md);
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignleft {
  float: left;
  margin-right: 24px;
}

.alignright {
  float: right;
  margin-left: 24px;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding-top: 8px;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* Comment styling */
.comments-area {
  max-width: 720px;
  margin: 0 auto;
  padding-top: 40px;
}

.comments-area h2 {
  margin-bottom: 24px;
}

.comment-list {
  list-style: none;
  padding: 0;
}

.comment-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.comment-author {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.comment-metadata {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 240px 1fr;
    gap: 36px;
  }

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

  .edu-row {
    grid-template-columns: 4px 44px 1fr auto;
    gap: 14px;
  }

  .edu-row-institution {
    display: none;
  }

  .hero-stats {
    gap: 32px;
  }

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

@media (max-width: 768px) {
  /* ── Section spacing: more compact on mobile ── */
  .section {
    padding: 48px 0;
  }

  .section-header {
    margin-bottom: 36px;
  }

  .section-header .subtitle {
    font-size: 1rem;
  }

  /* ── Nav ── */
  .nav-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(12, 27, 42, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    z-index: 999;
    padding: 0;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu a {
    font-size: 1.2rem;
  }

  /* Ensure nav-inner stays tightly packed: logo left, icons right */
  .nav-inner {
    gap: 4px;
  }

  /* Show search icon explicitly */
  .search-trigger {
    display: flex;
    flex-shrink: 0;
  }

  /* Show burger */
  .nav-toggle {
    display: flex;
    z-index: 1001;

  }

  /* ── Hero: compact, no wasted full-screen height ── */
  .hero {
    min-height: auto;
    padding: 80px 0 36px;
    align-items: flex-start;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-visual {
    display: flex;
    margin-top: 16px;
    transform: scale(0.85);
    transform-origin: center top;
  }

  .hero h1 {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
    margin-bottom: 4px;
  }

  .hero-badge {
    margin-bottom: 14px;
    font-size: 0.7rem;
    padding: 5px 12px;
  }

  .hero-credentials {
    font-size: 1rem;
    margin-bottom: 12px;
  }

  .hero-trust-badges {
    margin-bottom: 14px !important;
    gap: 8px !important;
    flex-wrap: wrap;
  }

  .hero-description {
    font-size: 0.93rem;
    margin-bottom: 20px;
    line-height: 1.65;
  }

  /* Hero actions: row layout, not column */
  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    justify-content: center;
    padding: 11px 18px;
    font-size: 0.85rem;
  }

  .btn-cv {
    width: 100%;
    justify-content: center;
  }

  /* Hero stats: compact horizontal row */
  .hero-stats {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 24px;
    padding-top: 20px;
  }

  .hero-stat {
    flex: 1 1 auto;
    text-align: center;
  }

  .hero-stat .number {
    font-size: 1.5rem;
  }

  .hero-stat .label {
    font-size: 0.72rem;
  }

  /* ── About: stacked on mobile ── */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Replace tall portrait card with a compact identity block */
  .about-image-wrapper {
    max-width: 100%;
    margin: 0;
  }

  /* Profile card: horizontal row instead of tall box */
  .about-image {
    aspect-ratio: unset;
    height: auto;
    background: transparent;
    border-radius: 16px;
    border: 1px solid rgba(201, 169, 97, 0.15);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .about-image::after {
    display: none;
  }

  .about-profile-card {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 0;
    width: 100%;
    height: auto;
    justify-content: flex-start;
  }

  /* Shrink initials circle significantly */
  .about-initials-circle {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.15), 0 6px 20px rgba(201, 169, 97, 0.2);
  }

  .about-initials-circle span {
    font-size: 1.8rem;
  }

  /* Badges: single row of chips */
  .about-credential-badges {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
  }

  .credential-badge {
    font-size: 0.65rem;
    padding: 4px 10px;
  }


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

  .about-highlights-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* ── Education / Skills bento ── */
  .education-grid {
    grid-template-columns: 1fr;
  }

  .skills-bento-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 24px;
  }

  /* ── Blog ── */
  .blog-grid,
  .blog-list-grid {
    grid-template-columns: 1fr;
  }

  /* ── Contact ── */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* ── Footer ── */
  .footer-inner {
    flex-direction: column;
  }

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

  .form-row {
    grid-template-columns: 1fr;
  }

  .post-navigation {
    flex-direction: column;
  }

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

  .scroll-indicator {
    display: none;
  }

  /* ── Publications ── */
  .pub-item {
    grid-template-columns: 4px 1fr;
    gap: 14px;
    padding: 20px 16px;
  }

  .pub-accent {
    height: 40px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 14px;
  }

  .section {
    padding: 24px 0;
  }

  .section-header {
    margin-bottom: 20px;
  }

  .hero {
    padding: 70px 0 24px;
  }

  .hero-grid {
    gap: 0;
  }

  .hero-visual {
    display: none;
  }

  .hero h1 {
    font-size: clamp(1.6rem, 8vw, 2.1rem);
  }

  .hero-badge {
    font-size: 0.65rem;
    padding: 4px 10px;
    margin-bottom: 10px;
  }

  .hero-credentials {
    font-size: 0.92rem;
    margin-bottom: 10px;
  }

  .hero-trust-badges {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }

  .hero-description {
    font-size: 0.88rem;
    margin-bottom: 16px;
  }

  .hero-actions {
    gap: 8px;
  }

  .hero-actions .btn {
    padding: 10px 14px;
    font-size: 0.82rem;
  }

  .hero-stats {
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
  }

  .hero-stat .number {
    font-size: 1.4rem;
  }

  .hero-stat .label {
    font-size: 0.68rem;
  }

  .about-image-wrapper {
    max-width: 180px;
  }

  .about-highlights-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .timeline {
    padding-left: 28px;
  }

  .timeline-dot {
    left: -35px;
  }

  .timeline-item:first-child .timeline-dot {
    left: -37px;
  }

  .timeline-card {
    padding: 16px 14px;
  }

  .contact-form-wrapper {
    padding: 20px 16px;
  }

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

  .about-initials-circle {
    width: 90px;
    height: 90px;
  }

  .about-initials-circle span {
    font-size: 2.6rem;
  }

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

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }

  .back-to-top svg {
    width: 18px;
    height: 18px;
  }
}

/* ============================================================
   COURSES & WORKSHOPS
   ============================================================ */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.course-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 22px 20px 20px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.course-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--course-color, var(--gold));
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--course-color, var(--border-gold));
}

.course-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.course-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: var(--course-bg, rgba(201, 169, 97, 0.12));
  color: var(--course-color, var(--gold));
  flex-shrink: 0;
}

.course-certified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(45, 122, 79, 0.1);
  color: var(--green-medical);
  flex-shrink: 0;
}

.course-certified-badge svg {
  width: 11px;
  height: 11px;
}

.course-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
  font-family: 'Outfit', sans-serif;
  margin: 0;
}

.course-provider {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.83rem;
  color: var(--text-muted);
  font-weight: 500;
}

.course-provider svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: var(--course-color, var(--gold));
}

.course-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.course-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.course-meta-item svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.course-cert-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--course-color, var(--gold));
  transition: var(--transition);
}

.course-cert-link svg {
  width: 13px;
  height: 13px;
  transition: var(--transition);
}

.course-cert-link:hover svg {
  transform: translate(2px, -2px);
}

/* Course meta row (preview-friendly shorthand) */
.course-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.course-meta-row .course-date,
.course-meta-row .course-duration {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.course-meta-row .course-date::before {
  content: '';
}

.course-meta-row .course-duration::before {
  content: '·';
  margin-right: 4px;
  color: var(--text-light);
}

.course-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.4;
  font-family: 'Outfit', sans-serif;
  margin: 0;
}

/* Dark mode: course cards */
[data-theme="dark"] .course-card {
  background: var(--white);
  border-color: var(--border);
}

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

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

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201, 169, 97, 0.08);
}

.theme-toggle svg {
  width: 15px;
  height: 15px;
}

.theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-moon {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}


/* ============================================================
   DARK THEME
   ============================================================ */
[data-theme="dark"] {
  --ivory: #0D1A28;
  --white: #132438;
  --card-bg: #132438;
  --text-dark: #FFFFFF;
  --text-body: rgba(255, 255, 255, 0.95);
  --text-muted: rgba(255, 255, 255, 0.85);
  --text-light: rgba(255, 255, 255, 0.70);
  --border: rgba(255, 255, 255, 0.12);
  --border-gold: rgba(201, 169, 97, 0.25);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.45);
  --gold-pale: rgba(201, 169, 97, 0.08);
  --green-light: rgba(45, 122, 79, 0.14);
}

/* Smooth transition when toggling */
[data-theme="dark"] body,
[data-theme] body {
  transition: background-color 0.3s ease;
}

/* Dark mode: sections that were light become card-dark */
[data-theme="dark"] .section-white {
  background: var(--white);
}

/* Dark mode: cards */
[data-theme="dark"] .edu-card,
[data-theme="dark"] .timeline-card,
[data-theme="dark"] .skill-category,
[data-theme="dark"] .about-image,
[data-theme="dark"] .highlight-card,
[data-theme="dark"] .post-nav-link,
[data-theme="dark"] .blog-filter-bar a,
[data-theme="dark"] .pagination .page-numbers,
[data-theme="dark"] .toc-box,
[data-theme="dark"] .sidebar-share,
[data-theme="dark"] .author-bio-card,
[data-theme="dark"] .post-stats-bar,
[data-theme="dark"] .blog-post-main {
  background: var(--white);
  border-color: var(--border);
}

/* Dark mode: blog cards */
[data-theme="dark"] .blog-card,
[data-theme="dark"] .blog-featured-card {
  background: var(--white);
  border-color: var(--border);
}

/* Dark mode: contact form inputs */
[data-theme="dark"] .contact-form-wrapper input[type="text"],
[data-theme="dark"] .contact-form-wrapper input[type="email"],
[data-theme="dark"] .contact-form-wrapper textarea,
[data-theme="dark"] .contact-form-wrapper select {
  background: var(--ivory);
  border-color: var(--border);
  color: var(--text-dark);
}

[data-theme="dark"] .contact-form-wrapper input::placeholder,
[data-theme="dark"] .contact-form-wrapper textarea::placeholder {
  color: var(--text-muted);
}

/* Dark mode: share bar */
[data-theme="dark"] .share-bar {
  background: rgba(201, 169, 97, 0.06);
  border-color: rgba(201, 169, 97, 0.12);
}

[data-theme="dark"] .share-btn,
[data-theme="dark"] .sidebar-share-btn {
  background: var(--ivory);
  border-color: var(--border);
  color: var(--text-body);
}

/* Dark mode: about initials */
[data-theme="dark"] .about-image-wrapper .about-initials-circle {
  border-color: rgba(201, 169, 97, 0.3);
}

/* Dark mode: skill items */
[data-theme="dark"] .skill-item {
  border-color: var(--border);
}

/* Dark mode: section divider visibility */
[data-theme="dark"] .section-divider {
  opacity: 0.2;
}

/* Dark mode: hero badge */
[data-theme="dark"] .hero-badge {
  background: rgba(201, 169, 97, 0.1);
  border-color: rgba(201, 169, 97, 0.2);
}

/* ============================================================
   DARK MODE — TEXT VISIBILITY FIX
   Always-dark sections (navbar, hero, page-hero, blog-post-hero,
   footer) use color: var(--white) for text. In dark mode
   --white maps to #132438 (dark navy) → text becomes invisible.
   These overrides force text back to white in those sections.
   ============================================================ */

/* Navbar logo */
[data-theme="dark"] .nav-logo {
  color: #FFFFFF;
}

[data-theme="dark"] .nav-menu a:hover {
  color: #FFFFFF;
}

/* Main hero heading (always-dark gradient background) */
[data-theme="dark"] .hero h1 {
  color: #FFFFFF;
}

[data-theme="dark"] .hero-card-item-text .item-title {
  color: #FFFFFF;
}

[data-theme="dark"] .btn-outline {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.22);
}

[data-theme="dark"] .btn-outline:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.40);
  color: #fff;
}

/* Page hero (blog listing, archives) */
[data-theme="dark"] .page-hero h1 {
  color: #fff;
}

/* Blog post hero */
[data-theme="dark"] .blog-post-hero h1 {
  color: #fff;
}

[data-theme="dark"] .post-meta .author-name {
  color: #fff;
}

/* Footer headings */
[data-theme="dark"] .footer-links h4 {
  color: var(--gold);
}

/* Current badge (white text on green bg — stay explicit) */
[data-theme="dark"] .current-badge {
  color: #fff;
}

/* ============================================================
   DARK MODE — SECTION BACKGROUNDS
   ============================================================ */

/* section-edu gradient hardcodes a light end-stop (#F5F0E8) —
   override entirely in dark mode */
[data-theme="dark"] .section-edu {
  background: linear-gradient(180deg, #0D1A28 0%, #091320 100%);
}

/* Highlight cards get a subtle gold-tinted dark surface */
[data-theme="dark"] .highlight-card {
  background: rgba(201, 169, 97, 0.05);
  border-color: rgba(201, 169, 97, 0.10);
}

/* ============================================================
   DARK MODE — CARD DEPTH & POLISH
   ============================================================ */

/* Give cards subtle elevation via shadow, not borders */
[data-theme="dark"] .edu-card,
[data-theme="dark"] .timeline-card {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(201, 169, 97, 0.05);
}

[data-theme="dark"] .blog-card:hover,
[data-theme="dark"] .blog-featured-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .pub-item {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .pub-item:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .course-card {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* Blog filter bar active/hover */
[data-theme="dark"] .blog-filter-bar a.active,
[data-theme="dark"] .blog-filter-bar a:hover {
  background: var(--gold);
  color: #0C1B2A;
  border-color: var(--gold);
}

/* Share button hover: goes to navy bg → needs white text */
[data-theme="dark"] .share-btn:hover,
[data-theme="dark"] .sidebar-share-btn:hover {
  color: #fff;
}

/* Pagination current page */
[data-theme="dark"] .pagination .page-numbers.current {
  background: var(--gold);
  color: #0C1B2A;
  border-color: var(--gold);
}

/* Skill item hover glow */
[data-theme="dark"] .skill-item:hover {
  border-color: rgba(201, 169, 97, 0.35);
  box-shadow: 0 0 0 1px rgba(201, 169, 97, 0.15);
}

/* Section header gold underline stays crisp */
[data-theme="dark"] .section-header h2::after {
  opacity: 0.85;
}

/* Related posts section bg */
[data-theme="dark"] .related-posts-section {
  background: var(--ivory);
}

/* ============================================================
   DARK MODE — GLOBAL SMOOTH TRANSITION
   Only background/border/color — never transform/opacity
   (prevents sluggish scroll animations)
   ============================================================ */
[data-theme] .navbar,
[data-theme] body,
[data-theme] .section,
[data-theme] .section-white,
[data-theme] .section-edu,
[data-theme] .edu-card,
[data-theme] .timeline-card,
[data-theme] .highlight-card,
[data-theme] .blog-card,
[data-theme] .blog-featured-card,
[data-theme] .course-card,
[data-theme] .pub-item,
[data-theme] .skill-category,
[data-theme] .skill-item,
[data-theme] .about-image,
[data-theme] .post-nav-link,
[data-theme] .toc-box,
[data-theme] .blog-post-main,
[data-theme] .author-bio-card,
[data-theme] .post-stats-bar {
  transition: background-color 0.28s ease, border-color 0.28s ease, color 0.28s ease, box-shadow 0.28s ease;
}

/* ============================================================
   DOWNLOAD CV BUTTON
   ============================================================ */
.btn-cv {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.75);
  transition: var(--transition);
  letter-spacing: 0.3px;
}

.btn-cv:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201, 169, 97, 0.06);
}

.btn-cv svg {
  width: 15px;
  height: 15px;
}

/* Print */
@media print {

  .navbar,
  .scroll-indicator,
  .contact-form-wrapper,
  .footer {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 40px 0;
  }

  .section {
    padding: 40px 0;
    page-break-inside: avoid;
  }
}


/* ============================================================
   BLOG LISTING — FEATURED POST
   ============================================================ */
.blog-section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.blog-section-label h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.blog-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.blog-featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 64px;
  background: var(--white);
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.blog-featured-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-gold);
  transform: translateY(-4px);
}

.blog-featured-card .featured-image {
  min-height: 280px;
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy-light) 60%, rgba(201, 169, 97, 0.15) 100%);
  position: relative;
  overflow: hidden;
}

.blog-featured-card .featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.15;
}

.featured-image-placeholder svg {
  width: 80px;
  height: 80px;
  color: var(--gold);
}

.featured-image-overlay {
  position: absolute;
  bottom: 20px;
  left: 20px;
}

.featured-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold);
  margin-bottom: 12px;
}

.featured-eyebrow::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--gold);
}

.blog-featured-card .featured-body {
  padding: 36px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

.featured-category-pill {
  display: inline-block;
  background: var(--gold-pale);
  color: var(--gold);
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 18px;
  width: fit-content;
}

.blog-featured-card h2 {
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  margin-bottom: 14px;
  line-height: 1.25;
  color: var(--text-dark);
}

.blog-featured-card .excerpt {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.featured-author {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}

.featured-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-mid), var(--navy-deep));
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  overflow: hidden;
  flex-shrink: 0;
}

.featured-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-author-name {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.85rem;
}

.featured-author-date {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.featured-meta-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.featured-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  transition: var(--transition);
}

.featured-read-more svg {
  width: 16px;
  height: 16px;
  transition: var(--transition);
}

.blog-featured-card:hover .featured-read-more svg {
  transform: translateX(4px);
}

/* ============================================================
   POST LAYOUT — TWO COLUMN WITH SIDEBAR
   ============================================================ */
.blog-post-wrap {
  padding: 48px 0 80px;
  background: var(--ivory);
  border-top: 3px solid var(--gold);
}



.blog-post-main {
  min-width: 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 44px 48px;
  border: 1px solid var(--border);
}

/* Post Stats Bar */
.post-stats-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--white);
}

.post-stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 0.83rem;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  flex: 1;
  justify-content: center;
}

.post-stat-item:last-child {
  border-right: none;
}

.post-stat-item svg {
  width: 14px;
  height: 14px;
  color: var(--gold);
  flex-shrink: 0;
}

.post-stat-item strong {
  color: var(--text-dark);
  font-weight: 600;
}

/* Featured Image in Post */
.post-featured-img {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: 36px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.post-featured-img img {
  width: 100%;
  height: auto;
  display: block;
}

/* Share Bar */
.share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 40px 0;
  padding: 20px 24px;
  background: var(--gold-pale);
  border-radius: var(--radius-md);
  border: 1px solid rgba(201, 169, 97, 0.2);
}

.share-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dark);
  margin-right: 4px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(201, 169, 97, 0.3);
  background: var(--white);
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Outfit', sans-serif;
}

.share-btn:hover {
  background: var(--navy-deep);
  color: var(--white);
  border-color: var(--navy-deep);
}

.share-btn svg {
  width: 14px;
  height: 14px;
}

/* Author Bio */
.author-bio-card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 28px 32px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 40px 0;
}

.author-bio-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-mid), var(--navy-deep));
  border: 3px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
  overflow: hidden;
}

.author-bio-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-bio-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--gold);
  margin-bottom: 4px;
}

.author-bio-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.author-bio-text {
  font-size: 0.91rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 12px;
}

.author-bio-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.author-bio-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  border: 1px solid var(--border-gold);
  padding: 4px 12px;
  border-radius: 50px;
  transition: var(--transition);
}

.author-bio-link:hover {
  background: var(--gold);
  color: var(--navy-deep);
  border-color: var(--gold);
}

.author-bio-link svg {
  width: 12px;
  height: 12px;
}

/* ============================================================
   TABLE OF CONTENTS SIDEBAR
   ============================================================ */
.toc-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.toc-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 20px;
}

.toc-box-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-box-title::before {
  content: '';
  width: 16px;
  height: 2px;
  background: var(--gold);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: 4px;
}

.toc-list a {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 5px 10px;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  transition: var(--transition);
  line-height: 1.4;
}

.toc-list a:hover,
.toc-list a.active {
  color: var(--gold);
  border-left-color: var(--gold);
  background: var(--gold-pale);
}

.toc-list .toc-h3 a {
  padding-left: 22px;
  font-size: 0.8rem;
}

/* Sidebar Share Widget */
.sidebar-share {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.sidebar-share-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-share-title::before {
  content: '';
  width: 16px;
  height: 2px;
  background: var(--gold);
}

.sidebar-share-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-share-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Outfit', sans-serif;
  text-decoration: none;
}

.sidebar-share-btn:hover {
  background: var(--navy-deep);
  color: var(--white);
  border-color: var(--navy-deep);
}

.sidebar-share-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ============================================================
   RELATED POSTS
   ============================================================ */
.related-posts {
  background: var(--white);
  padding: 64px 0;
  border-top: 1px solid var(--border);
}

.related-posts-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}

.related-posts-header h2 {
  font-size: 1.8rem;
}

.related-posts-header a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gold);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ============================================================
   BLOG PAGE HERO META ROW
   ============================================================ */
.page-hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 12px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.70);
}

.page-hero-meta .meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

/* ============================================================
   RESPONSIVE — NEW COMPONENTS
   ============================================================ */
@media (max-width: 1024px) {
  .blog-post-layout {
    grid-template-columns: 1fr;
  }

  .toc-sidebar {
    display: none;
  }

  .blog-featured-card {
    grid-template-columns: 1fr;
  }

  .blog-featured-card .featured-image {
    min-height: 220px;
  }

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

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

@media (max-width: 768px) {
  .related-grid {
    grid-template-columns: 1fr;
  }

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

  .author-bio-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .author-bio-links {
    justify-content: center;
  }

  .share-bar {
    gap: 8px;
  }

  .post-stats-bar {
    flex-wrap: wrap;
  }

  .post-stat-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
    flex-basis: 50%;
  }

  .post-stat-item:last-child {
    border-bottom: none;
  }

  .blog-post-layout {
    padding: 0 16px;
  }

  .blog-post-wrap {
    padding: 32px 0 60px;
  }

  .blog-post-main {
    padding: 24px 20px 32px;
    border-radius: var(--radius-md);
  }
}

/* ============================================================
   PUBLICATIONS & RESEARCH SECTION
   ============================================================ */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 40px;
}

.pub-item {
  display: grid;
  grid-template-columns: 8px 1fr;
  align-items: center;
  gap: 24px;
  background: var(--white);
  padding: 32px;
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
}

.pub-item:first-child {
  border-top: 1px solid var(--border);
}

.pub-item:hover {
  background: #FAFAFA;
}

.pub-accent {
  height: 60px;
  width: 4px;
  background: var(--pub-color, var(--gold));
  border-radius: 4px;
  opacity: 0.8;
}

.pub-body {
  padding: 0;
  flex: 1;
}

.pub-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.pub-type-badge {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
}

.pub-year {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.pub-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.45;
  margin: 0 0 8px;
}

.pub-authors {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.pub-authors strong {
  color: var(--text-body);
}

.pub-journal {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.pub-journal em {
  color: var(--text-body);
  font-style: italic;
}

.pub-vol {
  color: var(--text-muted);
}

.pub-doi-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--pub-color, var(--gold));
  text-decoration: none;
  border: 1px solid currentColor;
  padding: 4px 12px;
  border-radius: 20px;
  transition: background 0.2s ease, color 0.2s ease;
}

.pub-doi-link svg {
  width: 12px;
  height: 12px;
}

.pub-doi-link:hover {
  background: var(--pub-color, var(--gold));
  color: #fff;
}

.pub-fallback-note {
  text-align: center;
  margin-top: 28px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Dark mode adjustments */
[data-theme="dark"] .pub-doi-link:hover {
  color: #0D1A28;
}

@media (max-width: 768px) {
  .pub-body {
    padding: 16px 18px;
  }

  .pub-title {
    font-size: 1rem;
  }
}

/* ============================================================
   WHATSAPP FLOATING BUTTON
   ============================================================ */
.whatsapp-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  width: 56px;
  height: 56px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: wa-pulse 2.5s ease-in-out infinite;
}

.whatsapp-fab svg {
  width: 28px;
  height: 28px;
}

.whatsapp-fab:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.55);
  animation: none;
}

.whatsapp-tooltip {
  position: absolute;
  right: 66px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(12, 27, 42, 0.92);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.whatsapp-tooltip::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: rgba(12, 27, 42, 0.92);
}

.whatsapp-fab:hover .whatsapp-tooltip {
  opacity: 1;
}

@keyframes wa-pulse {

  0%,
  100% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  }

  50% {
    box-shadow: 0 4px 28px rgba(37, 211, 102, 0.7), 0 0 0 8px rgba(37, 211, 102, 0.12);
  }
}

@media (max-width: 768px) {
  .whatsapp-fab {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }

  .whatsapp-fab svg {
    width: 24px;
    height: 24px;
  }

  .whatsapp-tooltip {
    display: none;
  }
}

/* ============================================================
   SKIP LINK (Accessibility)
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 99999;
  background: var(--gold);
  color: var(--navy-deep);
  padding: 10px 24px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--navy-deep);
  outline-offset: 2px;
}

/* ============================================================
   FOCUS VISIBLE (Keyboard Navigation)
   ============================================================ */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 50%;
}

/* ============================================================
   TOUCH ACTION (Mobile tap responsiveness)
   ============================================================ */
button,
a,
[role="button"],
.blog-card,
.blog-featured-card,
.course-card,
.pub-item,
.nav-toggle,
.theme-toggle,
.back-to-top,
.whatsapp-fab,
.share-btn,
.sidebar-share-btn,
.pagination .page-numbers {
  touch-action: manipulation;
}

/* ============================================================
   PREFERS REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .hero::after,
  .hero-pattern,
  .pulse-dot,
  .scroll-indicator,
  .whatsapp-fab {
    animation: none !important;
  }

  .reading-progress {
    transition: none !important;
  }
}

/* ============================================================
   404 ERROR PAGE
   ============================================================ */
.error-404-section {
  padding: 60px 0 100px;
  background: var(--ivory);
  text-align: center;
}

.error-404-inner {
  max-width: 560px;
  margin: 0 auto;
}

.error-404-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(6rem, 18vw, 11rem);
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px var(--gold);
  opacity: 0.45;
  margin-bottom: -12px;
  user-select: none;
}

.error-404-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  background: var(--gold-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(201, 169, 97, 0.3);
}

.error-404-icon svg {
  width: 32px;
  height: 32px;
  color: var(--gold);
  stroke-width: 1.5;
}

.error-404-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--text-dark);
  margin-bottom: 14px;
}

.error-404-desc {
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto 36px;
  font-size: 1rem;
  line-height: 1.65;
}

.error-404-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.error-404-links p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.error-404-nav {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.error-404-nav a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold);
  padding: 6px 16px;
  border: 1px solid rgba(201, 169, 97, 0.3);
  border-radius: 50px;
  transition: var(--transition);
  background: transparent;
}

.error-404-nav a:hover {
  background: var(--gold);
  color: var(--navy-deep);
  border-color: var(--gold);
}

/* Dark mode 404 */
[data-theme="dark"] .error-404-number {
  -webkit-text-stroke-color: var(--gold);
  opacity: 0.35;
}

/* ============================================================
   TYPOGRAPHY — System Font Fallbacks
   ============================================================ */
body {
  font-family: 'Outfit', 'Helvetica Neue', Arial, sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}

/* ============================================================
   RESPONSIVE — Timeline 480px refinement
   ============================================================ */
@media (max-width: 480px) {
  .timeline-item {
    padding-left: 28px;
  }

  .timeline-item::before {
    left: 6px;
    width: 14px;
    height: 14px;
  }

  .timeline-connector {
    left: 12px;
  }

  .timeline-card {
    padding: 18px 16px;
  }

  .error-404-section {
    padding: 40px 0 80px;
  }

  .error-404-actions {
    flex-direction: column;
    align-items: center;
  }
}

/* ============================================================
   LANDSCAPE MOBILE
   ============================================================ */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 100px 0 60px;
  }

  .page-hero {
    padding: 80px 0 24px;
  }
}

/* ============================================================
   BLOG LISTING
   ============================================================ */
.blog-listing-section {
  padding: 64px 0 100px;
  background: var(--ivory);
}

/* ============================================================
   DARK MODE — ALWAYS-DARK SECTION FIXES
   ============================================================ */
/* Fix: Always-dark sections need explicit white text in dark mode */
[data-theme="dark"] .section-dark {
  color: rgba(255, 255, 255, 0.88);
}

[data-theme="dark"] .section-dark h2,
[data-theme="dark"] .section-dark h3,
[data-theme="dark"] .section-dark h4 {
  color: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] .section-dark p,
[data-theme="dark"] .section-dark .subtitle {
  color: rgba(255, 255, 255, 0.50);
}

/* Fix: Footer headings */
[data-theme="dark"] .footer {
  color: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] .footer-brand p {
  color: rgba(255, 255, 255, 0.75);
}

[data-theme="dark"] .footer-links h4 {
  color: var(--gold);
}

[data-theme="dark"] .footer-links a {
  color: rgba(255, 255, 255, 0.75);
}

[data-theme="dark"] .footer-links a:hover {
  color: var(--gold);
}

[data-theme="dark"] .footer-bottom {
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.65);
}

/* Fix: 404 outline button & share button hover */
[data-theme="dark"] .error-404-nav a {
  color: rgba(255, 255, 255, 0.82);
  border-color: rgba(255, 255, 255, 0.22);
}

[data-theme="dark"] .share-btn:hover {
  color: #fff;
}

/* Fix: Contact section polish */
[data-theme="dark"] .contact-icon {
  background: rgba(201, 169, 97, 0.12);
}

[data-theme="dark"] .social-link {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .contact-quote {
  background: rgba(201, 169, 97, 0.04);
}

/* Fix: Editorial styles in dark mode */
[data-theme="dark"] .section-edu {
  background: var(--navy-deep);
}

[data-theme="dark"] .edu-card,
[data-theme="dark"] .pub-item {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
}

[data-theme="dark"] .edu-card:hover,
[data-theme="dark"] .pub-item:hover {
  background: rgba(201, 169, 97, 0.06);
}

[data-theme="dark"] .pub-title,
[data-theme="dark"] .timeline-card h3 {
  color: #fff;
}

[data-theme="dark"] .education-grid {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
}

/* Fix: Timeline card polish */
[data-theme="dark"] .timeline-card {
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .timeline-card-current {
  background: linear-gradient(135deg, rgba(201, 169, 97, 0.08) 0%, rgba(0, 0, 0, 0) 100%);
}

/* ============================================================
   PREMIUM 10/10 DESIGN OVERHAUL (BENTO & CARDS)
   ============================================================ */

/* Alternating Dark Sections */
[data-theme="dark"] .section-white {
  background-color: rgba(255, 255, 255, 0.015);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .section-edu {
  background: var(--bg-dark);
}

[data-theme="dark"] .section-dark {
  background-color: rgba(255, 255, 255, 0.025);
}

/* Premium Cards (Courses, Publications, Education) */
.premium-card {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
  position: relative;
}

.premium-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(201, 169, 97, 0.3) 0%, rgba(201, 169, 97, 0) 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.premium-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(201, 169, 97, 0.1);
  border-color: rgba(201, 169, 97, 0.25);
}

.premium-card:hover::before {
  opacity: 1;
}

[data-theme="dark"] .premium-card {
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.85);
}

.premium-badge {
  background: rgba(201, 169, 97, 0.1);
  color: var(--gold) !important;
  border: 1px solid rgba(201, 169, 97, 0.2);
  box-shadow: 0 2px 8px rgba(201, 169, 97, 0.05);
}

/* Bento Box Grid for Skills */
.skills-bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.bento-box {
  background: rgba(255, 255, 255, 0.015);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.bento-box::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(201, 169, 97, 0.03) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.bento-box:hover::after {
  opacity: 1;
}

.bento-box:hover {
  border-color: rgba(201, 169, 97, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.bento-box-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bento-box-header svg {
  color: var(--gold);
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 2px 4px rgba(201, 169, 97, 0.3));
}

.bento-box-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white);
  margin: 0;
  letter-spacing: 0.02em;
}

[data-theme="dark"] .bento-box-title {
  color: #fff;
}

.bento-skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.premium-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.02em;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: default;
}

.premium-chip:hover {
  background: rgba(201, 169, 97, 0.1);
  border-color: rgba(201, 169, 97, 0.4);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(201, 169, 97, 0.15);
}

.premium-chip::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.5;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.premium-chip:hover::before {
  opacity: 1;
  transform: scale(1.3);
  box-shadow: 0 0 8px var(--gold);
}

@media (max-width: 768px) {
  .bento-box {
    padding: 24px;
  }

  .premium-chip {
    font-size: 0.8rem;
    padding: 6px 14px;
  }
}

/* ============================================================
   ABOUT HIGHLIGHTS & EDUCATION CARD POLISH
   ============================================================ */

/* Fix Education Cards Layout */
.edu-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  padding: 32px !important;
  gap: 4px !important;
}

.edu-card-header {
  width: 100% !important;
  justify-content: space-between !important;
  margin-bottom: 16px !important;
}

.edu-card h4 {
  font-size: 1.4rem !important;
  margin-bottom: 4px !important;
}

.edu-card .school {
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 1.05rem !important;
}

.edu-card .subject {
  color: var(--gold) !important;
  font-size: 0.9rem !important;
  font-weight: 500;
  opacity: 0.8;
}

/* Fix About Me Highlights in Dark Mode */
[data-theme="dark"] .highlight-emergency,
[data-theme="dark"] .highlight-mental,
[data-theme="dark"] .highlight-patient,
[data-theme="dark"] .highlight-learning {
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 255, 255, 0.85) !important;
}

[data-theme="dark"] .highlight-item {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .highlight-item:hover {
  background: rgba(201, 169, 97, 0.05) !important;
  border-color: rgba(201, 169, 97, 0.3) !important;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .highlight-emergency .highlight-icon,
[data-theme="dark"] .highlight-mental .highlight-icon,
[data-theme="dark"] .highlight-patient .highlight-icon,
[data-theme="dark"] .highlight-learning .highlight-icon {
  background: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .highlight-emergency .highlight-icon svg {
  color: #FC8181;
}

[data-theme="dark"] .highlight-mental .highlight-icon svg {
  color: #68D391;
}

[data-theme="dark"] .highlight-patient .highlight-icon svg {
  color: #F6E05E;
}

[data-theme="dark"] .highlight-learning .highlight-icon svg {
  color: #63B3ED;
}

[data-theme="dark"] .highlight-text {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

/* ============================================================
   PREMIUM BLOG FEATURES (CODE BLOCK & NEWSLETTER)
   ============================================================ */

/* --- Code Syntax Block --- */
.code-block-wrapper {
  position: relative;
  margin: 32px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--navy-deep);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-block-lang {
  color: var(--gold-light);
  font-family: monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.copy-code-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.copy-code-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.copy-code-btn.copied {
  background: var(--gold);
  color: var(--navy-deep);
  border-color: var(--gold);
}

.code-block-wrapper pre {
  margin: 0;
  padding: 20px 16px;
  overflow-x: auto;
  font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #abb2bf;
  /* One Dark Pro text */
}

/* Syntax Highlighting Colors */
.code-keyword {
  color: #c678dd;
}

.code-string {
  color: #98c379;
}

.code-function {
  color: #61afef;
}

.code-comment {
  color: #5c6370;
  font-style: italic;
}

.code-number {
  color: #d19a66;
}

.code-operator {
  color: #56b6c2;
}

.code-tag {
  color: #e06c75;
}

/* Light Mode Overrides for Code Block */
[data-theme="light"] .code-block-wrapper {
  background: #282C34;
  /* Keep code block dark even in light mode for dev aesthetic */
}

/* --- Newsletter CTA --- */
.newsletter-cta {
  background: linear-gradient(135deg, rgba(201, 169, 97, 0.1) 0%, rgba(201, 169, 97, 0.02) 100%);
  border: 1px solid rgba(201, 169, 97, 0.2);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  margin: 64px 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .newsletter-cta {
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.newsletter-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.newsletter-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  background: rgba(201, 169, 97, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}

.newsletter-title {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--text-dark);
  margin-bottom: 12px;
}

[data-theme="dark"] .newsletter-title {
  color: var(--white);
}

.newsletter-desc {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 32px;
}

[data-theme="dark"] .newsletter-desc {
  color: var(--text-light);
}

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

.newsletter-input {
  flex: 1;
  padding: 14px 20px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition);
}

[data-theme="dark"] .newsletter-input {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.2);
}

.newsletter-btn {
  padding: 14px 28px;
  border-radius: 50px;
  background: var(--gold);
  color: var(--navy-deep);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.newsletter-btn:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(201, 169, 97, 0.3);
}

@media (max-width: 600px) {
  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-cta {
    padding: 32px 20px;
  }
}

/* --- Search Bar --- */
.blog-search-bar {
  margin-bottom: 32px;
  display: flex;
  justify-content: center;
}

.blog-search-form {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.blog-search-input {
  width: 100%;
  padding: 14px 20px 14px 44px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .blog-search-input {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.blog-search-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.15);
}

.blog-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}

[data-theme="dark"] .blog-search-icon {
  color: var(--text-light);
}

/* ============================================================
   SINGLE POST — Layout, TOC, Share, Author, Nav, Comments
   ============================================================ */

/* --- Reading Progress Bar --- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  z-index: 10000;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(201, 169, 97, 0.4);
}

/* --- Post Featured Image --- */
.post-featured-img {
  margin-bottom: 32px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.post-featured-img img {
  width: 100%;
  height: auto;
  display: block;
}

/* --- Breadcrumb (blog post) --- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--gold);
}

.breadcrumb svg {
  opacity: 0.4;
}

.breadcrumb span[aria-current] {
  color: var(--gold);
  font-weight: 500;
}

/* --- Post Hero (consolidated) --- */
.blog-post-hero {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy-mid) 100%);
  padding: 72px 0 24px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(201, 169, 97, 0.25);
}

.blog-post-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.025;
  background-image:
    linear-gradient(rgba(201, 169, 97, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 169, 97, 0.5) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.blog-post-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(201, 169, 97, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.post-hero-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.post-hero-breadcrumb {
  justify-content: center;
  margin-bottom: 10px;
}

.post-hero-badge-wrap {
  margin-bottom: 8px;
}

.post-hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: 1px solid rgba(201, 169, 97, 0.3);
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(201, 169, 97, 0.08);
}

.post-hero-title {
  font-family: var(--font-display);
  line-height: 1.18;
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  margin: 0 auto 16px;
  color: #fff;
  max-width: 800px;
}

.post-hero-meta-bar {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 7px 18px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.post-hero-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-hero-author-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(201, 169, 97, 0.3);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy-deep);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
}

.post-hero-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-hero-author-name {
  color: #fff;
  font-weight: 500;
  font-size: 0.88rem;
}

.post-hero-meta-dot {
  opacity: 0.4;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.post-hero-meta-text {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.83rem;
}

@media (max-width: 768px) {
  .blog-post-hero {
    padding: 68px 0 20px;
  }

  .post-hero-title {
    font-size: clamp(1.4rem, 5vw, 1.9rem);
    margin-bottom: 14px;
  }

  .post-hero-meta-bar {
    padding: 6px 14px;
    gap: 8px;
  }

  .post-hero-meta-text {
    font-size: 0.78rem;
  }

  .post-hero-author-name {
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .blog-post-hero {
    padding: 62px 0 16px;
  }

  .post-hero-badge {
    font-size: 0.68rem;
    padding: 2px 10px;
  }

  .post-hero-meta-bar {
    gap: 6px;
    padding: 5px 12px;
  }
}

/* --- Post Layout Grid --- */
.blog-post-wrap {
  background: var(--ivory);
  padding: 48px 0 80px;
}

[data-theme="dark"] .blog-post-wrap {
  background: var(--navy-deep);
}

.blog-post-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  align-items: start;
}

@media (max-width: 960px) {
  .blog-post-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* --- Article Prose Styling --- */
.blog-post-main {
  min-width: 0;
}

[data-theme="dark"] .blog-post-main {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
  .blog-post-main {
    padding: 24px 20px 32px;
    border-radius: var(--radius-md);
  }

  .blog-post-wrap {
    padding: 32px 0 48px;
  }
}

.prose {
  font-family: var(--font-body);
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--text-dark);
}

[data-theme="dark"] .prose {
  color: rgba(255, 255, 255, 0.96);
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin: 48px 0 16px;
  color: var(--text-dark);
  line-height: 1.3;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 80px;
}

[data-theme="dark"] .prose h2 {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.prose h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 32px 0 12px;
  color: var(--text-dark);
  scroll-margin-top: 80px;
}

[data-theme="dark"] .prose h3 {
  color: #FFFFFF;
}

.prose p {
  margin-bottom: 20px;
}

.prose blockquote {
  border-left: 3px solid var(--gold);
  margin: 32px 0;
  padding: 20px 24px;
  background: rgba(201, 169, 97, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-muted);
}

[data-theme="dark"] .prose blockquote {
  background: rgba(201, 169, 97, 0.06);
  color: rgba(255, 255, 255, 0.8);
}

.prose code {
  background: rgba(201, 169, 97, 0.1);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.88em;
  font-family: Consolas, Monaco, monospace;
  color: var(--gold);
}

/* --- Code Block Wrapper --- */
.code-block-wrapper {
  background: #1e1e2e;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 28px 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-block-lang {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-body);
}

.copy-code-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 5px 12px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
  font-family: var(--font-body);
  transition: all 0.2s ease;
}

.copy-code-btn:hover {
  color: var(--gold);
  border-color: rgba(201, 169, 97, 0.3);
  background: rgba(201, 169, 97, 0.08);
}

.copy-code-btn.copied {
  color: #98c379;
  border-color: rgba(152, 195, 121, 0.3);
}

/* --- TOC Sidebar --- */
.toc-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
}

/* TOC mobile toggle */
@media (max-width: 960px) {
  .toc-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    z-index: 100;
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 60vh;
    overflow-y: auto;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  [data-theme="dark"] .toc-sidebar {
    background: var(--navy-deep);
    border-top-color: rgba(255, 255, 255, 0.08);
  }

  .toc-sidebar.mobile-open {
    transform: translateY(0);
  }

  .toc-mobile-toggle {
    display: flex;
  }

  .sidebar-share {
    display: none;
    /* share buttons already in main content on mobile */
  }
}

@media (min-width: 961px) {
  .toc-mobile-toggle {
    display: none;
  }
}

.toc-mobile-toggle {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy-deep);
  color: var(--gold);
  border: 1px solid rgba(201, 169, 97, 0.3);
  cursor: pointer;
  display: none;
  /* shown via media query */
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 101;
  transition: all 0.2s ease;
}

.toc-mobile-toggle:hover {
  background: var(--navy-light);
}

.toc-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .toc-box {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.toc-box-title {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-box-title::before {
  content: '—';
  color: var(--gold);
  font-weight: 300;
}

[data-theme="dark"] .toc-box-title {
  color: rgba(255, 255, 255, 0.5);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: 2px;
}

.toc-list li.toc-h3 {
  padding-left: 16px;
}

.toc-list a {
  display: block;
  padding: 6px 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1.4;
}

.toc-list a:hover {
  color: var(--gold);
  background: rgba(201, 169, 97, 0.06);
}

.toc-list a.active {
  color: var(--gold);
  background: rgba(201, 169, 97, 0.08);
  border-left-color: var(--gold);
  font-weight: 500;
}

[data-theme="dark"] .toc-list a {
  color: rgba(255, 255, 255, 0.55);
}

[data-theme="dark"] .toc-list a:hover,
[data-theme="dark"] .toc-list a.active {
  color: var(--gold);
}

/* --- Sidebar Share --- */
.sidebar-share {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .sidebar-share {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.sidebar-share-title {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-share-title::before {
  content: '—';
  color: var(--gold);
  font-weight: 300;
}

[data-theme="dark"] .sidebar-share-title {
  color: rgba(255, 255, 255, 0.5);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.sidebar-share-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-share-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--font-body);
  color: var(--text-dark);
  transition: all 0.2s ease;
}

.sidebar-share-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201, 169, 97, 0.05);
}

[data-theme="dark"] .sidebar-share-btn {
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .sidebar-share-btn:hover {
  border-color: rgba(201, 169, 97, 0.3);
  color: var(--gold);
  background: rgba(201, 169, 97, 0.06);
}

.sidebar-share-btn svg {
  flex-shrink: 0;
}

/* --- Inline Share Bar (below article) --- */
.share-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  margin: 24px 0 40px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

[data-theme="dark"] .share-bar {
  border-color: rgba(255, 255, 255, 0.06);
}

.share-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-theme="dark"] .share-label {
  color: rgba(255, 255, 255, 0.5);
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: none;
  cursor: pointer;
  font-size: 0.83rem;
  font-family: var(--font-body);
  color: var(--text-dark);
  transition: all 0.2s ease;
}

.share-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.share-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201, 169, 97, 0.05);
}

[data-theme="dark"] .share-btn {
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .share-btn:hover {
  border-color: rgba(201, 169, 97, 0.3);
  color: var(--gold);
}

@media (max-width: 600px) {
  .share-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .share-btn {
    width: 100%;
    justify-content: center;
  }
}

/* --- Post Tags --- */
.post-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.post-tag {
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  background: var(--gold-pale);
  color: var(--text-dark);
  font-weight: 500;
  border: 1px solid rgba(201, 169, 97, 0.2);
  transition: all 0.2s ease;
}

.post-tag:hover {
  background: var(--gold);
  color: var(--navy-deep);
}

[data-theme="dark"] .post-tag {
  background: rgba(201, 169, 97, 0.1);
  color: var(--gold);
  border-color: rgba(201, 169, 97, 0.25);
}

[data-theme="dark"] .post-tag:hover {
  background: rgba(201, 169, 97, 0.2);
}

/* --- Author Bio Card --- */
.author-bio-card {
  display: flex;
  gap: 24px;
  padding: 32px;
  margin: 40px 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .author-bio-card {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.author-bio-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(201, 169, 97, 0.08);
  flex-shrink: 0;
}

.author-bio-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold);
  margin-bottom: 4px;
}

.author-bio-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 10px;
}

[data-theme="dark"] .author-bio-name {
  color: #fff;
}

.author-bio-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

[data-theme="dark"] .author-bio-text {
  color: rgba(255, 255, 255, 0.65);
}

.author-bio-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.author-bio-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-dark);
  text-decoration: none;
  transition: all 0.2s ease;
}

.author-bio-link svg {
  width: 14px;
  height: 14px;
}

.author-bio-link:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201, 169, 97, 0.06);
}

[data-theme="dark"] .author-bio-link {
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .author-bio-link:hover {
  border-color: rgba(201, 169, 97, 0.3);
  color: var(--gold);
}

@media (max-width: 600px) {
  .author-bio-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 20px;
  }

  .author-bio-links {
    justify-content: center;
  }
}

/* --- Post Navigation (Prev / Next) --- */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 48px 0;
}

.post-nav-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.3s ease;
  background: var(--white);
}

[data-theme="dark"] .post-nav-link {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

.post-nav-link:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 16px rgba(201, 169, 97, 0.1);
  transform: translateY(-2px);
}

.post-nav-link:hover .nav-arrow {
  color: var(--gold);
}

.post-nav-link .nav-arrow {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

[data-theme="dark"] .post-nav-link .nav-arrow {
  color: rgba(255, 255, 255, 0.35);
}

[data-theme="dark"] .post-nav-link:hover .nav-arrow {
  color: var(--gold);
}

.post-nav-link .nav-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold);
  margin-bottom: 8px;
}

.post-nav-link .nav-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text-dark);
  line-height: 1.4;
}

[data-theme="dark"] .post-nav-link .nav-title {
  color: rgba(255, 255, 255, 0.9);
}

.post-nav-link.next {
  text-align: right;
  flex-direction: row;
  justify-content: flex-end;
}

.post-nav-link.prev .nav-arrow {
  order: -1;
}

@media (max-width: 600px) {
  .post-navigation {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* --- Comments Area --- */
.comments-area {
  margin: 48px 0;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

[data-theme="dark"] .comments-area {
  border-top-color: rgba(255, 255, 255, 0.06);
}

.comments-area>h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--text-dark);
  margin-bottom: 32px;
}

[data-theme="dark"] .comments-area>h2 {
  color: #fff;
}

/* Comment avatars */
.comment-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.comment-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--navy-mid), var(--navy-deep));
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comment-list>li {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.comment-list>li:last-child {
  border-bottom: none;
}

[data-theme="dark"] .comment-list>li {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.comment-author {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-dark);
  margin-bottom: 4px;
}

[data-theme="dark"] .comment-author {
  color: #fff;
}

.comment-metadata {
  font-size: 0.82rem;
  color: var(--gold);
  margin-bottom: 12px;
  opacity: 0.85;
}

.comment-list p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
}

[data-theme="dark"] .comment-list p {
  color: rgba(255, 255, 255, 0.7);
}

/* Comment Form */
.comment-respond {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

[data-theme="dark"] .comment-respond {
  border-top-color: rgba(255, 255, 255, 0.06);
}

.comment-form-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text-dark);
  margin-bottom: 24px;
}

[data-theme="dark"] .comment-form-title {
  color: #fff;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comments-area .form-row,
.comment-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-dark);
}

[data-theme="dark"] .form-group label {
  color: rgba(255, 255, 255, 0.7);
}

.form-group input,
.form-group textarea {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  background: var(--white);
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group textarea {
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.12);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

[data-theme="dark"] .form-group input::placeholder,
[data-theme="dark"] .form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.comment-submit-btn {
  align-self: flex-start;
  padding: 12px 32px;
  background: var(--gold);
  color: var(--navy-deep);
  border: none;
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.comment-submit-btn:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201, 169, 97, 0.25);
}

@media (max-width: 600px) {

  .comments-area .form-row,
  .comment-form .form-row {
    grid-template-columns: 1fr;
  }
}

/* --- Article Newsletter (WordPress single.php) --- */
.article-newsletter {
  background: linear-gradient(135deg, rgba(201, 169, 97, 0.08) 0%, rgba(201, 169, 97, 0.02) 100%);
  border: 1px solid rgba(201, 169, 97, 0.15);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  margin: 48px 0;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .article-newsletter {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.06);
}

.article-newsletter::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.article-newsletter .newsletter-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  background: rgba(201, 169, 97, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}

.article-newsletter .newsletter-icon svg {
  width: 26px;
  height: 26px;
}

.article-newsletter .newsletter-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--text-dark);
  margin-bottom: 12px;
}

[data-theme="dark"] .article-newsletter .newsletter-title {
  color: #fff;
}

.article-newsletter .newsletter-desc {
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 28px;
  font-size: 0.95rem;
  line-height: 1.7;
}

[data-theme="dark"] .article-newsletter .newsletter-desc {
  color: rgba(255, 255, 255, 0.65);
}

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

.article-newsletter .newsletter-input,
.newsletter-input {
  flex: 1;
  padding: 14px 20px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
}

[data-theme="dark"] .article-newsletter .newsletter-input {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.article-newsletter .newsletter-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.15);
}

.article-newsletter .newsletter-submit,
.newsletter-submit {
  padding: 14px 28px;
  border-radius: 50px;
  background: var(--gold);
  color: var(--navy-deep);
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
  white-space: nowrap;
}

.article-newsletter .newsletter-submit:hover,
.newsletter-submit:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(201, 169, 97, 0.3);
}

.newsletter-disclaimer {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 14px;
  opacity: 0.7;
}

[data-theme="dark"] .newsletter-disclaimer {
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 600px) {
  .article-newsletter .newsletter-form {
    flex-direction: column;
  }

  .article-newsletter {
    padding: 32px 20px;
  }
}

/* --- Related Posts --- */
.related-posts {
  background: var(--ivory);
  padding: 64px 0;
}

[data-theme="dark"] .related-posts {
  background: var(--navy-mid);
}

.related-posts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.related-posts-header h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--text-dark);
}

[data-theme="dark"] .related-posts-header h2 {
  color: #fff;
}

.related-posts-header a {
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s;
}

.related-posts-header a:hover {
  opacity: 0.8;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 960px) and (min-width: 769px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .related-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .related-posts-header {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}

/* --- JS-generated code blocks (single.php) --- */
.code-block {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 28px 0;
  background: #1e1e2e;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.code-block .code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-block .code-lang {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-body);
}

.code-copy-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.4);
  transition: all 0.2s ease;
}

.code-copy-btn:hover {
  color: var(--gold);
  border-color: rgba(201, 169, 97, 0.3);
}

.code-copy-btn svg {
  width: 14px;
  height: 14px;
}

/* ─── Back to Top Button ─── */
.back-to-top {
  position: fixed;
  bottom: 80px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-deep);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(201, 169, 97, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.3s ease;
  z-index: 99;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 169, 97, 0.4);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* ─── Reading Progress Bar ─── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light, #e0c97a));
  z-index: 1001;
  transition: width 0.15s ease-out;
  box-shadow: 0 0 8px rgba(201, 169, 97, 0.4);
}

/* ─── Reading Time Remaining ─── */
.reading-time-remaining {
  position: fixed;
  top: 5px;
  right: 24px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gold);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1001;
  pointer-events: none;
  font-family: var(--font-body);
  letter-spacing: 0.3px;
}

.reading-time-remaining.visible {
  opacity: 1;
}

@media (max-width: 768px) {
  .reading-time-remaining {
    display: none;
  }
}

/* ─── Image Lightbox ─── */
.prose img {
  cursor: zoom-in;
  transition: opacity 0.2s ease;
}

.prose img:hover {
  opacity: 0.92;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  cursor: zoom-out;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.3s ease;
  cursor: default;
}

.lightbox-overlay.active img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-close svg {
  width: 18px;
  height: 18px;
}

/* ─── Resume Reading Banner ─── */
.resume-reading-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy-deep);
  color: #fff;
  padding: 12px 20px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(201, 169, 97, 0.2);
  z-index: 100;
  animation: resumeSlideUp 0.4s ease;
  white-space: nowrap;
}

@keyframes resumeSlideUp {
  from {
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

.resume-btn {
  padding: 6px 16px;
  background: var(--gold);
  color: var(--navy-deep);
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s ease;
}

.resume-btn:hover {
  background: var(--gold-light);
}

.resume-dismiss {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.resume-dismiss:hover {
  color: #fff;
}

@media (max-width: 600px) {
  .resume-reading-banner {
    bottom: 16px;
    padding: 10px 16px;
    font-size: 0.78rem;
    gap: 8px;
    max-width: calc(100vw - 32px);
    white-space: normal;
  }
}

/* ─── Print Styles ─── */
@media print {

  .navbar,
  .reading-progress,
  .reading-time-remaining,
  .back-to-top,
  .toc-sidebar,
  .share-bar,
  .sidebar-share,
  .article-newsletter,
  .related-posts,
  .post-navigation,
  .resume-reading-banner,
  .lightbox-overlay,
  .whatsapp-btn {
    display: none !important;
  }

  .blog-post-hero {
    padding: 20px 0 10px !important;
    background: #fff !important;
    border: none !important;
  }

  .blog-post-hero::before,
  .blog-post-hero::after {
    display: none !important;
  }

  .post-hero-title {
    color: #000 !important;
    text-shadow: none !important;
    font-size: 1.8rem !important;
  }

  .post-hero-meta-bar {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
  }

  .post-hero-meta-text,
  .post-hero-author-name {
    color: #333 !important;
  }

  .post-hero-meta-dot {
    color: #999 !important;
  }

  .post-hero-badge {
    border-color: #999 !important;
    color: #333 !important;
    background: none !important;
  }

  .breadcrumb {
    display: none !important;
  }

  .blog-post-layout {
    grid-template-columns: 1fr !important;
  }

  .blog-post-main {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .blog-post-wrap {
    background: #fff !important;
    padding: 20px 0 !important;
  }

  .prose {
    font-size: 11pt;
    color: #000 !important;
  }

  .prose a {
    color: #000;
    text-decoration: underline;
  }

  .code-block {
    break-inside: avoid;
  }

  .author-bio-card {
    break-inside: avoid;
  }
}


/* ============================================================
   CHAMBER SECTION
   ============================================================ */
.chamber-coming-soon {
  text-align: center;
  padding: 60px 0;
  background: rgba(0, 0, 0, 0.02);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

[data-theme="dark"] .chamber-coming-soon {
  background: rgba(255, 255, 255, 0.02);
}

.chamber-coming-soon h3 {
  margin-top: 16px;
  margin-bottom: 8px;
}

.chamber-placeholder-icon {
  font-size: 3rem;
}

/* ============================================================
   REUSABLE CLASSES (ABOUT & EDU)
   ============================================================ */
.about-highlights-grid {
  gap: 16px;
  margin-bottom: 30px;
  display: flex;
  flex-wrap: wrap;
}

.premium-chip {
  padding: 12px 20px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-grow: 1;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.premium-chip:hover {
  background: rgba(201, 169, 97, 0.08) !important;
  border-color: rgba(201, 169, 97, 0.3) !important;
}

[data-theme="light"] .premium-chip:hover {
  background: rgba(201, 169, 97, 0.1) !important;
}

.edu-bento-card {
  padding: 32px;
  gap: 16px;
}

.edu-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 20px;
  margin-bottom: 12px;
}

[data-theme="light"] .edu-card-header {
  border-bottom: 1px solid var(--border);
}

.edu-icon {
  background: rgba(201, 169, 97, 0.1);
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  color: var(--gold);
  border: 1px solid rgba(201, 169, 97, 0.2);
  box-shadow: inset 0 2px 8px rgba(255, 255, 255, 0.05);
}

.edu-card-title {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

[data-theme="dark"] .edu-card-title {
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.edu-school {
  color: var(--text-body);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.5;
  padding-top: 4px;
}

[data-theme="dark"] .edu-school {
  color: rgba(255, 255, 255, 0.85);
}

.edu-subject {
  color: var(--gold);
  font-size: 0.95rem;
  opacity: 0.9;
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* =========================================================================
   PRIVATE VAULT - APP LAYOUT (v-namespace SaaS Design)
========================================================================= */
.vault-app-wrapper {
  --v-bg-main: #0b0f19;
  --v-bg-sidebar: #060910;
  --v-bg-card: rgba(255, 255, 255, 0.03);
  --v-bg-card-hover: rgba(255, 255, 255, 0.06);
  --v-border: rgba(255, 255, 255, 0.08);
  --v-border-soft: rgba(255, 255, 255, 0.04);
  --v-text: #e2e8f0;
  --v-text-muted: #94a3b8;
  --v-gold: #e2b356;
  --v-gold-dim: rgba(226, 179, 86, 0.15);
  --v-transition: all 0.2s ease;
  --v-radius-sm: 4px;
  --v-radius-md: 8px;
  --v-radius-lg: 10px;

  background: var(--v-bg-main);
  color: var(--v-text);
  font-family: 'Inter', -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Layout */
.v-layout {
  display: flex;
  margin-top: 80px;
  /* Account for global WP theme header */
  height: calc(100vh - 80px);
  width: 100%;
}

/* Sidebar - Compact */
.v-sidebar {
  width: 200px;
  background: var(--v-bg-sidebar);
  border-right: 1px solid var(--v-border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  flex-shrink: 0;
}

.v-nav-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.v-nav-section h4 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--v-text-muted);
  margin: 0 0 6px 8px;
  font-weight: 600;
}

.v-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--v-radius-sm);
  color: var(--v-text-muted);
  text-decoration: none;
  transition: var(--v-transition);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.v-nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--v-text);
}

.v-nav-item.active {
  background: var(--v-gold-dim);
  color: var(--v-gold);
  position: relative;
}

.v-nav-item.active::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 10%;
  height: 80%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--v-gold);
}

/* Main Area - Compact */
.v-main {
  flex: 1;
  padding: 24px 32px;
  overflow-y: auto;
  position: relative;
  background: radial-gradient(circle at 50% 0%, rgba(226, 179, 86, 0.02) 0%, transparent 60%);
}

/* Top Controls */
.v-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.v-title-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
}

.v-title-wrap h1 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
  color: #fff;
}

.v-header-stats {
  display: flex;
  align-items: center;
  gap: 16px;
}

.v-stat-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--v-border-soft);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--v-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.v-stat-pill strong {
  color: #fff;
  font-weight: 600;
}

.v-stat-pill svg {
  color: var(--v-gold);
}

/* Premium Custom Dropdown */
.v-dropdown {
  position: relative;
  display: inline-block;
  margin-left: 8px;
}

.v-dropdown-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--v-text-muted);
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--v-radius-sm);
  transition: var(--v-transition);
}

.v-dropdown-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.v-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #0d121c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--v-radius-md);
  padding: 6px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  min-width: 200px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.v-dropdown-menu.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.v-dropdown-item {
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--v-text-muted);
  border-radius: var(--v-radius-sm);
  cursor: pointer;
  transition: var(--v-transition);
}

.v-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.v-dropdown-item.active {
  background: var(--v-gold-dim);
  color: var(--v-gold);
  font-weight: 500;
}

.v-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.v-search {
  position: relative;
  display: flex;
  align-items: center;
}

.v-search svg {
  position: absolute;
  left: 10px;
  color: var(--v-text-muted);
}

.v-search input {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--v-border);
  color: #fff;
  border-radius: 20px;
  padding: 6px 14px 6px 34px;
  width: 220px;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  transition: var(--v-transition);
}

.v-search input:focus {
  outline: none;
  border-color: var(--v-gold);
  background: rgba(0, 0, 0, 0.5);
}

.v-btn-icon {
  background: transparent;
  border: 1px solid var(--v-border);
  border-radius: var(--v-radius-sm);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--v-text-muted);
  cursor: pointer;
  transition: var(--v-transition);
  padding: 0;
}

.v-btn-icon:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Create Box - Compact */
.v-create-box {
  background: #0d121c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--v-radius-md);
  padding: 12px 16px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: var(--v-transition);
  position: relative;
  overflow: hidden;
}

.v-create-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226, 179, 86, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.v-create-box:focus-within {
  border-color: rgba(226, 179, 86, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.v-create-box:focus-within::before {
  opacity: 1;
}

.v-create-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
}

.v-create-input::placeholder {
  color: var(--v-text-muted);
  font-weight: 400;
}

.v-create-body {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--v-text);
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  resize: none;
  min-height: 40px;
  display: none;
  margin-top: 8px;
  margin-bottom: 12px;
}

.v-create-toolbar {
  display: none;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--v-border-soft);
  padding-top: 10px;
}

.v-toolbar-inputs {
  display: flex;
  gap: 8px;
}

.v-select,
.v-tags-input {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--v-border);
  color: var(--v-text);
  font-size: 0.75rem;
  border-radius: 12px;
  padding: 4px 10px;
  outline: none;
  transition: var(--v-transition);
  font-family: 'Inter', sans-serif;
}

.v-select:focus,
.v-tags-input:focus {
  border-color: var(--v-gold);
}

.v-btn-primary {
  background: var(--v-gold);
  color: #000;
  border: none;
  border-radius: 12px;
  padding: 4px 16px;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--v-transition);
  font-family: 'Inter', sans-serif;
}

.v-btn-primary:hover {
  background: #cf9f45;
  transform: scale(1.02);
}

/* Grid - Compact */
.v-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.v-grid.list-view {
  grid-template-columns: 1fr;
  max-width: 800px;
  margin: 0 auto;
}

/* Card Elements - Compact */
.v-card {
  background: var(--v-bg-card);
  border: 1px solid var(--v-border);
  border-radius: var(--v-radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: var(--v-transition);
  position: relative;
  overflow: hidden;
  height: 160px;
  /* Fixed height for consistent dense look */
}

.v-card.list-view {
  height: auto;
}

.v-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  background: var(--v-bg-card-hover);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.v-card[data-pinned="true"] {
  border-top: 2px solid var(--v-gold);
}

.v-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.v-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  margin: 0;
  padding-right: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v-pin-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.3s;
  color: rgba(255, 255, 255, 0.15);
  padding: 2px;
  display: flex;
}

.v-pin-btn:hover {
  color: var(--v-gold);
}

.v-card[data-pinned="true"] .v-pin-btn {
  color: var(--v-gold);
}

.v-card-content {
  font-size: 0.85rem;
  color: var(--v-text-muted);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.v-card-content p {
  margin: 0 0 4px 0;
}

.v-card-content code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 0.75rem;
}

.v-card-footer {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--v-border-soft);
  padding-top: 8px;
}

.v-tags-wrap {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  overflow: hidden;
}

.v-tag {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--v-text);
  padding: 2px 6px;
  border-radius: 12px;
  font-weight: 500;
}

.v-date {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 500;
}

/* MODAL - Compact & Intact */
.v-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.v-modal {
  background: #0d121c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  max-width: 650px;
  border-radius: var(--v-radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  font-family: 'Inter', sans-serif;
}

.v-modal-inputs {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.v-modal-title {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
}

.v-modal-tabs {
  display: flex;
  gap: 8px;
}

.v-modal-tab {
  background: transparent;
  border: 1px solid var(--v-border);
  color: var(--v-text-muted);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: 0.2s;
  font-family: -apple-system, sans-serif;
}

.v-modal-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.v-modal-body,
.v-modal-preview {
  background: transparent;
  border: none;
  outline: none;
  color: var(--v-text);
  font-size: 0.9rem;
  line-height: 1.6;
  font-family: 'Inter', sans-serif;
  min-height: 250px;
  max-height: 60vh;
  overflow-y: auto;
  resize: none;
  width: 100%;
}

.v-modal-preview {
  display: none;
  background: rgba(0, 0, 0, 0.2);
  padding: 12px;
  border-radius: var(--v-radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.v-modal-toolbar {
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid var(--v-border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Color Dots (label picker) */
.v-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, outline 0.15s;
  flex-shrink: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.v-color-dot:hover {
  transform: scale(1.3);
}

/* Fix line-clamp standard property for compatibility */
.v-card-content {
  line-clamp: 4;
}

/* Responsive vault */
@media (max-width: 768px) {
  .v-layout {
    flex-direction: column;
    height: auto;
  }

  .v-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--v-border);
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
  }

  .v-nav-section {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .v-main {
    padding: 16px;
  }

  .v-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .v-title-wrap {
    flex-wrap: wrap;
  }

  .v-modal {
    max-width: 95vw;
    margin: 0 10px;
  }

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

/* ============================================================
   GLOBAL AJAX SEARCH MODAL (Phase 7)
   ============================================================ */
.search-trigger {
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: var(--transition);
  opacity: 0.8;
}

.search-trigger:hover {
  background: rgba(255, 255, 255, 0.1);
  opacity: 1;
}


.global-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 27, 42, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.global-search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-modal {
  width: 100%;
  max-width: 650px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  transform: translateY(20px) scale(0.98);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.global-search-overlay.active .search-modal {
  transform: translateY(0) scale(1);
}

.search-modal-header {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(var(--bg-surface-rgb), 0.95);
}

.modal-search-icon {
  width: 20px;
  height: 20px;
  color: var(--primary-color);
  margin-right: 16px;
}

#global-search-input {
  flex: 1;
  background: none;
  border: none;
  height: 70px;
  font-size: 1.25rem;
  color: var(--text);
  outline: none;
  font-family: inherit;
}

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

.search-shortcuts {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 16px;
  display: none;
}

@media (min-width: 768px) {
  .search-shortcuts {
    display: block;
  }
}

.search-shortcuts kbd {
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 3px 6px;
  font-family: monospace;
}

.search-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: var(--transition);
  margin-left: 12px;
}

.search-modal-close:hover {
  background: rgba(var(--text-rgb), 0.05);
  color: var(--text);
  transform: rotate(90deg);
}

.search-modal-close svg {
  width: 24px;
  height: 24px;
}

.search-modal-body {
  max-height: 60vh;
  overflow-y: auto;
  padding: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) transparent;
}

.search-modal-body::-webkit-scrollbar {
  width: 6px;
}

.search-modal-body::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

.search-item {
  display: flex;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  text-decoration: none;
  border: 1px solid transparent;
}

.search-item:hover,
.search-item:focus {
  background: var(--bg-body);
  border-color: var(--border-color);
  outline: none;
}

.search-item .s-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(var(--primary-color-rgb), 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  color: var(--primary-color);
  flex-shrink: 0;
}

.search-item .s-content {
  flex: 1;
  min-width: 0;
}

.search-item h4 {
  font-size: 1rem;
  color: var(--text);
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-body);
}

.search-item .s-badge {
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
  margin-left: 16px;
  white-space: nowrap;
}

.search-item .post-badge {
  background: rgba(var(--primary-color-rgb), 0.1);
  color: var(--primary-color);
}

.search-item .res-badge {
  background: rgba(201, 169, 97, 0.15);
  color: var(--gold);
}


/* ============================================================
   ARTICLE REACTIONS (Phase 7)
   ============================================================ */
.article-reactions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px 0;
  margin: 48px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

@media (max-width: 600px) {
  .article-reactions {
    flex-wrap: wrap;
    gap: 12px;
  }
}

.reaction-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 30px;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reaction-btn:hover {
  background: rgba(var(--primary-color-rgb), 0.05);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

.reaction-btn.loading {
  opacity: 0.7;
  pointer-events: none;
}

.reaction-btn.reacted {
  background: var(--primary-color);
  color: #000;
  border-color: var(--primary-color);
}

.reaction-btn.reacted svg {
  fill: #000;
  stroke: #000;
}

.pop-anim {
  animation: svgPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes svgPop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.5);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.search-loading .spinner {
  animation: spin 0.9s linear infinite;
}

/* ============================================================
   PHASE B4/B6/B8 — VAULT: A11y, Design, Mobile
   ============================================================ */

/* Screen reader only utility */
.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;
}

/* Card entrance animation */
.v-card {
  animation: vCardIn 0.22s ease forwards;
}

@keyframes vCardIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sidebar active indicator */
.v-nav-item {
  position: relative;
}

.v-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: #e2b356;
  border-radius: 0 2px 2px 0;
}

/* Vault Mobile */
@media (max-width:768px) {
  .v-layout {
    flex-direction: column;
  }

  .v-sidebar {
    width: 100%;
    height: auto;
    flex-direction: row;
    overflow-x: auto;
    padding: 8px 16px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .v-nav-section {
    display: flex;
    flex-direction: row;
    gap: 4px;
    align-items: center;
  }

  .v-nav-section h4 {
    display: none;
  }

  .v-nav-item {
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 6px 10px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .v-btn-icon,
  .v-pin-btn,
  .v-del-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .v-color-dot {
    width: 28px;
    height: 28px;
  }

  .v-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .v-modal {
    width: 100vw;
    height: 92dvh;
    max-height: 92dvh;
    border-radius: 16px 16px 0 0;
  }

  #kbToast {
    display: none !important;
  }
}

@media (max-width:640px) {
  .v-grid {
    grid-template-columns: 1fr !important;
  }

  .v-create-toolbar {
    flex-direction: column;
  }
}

/* ============================================================
   PHASE C5/C7/C10 — BLOG: A11y, Design, Mobile
   ============================================================ */

/* Reaction button states */
@keyframes reactionPop {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(1.25);
  }

  100% {
    transform: scale(1);
  }
}

.reaction-btn.reaction-pop {
  animation: reactionPop 0.35s ease;
}

.reaction-btn.reacted {
  opacity: 0.55;
  cursor: default;
}

/* <dialog> based lightbox */
dialog.lightbox-dialog {
  padding: 0;
  background: rgba(0, 0, 0, 0.95);
  border: none;
  border-radius: 8px;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

dialog.lightbox-dialog::backdrop {
  background: rgba(0, 0, 0, 0.85);
}

dialog.lightbox-dialog img {
  max-width: 100%;
  max-height: calc(90vh - 60px);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 1;
}

.lightbox-caption {
  color: #94a3b8;
  font-size: 0.85rem;
  padding: 8px 16px;
  text-align: center;
}

/* kbd style */
kbd {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  font-size: 0.8em;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
}

/* Code blocks horizontal scroll on mobile */
.code-block pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Blog Mobile */
@media (max-width:768px) {
  .reading-time-remaining {
    font-size: 0.7rem;
    padding: 3px 10px;
    right: 8px;
  }
}

@media (max-width:480px) {
  .share-bar {
    flex-wrap: wrap;
    gap: 6px;
  }

  .share-btn {
    font-size: 0.8rem;
    padding: 6px 10px;
  }

  dialog.lightbox-dialog {
    max-width: 100vw;
    max-height: 100dvh;
    border-radius: 0;
  }

  dialog.lightbox-dialog img {
    max-height: calc(100dvh - 70px);
  }
}

/* ── FINAL 3 FIXES TO REACH 100/100 ── */

/* Fix 1: dialog[open] display fix for all browsers */
dialog.lightbox-dialog[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Fix 2: Vault sidebar 320px (narrowest phones) */
@media (max-width:380px) {
  .v-nav-item {
    font-size: 0.73rem;
    padding: 4px 7px;
  }

  .v-grid {
    gap: 8px;
  }

  .v-card {
    padding: 12px;
  }
}

/* ============================================================
   RESOURCE CARD
   ============================================================ */
.resource-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition);
  overflow: hidden;
}

.resource-card:hover {
  border-color: rgba(201, 169, 97, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.res-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: rgba(201, 169, 97, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--gold);
}

.category-tag.res-category {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 0.65rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 8px;
  border-radius: 12px;
}

.res-title {
  font-size: 1.1rem;
  margin-bottom: 8px;
  line-height: 1.3;
  margin-top: 0;
}

.res-excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.res-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.res-size {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.res-download {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  padding: 6px 14px;
  background: rgba(201, 169, 97, 0.1);
  border-radius: 20px;
  transition: var(--transition);
}

.res-download:hover {
  background: var(--gold);
  color: var(--navy-deep);
}

.res-coming-soon {
  font-size: 0.8rem;
  color: var(--gold);
}

/* ============================================================
   TYPOGRAPHY PROSE
   ============================================================ */
.prose {
  color: var(--text-dark);
  max-width: 65ch;
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0 auto;
}

.prose p {
  margin-bottom: 1.5em;
}

.prose h2 {
  font-size: 1.75em;
  margin-top: 2em;
  margin-bottom: 1em;
  color: var(--navy-deep);
}

.prose h3 {
  font-size: 1.25em;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  color: var(--navy-deep);
}

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

.prose ul,
.prose ol {
  margin-top: 1em;
  margin-bottom: 1em;
  padding-left: 1.5em;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose blockquote {
  border-left: 4px solid var(--gold);
  padding-left: 1em;
  font-style: italic;
  color: var(--text-muted);
}

.prose img {
  border-radius: var(--radius-md);
  max-width: 100%;
  height: auto;
}

[data-theme="dark"] .prose {
  color: var(--text-dark);
}

[data-theme="dark"] .prose h2,
[data-theme="dark"] .prose h3 {
  color: #f8fafc;
}

/* ============================================================
   APPOINTMENT STEP UI
   ============================================================ */
.appointment-stepper {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 40px;
}

.appointment-stepper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
  z-index: 1;
}

.step-item {
  position: relative;
  z-index: 2;
  background: var(--bg-color);
  padding: 0 10px;
  text-align: center;
  color: var(--text-muted);
  font-weight: 500;
}

.step-item.active {
  color: var(--primary-color);
}

.step-item.completed {
  color: #10B981;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  transition: var(--transition);
}

.step-item.active .step-circle {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: #fff;
}

.step-item.completed .step-circle {
  border-color: #10B981;
  background: #10B981;
  color: #fff;
}

.step-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.step-content.active {
  display: block;
}

.timeslot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.time-btn {
  padding: 10px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.time-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.time-btn.selected {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon,
.empty-state .empty-state-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  opacity: 0.4;
}

.empty-state .empty-state-icon svg {
  width: 100%;
  height: 100%;
}

.empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.empty-state p {
  font-size: 0.9rem;
  max-width: 400px;
  margin: 0 auto;
}

.empty-state a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.empty-state-search {
  max-width: 400px;
  margin: 24px auto 0;
}

/* ============================================================
   RESOURCE GRID
   ============================================================ */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

@media (max-width: 480px) {
  .resource-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   APPOINTMENT STEPS & BOOKING PLACEHOLDER
   ============================================================ */
.appointment-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
  margin: 30px auto;
  max-width: 500px;
}

.appointment-steps .step-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.appointment-steps .step-number {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.appointment-steps .step-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-dark);
  padding-top: 6px;
}

.booking-iframe-placeholder {
  background: rgba(201, 169, 97, 0.05);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  margin-top: 30px;
  text-align: center;
}

.booking-iframe-placeholder .booking-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--gold);
  opacity: 0.6;
}

.booking-iframe-placeholder .booking-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.booking-iframe-placeholder .booking-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================================
   APPOINTMENT CARD
   ============================================================ */
.appointment-card-inner {
  text-align: center;
  padding: 40px 0;
}

.appointment-card-title {
  margin-bottom: 20px;
}

.appointment-card-desc {
  color: var(--text-muted);
  margin-bottom: 30px;
}

.appointment-contact-bar {
  margin-top: 40px;
  border-top: 1px solid var(--border);
  padding-top: 30px;
}

.appointment-contact-label {
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.appointment-contact-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================================================
   HEADER UTILITY WIDGETS
   ========================================================================== */
.header-actions {
  display: flex;
  align-items: center;
}

.header-wa-btn {
  border-color: rgba(37, 211, 102, 0.3) !important;
  color: #25D366 !important;
  margin-right: 8px;
}

.header-wa-btn:hover {
  background: rgba(37, 211, 102, 0.1) !important;
  border-color: #25D366 !important;
  transform: translateY(-2px);
}

.header-wa-btn svg {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   FLOATING SIDEBAR (GLASSMORPHISM)
   ========================================================================== */
.floating-sidebar {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 16px 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  width: 56px;
  overflow: hidden;
}

[data-theme="light"] .floating-sidebar {
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.floating-sidebar:hover {
  width: 180px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .floating-sidebar:hover {
  background: rgba(255, 255, 255, 0.7);
}

.floating-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.floating-link {
  display: flex;
  align-items: center;
  color: var(--text-body);
  text-decoration: none;
  padding: 10px;
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  width: 100%;
}

.floating-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  z-index: 2;
}

.floating-icon svg {
  width: 20px;
  height: 20px;
  transition: all 0.3s ease;
  stroke-width: 2;
}

.floating-text {
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.95rem;
  z-index: 2;
  margin-left: 14px;
}

.floating-sidebar:hover .floating-text {
  opacity: 1;
  transform: translateX(0);
}

.floating-link:hover,
.floating-link.active {
  background: rgba(201, 169, 97, 0.15);
  color: var(--gold);
}

.floating-link.active::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--gold);
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(201, 169, 97, 0.5);
}

[data-theme="light"] .floating-link:hover,
[data-theme="light"] .floating-link.active {
  background: rgba(201, 169, 97, 0.2);
}

.floating-link:hover .floating-icon svg,
.floating-link.active .floating-icon svg {
  stroke: var(--gold);
  stroke-width: 2;
}

@media (max-width: 1024px) {
  /* ── Bottom dock: premium pill design ── */
  .floating-sidebar {
    /* Reset desktop positioning */
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    bottom: env(safe-area-inset-bottom, 16px);
    bottom: max(16px, env(safe-area-inset-bottom));
    width: auto !important;
    max-width: calc(100vw - 24px);
    flex-direction: row;
    /* Premium dock card */
    background: rgba(10, 15, 28, 0.88);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    padding: 6px 10px !important;
    box-shadow:
      0 4px 24px rgba(0, 0, 0, 0.5),
      0 1px 0 rgba(255,255,255,0.05) inset,
      0 0 0 1px rgba(201, 169, 97, 0.06);
    overflow: visible;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  .floating-sidebar::-webkit-scrollbar {
    display: none;
  }

  /* Hover state doesn't make sense on touch — keep same size */
  .floating-sidebar:hover {
    width: auto !important;
    padding: 6px 10px !important;
    background: rgba(10, 15, 28, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  [data-theme="light"] .floating-sidebar {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow:
      0 4px 24px rgba(0, 0, 0, 0.12),
      0 1px 0 rgba(255,255,255,0.9) inset;
  }

  /* Menu: horizontal, no wrap */
  .floating-menu {
    flex-direction: row;
    gap: 2px;
    flex-wrap: nowrap;
    align-items: center;
  }

  /* Each link: icon + label stacked vertically */
  .floating-link {
    width: auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 14px;
    min-width: 44px;
    gap: 3px;
    transition: background 0.2s ease, color 0.2s ease;
  }

  /* Show labels on mobile tab bar */
  .floating-text {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
    font-size: 0.6rem;
    font-weight: 600;
    margin-left: 0;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
    transition: color 0.2s ease;
  }

  [data-theme="light"] .floating-text {
    color: rgba(0, 0, 0, 0.4);
  }

  /* Icon colors */
  .floating-icon svg {
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.2s ease, filter 0.2s ease;
  }

  [data-theme="light"] .floating-icon svg {
    color: rgba(0, 0, 0, 0.4);
  }

  /* Active / hover state — gold glow */
  .floating-link:hover,
  .floating-link.active {
    background: rgba(201, 169, 97, 0.15);
    color: var(--gold);
  }

  .floating-link:hover .floating-text,
  .floating-link.active .floating-text {
    color: var(--gold);
  }

  .floating-link:hover .floating-icon svg,
  .floating-link.active .floating-icon svg {
    color: var(--gold);
    filter: drop-shadow(0 0 6px rgba(201, 169, 97, 0.5));
  }

  [data-theme="light"] .floating-link:hover,
  [data-theme="light"] .floating-link.active {
    background: rgba(201, 169, 97, 0.18);
  }

  /* Remove left-border active indicator — not applicable here */
  .floating-link.active::before {
    display: none;
  }

  /* Give footer enough breathing room for the dock */
  .footer {
    padding-bottom: 88px;
  }
}

@media (max-width: 480px) {
  /* Tighter on phones */
  .floating-sidebar {
    max-width: calc(100vw - 16px);
    border-radius: 18px;
    padding: 5px 6px !important;
  }

  .floating-link {
    padding: 5px 7px;
    min-width: 38px;
    border-radius: 12px;
    gap: 2px;
  }

  .floating-icon svg {
    width: 16px;
    height: 16px;
  }

  .floating-text {
    font-size: 0.55rem;
  }

  .footer {
    padding-bottom: 80px;
  }
}

/* ==========================================================================
   10/10 PREMIUM TWEAKS: SELECTION, SCROLLBAR & ACCESSIBILITY FOCUS
   ========================================================================== */

/* 1. Brand-Matched Text Selection */
::selection {
  background: rgba(201, 169, 97, 0.4);
  /* soft translucent gold */
  color: inherit;
}

::-moz-selection {
  background: rgba(201, 169, 97, 0.4);
  color: inherit;
}

/* 2. Custom Webkit Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface-1);
}

::-webkit-scrollbar-thumb {
  background: rgba(201, 169, 97, 0.3);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* 3. Keyboard Outline Accessibility (Aesthetically pleasing) */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ============================================================
   READER DASHBOARD (moved from inline JS styles)
   ============================================================ */
.dashboard-bookmark-link {
  display: block;
  padding: 10px;
  background: rgba(201, 169, 97, 0.05);
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  color: inherit;
  text-decoration: none;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid rgba(201, 169, 97, 0.1);
  transition: background 0.2s;
}

.dashboard-bookmark-link:hover {
  background: rgba(201, 169, 97, 0.1);
}

.dashboard-continue-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: rgba(201, 169, 97, 0.05);
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  color: inherit;
  text-decoration: none;
  font-size: 0.95rem;
  border: 1px solid rgba(201, 169, 97, 0.1);
  transition: background 0.2s;
}

.dashboard-continue-link:hover {
  background: rgba(201, 169, 97, 0.1);
}

.dashboard-continue-link .cr-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 12px;
}

.dashboard-continue-link .cr-progress {
  font-size: 0.8rem;
  background: var(--gold);
  color: var(--navy-deep);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  flex-shrink: 0;
}

/* ============================================================
   ESTIMATED FINISH TOAST (moved from inline JS styles)
   ============================================================ */
.estimated-finish-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translate(-50%, 100px);
  background: rgba(10, 13, 20, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 12px 24px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  color: #fff;
  pointer-events: none;
}

.estimated-finish-toast.visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* ============================================================
   REACTION BUTTON ACTIVE STATE (moved from inline JS styles)
   ============================================================ */
.reaction-btn.reacted {
  background: rgba(201, 169, 97, 0.2);
  border-color: var(--gold);
}

/* ============================================================
   BOOKMARK BUTTON (moved from inline PHP styles)
   ============================================================ */
.bookmark-hero-btn {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 4px;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.bookmark-hero-btn:hover {
  opacity: 1;
}

/* ============================================================
   REACTIONS GRID & HEADING (moved from inline PHP styles)
   ============================================================ */
.reactions-heading {
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.reactions-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.react-count {
  font-weight: 600;
  opacity: 0.8;
  margin-left: 4px;
}

/* ============================================================
   FOOTER LEGAL LINKS
   ============================================================ */
.footer-legal-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-legal-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.footer-legal-links a:hover {
  color: var(--gold);
}

.footer-legal-sep {
  color: var(--text-light);
  font-size: 0.85rem;
}

/* ============================================================
   COOKIE CONSENT BANNER
   ============================================================ */
.cookie-consent {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 16px 24px;
  background: var(--navy-deep);
  border-top: 1px solid rgba(201, 169, 97, 0.2);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-consent-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-consent-inner p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.88rem;
  margin: 0;
  flex: 1;
  min-width: 250px;
  line-height: 1.5;
}

.cookie-consent-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.cookie-learn-more {
  color: var(--gold);
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.cookie-learn-more:hover {
  color: var(--gold-light);
}

.cookie-accept-btn {
  background: var(--gold);
  color: var(--navy-deep);
  border: none;
  padding: 10px 28px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.cookie-accept-btn:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201, 169, 97, 0.3);
}

@media (max-width: 600px) {
  .cookie-consent-inner {
    flex-direction: column;
    text-align: center;
  }

  .cookie-consent-actions {
    justify-content: center;
    width: 100%;
  }
}

/* ============================================================
   LIGHT MODE — COMPREHENSIVE OVERRIDES
   Hero, Navbar & Footer remain ALWAYS DARK (hardcoded).
   These rules fix every section that needs light treatment.
   ============================================================ */

/* ── Navbar: always dark, icons must stay white/visible ── */
[data-theme="light"] .navbar {
  background: transparent;
}

[data-theme="light"] .navbar.scrolled {
  background: rgba(12, 27, 42, 0.97);
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.18);
}

[data-theme="light"] .nav-logo {
  color: #FFFFFF;
}

[data-theme="light"] .nav-menu a {
  color: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .nav-menu a:hover {
  color: #FFFFFF;
}

[data-theme="light"] .nav-toggle span {
  background: #FFFFFF;
}

[data-theme="light"] .theme-toggle {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .theme-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201, 169, 97, 0.12);
}

[data-theme="light"] .search-trigger {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .search-trigger:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Show moon icon in light mode (to switch to dark) */
[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

/* ── Hero: already dark gradient — keep text white ── */
[data-theme="light"] .hero h1 {
  color: #FFFFFF;
}

[data-theme="light"] .hero-card-item-text .item-title {
  color: #FFFFFF;
}

[data-theme="light"] .btn-outline {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.35);
}

[data-theme="light"] .btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ── Footer: always dark — keep white text ── */
[data-theme="light"] .footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .footer-brand p {
  color: rgba(255, 255, 255, 0.45);
}

[data-theme="light"] .footer-links h4 {
  color: var(--gold);
}

[data-theme="light"] .footer-links a,
[data-theme="light"] .footer-links .widget ul li a {
  color: rgba(255, 255, 255, 0.55);
}

[data-theme="light"] .footer-links a:hover,
[data-theme="light"] .footer-links .widget ul li a:hover {
  color: var(--gold);
}

[data-theme="light"] .footer-bottom {
  border-top-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .footer-bottom a {
  color: var(--gold);
}

[data-theme="light"] .footer-socials .social-link {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .footer-socials .social-link:hover {
  background: rgba(201, 169, 97, 0.12);
  color: var(--gold);
  border-color: rgba(201, 169, 97, 0.35);
}

/* ── Body / General text — proper light mode contrast ── */
[data-theme="light"] body {
  background: var(--ivory);
  color: var(--text-body);
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
  color: var(--text-dark);
}

[data-theme="light"] p {
  color: var(--text-body);
}

/* ── Section backgrounds ── */
[data-theme="light"] .section-white {
  background: #FFFFFF;
}

[data-theme="light"] .section {
  background: var(--ivory);
}

[data-theme="light"] .section-dark {
  background: var(--navy-deep);
}

[data-theme="light"] .section-dark h2,
[data-theme="light"] .section-dark h3,
[data-theme="light"] .section-dark h4 {
  color: #FFFFFF;
}

[data-theme="light"] .section-dark p,
[data-theme="light"] .section-dark .subtitle {
  color: rgba(255, 255, 255, 0.70);
}

/* ── Bento Boxes / Skills Section ── */
[data-theme="light"] .bento-box {
  background: #FFFFFF;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .bento-box:hover {
  border-color: rgba(201, 169, 97, 0.35);
  box-shadow: var(--shadow-md);
}

[data-theme="light"] .bento-box-header {
  border-bottom-color: var(--border);
}

[data-theme="light"] .bento-box-title {
  color: var(--text-dark);
}

[data-theme="light"] .premium-chip {
  background: var(--gold-pale);
  border-color: rgba(201, 169, 97, 0.3);
  color: var(--text-dark);
}

[data-theme="light"] .premium-chip:hover {
  background: rgba(201, 169, 97, 0.18);
  border-color: var(--gold);
  color: var(--navy-deep);
}

/* ── Premium Cards ── */
[data-theme="light"] .premium-card {
  background: #FFFFFF;
  border-color: var(--border);
}

[data-theme="light"] .premium-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(201, 169, 97, 0.3);
}

/* ── Education Cards ── */
[data-theme="light"] .edu-card {
  background: #FFFFFF;
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--text-body);
}

[data-theme="light"] .edu-card .school {
  color: var(--text-body) !important;
}

[data-theme="light"] .edu-card h4,
[data-theme="light"] .edu-card-title {
  color: var(--text-dark) !important;
}

[data-theme="light"] .edu-card-header {
  border-bottom-color: var(--border) !important;
}

/* ── Timeline Cards ── */
[data-theme="light"] .timeline-card {
  background: #FFFFFF;
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .timeline-card h3 {
  color: var(--text-dark);
}

[data-theme="light"] .timeline-card p {
  color: var(--text-muted);
}

/* ── Publications ── */
[data-theme="light"] .pub-item {
  background: #FFFFFF;
  border-color: var(--border);
}

[data-theme="light"] .pub-item:hover {
  background: #FAFAF8;
}

[data-theme="light"] .pub-title {
  color: var(--text-dark);
}

/* ── Skill Category / Items ── */
[data-theme="light"] .skill-category {
  background: #FFFFFF;
  border-color: var(--border);
}

[data-theme="light"] .skill-item {
  border-color: var(--border);
  color: var(--text-body);
}

[data-theme="light"] .skill-item:hover {
  border-color: rgba(201, 169, 97, 0.4);
  background: var(--gold-pale);
}

/* ── Blog Cards ── */
[data-theme="light"] .blog-card {
  background: #FFFFFF;
  border-color: var(--border);
}

[data-theme="light"] .blog-card h3 {
  color: var(--text-dark);
}

[data-theme="light"] .blog-card .excerpt {
  color: var(--text-muted);
}

[data-theme="light"] .blog-featured-card {
  background: #FFFFFF;
  border-color: var(--border);
}

[data-theme="light"] .blog-featured-card h2 {
  color: var(--text-dark);
}

/* ── Contact Section ── */
[data-theme="light"] .contact-info h2 {
  color: var(--text-dark);
}

[data-theme="light"] .contact-info > p {
  color: var(--text-muted);
}

[data-theme="light"] .contact-item-text .value {
  color: var(--text-dark);
}

[data-theme="light"] .contact-icon {
  background: var(--gold-pale);
}

[data-theme="light"] .social-link {
  background: #FFFFFF;
  border-color: var(--border);
}

[data-theme="light"] .social-link svg {
  color: var(--text-muted);
}

/* ── Post / Blog Single ── */
[data-theme="light"] .blog-post-wrap {
  background: var(--ivory);
}

[data-theme="light"] .blog-post-main {
  background: #FFFFFF;
  border-color: var(--border);
}

[data-theme="light"] .toc-box,
[data-theme="light"] .sidebar-share {
  background: #FFFFFF;
  border-color: var(--border);
}

[data-theme="light"] .author-bio-card {
  background: #FFFFFF;
  border-color: var(--border);
}

[data-theme="light"] .author-bio-name {
  color: var(--text-dark);
}

[data-theme="light"] .author-bio-text {
  color: var(--text-muted);
}

[data-theme="light"] .post-stats-bar {
  background: #FFFFFF;
  border-color: var(--border);
}

[data-theme="light"] .post-nav-link {
  background: #FFFFFF;
  border-color: var(--border);
}

[data-theme="light"] .post-nav-link .nav-title {
  color: var(--text-dark);
}

[data-theme="light"] .post-nav-link .nav-arrow {
  color: var(--text-muted);
}

/* ── Share Bar ── */
[data-theme="light"] .share-bar {
  background: var(--gold-pale);
  border-color: rgba(201, 169, 97, 0.25);
}

[data-theme="light"] .share-label {
  color: var(--text-dark);
}

[data-theme="light"] .share-btn,
[data-theme="light"] .sidebar-share-btn {
  background: #FFFFFF;
  border-color: rgba(201, 169, 97, 0.3);
  color: var(--text-dark);
}

[data-theme="light"] .share-btn:hover,
[data-theme="light"] .sidebar-share-btn:hover {
  background: var(--navy-deep);
  color: #FFFFFF;
  border-color: var(--navy-deep);
}

/* ── Highlight Cards (About section) ── */
[data-theme="light"] .highlight-emergency,
[data-theme="light"] .highlight-mental,
[data-theme="light"] .highlight-patient,
[data-theme="light"] .highlight-learning {
  background: #FFFFFF !important;
  border-color: var(--border) !important;
  color: var(--text-dark) !important;
}

[data-theme="light"] .highlight-text {
  color: var(--text-dark);
}

/* ── Section education gradient ── */
[data-theme="light"] .section-edu {
  background: linear-gradient(180deg, var(--ivory) 0%, #F5F0E8 100%);
}

/* ── Contact form ── */
[data-theme="light"] .contact-form-wrapper input[type="text"],
[data-theme="light"] .contact-form-wrapper input[type="email"],
[data-theme="light"] .contact-form-wrapper textarea,
[data-theme="light"] .contact-form-wrapper select {
  background: var(--ivory);
  border-color: var(--border);
  color: var(--text-dark);
}

/* ── Blog filter bar ── */
[data-theme="light"] .blog-filter-bar a {
  background: #FFFFFF;
  border-color: var(--border);
  color: var(--text-muted);
}

[data-theme="light"] .blog-filter-bar a.active,
[data-theme="light"] .blog-filter-bar a:hover {
  background: var(--gold);
  color: var(--navy-deep);
  border-color: var(--gold);
}

/* ── Pagination ── */
[data-theme="light"] .pagination .page-numbers {
  background: #FFFFFF;
  border-color: var(--border);
  color: var(--text-dark);
}

[data-theme="light"] .pagination .page-numbers.current {
  background: var(--gold);
  color: var(--navy-deep);
  border-color: var(--gold);
}

/* ── Section headers ── */
[data-theme="light"] .section-header h2 {
  color: var(--text-dark);
}

[data-theme="light"] .section-header .subtitle {
  color: var(--text-muted);
}

/* ── Floating sidebar ── */
[data-theme="light"] .floating-link {
  color: var(--text-body);
}

[data-theme="light"] .floating-text {
  color: var(--text-body);
}

/* ── Course Cards ── */
[data-theme="light"] .course-card {
  background: #FFFFFF;
  border-color: var(--border);
  box-shadow: none;
}

[data-theme="light"] .course-card:hover {
  box-shadow: var(--shadow-md);
}

[data-theme="light"] .course-title {
  color: var(--text-dark);
}

[data-theme="light"] .course-provider {
  color: var(--text-muted);
}

/* ── TOC links ── */
[data-theme="light"] .toc-list a {
  color: var(--text-muted);
}

[data-theme="light"] .toc-list a:hover,
[data-theme="light"] .toc-list a.active {
  color: var(--gold);
  background: var(--gold-pale);
}

/* ── Search modal ── */
[data-theme="light"] .search-modal {
  background: #FFFFFF;
  border-color: var(--border);
}

[data-theme="light"] #global-search-input {
  color: var(--text-dark);
}

[data-theme="light"] .search-item:hover {
  background: var(--ivory);
  border-color: var(--border);
}

[data-theme="light"] .search-item h4 {
  color: var(--text-dark);
}

/* ── Prose (article content) ── */
[data-theme="light"] .prose {
  color: var(--text-dark);
}

[data-theme="light"] .prose h2,
[data-theme="light"] .prose h3 {
  color: var(--navy-deep);
}

/* ── Page Hero (blog listing, archive) ── */
[data-theme="light"] .page-hero {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy-mid) 100%);
}

[data-theme="light"] .page-hero h1 {
  color: #FFFFFF;
}

[data-theme="light"] .page-hero p {
  color: rgba(255, 255, 255, 0.80);
}

/* ── Section divider ── */
[data-theme="light"] .section-divider {
  opacity: 0.4;
}

/* ── About initials circle ── */
[data-theme="light"] .about-image-wrapper .about-initials-circle {
  border-color: rgba(201, 169, 97, 0.4);
}

/* ── Code blocks (always dark) ── */
[data-theme="light"] .code-block-wrapper {
  background: var(--navy-deep);
}

/* ── Btn outline dark (light mode body buttons) ── */
[data-theme="light"] .btn-outline-dark {
  color: var(--text-dark);
  border-color: var(--border);
}

[data-theme="light"] .btn-outline-dark:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ── Error 404 page ── */
[data-theme="light"] .error-404-section {
  background: var(--ivory);
}

[data-theme="light"] .error-404-title {
  color: var(--text-dark);
}

[data-theme="light"] .error-404-desc {
  color: var(--text-muted);
}

/* ── Skills section background ── */
[data-theme="light"] .section-skills {
  background: var(--ivory);
}

/* ── Edu-school & edu-subject (bento education cards) ── */
[data-theme="light"] .edu-school {
  color: var(--text-body);
}

[data-theme="light"] .edu-card-title {
  color: var(--text-dark);
}

[data-theme="light"] .edu-subject {
  color: var(--gold);
}

/* ── Premium badge (year range in edu cards) ── */
[data-theme="light"] .premium-badge {
  color: var(--gold);
  background: var(--gold-pale);
  border-color: rgba(201, 169, 97, 0.3);
}

/* ── Edu card header border fix ── */
[data-theme="light"] .edu-card-header {
  border-bottom-color: var(--border);
}

/* ── Edu icon background ── */
[data-theme="light"] .edu-icon {
  background: var(--gold-pale);
  color: var(--gold);
}

/* ── Resource cards in section-dark (always dark, keep white text) ── */
[data-theme="light"] .section-dark .resource-card h4,
[data-theme="light"] .section-dark .bento-box-title {
  color: #FFFFFF;
}

[data-theme="light"] .section-dark .bento-box {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

/* ── Contact section ── */
[data-theme="light"] .contact-quote {
  color: var(--text-muted);
}

[data-theme="light"] .contact-quote cite {
  color: var(--gold);
}

/* ── Highlight icons in light mode ── */
[data-theme="light"] .highlight-icon {
  background: var(--gold-pale);
}

/* ── Blog card body in light mode ── */
[data-theme="light"] .blog-card-body {
  background: #FFFFFF;
}

[data-theme="light"] .blog-card-meta {
  color: var(--text-muted);
}

[data-theme="light"] .read-more {
  color: var(--gold);
}

/* ── Current badge ── */
[data-theme="light"] .current-badge {
  color: #fff;
  background: var(--green-medical);
}

/* ── Timeline elements ── */
[data-theme="light"] .timeline-date {
  color: var(--text-muted);
}

[data-theme="light"] .institution {
  color: var(--text-body);
}

[data-theme="light"] .location {
  color: var(--text-muted);
}

/* ── About section ── */
[data-theme="light"] .about-tagline {
  color: var(--gold);
}

[data-theme="light"] .about-text p {
  color: var(--text-body);
}

/* ── Btn primary (stays consistent) ── */
[data-theme="light"] .btn-primary {
  background: var(--gold);
  color: var(--navy-deep);
}

[data-theme="light"] .btn-primary:hover {
  background: var(--gold-light);
}

/* ── Download CV btn (in hero, always dark bg) ── */
[data-theme="light"] .btn-cv {
  color: rgba(255, 255, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.25);
}

[data-theme="light"] .btn-cv:hover {
  color: var(--gold);
  border-color: var(--gold);
}

/* ============================================================
   BLOG & SINGLE POST — MOBILE OPTIMISATIONS
   All rules here are inside media queries.
   Desktop is completely unaffected.
   ============================================================ */

@media (max-width: 768px) {
  /* ── Blog listing section ── */
  .blog-listing-section {
    padding: 36px 0 64px;
  }

  /* ── Page hero (blog listing, archives) ── */
  .page-hero {
    padding: 76px 0 22px;
  }

  .page-hero h1 {
    font-size: clamp(1.4rem, 5vw, 1.85rem);
  }

  .page-hero p {
    font-size: 0.9rem;
  }

  /* ── Featured card ── */
  .blog-featured-card {
    margin-bottom: 36px;
    border-radius: var(--radius-md);
  }

  .blog-featured-card .featured-image {
    min-height: 200px;
  }

  .blog-featured-card .featured-body {
    padding: 22px 20px 24px;
  }

  .blog-featured-card h2 {
    font-size: clamp(1.15rem, 4vw, 1.4rem);
    margin-bottom: 10px;
  }

  .blog-featured-card .excerpt {
    font-size: 0.9rem;
    margin-bottom: 18px;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }

  .featured-footer {
    padding-top: 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* ── Category filter bar ── */
  .blog-filter-bar {
    gap: 8px;
    margin-bottom: 28px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 6px;
    scrollbar-width: none;
  }

  .blog-filter-bar::-webkit-scrollbar {
    display: none;
  }

  .blog-filter-bar a {
    flex-shrink: 0;
    padding: 7px 16px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  /* ── Search bar ── */
  .blog-search-bar {
    margin-bottom: 20px;
  }

  .blog-search-input {
    font-size: 0.92rem;
    padding: 12px 18px 12px 40px;
  }

  /* ── Section label (Featured / Most Popular / Latest) ── */
  .blog-section-label {
    margin-bottom: 20px;
  }

  /* "Most Popular" top margin */
  .blog-section-label[style*="margin-top: 60px"] {
    margin-top: 36px !important;
  }

  /* ── Popular scroll row cards ── */
  .popular-scroll-row a.popular-card {
    min-width: 240px !important;
    width: 240px !important;
    padding: 10px !important;
  }

  /* ── Blog cards: compact text-only on mobile ── */
  .blog-list-grid {
    gap: 10px;
  }

  /* Hide the image/pattern banner — saves ~155px per card */
  .blog-card-image {
    display: none;
  }

  /* Card: horizontal compact row */
  .blog-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border-radius: 12px;
    overflow: hidden;
    border-left: 3px solid rgba(201, 169, 97, 0.4);
    border-top: none;
    border-right: none;
    border-bottom: none;
    /* Add back a subtle box border */
    outline: 1px solid var(--border);
  }

  .blog-card-body {
    padding: 12px 14px;
    flex: 1;
  }

  .blog-card-body h3 {
    font-size: 0.97rem;
    line-height: 1.35;
    margin-bottom: 6px;
  }

  .blog-card-body .excerpt {
    font-size: 0.83rem;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
  }

  .blog-card-meta {
    font-size: 0.75rem;
    gap: 6px;
    margin-bottom: 8px;
  }

  .blog-card .read-more {
    font-size: 0.78rem;
    margin-top: 8px;
  }

  /* Featured card on home: keep image but shrink */
  .blog-card-featured .blog-card-image {
    display: block;
    height: 120px;
  }

  .blog-card-featured {
    flex-direction: column;
  }

  /* ── Related posts ── */
  .related-posts {
    padding: 40px 0;
  }

  .related-posts-header {
    margin-bottom: 20px;
  }

  .related-posts-header h2 {
    font-size: 1.3rem;
  }

  /* ── Single post — main content area ── */
  .blog-post-wrap {
    padding: 24px 0 48px;
  }

  .blog-post-layout {
    padding: 0 12px;
  }

  .blog-post-main {
    padding: 20px 16px 28px;
    border-radius: var(--radius-sm);
  }

  /* ── Post stats bar ── */
  .post-stats-bar {
    flex-wrap: wrap;
    border-radius: var(--radius-sm);
  }

  .post-stat-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
    flex-basis: 50%;
    padding: 10px 12px;
    font-size: 0.78rem;
  }

  .post-stat-item:last-child {
    border-bottom: none;
  }

  /* ── Prose content ── */
  .prose {
    font-size: 1rem;
    line-height: 1.8;
  }

  .prose h2 {
    font-size: 1.4rem;
    margin-top: 36px;
  }

  .prose h3 {
    font-size: 1.1rem;
    margin-top: 28px;
  }

  .prose blockquote {
    padding: 14px 18px;
    font-size: 1.05rem;
  }

  /* ── Inline share bar ── */
  .share-bar {
    padding: 14px 16px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .share-btn {
    flex: 1 1 auto;
    justify-content: center;
    padding: 8px 12px;
    font-size: 0.78rem;
  }

  /* ── Pagination ── */
  .pagination {
    margin-top: 32px;
    gap: 6px;
  }

  .pagination .page-numbers {
    width: 38px;
    height: 38px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  /* ── Blog listing tighter on small phones ── */
  .blog-listing-section {
    padding: 28px 0 56px;
  }

  .page-hero {
    padding: 68px 0 18px;
  }

  .page-hero h1 {
    font-size: clamp(1.2rem, 6vw, 1.55rem);
  }

  .blog-featured-card .featured-image {
    min-height: 170px;
  }

  .blog-featured-card .featured-body {
    padding: 18px 16px 20px;
  }

  .blog-featured-card h2 {
    font-size: 1.1rem;
  }

  .blog-card-body {
    padding: 14px 14px 16px;
  }

  .blog-post-main {
    padding: 16px 14px 24px;
  }

  .prose h2 {
    font-size: 1.25rem;
  }

  .prose h3 {
    font-size: 1rem;
  }

  .share-bar {
    flex-direction: column;
  }

  .share-btn {
    width: 100%;
  }

  .related-posts {
    padding: 30px 0;
  }

  .pagination .page-numbers {
    width: 34px;
    height: 34px;
    font-size: 0.8rem;
  }
}

/* ============================================================
   CLINICAL TOOLS PAGE — DESKTOP & MOBILE OPTIMISATIONS
   ============================================================ */

.tools-compact-header {
  padding: 140px 0 40px;
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy-mid) 100%);
  text-align: center;
  color: var(--white);
}

.tools-compact-header h1 {
  color: var(--white);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 12px;
}

.tools-compact-header h1 .gold {
  color: var(--gold);
  font-style: italic;
}

.tools-compact-header .subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Light mode overrides for header */
[data-theme="light"] .tools-compact-header h1 {
  color: var(--white); /* Keep white in light mode to match hero */
}

@media (max-width: 1024px) {
  /* ── Wrapper: stacked layout ── */
  .tools-wrapper {
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    display: flex !important;
    gap: 0 !important;
  }

  /* ── Sidebar becomes horizontal scroll pill-bar ── */
  .tools-sidebar {
    position: sticky;
    top: 70px;
    z-index: 100;
    /* Flat/clean — no floating shadow on scroll */
    background: var(--ivory);
    border-bottom: 1px solid var(--border);
    border-top: none;
    border-left: none;
    border-right: none;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 10px 16px 0;
    width: 100%;
    box-sizing: border-box;
    /* Thin separator line instead of glow */
    outline: none;
  }

  [data-theme="dark"] .tools-sidebar {
    background: var(--navy-deep);
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }

  .tools-sidebar-header {
    display: none;
  }

  .tools-search-wrap {
    margin-bottom: 8px;
  }

  .tools-search-wrap input.tools-search {
    font-size: 0.88rem;
    padding: 9px 12px 9px 36px;
    border-radius: 50px;
  }

  /* Cat list → horizontal scrollable row */
  .tools-cat-list {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 6px;
    padding-bottom: 10px;
    flex-wrap: nowrap;
  }

  .tools-cat-list::-webkit-scrollbar {
    display: none;
  }

  /* All category buttons inline */
  .tools-cat-btn {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 6px 14px !important;
    font-size: 0.8rem !important;
    border-radius: 50px !important;
    min-width: auto !important;
  }

  /* Hide the nested sub-links (not needed in pill-bar mode) */
  .tools-cat-tools {
    display: none !important;
  }

  /* ── Tools main fills full width ── */
  .tools-main {
    width: 100%;
    padding: 0;
  }

  /* ── Tools grid: 2 columns on tablet ── */
  .tools-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
  }

  .tool-card-wide {
    grid-column: span 2 !important;
  }
}

@media (max-width: 768px) {
  /* ── Page header ── */
  .tools-compact-header {
    padding: 80px 0 18px !important;
    text-align: center;
  }

  .tools-compact-header h1 {
    font-size: clamp(1.5rem, 6vw, 2rem) !important;
    margin-bottom: 8px;
  }

  .tools-compact-header .subtitle {
    font-size: 0.88rem !important;
    margin-bottom: 0;
  }

  /* ── Section padding ── */
  section.section.pt-0#calculators {
    padding-top: 0 !important;
    padding-bottom: 60px;
  }

  /* ── Sidebar: more compact on phone ── */
  .tools-sidebar {
    top: 64px;
    padding: 8px 12px 0;
  }

  .tools-search-wrap {
    margin-bottom: 6px;
  }

  /* ── Tools grid: single column on phone ── */
  .tools-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .tool-card-wide {
    grid-column: span 1 !important;
  }

  /* ── Tool cards (bento-box): compact ── */
  .tool-card.bento-box {
    padding: 18px 16px !important;
    border-radius: 14px !important;
    gap: 12px !important;
  }

  .tool-fav-btn {
    top: 12px !important;
    right: 12px !important;
    width: 28px !important;
    height: 28px !important;
  }

  .tool-tag {
    font-size: 0.68rem !important;
    padding: 3px 10px !important;
    margin-bottom: 6px !important;
  }

  .tool-card h3 {
    font-size: clamp(1rem, 4vw, 1.2rem) !important;
    margin-bottom: 4px !important;
  }

  .tool-desc {
    font-size: 0.85rem !important;
    margin-bottom: 14px !important;
    line-height: 1.5 !important;
  }

  /* ── Calc form: single column ── */
  .calc-form-row {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .calc-form-group {
    margin-bottom: 10px !important;
  }

  .calc-form-group label {
    font-size: 0.75rem !important;
    margin-bottom: 4px !important;
  }

  .calc-form-group input,
  .calc-form-group select {
    padding: 9px 12px !important;
    font-size: 0.9rem !important;
    border-radius: 8px !important;
  }

  /* ── Calc button ── */
  .calc-btn {
    padding: 11px 20px !important;
    font-size: 0.88rem !important;
    width: 100%;
    border-radius: 10px !important;
  }

  .calc-reset-btn {
    font-size: 0.78rem !important;
    padding: 6px 14px !important;
  }

  .calc-note {
    font-size: 0.75rem !important;
    padding: 8px 10px !important;
    margin-top: 10px !important;
    line-height: 1.45;
  }

  /* ── Score display ── */
  .calc-score-display {
    padding: 16px !important;
    margin-top: 14px !important;
    border-radius: 10px !important;
  }

  .calc-score-number {
    font-size: 2.4rem !important;
  }

  .calc-score-interp {
    font-size: 0.85rem !important;
  }

  /* ── Calc result box ── */
  .calc-result {
    padding: 14px !important;
    font-size: 0.9rem !important;
    border-radius: 10px !important;
    margin-top: 12px !important;
  }

  /* ── Checkbox score items: tighter ── */
  .calc-check-item {
    padding: 9px 12px !important;
    gap: 10px !important;
    border-radius: 8px !important;
  }

  .calc-check-label {
    font-size: 0.83rem !important;
    line-height: 1.4;
  }

  .calc-check-pts {
    font-size: 0.72rem !important;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* ── GCS grid: stack columns ── */
  .gcs-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .gcs-col-header {
    font-size: 0.8rem !important;
    margin-bottom: 6px !important;
  }

  /* ── Apache/Bishop grid ── */
  .apache-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* ── Drug reference table: scrollable ── */
  .drug-ref-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    font-size: 0.8rem !important;
    border-radius: 8px;
  }

  .drug-ref-table th,
  .drug-ref-table td {
    padding: 8px 10px !important;
    font-size: 0.78rem !important;
  }

  /* ── Calc tabs ── */
  .calc-tabs {
    gap: 6px !important;
    flex-wrap: wrap;
  }

  .calc-tab {
    padding: 7px 14px !important;
    font-size: 0.8rem !important;
    border-radius: 8px !important;
  }

  /* ── Electrolyte tab contents ── */
  .calc-tab-content {
    padding: 0 !important;
  }

  /* ── Checkbox label ── */
  .calc-checkbox-label {
    font-size: 0.85rem !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
  }

  /* ── History section (if present) ── */
  .tool-history-panel {
    padding: 14px 12px !important;
    font-size: 0.82rem !important;
  }

  /* ── Category toggle active indicator ── */
  .tools-cat-btn.active {
    background: var(--gold) !important;
    color: var(--navy-deep) !important;
    border-color: var(--gold) !important;
  }

  /* ── Prevent content touching the sticky sidebar ── */
  .tools-main {
    padding-top: 8px;
  }
}

@media (max-width: 480px) {
  .tools-compact-header {
    padding: 72px 0 14px !important;
  }

  .tools-compact-header h1 {
    font-size: clamp(1.3rem, 7vw, 1.65rem) !important;
  }

  /* Sidebar top offset reduced for smaller navbar */
  .tools-sidebar {
    top: 58px;
  }

  .tool-card.bento-box {
    padding: 14px 13px !important;
    border-radius: 12px !important;
  }

  .tool-card h3 {
    font-size: 1rem !important;
  }

  .tool-desc {
    font-size: 0.82rem !important;
  }

  .calc-score-number {
    font-size: 2rem !important;
  }

  .calc-form-group input,
  .calc-form-group select {
    padding: 8px 10px !important;
    font-size: 0.88rem !important;
  }

  .calc-btn {
    padding: 10px 16px !important;
    font-size: 0.85rem !important;
  }

  .drug-ref-table th,
  .drug-ref-table td {
    padding: 7px 8px !important;
    font-size: 0.75rem !important;
  }
}

/* ============================================================
   ACCESSIBILITY & ANIMATIONS (Phase 1 & 3 Updates)
   ============================================================ */

/* Accessible Gold for Small Text on Dark Backgrounds */
[data-theme="dark"] .hero-badge,
[data-theme="dark"] .post-hero-badge,
[data-theme="dark"] .toc-box-title,
[data-theme="dark"] .sidebar-share-title {
  color: var(--gold-accessible);
}

/* Global visible focus ring — keyboard navigation */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Remove for mouse users only */
:focus:not(:focus-visible) {
  outline: none;
}

/* Floating Animation for Hero Visual Card */
.hero-visual-card {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

/* Trust Badges */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.trust-badge-green {
  background: rgba(45,122,79,0.15);
  color: #34D399;
  border: 1px solid rgba(45,122,79,0.3);
}
.trust-badge-gold {
  background: rgba(201,169,97,0.15);
  color: var(--gold);
  border: 1px solid rgba(201,169,97,0.3);
}