/* ===================================================================
   LuminaEducation.tech — styles.css

   Refactor changelog (this version):
   1. Z-index system: hardcoded values replaced with --z-* variables
   2. Dark mode: consolidated via variable reassignment under html.dark
      (component-specific overrides retained only where values diverge
      from the variable system — gradients, navbar translucent surface,
      footer deepest black, marquee tinted background)
   3. Marquee: padding-right balances the gap for seamless loop math,
      translate3d in keyframes, hover-pause, will-change removed,
      manual scroll enabled under reduced-motion
   4. Float cards: !important removed from animations so reduced-motion
      can cleanly override
   5. Reduced-motion block: cleaner organization, explicit suppression
      for slowSpin/glowPulse/portraitBreathe, manual scroll fallback
   6. Box-sizing reset extended to pseudo-elements
   =================================================================== */

/* === Base Styles & Variables === */
:root {
    --primary-navy: #0f172a;
    --secondary-slate: #334155;
    --accent-blue: #0ea5e9;
    --accent-hover: #0284c7;
    --coral-accent: #f59e0b;
    --bg-light: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --white: #ffffff;
    --border-color: #cbd5e1;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;

    /* Z-index scale — single source of truth */
    --z-behind: -1;
    --z-content: 1;
    --z-fade: 2;
    --z-tooltip: 10;
    --z-nav: 100;
    --z-dropdown: 101;
    --z-modal: 1000;
}

/* Dark mode via variable reassignment. Component-specific overrides
   that genuinely differ from the variable system live near their
   components at the bottom of the file. */
html.dark {
    --primary-navy: #f1f5f9;
    --secondary-slate: #94a3b8;
    --bg-light: #0f172a;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --white: #111827;
    --border-color: #1e293b;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

/* Slight zoom-out on desktop — scales all rem-based sizing ~6% smaller.
   Mobile stays at the browser default (16px). */
@media (min-width: 769px) {
    html { font-size: 14px; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.bg-light { background-color: var(--bg-light); }
.text-center { text-align: center; }

/* Typography */
h1, h2, h3, h4 {
    color: var(--primary-navy);
    line-height: 1.2;
    margin-bottom: 1rem;
}
h1 { font-size: 3.5rem; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 2.5rem; font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin-bottom: 1rem; color: var(--secondary-slate); }

/* Navigation */
.navbar {
    background-color: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(203, 213, 225, 0.6);
    position: sticky;
    top: 0;
    z-index: var(--z-nav);
    padding: 1rem 0;
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}
.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-navy);
    text-decoration: none;
    display: inline-block;
}
.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}
.nav-links > li > a {
    text-decoration: none;
    color: var(--secondary-slate);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}
.nav-links > li > a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-blue);
    transition: width 0.3s ease;
    border-radius: 2px;
}
.nav-links > li > a:hover, .nav-links > li > a.active {
    color: var(--accent-blue);
}
.nav-links > li > a:hover::after, .nav-links > li > a.active::after {
    width: 100%;
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-sm);
    z-index: var(--z-dropdown);
    top: 100%;
    left: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.dropdown-content a {
    color: var(--secondary-slate);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--bg-light);
    transition: all 0.2s ease;
}
.dropdown-content a:hover {
    background-color: var(--bg-light);
    color: var(--accent-blue);
    padding-left: 20px;
}
.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeInNav 0.2s ease;
}
@keyframes fadeInNav {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-primary-small {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}
.btn-primary {
    background-color: var(--accent-blue);
    color: var(--white);
    border: 1px solid var(--accent-blue);
}
.btn-primary:hover {
    background-color: var(--accent-hover);
}
.btn-primary-small {
    padding: 0.5rem 1rem;
    background-color: var(--primary-navy);
    color: var(--white) !important;
    border-radius: var(--radius-md);
}
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}
.btn-primary-small:hover {
    background-color: var(--secondary-slate);
}
.btn-secondary {
    background-color: transparent;
    color: var(--primary-navy);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background-color: var(--bg-light);
    border-color: var(--secondary-slate);
}
.large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Layout Grids */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.align-center { align-items: center; }

