/* ===== DESIGN TOKENS ===== */
:root,
[data-theme="light"] {
  --paper: #fffef7;
  --cream: #faf8f5;
  --ink: #1a1a2e;
  --muted: #6b6b7b;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --success: #4db8a8;
  --warning: #ff6b6b;
  --surface: var(--paper);
  --card-bg: #ffffff;
  --card-border: rgba(26, 26, 46, 0.08);
  --border-color: rgba(26, 26, 46, 0.09);
  --nav-bg: rgba(255, 254, 247, 0.88);
  --dropdown-bg: rgba(255, 255, 255, 0.96);
  --dropdown-hover: rgba(99, 102, 241, 0.08);
  --dropdown-border: rgba(26, 26, 46, 0.08);
  --input-bg: #ffffff;
  --input-border: rgba(26, 26, 46, 0.12);
  --tag-bg: rgba(26, 26, 46, 0.05);
  --code-bg: #f4f4f8;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 2px 8px rgba(26, 26, 46, 0.06);
  --shadow-md: 0 4px 16px rgba(26, 26, 46, 0.08);
  --shadow-lg: 0 8px 32px rgba(26, 26, 46, 0.12);
  --shadow-accent: 0 4px 20px rgba(99, 102, 241, 0.25);
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --max-width: 1200px;
  --nav-height: 72px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --paper: #0c0d14;
  --cream: #121320;
  --ink: #f4f4fa;
  --muted: #9c9cb4;
  --accent: #818cf8;
  --accent-hover: #6366f1;
  --success: #34d399;
  --warning: #f87171;
  --surface: var(--paper);
  --card-bg: #171828;
  --card-border: rgba(255, 255, 255, 0.08);
  --border-color: rgba(255, 255, 255, 0.09);
  --nav-bg: rgba(12, 13, 20, 0.88);
  --dropdown-bg: rgba(20, 21, 36, 0.96);
  --dropdown-hover: rgba(129, 140, 248, 0.12);
  --dropdown-border: rgba(255, 255, 255, 0.1);
  --input-bg: #18192a;
  --input-border: rgba(255, 255, 255, 0.14);
  --tag-bg: rgba(255, 255, 255, 0.08);
  --code-bg: #1b1c2e;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.55);
  --shadow-accent: 0 4px 20px rgba(129, 140, 248, 0.3);
}

/* Smooth theme switching */
body,
.lw-nav,
.lw-card,
.pillar-card,
.project-card,
.blog-card,
.tool-card,
.concept-card,
.about-card,
.newsletter-card,
.mobile-menu,
.nav-dropdown-menu,
.nav-nested-menu {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--surface);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ===== UTILITY CLASSES ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.text-accent {
  color: var(--accent);
}
.text-muted {
  color: var(--muted);
}
.text-success {
  color: var(--success);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.badge-accent {
  background: rgba(99, 102, 241, 0.08);
  color: var(--accent);
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.badge-success {
  background: rgba(77, 184, 168, 0.08);
  color: var(--success);
  border: 1px solid rgba(77, 184, 168, 0.15);
}

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}
h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
}
h3 {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
}
h4 {
  font-size: 1.2rem;
}
h5 {
  font-size: 1rem;
}
h6 {
  font-size: 0.875rem;
}

p {
  color: var(--muted);
  line-height: 1.7;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 12px;
}

.section-title {
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.1rem;
  max-width: 600px;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header .section-subtitle {
  margin: 0 auto;
}

/* ===== BUTTONS ===== */
.lw-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  outline: none;
  font-size: 0.95rem;
  padding: 12px 24px;
}

.lw-btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}

.lw-btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.35);
  color: #fff;
}

.lw-btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border-color);
}

.lw-btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--dropdown-hover);
  transform: translateY(-2px);
}

.lw-btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.lw-btn-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
}

.btn-icon {
  transition: transform var(--transition);
}

.lw-btn:hover .btn-icon {
  transform: translateX(3px);
}

/* ===== NAVIGATION ===== */
.lw-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: all var(--transition);
}

.lw-nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.nav-brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  font-family: var(--font-display);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: all var(--transition);
  cursor: pointer;
}

.nav-link:hover {
  color: var(--ink);
  background: var(--dropdown-hover);
}

.nav-link.active {
  color: var(--accent);
  font-weight: 600;
}

[data-theme="dark"] .nav-link.active {
  color: #fff;
  background: rgba(129, 140, 248, 0.15);
  border-radius: var(--radius-sm);
}