/* Hero Section Redesigned */
.hero {
    padding: 8rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
    text-align: center;
}
.hero-redesigned {
    padding: 2rem 0 0;
    text-align: left;
    position: relative;
    overflow: visible;
    background: linear-gradient(135deg, #f0f7ff 0%, #e0f2fe 100%);
}
.page-hero {
    position: relative;
    padding: 7rem 0 4rem;
    background: linear-gradient(135deg, #f0f7ff 0%, #e0f2fe 100%);
    text-align: center;
    overflow: hidden;
}
.page-hero h1 {
    color: var(--primary-navy);
    font-size: 3rem;
    margin-bottom: 1rem;
}
.page-hero .hero-subtitle {
    color: var(--secondary-slate);
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.25rem;
    line-height: 1.6;
}
.hero-bg-pattern {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: linear-gradient(rgba(37, 99, 235, 0.06) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(37, 99, 235, 0.06) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
    overflow: hidden;
}
.hero-bg-pattern::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 80% 20%, rgba(14, 165, 233, 0.08) 0%, transparent 30%);
    animation: slowSpin 25s ease-in-out infinite alternate;
    z-index: var(--z-behind);
}
@keyframes slowSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: var(--z-content);
    padding-bottom: 2.5rem;
}
.hero-text-col {
    max-width: 600px;
}
.hero-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-blue);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid rgba(37, 99, 235, 0.2);
}
.hero-subtitle {
    font-size: 1.15rem;
    color: var(--secondary-slate);
    margin: 1.5rem 0 2.5rem;
    max-width: 100%;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
}

/* Floating Cards Visual */
.hero-visual-col {
    position: relative;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.floating-cards-container {
    position: relative;
    width: 100%;
    height: 100%;
}
.visual-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: 0;
    animation: glowPulse 5s ease-in-out infinite;
}
.hero-portrait-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    z-index: 0;
    border: 4px solid var(--white);
    box-shadow: 0 20px 40px -5px rgba(37, 99, 235, 0.15), 0 10px 20px -6px rgba(37, 99, 235, 0.1);
    background: var(--white);
    animation: portraitBreathe 4s ease-in-out infinite;
}
.hero-portrait-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}
.float-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px -5px rgba(37, 99, 235, 0.15), 0 10px 20px -6px rgba(37, 99, 235, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-navy);
    z-index: var(--z-content);
    transition: box-shadow 0.3s ease;
}
.float-card:hover {
    box-shadow: 0 25px 50px -5px rgba(124, 58, 237, 0.3), 0 15px 30px -6px rgba(124, 58, 237, 0.15);
}
.float-card .icon {
    font-size: 1.25rem;
}

/* Per-card float animations — varied paths for organic feel */
@keyframes float1 {
  0%   { transform: translate(0px, 0px) rotate(0deg); }
  33%  { transform: translate(-12px, -10px) rotate(-1deg); }
  66%  { transform: translate(8px, -18px) rotate(1deg); }
  100% { transform: translate(0px, 0px) rotate(0deg); }
}
@keyframes float2 {
  0%   { transform: translate(0px, 0px) rotate(0deg); }
  30%  { transform: translate(10px, -12px) rotate(1deg); }
  60%  { transform: translate(-15px, 8px) rotate(-1deg); }
  100% { transform: translate(0px, 0px) rotate(0deg); }
}
@keyframes float3 {
  0%   { transform: translate(0px, 0px) rotate(0deg); }
  25%  { transform: translate(-10px, 12px) rotate(-1deg); }
  75%  { transform: translate(15px, -8px) rotate(1deg); }
  100% { transform: translate(0px, 0px) rotate(0deg); }
}
@keyframes float4 {
  0%   { transform: translate(0px, 0px) rotate(0deg); }
  40%  { transform: translate(12px, -14px) rotate(1deg); }
  80%  { transform: translate(-8px, 10px) rotate(-1deg); }
  100% { transform: translate(0px, 0px) rotate(0deg); }
}
@keyframes float5 {
  0%   { transform: translate(0px, 0px) rotate(0deg); }
  20%  { transform: translate(-14px, -10px) rotate(-1deg); }
  70%  { transform: translate(18px, 12px) rotate(1deg); }
  100% { transform: translate(0px, 0px) rotate(0deg); }
}
@keyframes float6 {
  0%   { transform: translate(0px, 0px) rotate(0deg); }
  30%  { transform: translate(20px, -8px) rotate(1deg); }
  60%  { transform: translate(-12px, 14px) rotate(-1deg); }
  100% { transform: translate(0px, 0px) rotate(0deg); }
}
@keyframes float7 {
  0%   { transform: translate(0px, 0px) rotate(0deg); }
  35%  { transform: translate(-10px, 8px) rotate(-1deg); }
  70%  { transform: translate(14px, -12px) rotate(1deg); }
  100% { transform: translate(0px, 0px) rotate(0deg); }
}
@keyframes glowPulse {
    0%   { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    50%  { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
    100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
}
@keyframes portraitBreathe {
    0%   { box-shadow: 0 20px 60px rgba(124,58,237,0.3), 0 0 0 8px rgba(139,92,246,0.1); }
    50%  { box-shadow: 0 25px 70px rgba(124,58,237,0.45), 0 0 0 12px rgba(139,92,246,0.15); }
    100% { box-shadow: 0 20px 60px rgba(124,58,237,0.3), 0 0 0 8px rgba(139,92,246,0.1); }
}

/* Per-card positions */
.card-1 { top: 5%;    left: 5%;   }
.card-2 { top: 25%;   right: 2%;  }
.card-3 { top: 40%;   left: 0%;   }
.card-4 { top: 55%;   right: 5%;  }
.card-5 { bottom: 5%; left: 10%;  }
.card-6 { bottom: 20%; right: 15%; border: 1px solid rgba(34, 197, 94, 0.5); }
.card-7 { bottom: 10%; right: 25%; border: 1px solid rgba(236, 72, 153, 0.5); }

/* Float card animations — !important removed so reduced-motion can override */
.float-card.card-1 { animation: float1 9s   ease-in-out infinite; animation-delay: -2.1s; }
.float-card.card-2 { animation: float2 8.6s ease-in-out infinite; animation-delay: -3.6s; }
.float-card.card-3 { animation: float3 5.2s ease-in-out infinite; animation-delay: -3.1s; }
.float-card.card-4 { animation: float4 9.2s ease-in-out infinite; animation-delay: -0.6s; }
.float-card.card-5 { animation: float5 7s   ease-in-out infinite; animation-delay: -1.8s; }
.float-card.card-6 { animation: float6 11s  ease-in-out infinite; animation-delay: -4.2s; }
.float-card.card-7 { animation: float7 8.8s ease-in-out infinite; animation-delay: -2.2s; }

.hero-preview-row {
    position: absolute;
}
.preview-card {
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    font-weight: 500;
    color: var(--secondary-slate);
    font-size: 0.95rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}
.preview-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--accent-blue);
    border-color: rgba(37, 99, 235, 0.2);
}

/* Philosophy Section */
.philosophy {
    padding: 6rem 0;
}
.philosophy-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.stat-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}
.stat-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

/* Services Section */
.services {
    padding: 6rem 0;
}
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}
.service-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

/* Code Mockup Window */
.mockup-window {
    background: #1e293b;
    border-radius: var(--radius-lg);
    border: 1px solid #334155;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.5);
}
.mockup-header {
    background: #0f172a;
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid #334155;
}
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #eab308; }
.dot.green { background: #22c55e; }
.mockup-body {
    padding: 2rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: #94a3b8;
}
.code-line { margin-bottom: 0.75rem; }
.code-line.indent { padding-left: 1.5rem; color: #cbd5e1; }
.code-line.success { color: #22c55e; margin-top: 1.5rem; font-weight: bold; }

/* Idea Gallery */
.gallery {
    padding: 6rem 0;
}
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}
.filter-btn {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    color: var(--secondary-slate);
    transition: all 0.2s ease;
}
.filter-btn:hover, .filter-btn.active {
    background: var(--primary-navy);
    color: var(--white);
    border-color: var(--primary-navy);
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}
.gallery-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: row;
}
.card-image {
    width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.preview-text {
    font-size: 2rem;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    letter-spacing: 2px;
}
.bg-blue { background: #2563eb; }
.bg-slate { background: #475569; }
.bg-navy { background: #0f172a; }
.bg-accent { background: #0ea5e9; }
.card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}
.card-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}
.card-content p {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}
.view-btn {
    align-self: flex-start;
    background: transparent;
    border: none;
    color: var(--accent-blue);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.view-btn::after {
    content: "→";
    transition: transform 0.2s ease;
}
.view-btn:hover::after {
    transform: translateX(5px);
}

/* Interactive Dashboard Mockup */
.bg-interactive {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}
.text-light h2, .text-light p {
    color: var(--white);
}
.platform-mockup {
    padding: 6rem 0;
}
.dashboard-ui {
    display: flex;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.4);
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-top: 3rem;
}
.dash-sidebar {
    width: 250px;
    background: #0f172a;
    color: var(--white);
    padding: 2rem 1rem;
    flex-shrink: 0;
    border-right: 1px solid #1e293b;
}
.dash-logo {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    padding-left: 1rem;
    color: #60a5fa;
}
.dash-nav {
    list-style: none;
}
.dash-nav li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.dash-nav li:hover, .dash-nav li.active {
    background: #1e293b;
    color: var(--white);
}
.dash-main {
    flex-grow: 1;
    padding: 2rem 3rem;
    background: #f1f5f9;
}
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}
.dash-header-title {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.badge-initial {
    align-self: flex-start;
    background: #e0e7ff;
    color: #4338ca;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.dash-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
}
.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.meta-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.meta-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-navy);
}
.dash-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.dash-card {
    background: var(--white);
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
}
.dash-card h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-slate);
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0.5rem;
}
.check-list {
    list-style: none;
}
.check-list li {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    cursor: help;
    transition: all 0.2s;
    font-size: 0.9rem;
}
.mt-4 {
    margin-top: 1.5rem;
}
.date-badge {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}
.check-list li.pending {
    border-left: 4px solid #eab308;
    background: #fefce8;
}
.check-list li.pending .date-badge {
    color: #a16207;
    background: #fef9c3;
}
.check-list li:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.check-list li.completed { border-left: 4px solid #22c55e; }
.check-list li.missing { border-left: 4px solid #ef4444; background: #fff5f5; }
.tooltip-box {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-navy);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: var(--z-tooltip);
    margin-bottom: 10px;
    box-shadow: var(--shadow-md);
}
.tooltip-box::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--primary-navy) transparent transparent transparent;
}
.check-list li:hover .tooltip-box {
    opacity: 1;
    visibility: visible;
}
.eligibility-group {
    margin-bottom: 1.5rem;
}
.eligibility-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}
.dash-select {
    width: 100%;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid #cbd5e1;
    font-family: inherit;
    font-size: 0.95rem;
    background: #f8fafc;
}
.button-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.dash-btn {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    background: var(--white);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    color: var(--secondary-slate);
    transition: all 0.2s;
}
.dash-btn:hover {
    background: #f1f5f9;
}