/* ===== NESTED MULTILEVEL DROPDOWNS ===== */
.nav-item-dropdown {
  position: relative;
}

.dropdown-chevron {
  transition: transform var(--transition);
  opacity: 0.6;
}

.nav-item-dropdown:hover > .nav-dropdown-trigger .dropdown-chevron,
.nav-item-dropdown.open > .nav-dropdown-trigger .dropdown-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

/* 1st Level Dropdown Menu */
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  background: var(--dropdown-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--dropdown-border);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.22s;
  z-index: 1100;
  pointer-events: none;
}

/* Invisible bridge to keep hover active across the gap */
.nav-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

.nav-item-dropdown:hover > .nav-dropdown-menu,
.nav-item-dropdown.open > .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.dropdown-header {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 6px 12px 4px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  transition: all 0.18s ease;
  cursor: pointer;
}

.dropdown-item:hover {
  background: var(--dropdown-hover);
  color: var(--accent);
}

.dropdown-item-icon {
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
}

.dropdown-item-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.dropdown-item-title {
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.25;
}

.dropdown-item-desc {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.25;
  margin-top: 2px;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 6px 8px;
}

.dropdown-external-icon {
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: auto;
  opacity: 0.7;
  transition: transform var(--transition), color var(--transition);
}

.dropdown-item:hover .dropdown-external-icon {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* 2nd Level Nested Flyout Dropdown */
.nav-nested-dropdown {
  position: relative;
}

.nested-trigger {
  justify-content: space-between;
}

.nested-chevron {
  opacity: 0.6;
  transition: transform var(--transition);
  margin-left: auto;
}

.nav-nested-dropdown:hover > .nested-trigger .nested-chevron,
.nav-nested-dropdown.open > .nested-trigger .nested-chevron {
  transform: translateX(3px);
  opacity: 1;
}

.nav-nested-menu {
  position: absolute;
  top: -8px;
  left: calc(100% + 8px);
  min-width: 250px;
  background: var(--dropdown-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--dropdown-border);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-8px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.22s;
  z-index: 1101;
  pointer-events: none;
}

/* Invisible bridge to keep hover active across the gap */
.nav-nested-menu::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -10px;
  width: 10px;
}

.nav-nested-dropdown:hover > .nav-nested-menu,
.nav-nested-dropdown.open > .nav-nested-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

/* ===== THEME TOGGLE BUTTON — POLISHED ===== */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--ink);
  cursor: pointer;
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.theme-toggle-btn:hover {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.1) translateY(-1px);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb, 59,130,246), 0.15), var(--shadow-md, var(--shadow));
}

.theme-toggle-btn:active {
  transform: scale(0.95);
}

/* Icon wrapper: both icons always in DOM, we animate position */
.theme-toggle-btn .theme-icon-moon,
.theme-toggle-btn .theme-icon-sun {
  position: absolute;
  transition:
    opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Light mode (default): show moon, hide sun */
[data-theme="light"] .theme-icon-sun,
:root:not([data-theme="dark"]) .theme-icon-sun {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
  pointer-events: none;
}
[data-theme="light"] .theme-icon-moon,
:root:not([data-theme="dark"]) .theme-icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Dark mode: show sun, hide moon */
[data-theme="dark"] .theme-icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}
[data-theme="dark"] .theme-icon-moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
  pointer-events: none;
}

/* Spin burst on click — added via JS class */
.theme-toggle-btn.is-switching .theme-icon-sun,
.theme-toggle-btn.is-switching .theme-icon-moon {
  transition:
    opacity 0.25s ease,
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-mobile-toggle {
  display: none;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 1.25rem;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.nav-mobile-toggle:hover {
  background: var(--dropdown-hover);
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== MOBILE MENU ===== */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--paper);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1200;
  padding: 20px 20px 32px;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.mobile-menu.open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 8px;
}

.mobile-theme-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.mobile-menu .nav-link {
  font-size: 1.05rem;
  padding: 12px 14px;
}

/* Mobile Accordion */
.mob-dropdown {
  display: flex;
  flex-direction: column;
}

.mob-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-align: left;
}

.mob-dropdown-toggle:hover,
.mob-dropdown-toggle.active {
  background: var(--dropdown-hover);
  color: var(--ink);
}

.mob-chevron {
  transition: transform var(--transition);
  opacity: 0.6;
}

.mob-dropdown.open > .mob-dropdown-toggle .mob-chevron {
  transform: rotate(180deg);
}

.mob-submenu {
  display: none;
  flex-direction: column;
  padding-left: 12px;
  gap: 4px;
  margin-top: 4px;
  border-left: 2px solid var(--border-color);
  margin-left: 14px;
}

.mob-dropdown.open > .mob-submenu {
  display: flex;
}

.mob-submenu-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.92rem;
  color: var(--muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.mob-submenu-link:hover {
  color: var(--accent);
  background: var(--dropdown-hover);
}

/* Mobile nested 2nd level */
.mob-nested-dropdown {
  display: flex;
  flex-direction: column;
}

.mob-nested-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-align: left;
}

.mob-nested-toggle:hover {
  color: var(--ink);
  background: var(--dropdown-hover);
}

.mob-nested-dropdown.open > .mob-nested-toggle .mob-chevron {
  transform: rotate(180deg);
}

.mob-nested-menu {
  display: none;
  flex-direction: column;
  padding-left: 10px;
  gap: 2px;
  margin-top: 2px;
  border-left: 2px solid var(--border-color);
  margin-left: 10px;
}

.mob-nested-dropdown.open > .mob-nested-menu {
  display: flex;
}

.mob-nested-link {
  padding: 6px 10px;
  font-size: 0.85rem;
  color: var(--muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.mob-nested-link:hover {
  color: var(--accent);
}

.mobile-menu-socials {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

/* ===== HERO SECTION ===== */
.lw-hero {
  padding: calc(var(--nav-height) + 60px) 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-bg-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(
      circle at 20% 50%,
      rgba(99, 102, 241, 0.05) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(77, 184, 168, 0.04) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 50% 80%,
      rgba(99, 102, 241, 0.03) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.hero-grid-dots {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(
    circle,
    rgba(26, 26, 46, 0.04) 1px,
    transparent 1px
  );
  background-size: 40px 40px;
  pointer-events: none;
  opacity: 0.5;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  max-width: 560px;
}

.hero-badge {
  margin-bottom: 24px;
}

.hero-title {
  margin-bottom: 24px;
}

.hero-title .highlight {
  position: relative;
  display: inline-block;
}

.hero-title .highlight::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  height: 12px;
  background: rgba(99, 102, 241, 0.15);
  border-radius: 4px;
  z-index: -1;
}

.hero-description {
  font-size: 1.15rem;
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 40px;
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat-number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.hero-stat-label {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Hero Visual */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-card-stack {
  position: relative;
  width: 100%;
  max-width: 480px;
}

.hero-floating-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--card-border);
}

.hero-code-window {
  margin-bottom: 24px;
}

.code-window-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.code-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-dot-red {
  background: var(--warning);
}
.code-dot-yellow {
  background: #fbbf24;
}
.code-dot-green {
  background: var(--success);
}

.code-content {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--ink);
  background: var(--cream);
  padding: 20px;
  border-radius: var(--radius-sm);
}

.code-keyword {
  color: var(--accent);
  font-weight: 500;
}
.code-string {
  color: var(--success);
}
.code-comment {
  color: var(--muted);
  font-style: italic;
}

.hero-mini-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mini-card {
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mini-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.mini-card-icon.accent {
  background: rgba(99, 102, 241, 0.1);
}
.mini-card-icon.success {
  background: rgba(77, 184, 168, 0.1);
}

.mini-card-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
}

.mini-card-sub {
  font-size: 0.7rem;
  color: var(--muted);
}

/* Floating elements */
.hero-float {
  position: absolute;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--card-border);
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: float 3s ease-in-out infinite;
}

.hero-float-1 {
  top: -10px;
  right: -20px;
  animation-delay: 0s;
}

.hero-float-2 {
  bottom: 40px;
  left: -30px;
  animation-delay: 1.5s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ===== SECTIONS (BANDS) & PAGE HERO BANNERS ===== */
.lw-band {
  padding: 80px 0;
}

.lw-band-cream {
  background: var(--cream);
}

.page-hero-banner,
.page-hero {
  padding: calc(var(--nav-height) + 3.5rem) 0 3.5rem !important;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* ===== TESTIMONIAL CARDS V2 ===== */
.testimonial-card-v2:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.35) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12) !important;
}

/* ===== FEATURE CARDS ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.lw-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 36px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.lw-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99, 102, 241, 0.15);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 24px;
}

.card-icon-accent {
  background: rgba(99, 102, 241, 0.08);
  color: var(--accent);
}

.card-icon-success {
  background: rgba(77, 184, 168, 0.08);
  color: var(--success);
}

.card-icon-warning {
  background: rgba(255, 107, 107, 0.08);
  color: var(--warning);
}

.lw-card h3 {
  margin-bottom: 12px;
}

.lw-card p {
  font-size: 0.95rem;
  line-height: 1.7;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
  transition: all var(--transition);
}

.card-link:hover {
  gap: 10px;
}

/* ===== COURSE CARDS ===== */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.course-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.course-thumb {
  height: 200px;
  position: relative;
  overflow: hidden;
}

.course-thumb-bg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.course-thumb-bg.bg-accent {
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.1),
    rgba(99, 102, 241, 0.05)
  );
}