/* Meet Andrew Page Styles */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
}
.profile-image-col {
    position: relative;
}
.profile-img {
    width: 100%;
    max-width: 320px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: block;
    margin: 0 auto;
    border: 1px solid var(--border-color);
}
.milestone-card {
    display: flex;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    max-width: 900px;
    margin: 0 auto;
}
.milestone-image {
    width: 300px;
    flex-shrink: 0;
}
.award-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.milestone-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.milestone-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.presentation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}
.presentation-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.presentation-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.presentation-visual {
    height: 200px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}
.poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}
.presentation-details {
    padding: 1.5rem;
}
.presentation-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-blue);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.presentation-details h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.citation {
    font-size: 0.9rem;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .profile-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    .milestone-card {
        flex-direction: column;
    }
    .milestone-image {
        width: 100%;
        height: 250px;
    }
}

.dash-btn.active {
    background: var(--accent-blue);
    color: var(--white);
    border-color: var(--accent-blue);
}
.info-bubble {
    background: #eff6ff;
    border-left: 4px solid var(--accent-blue);
    padding: 1rem;
    font-size: 0.9rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: #1e3a8a;
    transition: all 0.3s ease;
}
.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.gallery-img:hover {
    transform: scale(1.05);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: var(--z-modal);
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(15, 23, 42, 0.9);
}
.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    animation: zoom 0.3s;
}
@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}
.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}
.close-modal:hover,
.close-modal:focus {
    color: #cbd5e1;
    text-decoration: none;
    cursor: pointer;
}

/* CTA & Contact */
.cta {
    padding: 6rem 0;
    background: var(--bg-light);
}
.contact-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
}
.contact-info {
    background: linear-gradient(135deg, var(--primary-navy), var(--accent-blue));
    color: var(--white);
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.contact-info h2, .contact-info p {
    color: var(--white);
}
.contact-details {
    margin-top: 2rem;
}
.contact-details p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}
.contact-form {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    justify-content: center;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.contact-form input, .contact-form textarea, .contact-form select {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    background: var(--white);
    transition: all 0.2s ease;
    color: var(--text-main);
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: #f8fafc;
}
.form-submit-btn {
    transition: all 0.2s ease;
}
.form-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.35);
}
.form-submit-btn:active {
    transform: translateY(0);
}
footer {
    background: var(--primary-navy);
    color: #cbd5e1;
    padding: 4rem 0;
    border-top: 1px solid #1e293b;
}
footer p {
    color: #94a3b8;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}
.footer-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.footer-badges span {
    background: #1e293b;
    color: #cbd5e1;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    border: 1px solid #334155;
    pointer-events: none;
    user-select: none;
}
.footer-badges span.highlighted {
    color: #38bdf8;
}
.footer-sub {
    color: #64748b;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .grid-2, .grid-3, .gallery-grid, .hero-grid {
        grid-template-columns: 1fr;
    }
    .nav-links {
        display: none;
    }
    h1 { font-size: 2.5rem; }
    .gallery-card {
        flex-direction: column;
    }
    .card-image {
        width: 100%;
        height: 150px;
    }
    .hero-redesigned {
        padding: 2rem 0 0;
        text-align: center;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-visual-col {
        height: 350px;
    }
    .hero-preview-row {
        position: relative;
        bottom: 0;
        flex-direction: column;
        gap: 0.5rem;
        padding: 2rem;
    }
    .hero-grid {
        padding-bottom: 2rem;
    }
}

/* Resource Gallery Styles */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.resource-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.resource-image {
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    width: calc(100% + 3rem);
    height: 140px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0;
    display: block;
}
.resource-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.3s ease;
}
.resource-card:hover .resource-image img {
    transform: scale(1.05);
}
.resource-badge-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.resource-badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-blue);
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}
.resource-badge.external {
    background: #f1f5f9;
    color: var(--secondary-slate);
}
.resource-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.resource-card p {
    flex-grow: 1;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}
.resource-card .btn-primary, .resource-card .btn-secondary {
    align-self: flex-start;
    text-align: center;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}