.course-thumb-bg.bg-success {
  background: linear-gradient(
    135deg,
    rgba(77, 184, 168, 0.1),
    rgba(77, 184, 168, 0.05)
  );
}

.course-thumb-bg.bg-warning {
  background: linear-gradient(
    135deg,
    rgba(255, 107, 107, 0.1),
    rgba(255, 107, 107, 0.05)
  );
}

.course-tag {
  position: absolute;
  top: 16px;
  left: 16px;
}

.course-body {
  padding: 24px;
}

.course-body h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.course-body p {
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.course-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.course-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ===== TOOLS SECTION ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.tool-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.15);
}

.tool-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.tool-card h4 {
  margin-bottom: 6px;
}

.tool-card p {
  font-size: 0.8rem;
}

/* ===== TESTIMONIALS ===== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.testimonial-stars {
  color: #fbbf24;
  font-size: 1rem;
  margin-bottom: 16px;
  letter-spacing: 2px;
}

.testimonial-text {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 24px;
  color: var(--ink);
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.testimonial-info {
  display: flex;
  flex-direction: column;
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}

.testimonial-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}

.testimonial-role {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ===== CTA BANNER ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--ink) 0%, #2a2a4a 100%);
  border-radius: var(--radius-lg);
  padding: 80px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(
      circle at 30% 50%,
      rgba(99, 102, 241, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 70% 30%,
      rgba(77, 184, 168, 0.1) 0%,
      transparent 40%
    );
  pointer-events: none;
}

.cta-banner * {
  position: relative;
  z-index: 1;
}

.cta-banner h2 {
  color: #fff;
  margin-bottom: 16px;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto 36px;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.lw-btn-white {
  background: #fff;
  color: var(--ink);
}

.lw-btn-white:hover {
  background: #f0f0f0;
  box-shadow: var(--shadow-lg);
}

.lw-btn-ghost-white {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.lw-btn-ghost-white:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

/* ===== NEWSLETTER ===== */
.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  padding: 14px 20px;
  border-radius: var(--radius);
  border: 2px solid var(--input-border);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--input-bg);
  color: var(--ink);
  transition: all var(--transition);
  outline: none;
}

.newsletter-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.newsletter-input::placeholder {
  color: var(--muted);
}