.resource-card.placeholder {
    background: #f8fafc;
    border-style: dashed;
}

/* Video Wrapper */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}
.video-wrapper iframe, .video-wrapper video, .video-wrapper > div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===================================================================
   MEET ANDREW PAGE
   =================================================================== */
.bio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.bio-grid--reversed {
    direction: rtl;
}
.bio-grid--reversed > * {
    direction: ltr;
}
.bio-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    object-fit: cover;
    box-shadow: var(--shadow-md);
}
.bio-text h2 {
    font-size: 2rem;
    margin-bottom: 1.25rem;
}
.bio-text p {
    margin-bottom: 1rem;
    line-height: 1.75;
    color: var(--secondary-slate);
}
.bio-text p:last-of-type {
    margin-bottom: 1.5rem;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}
.work-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.work-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}
.work-card__label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
}
.work-card:nth-child(1) .work-card__label {
    background: rgba(59, 130, 246, 0.1); color: #2563eb;
}
.work-card:nth-child(2) .work-card__label {
    background: rgba(139, 92, 246, 0.1); color: #7c3aed;
}
.work-card:nth-child(3) .work-card__label {
    background: rgba(13, 148, 136, 0.1); color: #0d9488;
}
.work-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}
.work-card p {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--secondary-slate);
    margin: 0;
}

.credentials-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}
.credentials-col h3 {
    font-size: 1.15rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent-blue);
}
.credentials-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.credentials-col li {
    padding: 0.7rem 0;
    padding-left: 1.25rem;
    position: relative;
    font-size: 0.92rem;
    color: var(--secondary-slate);
    border-bottom: 1px solid var(--bg-light);
}
.credentials-col li:last-child { border-bottom: none; }
.credentials-col li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-blue);
}

.assessment-block {
    margin-bottom: 2rem;
}
.assessment-block:last-child { margin-bottom: 0; }
.assessment-block h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 0.5rem;
}
.assessment-block p {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--secondary-slate);
    margin: 0;
}

.research-featured {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    align-items: start;
}
.research-poster-link {
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.research-poster-link:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.research-poster-link img {
    width: 100%;
    height: auto;
    display: block;
}
.research-details .citation {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--secondary-slate);
    margin-bottom: 1rem;
}
.research-details .description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--secondary-slate);
}
.view-poster-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-blue);
    text-decoration: none;
    margin-top: 0.75rem;
}
.view-poster-link:hover { text-decoration: underline; }

.recognition-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: box-shadow 0.25s ease;
}
.recognition-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.recognition-card img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    object-fit: cover;
}
.recognition-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}
.recognition-card .recognition-sub {
    font-size: 0.85rem;
    color: var(--accent-blue);
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.recognition-card p:last-child {
    font-size: 0.92rem;
    color: var(--secondary-slate);
    line-height: 1.65;
    margin: 0;
}

.honors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.honors-block h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--primary-navy);
}
.honors-block p {
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--secondary-slate);
    margin: 0;
}