/* ===== FOOTER ===== */
.lw-footer {
  background: radial-gradient(circle at top center, #1a1a2e, #0f0f1a);
  color: rgba(255, 255, 255, 0.7);
  padding: 80px 0 40px;
  position: relative;
}

[data-theme="dark"] .lw-footer {
  background: var(--cream);
}

.footer-top-border {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.7;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.footer-brand .nav-brand-icon {
  background: linear-gradient(135deg, var(--accent), #3b82f6);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.footer-desc {
  font-size: 1rem;
  line-height: 1.8;
  max-width: 380px;
  margin-bottom: 30px;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.social-link {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: rgba(255, 255, 255, 0.7);
}

.social-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.4);
}

.footer-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

[data-theme="dark"] .footer-heading,
[data-theme="dark"] .footer-brand {
  color: var(--ink);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-link {
  font-size: 0.95rem;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  position: relative;
  width: fit-content;
}

.footer-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: var(--accent);
  transition: width 0.3s ease;
}

.footer-link:hover {
  color: #fff;
}
.footer-link:hover::after {
  width: 100%;
}
[data-theme="dark"] .footer-link:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 40px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

[data-theme="dark"] .footer-bottom {
  border-top: 1px dashed var(--border-color);
}

.footer-bottom-links {
  display: flex;
  gap: 30px;
}

.footer-bottom-links a {
  transition: color var(--transition);
}

.footer-bottom-links a:hover {
  color: #fff;
}
[data-theme="dark"] .footer-bottom-links a:hover {
  color: var(--accent);
}

/* ===== SCROLL TO TOP ===== */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-accent);
  transition: all var(--transition);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  z-index: 900;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  background: var(--accent-hover);
  transform: translateY(-3px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-description {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .hero-card-stack {
    max-width: 420px;
  }

  .features-grid,
  .courses-grid,
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-mobile-toggle {
    display: inline-flex;
  }

  .theme-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .lw-band {
    padding: 60px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .features-grid,
  .courses-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta-banner {
    padding: 50px 30px;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .hero-float {
    display: none;
  }

  .hero-stats {
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.2rem;
  }

  .hero-mini-cards {
    grid-template-columns: 1fr;
  }
}

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 {
  transition-delay: 0.1s;
}
.fade-in-delay-2 {
  transition-delay: 0.2s;
}
.fade-in-delay-3 {
  transition-delay: 0.3s;
}
.fade-in-delay-4 {
  transition-delay: 0.4s;
}

/* ===== TYPING CURSOR ===== */
.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent);
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* ===== PROJECT DETAIL RESPONSIVE LAYOUT ===== */
.project-detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 880px) {
  .project-detail-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ===== FLOATING SOCIAL MEDIA BAR (LEFT SIDE) ===== */
.floating-social-dock {
  position: fixed;
  left: 20px;
  right: auto;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--card-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  padding: 10px 8px;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform var(--transition), opacity var(--transition);
}

.floating-social-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-color);
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-social-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: transform 0.25s ease;
}

.floating-social-btn:hover {
  transform: scale(1.15) translateX(3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* Brand-specific hover styles */
.floating-social-btn.social-github:hover {
  background: #24292e;
  color: #ffffff;
  border-color: #24292e;
}

.floating-social-btn.social-linkedin:hover {
  background: #0a66c2;
  color: #ffffff;
  border-color: #0a66c2;
}

.floating-social-btn.social-twitter:hover {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
}

[data-theme="dark"] .floating-social-btn.social-twitter:hover {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
}

.floating-social-btn.social-youtube:hover {
  background: #ff0000;
  color: #ffffff;
  border-color: #ff0000;
}

.floating-social-btn.social-contact:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

/* Floating Tooltips (Display on Right Side of Left Dock) */
.floating-social-btn::before {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 12px);
  right: auto;
  top: 50%;
  transform: translateY(-50%) scale(0.9);
  background: var(--ink);
  color: var(--paper);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--shadow);
}

.floating-social-btn::after {
  content: '';
  position: absolute;
  left: calc(100% + 6px);
  right: auto;
  top: 50%;
  transform: translateY(-50%) scale(0.9);
  border: 4px solid transparent;
  border-right-color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-social-btn:hover::before,
.floating-social-btn:hover::after {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

/* Hide floating dock on mobile & tablet devices for maximum screen real-estate */
@media (max-width: 992px) {
  .floating-social-dock {
    display: none !important;
  }
}

/* ============================================================
   CONCEPTS SIMPLIFIED (ELI5) STYLES
   ============================================================ */
.concepts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.concept-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.concept-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.concept-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.concept-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink);
  margin: 0 0 0.6rem;
  line-height: 1.3;
}

.concept-title a {
  color: var(--ink);
  text-decoration: none;
  transition: color var(--transition);
}

.concept-title a:hover {
  color: var(--accent);
}

.concept-summary {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.concept-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.concept-readtime {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.concept-btn {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform var(--transition);
}

.concept-btn:hover {
  transform: translateX(3px);
}

.complexity-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  color: var(--muted);
}

.complexity-badge.beginner {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border-color: rgba(34, 197, 94, 0.25);
}

.complexity-badge.intermediate {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border-color: rgba(245, 158, 11, 0.25);
}

.complexity-badge.advanced {
  background: rgba(168, 85, 247, 0.1);
  color: #9333ea;
  border-color: rgba(168, 85, 247, 0.25);
}

/* ============================================================
   INTERVIEW PREP HUB STYLES
   ============================================================ */
.qa-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.qa-item:hover {
  border-color: var(--accent);
}

.qa-item[open] {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.qa-question-header {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  user-select: none;
  list-style: none;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  transition: background var(--transition);
}

.qa-question-header::-webkit-details-marker {
  display: none;
}

.qa-question-header:hover {
  background: var(--dropdown-hover);
}

.qa-question-title {
  flex-grow: 1;
  font-family: var(--font-display);
}

.qa-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.qa-answer-body {
  padding: 1.25rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.75;
}

.qa-answer-text {
  margin-bottom: 1rem;
}

.qa-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.difficulty-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: capitalize;
}

.difficulty-badge.easy,
.difficulty-badge.junior {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.difficulty-badge.medium,
.difficulty-badge.mid-level {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.difficulty-badge.hard,
.difficulty-badge.senior,
.difficulty-badge.lead {
  background: rgba(168, 85, 247, 0.12);
  color: #9333ea;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.filter-tab {
  padding: 7px 14px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border-color);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-tab:hover {
  border-color: var(--accent);
  color: var(--ink);
}

/* ===== GLOBAL PAGE HEADER (UNDER FIXED NAVBAR) ===== */
.page-header {
  padding: calc(var(--nav-height) + 3.5rem) 0 3.5rem;
  text-align: center;
  position: relative;
  background: var(--cream);
  border-bottom: 1px solid var(--border-color);
}

.page-header .container {
  position: relative;
  z-index: 2;
}

.page-title {
  font-size: clamp(2.2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.page-subtitle {
  font-size: 1.15rem;
  max-width: 680px;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.6;
}

.filter-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 600;
}

/* ===== ARTICLE BODY TYPOGRAPHY & SPACING ===== */
.article-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--ink);
  word-wrap: break-word;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.article-content .article-body h1 { font-size: clamp(1.75rem, 3vw, 2rem); margin-top: 2rem; margin-bottom: 0.85rem; letter-spacing: -0.01em; }
.article-content .article-body h2 { font-size: clamp(1.5rem, 2.5vw, 1.7rem); border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; }
.article-body h3 { font-size: 1.4rem; }
.article-body h4 { font-size: 1.2rem; }

.article-body p {
  margin-bottom: 1.5rem;
  color: var(--ink);
}

.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: all 0.2s ease-in-out;
}

.article-body a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

.article-body ul,
.article-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body blockquote {
  border-left: 4px solid var(--accent);
  background: rgba(99, 102, 241, 0.05);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  font-style: italic;
  font-size: 1.15rem;
}

.article-body blockquote p:last-child {
  margin-bottom: 0;
}

.article-body pre {
  background: #1e1e2f;
  color: #cdd6f4;
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.5;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

.article-body code {
  font-family: var(--font-mono);
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
  word-break: break-word;
}

.article-body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: 1em;
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 2rem auto;
  display: block;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.article-body hr {
  border: 0;
  height: 1px;
  background: var(--border-color);
  margin: 3rem 0;
}

/* ============================================================
   GLOBAL SPOTLIGHT SEARCH MODAL
   ============================================================ */
.spotlight-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.spotlight-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.spotlight-modal {
  width: 100%;
  max-width: 640px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  overflow: hidden;
  transform: scale(0.96) translateY(-10px);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin: 0 1rem;
}

.spotlight-overlay.active .spotlight-modal {
  transform: scale(1) translateY(0);
}

.spotlight-header {
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.spotlight-search-icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
  flex-shrink: 0;
}

.spotlight-input {
  flex-grow: 1;
  background: transparent;
  border: none;
  padding: 1.25rem 1rem;
  font-size: 1.1rem;
  color: var(--ink);
  outline: none;
  font-family: var(--font-body);
}

.spotlight-input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.spotlight-close {
  background: var(--surface);
  border: 1px solid var(--border-color);
  color: var(--muted);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.spotlight-close:hover {
  background: var(--card-hover);
  color: var(--ink);
}

.spotlight-results-container {
  max-height: 400px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.spotlight-results {
  list-style: none;
  padding: 0.5rem;
  margin: 0;
}

.spotlight-result-item {
  display: flex;
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  color: var(--ink);
  align-items: center;
  gap: 1rem;
  transition: background 0.1s;
  cursor: pointer;
}

.spotlight-result-item[aria-selected="true"],
.spotlight-result-item:hover {
  background: var(--surface);
}

.spotlight-result-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.spotlight-result-content {
  flex-grow: 1;
  min-width: 0;
}

.spotlight-result-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotlight-result-desc {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotlight-result-type {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  padding: 3px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.spotlight-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border-color);
  background: var(--surface-2);
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.spotlight-hint {
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.spotlight-hint kbd {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  box-shadow: 0 1px 1px rgba(0,0,0,0.05);
}

@media (max-width: 640px) {
  .spotlight-footer {
    display: none;
  }
}