/* Mobile overrides for Meet Andrew */
@media (max-width: 768px) {
    .bio-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .bio-grid--reversed {
        direction: ltr;
    }
    .bio-image {
        max-width: 400px;
        margin: 0 auto;
    }
    .bio-text h2 {
        font-size: 1.65rem;
    }
    .work-grid {
        grid-template-columns: 1fr;
    }
    .credentials-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .research-featured {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .research-poster-link {
        max-width: 280px;
    }
    .recognition-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .recognition-card img {
        max-width: 280px;
        margin: 0 auto;
    }
    .honors-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================================================
   PRODUCT SHOWCASE CARDS
   =================================================================== */
.product-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.1);
}
.product-card__header {
    padding: 2rem 1.75rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.product-card--primary .product-card__header {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.02));
    border-bottom-color: rgba(59, 130, 246, 0.15);
}
.product-card--secondary .product-card__header {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(139, 92, 246, 0.02));
    border-bottom-color: rgba(139, 92, 246, 0.15);
}
.product-card--accent .product-card__header {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.02));
    border-bottom-color: rgba(16, 185, 129, 0.15);
}
.product-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.product-card--primary .product-card__icon { background: rgba(59, 130, 246, 0.12); }
.product-card--secondary .product-card__icon { background: rgba(139, 92, 246, 0.12); }
.product-card--accent .product-card__icon { background: rgba(16, 185, 129, 0.12); }
.product-card__header h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}
.product-card__tagline {
    font-size: 0.92rem;
    color: var(--secondary-slate);
    margin: 0;
    font-style: italic;
}
.product-card__features {
    list-style: none;
    padding: 1.5rem 1.75rem 2rem;
    margin: 0;
}
.product-card__features li {
    padding: 0.65rem 0;
    padding-left: 1.6rem;
    position: relative;
    font-size: 0.92rem;
    color: var(--primary-navy);
    border-bottom: 1px solid var(--bg-light);
}
.product-card__features li:last-child { border-bottom: none; }
.product-card__features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    font-weight: 700;
}
.product-card--primary .product-card__features li::before { color: #3b82f6; }
.product-card--secondary .product-card__features li::before { color: #8b5cf6; }
.product-card--accent .product-card__features li::before { color: #10b981; }
.product-card__badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .product-showcase { grid-template-columns: 1fr; }
    .product-card__header { padding: 1.5rem 1.25rem 1.25rem; }
    .product-card__features { padding: 1.25rem; }
}

/* ===================================================================
   MARQUEE SECTION (homepage)
   =================================================================== */
.marquee-section {
    padding: 5rem 0;
    background: linear-gradient(180deg, #f8f6ff 0%, #f0eeff 100%);
    border-top: 1px solid #e9d5ff;
    border-bottom: 1px solid #e9d5ff;
    overflow: hidden;
}
.marquee-heading { text-align: center; margin-bottom: 2.75rem; }
.marquee-heading .mq-label {
    display: inline-block;
    font-size: 0.7rem; font-weight: 800; letter-spacing: 1.5px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #7c3aed, #0d9488);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    margin-bottom: 0.75rem;
}
.marquee-heading h2 { font-size: 2rem; font-weight: 700; color: #1e1047; margin-bottom: 0.5rem; }
.marquee-heading p { font-size: 1rem; color: #6b5fa0; max-width: 520px; margin: 0 auto; }

.marquee-track-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.marquee-track-wrap::before,
.marquee-track-wrap::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 120px;
    z-index: var(--z-fade);
    pointer-events: none;
}
.marquee-track-wrap::before { left: 0; background: linear-gradient(90deg, #f0eeff, transparent); }
.marquee-track-wrap::after  { right: 0; background: linear-gradient(-90deg, #f0eeff, transparent); }
html.dark .marquee-track-wrap::before { background: linear-gradient(90deg, #0f172a, transparent); }
html.dark .marquee-track-wrap::after  { background: linear-gradient(-90deg, #0f172a, transparent); }

/* Marquee track: padding-right balances the gap so the duplicated set
   loops seamlessly. Without it the loop is off by 0.5*gap per cycle. */
.marquee-track {
    display: flex;
    gap: 0.75rem;
    padding-right: 0.75rem;
    width: max-content;
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-track.fwd { animation: scrollL 38s linear infinite; }
.marquee-track.rev { animation: scrollR 42s linear infinite; }

@keyframes scrollL {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-50%, 0, 0); }
}
@keyframes scrollR {
    from { transform: translate3d(-50%, 0, 0); }
    to   { transform: translate3d(0, 0, 0); }
}

.mq-tag {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.55rem 1.15rem; border-radius: 30px;
    font-size: 0.83rem; font-weight: 600; white-space: nowrap;
    border: 1px solid; transition: transform 0.15s; cursor: default;
}
.mq-tag:hover { transform: scale(1.05); }
.mq-v { background: rgba(124,58,237,0.09); color: #5b21b6; border-color: rgba(124,58,237,0.25); }
.mq-t { background: rgba(13,148,136,0.09); color: #0f766e; border-color: rgba(13,148,136,0.25); }
.mq-a { background: rgba(217,119,6,0.09); color: #92400e; border-color: rgba(217,119,6,0.25); }
.mq-e { background: rgba(5,150,105,0.09); color: #065f46; border-color: rgba(5,150,105,0.25); }
.mq-r { background: rgba(220,38,38,0.07); color: #991b1b; border-color: rgba(220,38,38,0.2); }

.marquee-cta { text-align: center; margin-top: 2.75rem; }
.marquee-cta a {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #7c3aed, #0d9488);
    color: white; text-decoration: none; border-radius: 30px;
    font-weight: 700; font-size: 0.9rem;
    box-shadow: 0 4px 20px rgba(124,58,237,0.28); transition: all 0.2s;
}
.marquee-cta a:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(124,58,237,0.38); }

/* ===================================================================
   HAMBURGER MENU — Base Styles (hidden on desktop)
   =================================================================== */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    padding: 8px;
    transition: all 0.2s ease;
    z-index: var(--z-dropdown);
    flex-shrink: 0;
}
.hamburger-btn:hover {
    background: var(--bg-light);
    border-color: var(--secondary-slate);
}
.hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--primary-navy);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}
.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}
.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===================================================================
   MEDIUM VIEWPORT NAV FIX (769–1024px)
   =================================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-links {
        gap: 1.25rem;
    }
    .nav-links > li > a {
        font-size: 0.88rem;
    }
    .logo {
        font-size: 1.1rem;
    }
    .btn-primary-small {
        padding: 0.4rem 0.85rem;
        font-size: 0.85rem;
    }
}

/* ===================================================================
   MOBILE LAYOUT & OVERFLOW FIXES
   =================================================================== */
@media (max-width: 768px) {
    .hero-redesigned h1 {
        font-size: 1.85rem !important;
        line-height: 1.25;
    }
    .hero-redesigned .hero-subtitle {
        font-size: 0.95rem;
    }
    .hero-redesigned .container {
        padding: 0 1.5rem;
    }
    .hero-redesigned .hero-badge {
        font-size: 0.75rem;
    }
    .hero-actions {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }
    .float-card {
        display: none !important;
    }
    .visual-glow {
        display: none;
    }
    .hero-visual-col {
        height: auto;
        min-height: 220px;
    }
    .hero-portrait-wrapper {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        width: 200px !important;
        height: 200px !important;
        margin: 1rem auto 0;
    }
    #platform-mockup {
        padding: 3rem 0 !important;
        overflow: hidden;
    }
    #platform-mockup > .container {
        padding: 0 1rem;
        overflow: hidden;
    }
    #platform-mockup .section-header h2 {
        font-size: 1.75rem !important;
    }
    #platform-mockup .section-header p {
        font-size: 0.95rem !important;
    }
    .mockup-app {
        flex-direction: column !important;
        overflow: hidden;
        border-radius: 12px !important;
    }
    .mockup-sidebar {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid #1e293b;
        padding: 1rem !important;
    }
    .mockup-sidebar > div:first-child {
        margin-bottom: 0.75rem !important;
        font-size: 1rem !important;
    }
    .mockup-sidebar ul {
        flex-direction: row !important;
        flex-wrap: wrap;
        gap: 0.3rem !important;
    }
    .mockup-sidebar ul li {
        padding: 0.4rem 0.65rem !important;
        font-size: 0.7rem !important;
        white-space: nowrap;
    }
    .mockup-main {
        padding: 1.25rem !important;
    }
    .mockup-topbar {
        flex-wrap: wrap !important;
        gap: 0.5rem;
    }
    .mockup-grid {
        grid-template-columns: 1fr !important;
    }
    .mockup-status {
        flex-wrap: wrap !important;
        gap: 0.5rem;
        justify-content: center !important;
        text-align: center;
    }
    .mockup-status span {
        font-size: 0.7rem !important;
    }
    .marquee-section {
        padding: 3rem 0 !important;
    }
    .marquee-heading h2 {
        font-size: 1.5rem;
    }
    .cbm-feature-block {
        padding: 3rem 0 !important;
    }
    .cbm-feature-text h2 {
        font-size: 1.6rem !important;
    }
    .hamburger-btn {
        display: flex;
    }
    .nav-content {
        position: relative;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: -2rem;
        right: -2rem;
        background: var(--white);
        flex-direction: column;
        padding: 0.5rem 2rem 1.25rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
        gap: 0;
        z-index: var(--z-nav);
    }
    .nav-links.nav-open {
        display: flex;
    }
    .nav-links > li {
        width: 100%;
    }
    .nav-links > li > a {
        display: block;
        padding: 0.85rem 0;
        border-bottom: 1px solid var(--bg-light);
        width: 100%;
        font-size: 1rem;
    }
    .nav-links > li > a::after {
        display: none;
    }
    .nav-links > li > a:hover::after {
        display: none;
    }
    .dropdown:hover .dropdown-content {
        display: none;
    }
    .dropdown.mobile-open > .dropdown-content {
        display: block !important;
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        min-width: 100%;
        padding: 0 0 0 1rem;
        background: transparent;
        animation: none;
    }
    .dropdown.mobile-open > .dropdown-content a {
        padding: 0.65rem 1rem;
        border-bottom: none;
        font-size: 0.9rem;
        color: var(--secondary-slate);
    }
    .dropdown.mobile-open > .dropdown-content a:hover {
        padding-left: 1.25rem;
        color: var(--accent-blue);
        background: transparent;
    }
    .nav-links .btn-primary-small {
        display: inline-block;
        margin-top: 0.5rem;
        text-align: center;
        width: 100%;
        padding: 0.75rem 1rem;
    }
}

/* ===================================================================
   ACCESSIBILITY
   =================================================================== */
:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
    border-radius: 4px;
}
a:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}
button:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

/* Reduced motion: respect the user's accessibility preference.
   Marquee gets manual horizontal scroll as a graceful fallback. */
@media (prefers-reduced-motion: disabled-for-testing) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    /* Explicit suppression for decorative animations.
       Listed by name so the kill is unambiguous, not just throttled. */
    .marquee-track,
    .visual-glow,
    .hero-bg-pattern::after,
    .hero-portrait-wrapper,
    .float-card {
        animation: none !important;
    }

    /* Allow manual horizontal scroll on the marquee since auto-scroll
       is disabled. Hides scrollbar for visual consistency. */
    .marquee-track-wrap {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .marquee-track-wrap::-webkit-scrollbar {
        display: none;
    }
}

/* ===================================================================
   DARK MODE — COMPONENT-SPECIFIC OVERRIDES

   Only overrides that genuinely differ from the variable system live
   here: gradients, translucent surfaces with specific tints, the
   deepest footer black, and the marquee section's purple-tinted bg.
   The bulk of dark mode is handled by the html.dark variable
   reassignment block at the top of this file.
   =================================================================== */

/* Page surface — darker than the elevated card surface (--white) */
html.dark body { background: #0a0f1e; }

/* Navbar uses a translucent surface that needs an explicit dark rgba */
html.dark .navbar {
    background: rgba(8, 13, 26, 0.92);
    border-color: #1e293b;
}

/* Footer needs the deepest black to anchor the page */
html.dark footer { background: #060a14; }
html.dark .btn-primary-small { background-color: #7c3aed; }
html.dark .btn-primary-small:hover { background-color: #6d28d9; }

/* Tinted-gradient sections — purple/navy variants for dark mode */
html.dark .cbm-feature-block {
    background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 60%) !important;
}
html.dark .cta {
    background: linear-gradient(180deg, #0a0f1e 0%, #0a0f1e 100%) !important;
}
html.dark .contact-card {
    background: rgba(8, 13, 26, 0.98) !important;
    border-color: rgba(139, 92, 246, 0.25) !important;
}
html.dark .marquee-section {
    background: #0f172a !important;
    border-color: #1e293b !important;
}
html.dark .page-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
}

/* Nav link hover accent shifts to purple in dark mode */
html.dark .nav-links a:hover,
html.dark .nav-links .active { color: #a78bfa; }
html.dark .dropdown-content a:hover { background: #1e293b; color: #a78bfa; }

/* Work card label tints — color shifts for dark contrast */
html.dark .work-card:nth-child(1) .work-card__label {
    background: rgba(59,130,246,0.15); color: #60a5fa;
}
html.dark .work-card:nth-child(2) .work-card__label {
    background: rgba(139,92,246,0.15); color: #a78bfa;
}
html.dark .work-card:nth-child(3) .work-card__label {
    background: rgba(13,148,136,0.15); color: #2dd4bf;
}
html.dark .recognition-card .recognition-sub { color: #60a5fa; }
html.dark .credentials-col h3 { border-color: #3b82f6; }
html.dark .view-poster-link { color: #60a5fa; }

/* Product card — badge tint shifts in dark mode */
html.dark .product-card__badge {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}

/* Dark toggle button */
#darkToggle {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    line-height: 1;
}
#darkToggle:hover { background: rgba(124,58,237,0.1); border-color: #a78bfa; }
html.dark #darkToggle { border-color: #334155; color: #f1f5f9; }

/* Mobile dark mode nav menu (translucent overlay) */
@media (max-width: 768px) {
    html.dark .nav-links {
        background: #080d1a;
        border-color: #1e293b;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    }
    html.dark .nav-links > li > a {
        border-color: #1e293b;
    }
    html.dark .dropdown.mobile-open > .dropdown-content a {
        color: #94a3b8;
    }
    html.dark .dropdown.mobile-open > .dropdown-content a:hover {
        color: #a78bfa;
    }
}

/* ===================================================================
   UNIFIED FOOTER
   =================================================================== */
.site-footer-unified {
    margin-top: 0;
    background: #0f172a;
    color: #94a3b8;
    font-size: 0.88rem;
    border-top: 1px solid rgba(139, 92, 246, 0.15);
}
.footer-grid-main {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 3rem;
    padding: 3.5rem 0 3rem;
    align-items: start;
}
.footer-col-brand .footer-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0 0 0.5rem;
}
.footer-col-brand .footer-tagline {
    margin: 0;
    line-height: 1.6;
    color: #64748b;
    font-size: 0.82rem;
}
.footer-col-nav nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.footer-col-nav nav a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.15s ease;
}
.footer-col-nav nav a:hover {
    color: #2dd4bf;
}
.footer-col-contact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.footer-col-contact a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.15s ease;
    word-break: break-all;
}
.footer-col-contact a:hover {
    color: #2dd4bf;
}
.footer-bottom {
    border-top: 1px solid #1e293b;
    padding: 1.25rem 0;
}
.footer-bottom p {
    margin: 0 0 0.3rem;
    font-size: 0.78rem;
    color: #475569;
    line-height: 1.5;
}
.footer-bottom p:last-child {
    margin: 0;
}
.footer-privacy {
    color: #475569 !important;
}
.footer-privacy a {
    color: #64748b;
    text-decoration: underline;
}
.footer-privacy a:hover {
    color: #2dd4bf;
}

@media (max-width: 768px) {
    .footer-grid-main {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2.5rem 0 2rem;
    }
    .footer-col-contact a {
        word-break: normal;
    }
}
@media (max-width: 480px) {
    .footer-grid-main {
        padding: 2rem 0 1.5rem;
    }
}
