/* ==========================================
   CSS VARIABLES - Dark and Light Themes
   ========================================== */
:root {
    --transition-speed: 0.3s;
}

/* Dark Theme */
body.dark-theme {
    --bg-color: #0b0d11;
    --card-bg: #111111;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --accent-primary: #00ff9d;
    --accent-secondary: #7000ff;
    --accent-strong: #00ff9d;
    --accent-rgb: 0, 255, 157;
    --accent-secondary-rgb: 112, 0, 255;
    --accent-strong-rgb: 0, 255, 157;
    --border-color: #27272a;
    --nav-bg: rgba(10, 10, 10, 0.9);
    --btn-primary-bg: #00ff9d;
    --btn-primary-text: #0a0a0a;
}

/* Light Theme - Pastel Baby Blue (Default) */
body.light-theme {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-primary: #bfdbfe;
    --accent-secondary: #93c5fd;
    --accent-strong: #3b82f6;
    --accent-rgb: 191, 219, 254;
    --accent-secondary-rgb: 147, 197, 253;
    --accent-strong-rgb: 59, 130, 246;
    --border-color: #e2e8f0;
    --nav-bg: rgba(248, 250, 252, 0.95);
    --btn-primary-bg: #93c5fd;
    --btn-primary-text: #0f172a;
}

/* ==========================================
   BASE STYLES
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

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

.cursor-glow {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    mix-blend-mode: screen;
}

body.light-theme .cursor-glow {
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.08) 0%, rgba(0, 0, 0, 0) 70%);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    position: relative;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

body.dark-theme::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 60% 45% at 8% 5%, rgba(0, 255, 157, 0.05), transparent 60%),
        radial-gradient(ellipse 70% 55% at 95% 25%, rgba(112, 0, 255, 0.045), transparent 60%),
        radial-gradient(ellipse 50% 45% at 50% 105%, rgba(0, 255, 157, 0.035), transparent 65%);
}

body.dark-theme::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(ellipse 100% 90% at 50% 40%, black 50%, transparent 95%);
    -webkit-mask-image: radial-gradient(ellipse 100% 90% at 50% 40%, black 50%, transparent 95%);
}

body.light-theme::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 60% at 10% 0%, rgba(191, 219, 254, 0.55), transparent 60%),
        radial-gradient(ellipse 70% 50% at 95% 30%, rgba(147, 197, 253, 0.40), transparent 60%),
        radial-gradient(ellipse 60% 50% at 50% 100%, rgba(191, 219, 254, 0.35), transparent 60%);
}

body.light-theme::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 30%, transparent 80%);
}

@media (max-width: 768px) {
    html,
    body {
        background: var(--bg-color) !important;
    }

    html {
        background: #0b0d11 !important;
    }

    html:has(body.light-theme) {
        background: #f8fafc !important;
    }

    body.dark-theme {
        background: #0b0d11 !important;
    }

    body.light-theme {
        background: #f8fafc !important;
    }

    body::before,
    body::after {
        content: none !important;
        display: none !important;
        background: none !important;
    }

    body.theme-switching,
    body.theme-switching * {
        transition: none !important;
    }

    body.light-theme .section,
    body.light-theme .about-content,
    body.light-theme .about-text,
    body.light-theme .stats-grid,
    body.light-theme .stat-item {
        background: transparent !important;
    }
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

strong {
    color: var(--text-primary);
}

em {
    color: var(--accent-primary);
    font-style: normal;
}

/* ==========================================
   UTILITIES
   ========================================== */
/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.accent-text {
    color: var(--accent-primary);
    font-weight: 800;
}

/* Section Styling */
.section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 4rem;
    text-align: center;
}

.section-header h2 {
    display: inline-block;
    margin: 0;
}

.section-header .line {
    display: none;
}

/* ==========================================
   NAVBAR
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-speed), border-color var(--transition-speed);
}

/* Account for sticky navbar when scrolling to section anchors */
.section,
section[id] {
    scroll-margin-top: 100px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0 2rem;
}

.nav-container .logo {
    margin-right: auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
}

.logo .dot {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links .btn-primary {
    padding: 0.6rem 1.2rem;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border-radius: 6px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-links .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.3);
}

body.light-theme .nav-links .btn-primary:hover {
    box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.25);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

body.light-theme .theme-toggle-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.15);
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-primary);
}

body.light-theme .theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Show/hide icons based on theme */
body.dark-theme .theme-toggle-btn .dark-icon {
    display: none;
}

body.light-theme .theme-toggle-btn .light-icon {
    display: none;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.5rem;
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--btn-primary-bg), var(--accent-secondary));
    color: var(--btn-primary-text);
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.01em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px -4px rgba(var(--accent-rgb), 0.45);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px -6px rgba(var(--accent-rgb), 0.55);
    filter: brightness(1.05);
}

body.light-theme .btn-primary:hover {
    box-shadow: 0 10px 28px -6px rgba(var(--accent-rgb), 0.4);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.6rem;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-primary);
    transform: translateY(-1px);
}

body.dark-theme .btn-secondary {
    background: transparent;
}

body.dark-theme .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

/* Video Background */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

/* Gradient overlay with subtle purple tint */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
            rgba(250, 248, 255, 0.80) 0%,
            rgba(245, 240, 255, 0.85) 50%,
            rgba(248, 250, 252, 1) 100%);
    z-index: 1;
    pointer-events: none;
}

body.dark-theme .hero::after {
    background: linear-gradient(180deg,
            rgba(20, 15, 35, 0.75) 0%,
            rgba(11, 13, 17, 0.92) 80%,
            #0b0d11 100%);
}

/* Terminal Background Effect */
.terminal-bg {
    position: absolute;
    top: 10%;
    right: 5%;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--accent-primary);
    opacity: 0.15;
    z-index: -1;
    user-select: none;
    line-height: 1.8;
}

.terminal-line {
    margin-bottom: 0.5rem;
}

.terminal-output {
    color: var(--text-secondary);
}

.terminal-cursor {
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.hero-content {
    max-width: 900px;
    text-align: center;
    z-index: 10;
    position: relative;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.5rem;
    background: rgba(var(--accent-rgb), 0.08);
    border: 1.5px solid var(--accent-primary);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--accent-primary);
    margin-bottom: 2.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    transition: all 0.3s ease;
}

.badge:hover {
    background: rgba(var(--accent-rgb), 0.12);
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.2);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {

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

    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

/* Improved H1 Typography */
.hero h1 {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    padding-bottom: 0.12em;
    letter-spacing: -0.03em;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.2rem;
    line-height: 1.55;
    margin-bottom: 1.25rem;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-secondary);
    font-weight: 400;
    text-wrap: balance;
    letter-spacing: 0.005em;
}

/* Hero Stats Badges */
.hero-subtitle strong {
    color: var(--text-primary);
    font-weight: 600;
    position: relative;
}

.hero-subtitle strong::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0.3;
}

/* Hero Stats Pills */
.hero-stats-pills {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.stat-pill {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.9rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-pill:hover {
    border-color: var(--accent-primary);
    background: rgba(var(--accent-rgb), 0.05);
    transform: translateY(-2px);
}

.stat-pill .number {
    color: var(--accent-primary);
    font-weight: 700;
}

body.light-theme .stat-pill {
    background: rgba(var(--accent-rgb), 0.06);
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    margin-top: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* Hero Tagline */
.hero-tagline {
    display: block;
    margin-top: 1rem;
    font-size: 1rem;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

.hero-tagline::before {
    content: '→ ';
    color: var(--accent-primary);
}

/* Tech Stack Badges */
.tech-stack-hero {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(var(--accent-rgb), 0.08);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tech-badge:hover {
    background: rgba(var(--accent-rgb), 0.12);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

body.light-theme .tech-badge {
    background: rgba(var(--accent-rgb), 0.08);
    border-color: rgba(var(--accent-rgb), 0.25);
}

body.light-theme .tech-badge:hover {
    background: rgba(var(--accent-rgb), 0.15);
    border-color: var(--accent-primary);
}

/* ==========================================
   ABOUT SECTION
   ========================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-content {
    display: flex;
    flex-direction: column;
}

.about-text p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
    margin-top: 2.5rem;
}

.stat-item {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-primary);
    margin-bottom: 0.75rem;
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
    max-width: 140px;
}

.info-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.info-list i {
    color: var(--accent-primary);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ==========================================
   GLOW CARDS
   ========================================== */
.glow-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.glow-card:hover {
    border-color: var(--accent-primary);
}

.glow-card h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* ==========================================
   TIMELINE
   ========================================== */
.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid var(--border-color);
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 0.5rem;
    width: 14px;
    height: 14px;
    background: var(--bg-color);
    border: 3px solid var(--accent-primary);
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px var(--accent-primary);
}

.timeline-date {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-primary);
    font-size: 0.875rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.timeline-content {
    margin-left: 0;
}

.role-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.role-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.company {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

.role-description {
    line-height: 1.7;
    margin-bottom: 1.5rem;
    list-style: none;
    padding-left: 0;
}

.role-description li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.65rem;
}

.role-description li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.45);
}

body.light-theme .role-description li::before {
    background: var(--accent-strong);
    box-shadow: 0 0 6px rgba(var(--accent-strong-rgb), 0.35);
}

/* ==========================================
   PROJECTS GRID
   ========================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 12px;
    position: relative;
    padding: 2px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
}

/* Rainbow Animated Border - Improved */
.project-card::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: conic-gradient(from 0deg,
            #ff0080,
            #ff0000,
            #ff8800,
            #ffff00,
            #00ff88,
            #00ffff,
            #0088ff,
            #8800ff,
            #ff0080);
    border-radius: 12px;
    animation: rotate-gradient 6s linear infinite;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

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

/* Smoother gradient rotation */
@keyframes rotate-gradient {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.card-content {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 2rem;
    height: 100%;
    position: relative;
    z-index: 1;
    transition: background 0.3s ease;
}

.project-icon {
    width: 56px;
    height: 56px;
    background: rgba(var(--accent-rgb), 0.1);
    border: 1px solid var(--accent-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent-primary);
}

.project-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.project-card p {
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ==========================================
   TAGS
   ========================================== */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.5rem;
}

.tags span {
    font-size: 0.75rem;
    padding: 0.35rem 0.85rem;
    background: rgba(var(--accent-rgb), 0.15);
    border: 1px solid rgba(var(--accent-rgb), 0.35);
    border-radius: 50px;
    color: var(--accent-strong, var(--accent-primary));
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tags span:hover {
    background: rgba(var(--accent-rgb), 0.25);
    border-color: var(--accent-strong, var(--accent-primary));
}

body.light-theme .tags span {
    background: rgba(var(--accent-strong-rgb), 0.08);
    border: 1px solid rgba(var(--accent-strong-rgb), 0.25);
    color: var(--accent-strong);
}

body.light-theme .tags span:hover {
    background: rgba(var(--accent-strong-rgb), 0.15);
    border-color: var(--accent-strong);
}

/* ==========================================
   AI PORTFOLIO SECTION
   ========================================== */
.ai-portfolio-section {
    padding: 6rem 1.25rem 4rem;
    max-width: none;
    background: transparent;
}

.ai-portfolio-section .section-header {
    margin-bottom: 1rem;
}

.featured-projects-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    max-width: 1180px;
    margin: 0 auto 3rem;
}

.featured-project {
    min-height: 390px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%),
        radial-gradient(circle at 18% 0%, rgba(var(--accent-rgb), 0.22), transparent 34%),
        linear-gradient(145deg, #0c1220 0%, #111827 52%, #070b12 100%);
    border: 1px solid rgba(226, 232, 240, 0.13);
    border-radius: 18px;
    padding: 1.15rem;
    position: relative;
    overflow: hidden;
    text-align: left;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.32);
    isolation: isolate;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.featured-project::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 78%);
    opacity: 0.35;
}

.featured-project::after {
    content: '';
    position: absolute;
    inset: 1px;
    z-index: -1;
    border-radius: 17px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 90%);
    pointer-events: none;
}

.featured-project--flagship,
.featured-project--secure {
    --case-accent: var(--accent-primary);
    --case-accent-rgb: var(--accent-rgb);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 40%),
        radial-gradient(circle at 88% 10%, rgba(var(--accent-rgb), 0.16), transparent 32%),
        linear-gradient(145deg, #090d16 0%, #111827 58%, #080a0f 100%);
}

.featured-project--flagship .featured-content h3,
.featured-project--secure .featured-content h3 {
    font-size: clamp(1.75rem, 2.6vw, 2.5rem);
    line-height: 1.05;
}

.secure-boundary {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    width: 150px;
    height: 112px;
    border: 1px solid rgba(var(--accent-rgb), 0.18);
    border-radius: 14px;
    opacity: 0.78;
    pointer-events: none;
}

.secure-boundary::before,
.secure-boundary::after {
    content: '';
    position: absolute;
    inset: 16px;
    border: 1px solid rgba(var(--accent-rgb), 0.14);
    border-radius: 10px;
}

.secure-boundary::after {
    inset: 38px 52px 26px;
    background: rgba(var(--accent-rgb), 0.16);
    box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.2);
}

.secure-boundary span {
    position: absolute;
    right: 18px;
    top: 18px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--accent-primary);
    box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.55);
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: max-content;
    max-width: 100%;
    min-height: 34px;
    padding: 0.45rem 0.72rem;
    background: rgba(var(--case-accent-rgb), 0.12);
    color: var(--case-accent);
    border: 1px solid rgba(var(--case-accent-rgb), 0.32);
    border-radius: 999px;
    font-size: 0.72rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1rem;
    align-self: flex-start;
    text-transform: uppercase;
    box-shadow: 0 0 28px rgba(var(--case-accent-rgb), 0.13);
}

.featured-badge i {
    width: 15px;
    height: 15px;
}

.featured-content {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

/* ==========================================
   THICK CARD STYLING — terminal aesthetic
   ========================================== */

.featured-project {
    padding: 1.5rem 1.5rem 1.25rem;
}

/* Corner brackets */
.card-corner {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 1.5px solid rgba(var(--case-accent-rgb), 0.55);
    pointer-events: none;
    z-index: 3;
}

.card-corner--tl { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.card-corner--tr { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.card-corner--bl { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.card-corner--br { bottom: 10px; right: 10px; border-left: none; border-top: none; }

body.light-theme .card-corner {
    border-color: rgba(var(--accent-strong-rgb), 0.55);
}

/* Card top row: icon box + status badge */
.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 2;
}

.card-icon-box {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(var(--case-accent-rgb), 0.4);
    border-radius: 10px;
    background: rgba(var(--case-accent-rgb), 0.08);
    color: var(--case-accent);
}

.card-icon-box i {
    width: 22px;
    height: 22px;
}

.card-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.32rem 0.65rem;
    border: 1px solid rgba(var(--case-accent-rgb), 0.4);
    border-radius: 4px;
    background: rgba(var(--case-accent-rgb), 0.06);
    color: var(--case-accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.card-status .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--case-accent);
    box-shadow: 0 0 10px rgba(var(--case-accent-rgb), 0.8);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ID label */
.card-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--case-accent);
    margin-bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* Company name — clearly separated from the tool title */
.card-company {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    align-self: flex-start;
    padding: 0.4rem 0.75rem;
    background: rgba(var(--case-accent-rgb), 0.1);
    border: 1px solid rgba(var(--case-accent-rgb), 0.3);
    border-radius: 999px;
    color: var(--case-accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.9rem;
}

.card-id-dot {
    font-size: 0.55rem;
    animation: pulse-dot 2s ease-in-out infinite;
}

/* Description: left-accent border - hidden until hover */
.featured-project .featured-content p {
    border-left: 2px solid rgba(var(--case-accent-rgb), 0);
    padding-left: 0.85rem;
    margin-top: 0.6rem;
    transition: border-color 0.3s ease;
}

.featured-project:hover .featured-content p {
    border-left-color: rgba(var(--case-accent-rgb), 0.35);
}

/* Inset metric boxes */
.card-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    position: relative;
    z-index: 2;
}

.card-metric {
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

body.light-theme .card-metric {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.08);
}

.card-metric-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.card-metric-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--case-accent);
}

.card-metric-value--wide {
    font-size: clamp(0.78rem, 1.5vw, 0.95rem);
    line-height: 1.12;
}

/* Terminal path strip - sticks to bottom of card */
.card-terminal {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px dashed rgba(var(--case-accent-rgb), 0.2);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 2;
}

.terminal-prompt {
    color: var(--case-accent);
    font-weight: 700;
}

.terminal-path {
    color: rgba(255, 255, 255, 0.55);
    transition: color 0.2s ease;
}

body.light-theme .terminal-path {
    color: rgba(15, 23, 42, 0.55);
}

.featured-project:hover .terminal-path {
    color: var(--case-accent);
}

/* Scan sweep animation */
.featured-project::before {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 38px 38px;
    opacity: 0.55;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.3) 70%, transparent);
}

.featured-project:hover {
    border-color: rgba(var(--case-accent-rgb), 0.45);
    transform: translateY(-2px);
}

.featured-project::after {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 55%),
        linear-gradient(120deg,
            transparent 30%,
            rgba(var(--case-accent-rgb), 0) 45%,
            rgba(var(--case-accent-rgb), 0.08) 50%,
            rgba(var(--case-accent-rgb), 0) 55%,
            transparent 70%);
    background-size: 100% 100%, 220% 220%;
    background-position: 0 0, -50% -50%;
    transition: background-position 1.2s ease;
}

.featured-project:hover::after {
    background-position: 0 0, 50% 50%;
}

/* ==========================================
   X-RAY MODE (hold SPACE to activate)
   ========================================== */

/* Default hint pill (visible when xray is OFF) */
.xray-hint {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 9000;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.95rem;
    background: rgba(10, 14, 18, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    user-select: none;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.xray-hint i {
    width: 14px;
    height: 14px;
    color: var(--accent-primary);
}

.xray-hint kbd {
    display: inline-block;
    padding: 1px 6px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.85);
    font-family: inherit;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
}

body.light-theme .xray-hint {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(15, 23, 42, 0.12);
    color: rgba(15, 23, 42, 0.7);
}

body.light-theme .xray-hint i {
    color: var(--accent-strong);
}

body.light-theme .xray-hint kbd {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.22);
    color: rgba(15, 23, 42, 0.85);
}

body.xray .xray-hint {
    opacity: 0;
}

@media (max-width: 768px) {
    .xray-hint { display: none; }
}

/* Scan line: full-width green sweep, animated when xray is active */
.xray-scanline {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent,
        rgba(0, 255, 157, 0.85) 30%,
        #00ff9d 50%,
        rgba(0, 255, 157, 0.85) 70%,
        transparent);
    box-shadow: 0 0 24px rgba(0, 255, 157, 0.9),
                0 0 60px rgba(0, 255, 157, 0.6),
                0 0 120px rgba(0, 255, 157, 0.35);
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transform: translateY(0);
}

/* xray-scanline retired — warp canvas replaces it */
.xray-scanline { display: none; }

body.xray {
    background: #07111F !important;
}

/* Dim site content so the starfield carries the eye */
body.xray .hero-video,
body.xray img,
body.xray video {
    opacity: 0.06 !important;
}

body.xray main,
body.xray header {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
    pointer-events: none;
}

body.xray::before {
    content: none !important;
    display: none !important;
}

body.xray::after {
    content: none !important;
    display: none !important;
}

/* Warp container (holds Three.js or 2D fallback canvas) */
#warp-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9998;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 46%,
        rgba(7, 17, 31, 0.3) 0%,
        rgba(7, 17, 31, 0.7) 40%,
        #07111F 75%);
}

#warp-canvas canvas {
    display: block;
    position: absolute;
    inset: 0;
}

body.xray #warp-canvas {
    opacity: 1;
}

body.xray {
    background: #000 !important;
}

/* Kill bleed-through: solid black canvas backdrop during warp. */
body.xray #warp-canvas {
    background: #000 !important;
}

/* Rocket cockpit POV overlay */
.rocket-pov {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.rocket-pov .cockpit-frame {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 0 12px rgba(46, 242, 160, 0.08));
}

body.xray .rocket-pov {
    opacity: 1;
}

@keyframes cockpit-shake {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-0.5px, 0.5px); }
    50% { transform: translate(0.5px, -0.5px); }
    75% { transform: translate(-0.5px, -0.5px); }
}

body.xray .rocket-pov .cockpit-frame {
    animation: none;
}

@media (max-width: 768px) {
    .card-metrics {
        gap: 0.4rem;
    }
    .card-metric {
        padding: 0.5rem;
    }
    .card-metric-value {
        font-size: 0.9rem;
    }
    .card-terminal {
        font-size: 0.65rem;
        gap: 0.4rem;
    }
}

.project-kicker {
    display: block;
    color: rgba(226, 232, 240, 0.64);
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.featured-content h3 {
    max-width: 680px;
    color: #f8fafc;
    font-size: clamp(1.75rem, 3.4vw, 3.2rem);
    line-height: 0.98;
    margin-bottom: 0.85rem;
    font-weight: 850;
}

.featured-content p {
    max-width: 690px;
    color: rgba(226, 232, 240, 0.74);
    font-size: 0.98rem;
    line-height: 1.68;
    margin: 0 0 1.05rem;
}

.featured-stack,
.secure-rail {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.featured-stack {
    position: relative;
    padding: 0.85rem;
    border: 1px solid rgba(var(--case-accent-rgb), 0.2);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.46);
}

.featured-stack span,
.secure-rail summary {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.68rem;
    border: 1px solid rgba(226, 232, 240, 0.12);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.055);
    color: rgba(248, 250, 252, 0.86);
    font-size: 0.76rem;
    font-weight: 700;
}

.project-orbit {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    width: 150px;
    height: 112px;
    border: 1px solid rgba(var(--accent-rgb), 0.18);
    border-radius: 14px;
    opacity: 0.78;
    pointer-events: none;
}

.project-orbit::before,
.project-orbit::after {
    content: '';
    position: absolute;
    inset: 16px;
    border: 1px solid rgba(var(--accent-rgb), 0.14);
    border-radius: 10px;
}

.project-orbit::after {
    inset: 38px 52px 26px;
    background: rgba(var(--accent-rgb), 0.15);
    box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.2);
}

.project-orbit span {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--accent-primary);
    box-shadow: 0 0 24px rgba(var(--accent-rgb), 0.8);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-orbit span:nth-child(1) {
    top: 18px;
    right: 18px;
}

.project-orbit span:nth-child(2) {
    top: 52px;
    right: 70px;
}

.project-orbit span:nth-child(3) {
    right: 110px;
    bottom: 18px;
}

.secure-rail {
    position: relative;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.95rem;
    padding: 0.85rem;
    border: 1px solid rgba(var(--case-accent-rgb), 0.2);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.46);
    overflow: hidden;
}

.secure-rail::before {
    content: '';
    position: absolute;
    left: -20%;
    top: 0;
    width: 32%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--case-accent-rgb), 0.16), transparent);
    transform: skewX(-18deg) translateX(-120%);
    transition: transform 0.55s ease;
}

.secure-rail details {
    margin: 0;
    width: 100%;
    position: relative;
    z-index: 1;
}

.secure-rail summary {
    width: 100%;
    justify-content: space-between;
    background: rgba(var(--case-accent-rgb), 0.06);
    border-color: rgba(var(--case-accent-rgb), 0.16);
    cursor: pointer;
    list-style: none;
}

.secure-rail summary::-webkit-details-marker {
    display: none;
}

.secure-rail summary::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(var(--case-accent-rgb), 0.82);
    box-shadow: 0 0 16px rgba(var(--case-accent-rgb), 0.5);
}

.secure-rail details[open] summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.secure-rail details p {
    margin: 0;
    padding: 0.6rem 0.68rem 0.7rem;
    border: 1px solid rgba(var(--case-accent-rgb), 0.16);
    border-top: 0;
    border-bottom-left-radius: 7px;
    border-bottom-right-radius: 7px;
    background: rgba(255, 255, 255, 0.035);
    color: rgba(226, 232, 240, 0.74);
    font-size: 0.75rem;
    line-height: 1.45;
}

.featured-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.55rem;
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(226, 232, 240, 0.13);
}

.metric {
    min-width: 0;
    padding: 0.72rem;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(226, 232, 240, 0.1);
    border-radius: 10px;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.metric-number {
    display: block;
    color: var(--case-accent);
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    font-weight: 850;
    margin-bottom: 0.18rem;
    line-height: 1;
}

.metric-label {
    display: block;
    color: rgba(226, 232, 240, 0.62);
    font-size: 0.72rem;
    line-height: 1.25;
    font-weight: 700;
}

@media (hover: hover) and (pointer: fine) {
    .featured-project:hover {
        transform: translateY(-4px);
        border-color: rgba(125, 211, 252, 0.38);
    }

    .featured-project--secure:hover {
        border-color: rgba(147, 197, 253, 0.34);
    }

    .featured-project--flagship:hover .project-orbit span {
        transform: scale(1.18);
        box-shadow: 0 0 34px rgba(94, 234, 212, 0.95);
    }

    .featured-project--secure:hover .secure-rail::before {
        transform: skewX(-18deg) translateX(430%);
    }

    .featured-project:hover .metric {
        border-color: rgba(var(--case-accent-rgb), 0.26);
    }

    .featured-project:hover .metric:nth-child(1) {
        transform: translateY(-2px);
    }

    .featured-project:hover .metric:nth-child(2) {
        transform: translateY(-2px);
        transition-delay: 0.03s;
    }

    .featured-project:hover .metric:nth-child(3) {
        transform: translateY(-2px);
        transition-delay: 0.06s;
    }
}

@media (prefers-reduced-motion: reduce) {
    .featured-project,
    .project-orbit span,
    .secure-rail::before,
    .metric {
        transition: none;
    }

    .featured-project:hover,
    .featured-project:hover .metric,
    .featured-project--flagship:hover .project-orbit span {
        transform: none;
    }
}

body.light-theme .featured-project {
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.04), transparent 44%),
        radial-gradient(circle at 18% 0%, rgba(var(--case-accent-rgb), 0.16), transparent 34%),
        linear-gradient(145deg, #ffffff 0%, #f8fafc 52%, #edf2f7 100%);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.1);
}

body.light-theme .featured-project::before {
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.055) 1px, transparent 1px);
}

body.light-theme .featured-content h3 {
    color: #0f172a;
}

body.light-theme .project-kicker,
body.light-theme .featured-content p {
    color: #475569;
}

body.light-theme .featured-stack span,
body.light-theme .secure-rail summary,
body.light-theme .metric {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

body.light-theme .secure-rail details p {
    background: rgba(255, 255, 255, 0.58);
    border-color: rgba(15, 23, 42, 0.08);
    color: #475569;
}

body.light-theme .metric-label {
    color: #64748b;
}

body.light-theme .secure-rail {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.1);
}

body.light-theme .secure-rail summary::after {
    background: rgba(var(--case-accent-rgb), 0.5);
    box-shadow: none;
}

body.light-theme .featured-metrics {
    border-top-color: rgba(15, 23, 42, 0.08);
}

body.light-theme .metric-number {
    color: var(--accent-strong);
}

.featured-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-tag {
    padding: 0.5rem 1rem;
    background: rgba(var(--accent-rgb), 0.08);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--accent-primary);
    font-weight: 600;
}

.portfolio-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.portfolio-footer {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 4rem;
    font-style: italic;
    opacity: 0.8;
}

/* Filter Buttons */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.65rem 1.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.filter-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(var(--accent-rgb), 0.05);
}

.filter-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--bg-color);
    font-weight: 600;
}

body.light-theme .filter-btn.active {
    background: var(--accent-primary);
    color: #ffffff;
}

/* AI Projects Grid */
.ai-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(440px, auto);
    gap: 1.75rem;
    margin: 2rem auto 0;
    max-width: 1180px;
    align-items: stretch;
    justify-content: center;
}

@media (max-width: 960px) {
    .ai-projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.ai-project-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 1.75rem;
    /* New layout: left-aligned vertical flow with proper hierarchy.
       Header row (icon + kicker), then title, then description,
       then tags. No more centering, no more wrap surprises. */
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Header row: icon left, kicker right */
.ai-project-card .project-icon-wrapper {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    margin: 0 0 1.25rem;
    align-self: flex-start;
}

.ai-project-card .project-kicker {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent-primary);
    opacity: 0.75;
    margin-bottom: 0.5rem;
    padding: 0.3rem 0.6rem;
    background: rgba(var(--accent-rgb), 0.08);
    border: 1px solid rgba(var(--accent-rgb), 0.18);
    border-radius: 4px;
    align-self: flex-start;
}

.ai-project-card h3 {
    flex: 0 0 auto;
    width: 100%;
    margin: 0 0 0.85rem;
    padding: 0;
    text-align: left;
    line-height: 1.25;
    display: block;
    min-height: 0;
}

.ai-project-card p {
    flex: 1 1 auto;
    width: 100%;
    margin: 0 0 1.25rem;
    padding: 0;
    text-align: left;
    line-height: 1.6;
    font-size: 0.92rem;
    display: block;
}

.ai-project-card .project-tags {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    margin: 1.25rem 0 0;
    min-height: 2.4em;
}

body.light-theme .ai-project-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Liquid glass gradient overlay - Pure iOS (colorless) */
.ai-project-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center,
            rgba(255, 255, 255, 0.04) 0%,
            rgba(255, 255, 255, 0.02) 25%,
            transparent 50%);
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

body.light-theme .ai-project-card::before {
    background: radial-gradient(circle at center,
            rgba(0, 0, 0, 0.02) 0%,
            rgba(0, 0, 0, 0.01) 25%,
            transparent 50%);
}



/* Secondary flowing layer */
.ai-project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.05) 0%,
            transparent 50%,
            rgba(0, 0, 0, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.6s ease;
    border-radius: 24px;
    pointer-events: none;
}

.ai-project-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    border-left-width: 4px;
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.light-theme .ai-project-card:hover {
    border-color: rgba(0, 0, 0, 0.08);
    border-left-width: 4px;
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.ai-project-card:hover::before {
    opacity: 1;
}

.ai-project-card:hover::after {
    opacity: 1;
}

/* Icon Wrappers - simplified */
.project-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Glass shimmer effect */
.project-icon-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}



.ai-project-card:hover .project-icon-wrapper {
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.ai-project-card:hover .project-icon-wrapper::before {
    opacity: 1;
}

.project-icon-wrapper i {
    width: 36px;
    height: 36px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
    position: relative;
    z-index: 1;
}

/* Icon Wrappers - Pure iOS Liquid Glass (No Color) */
.project-icon-wrapper,
.icon-violet,
.icon-emerald,
.icon-blue,
.icon-amber,
.icon-rose,
.icon-indigo,
.icon-teal,
.icon-pink,
.icon-cyan,
.icon-purple,
.icon-slate,
.icon-orange,
.icon-red,
.icon-lime,
.icon-green {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.12) 0%,
            rgba(255, 255, 255, 0.06) 100%);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

body.light-theme .project-icon-wrapper,
body.light-theme .icon-violet,
body.light-theme .icon-emerald,
body.light-theme .icon-blue,
body.light-theme .icon-amber,
body.light-theme .icon-rose,
body.light-theme .icon-indigo,
body.light-theme .icon-teal,
body.light-theme .icon-pink,
body.light-theme .icon-cyan,
body.light-theme .icon-purple,
body.light-theme .icon-slate,
body.light-theme .icon-orange,
body.light-theme .icon-red,
body.light-theme .icon-lime,
body.light-theme .icon-green {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.6) 0%,
            rgba(255, 255, 255, 0.4) 100%);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Card Text Content */
.ai-project-card h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.01em;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: manual;
}

.ai-project-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.ai-project-card p strong {
    color: var(--text-primary);
    font-weight: 600;
}

body.light-theme .ai-project-card p strong {
    color: #1e293b;
}

/* Project Tags - tighter spacing */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    width: 100%;
}

.project-tags span {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.project-tags span::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-tags span:hover::before {
    opacity: 1;
}

.project-tags span:hover {
    transform: translateY(-2px) scale(1.05);
}

/* Tag Color Variants - iOS Pure Glass (Minimal Color) */
.tag-violet,
.tag-emerald,
.tag-blue,
.tag-amber,
.tag-rose,
.tag-indigo,
.tag-teal,
.tag-pink,
.tag-cyan,
.tag-purple,
.tag-slate,
.tag-orange,
.tag-red,
.tag-lime,
.tag-green,
.tag-yellow,
.tag-magenta {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body.light-theme .tag-violet,
body.light-theme .tag-emerald,
body.light-theme .tag-blue,
body.light-theme .tag-amber,
body.light-theme .tag-rose,
body.light-theme .tag-indigo,
body.light-theme .tag-teal,
body.light-theme .tag-pink,
body.light-theme .tag-cyan,
body.light-theme .tag-purple,
body.light-theme .tag-slate,
body.light-theme .tag-orange,
body.light-theme .tag-red,
body.light-theme .tag-lime,
body.light-theme .tag-green,
body.light-theme .tag-yellow,
body.light-theme .tag-magenta {
    background: rgba(0, 0, 0, 0.03);
    color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.tag-gray {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.tag-dark {
    background: rgba(31, 41, 55, 0.15);
    color: #1f2937;
    border: 1px solid rgba(31, 41, 55, 0.3);
}

.project-tags span:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Hidden state for filtering */
.ai-project-card.hidden {
    display: none;
    opacity: 0;
}

/* Category-specific border colors */
[data-category*="rag"] {
    border-left-color: #10b981;
}

[data-category*="agents"] {
    border-left-color: #3b82f6;
}

[data-category*="vision"] {
    border-left-color: var(--accent-primary);
}

[data-category*="automation"] {
    border-left-color: #f59e0b;
}

/* Project metric badge */
.project-metric {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 8px;
    margin-top: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.project-metric i {
    width: 14px;
    height: 14px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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




/* ==========================================
   SKILLS SECTION
   ========================================== */
.skills-section {
    max-width: 1180px;
}

.skills-header {
    max-width: 760px;
    padding-top: 1.5rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2.5rem;
}

.section-eyebrow {
    display: block;
    width: 100%;
    margin-bottom: 0.85rem;
    color: var(--accent-strong);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.skills-header p {
    max-width: 620px;
    margin: 0.9rem auto 0;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    text-align: center;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 4rem;
}

.skill-category {
    grid-column: span 4;
    min-width: 0;
    padding: 1.35rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.skill-category:nth-child(4),
.skill-category:nth-child(5) {
    grid-column: span 6;
}

.skill-category:hover {
    border-color: rgba(var(--accent-strong-rgb), 0.5);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.skill-category h3 {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.skill-category h3 i {
    color: var(--accent-strong);
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.skill-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    max-width: 100%;
    padding: 0.5rem 0.75rem;
    background: rgba(var(--accent-rgb), 0.06);
    border: 1px solid rgba(var(--accent-rgb), 0.16);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.86rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.skill-tags span:hover {
    border-color: rgba(var(--accent-strong-rgb), 0.55);
    background: rgba(var(--accent-rgb), 0.12);
}

/* ==========================================
   CERTIFICATIONS
   ========================================== */
.certifications {
    margin-top: 4rem;
}

.certifications h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    max-width: 1100px;
    margin: 0 auto;
}

.cert-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
}

.cert-item i {
    color: var(--accent-primary);
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.cert-item strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.cert-item span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ==========================================
   CONTACT SECTION
   ========================================== */
.contact-section {
    text-align: center;
}

.contact-card {
    display: block;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-card h2 {
    margin-bottom: 1rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    align-items: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 2rem;
    background: rgba(var(--accent-rgb), 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 100%;
    max-width: 450px;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.contact-item:hover {
    background: rgba(var(--accent-rgb), 0.1);
    border-color: var(--accent-primary);
    transform: translateX(5px);
}

.contact-item i {
    color: var(--accent-primary);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* WhatsApp CTA - Special Styling */
.whatsapp-cta {
    background: rgba(37, 211, 102, 0.1);
    border-color: rgba(37, 211, 102, 0.3);
}

.whatsapp-cta:hover {
    background: rgba(37, 211, 102, 0.15);
    border-color: #25D366;
    transform: translateX(5px) scale(1.02);
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.2);
}

.whatsapp-cta i {
    color: #25D366;
}

body.light-theme .whatsapp-cta:hover {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
}

/* Light Theme Overrides for Skills & Contact */
body.light-theme .skill-tags span {
    background: rgba(var(--accent-rgb), 0.07);
    border-color: rgba(var(--accent-rgb), 0.2);
}

body.light-theme .skill-tags span:hover {
    background: rgba(var(--accent-rgb), 0.14);
    border-color: rgba(var(--accent-strong-rgb), 0.45);
}

body.light-theme .contact-item {
    background: rgba(var(--accent-rgb), 0.08);
    border-color: rgba(var(--accent-rgb), 0.25);
}

body.light-theme .contact-item:hover {
    background: rgba(var(--accent-rgb), 0.15);
    border-color: var(--accent-primary);
}

body.light-theme .whatsapp-cta {
    background: rgba(var(--accent-rgb), 0.08);
    border-color: rgba(var(--accent-rgb), 0.25);
}

body.light-theme .whatsapp-cta i {
    color: var(--accent-primary);
}

body.light-theme .whatsapp-cta:hover {
    background: rgba(var(--accent-rgb), 0.15);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.25);
}

/* Email Reveal Section */
.email-reveal {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(var(--accent-rgb), 0.05);
    border: 1px solid var(--accent-primary);
    border-radius: 8px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.email-reveal.hidden {
    display: none;
}

.email-reveal p {
    margin: 0.5rem 0;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.email-reveal .text-small {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

body.light-theme .email-reveal {
    background: rgba(var(--accent-rgb), 0.08);
}

/* ==========================================
   CHAT WIDGET - Clean Purple Design
   ========================================== */
.whatsapp-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

/* Status bubble */
.whatsapp-status {
    background: var(--card-bg);
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-primary);
    border-radius: 50%;
    animation: pulse-purple 2s infinite;
}

.status-text {
    font-weight: 500;
    color: var(--text-primary);
}

@keyframes pulse-purple {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.whatsapp-btn {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.25);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.whatsapp-btn i {
    color: white;
    width: 24px;
    height: 24px;
}

.whatsapp-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(var(--accent-rgb), 0.35);
}

/* Hover tooltip */
.whatsapp-btn::after {
    content: 'Chat met Robin';
    position: absolute;
    right: 56px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.whatsapp-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

@keyframes pulse-green {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Light theme adjustments */
body.light-theme .whatsapp-status {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

body.light-theme .whatsapp-status::after {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.05);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .whatsapp-widget {
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-btn {
        width: 50px;
        height: 50px;
    }

    .whatsapp-btn i {
        width: 24px;
        height: 24px;
    }

    .whatsapp-status {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
}

footer {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 980px) {
    .featured-projects-grid {
        grid-template-columns: 1fr;
        max-width: 720px;
    }

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

    .skill-category,
    .skill-category:nth-child(4),
    .skill-category:nth-child(5) {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stats-pills {
        flex-direction: column;
        align-items: center;
    }

    .stat-pill {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stats-grid {
        flex-direction: column;
        gap: 2rem;
    }

    .stat-item {
        align-items: center;
        text-align: center;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .terminal-bg {
        font-size: 0.7rem;
        right: 2%;
    }

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

    .timeline {
        padding-left: 1.5rem;
    }
}

@media (max-width: 640px) {
    .section {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .skills-header {
        text-align: center;
        margin-bottom: 1.75rem;
    }

    .skills-header p {
        margin-left: auto;
        margin-right: auto;
    }

    .skills-container {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .skill-category {
        padding: 1.1rem;
    }

    .skill-tags {
        gap: 0.45rem;
    }

    .skill-tags span {
        min-height: 34px;
        padding: 0.45rem 0.65rem;
        font-size: 0.82rem;
    }
}

/* ==========================================
   PRELOADER - MODERN CODE EDITOR
   ========================================== */

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    font-family: 'JetBrains Mono', monospace;
    max-width: 700px;
    width: 90%;
    padding: 0;
    position: relative;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    border: 1px solid transparent;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.preloader-content:hover {
    border-color: rgba(var(--accent-rgb), 0.3);
}

/* Code Header */
.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header-left .file-name {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

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

    50% {
        opacity: 0.7;
        transform: scale(0.95);
    }
}

.status-text {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

/* Code Editor */
.code-editor {
    padding: 2rem 1.5rem;
    background: #fafafa;
    min-height: 200px;
}

.code-line {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.6;
    opacity: 0;
    animation: fadeInCode 0.4s ease forwards;
}

.code-line:nth-child(1) {
    animation-delay: 0.1s;
}

.code-line:nth-child(2) {
    animation-delay: 0.2s;
}

.code-line:nth-child(3) {
    animation-delay: 0.3s;
}

.code-line:nth-child(4) {
    animation-delay: 0.4s;
}

.code-line:nth-child(5) {
    animation-delay: 0.5s;
}

.code-line:nth-child(6) {
    animation-delay: 0.6s;
}

@keyframes fadeInCode {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

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

.line-number {
    color: #9ca3af;
    user-select: none;
    min-width: 20px;
    text-align: right;
}

.keyword {
    color: #c084fc;
    font-weight: 600;
}

.variable {
    color: #f59e0b;
}

.string {
    color: #10b981;
}

.comment {
    color: #94a3b8;
    font-style: italic;
}

.operator {
    color: #64748b;
    font-weight: 600;
}

.class {
    color: #38bdf8;
    font-weight: 600;
}

.method {
    color: #facc15;
}

.bracket {
    color: #94a3b8;
}

/* Progress Container */
.progress-container {
    padding: 1.5rem;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.progress-bar-wrapper {
    width: 100%;
    height: 3px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    margin-bottom: 0.75rem;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #047857 0%, #10b981 55%, #00ff9d 100%);
    transition: width 0.1s linear;
    position: relative;
    border-radius: 3px;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.45);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-text {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.progress-percentage {
    font-size: 0.75rem;
    color: #1e293b;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}


/* ==========================================
   TESTIMONIALS SECTION
   ========================================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(var(--accent-rgb), 0.15);
}

.testimonial-quote {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 2rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-primary);
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.author-info strong {
    font-size: 1rem;
    color: var(--text-primary);
}

.author-info span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ==========================================
   CONTACT SECTION
   ========================================== */
.contact-header {
    justify-content: center;
    margin-bottom: 1.75rem;
}

.contact-header h2 {
    text-align: center;
}

#contact.section {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.contact-value-prop {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 500;
}

/* Contact card wrapper */
.contact-card {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    padding: 1.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    text-align: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

#contact .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#contact .contact-card,
#contact .contact-terminal-wrap {
    width: 100%;
}

body.light-theme .contact-card {
    background: rgba(15, 23, 42, 0.02);
    border-color: rgba(15, 23, 42, 0.08);
}

.contact-card .primary-cta {
    margin: 0 0 0.85rem;
}

.contact-card .secondary-options {
    margin: 0.85rem 0 0;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.cv-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0.25rem auto 0;
    padding: 0.65rem 1.25rem;
    border: 1px solid rgba(var(--accent-rgb), 0.4);
    border-radius: 999px;
    background: rgba(var(--accent-rgb), 0.06);
    color: var(--accent-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.cv-download-btn:hover {
    background: rgba(var(--accent-rgb), 0.15);
    border-color: rgba(var(--accent-rgb), 0.7);
    transform: translateY(-1px);
}

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

body.light-theme .cv-download-btn {
    color: var(--accent-strong);
    border-color: rgba(var(--accent-strong-rgb), 0.45);
    background: rgba(var(--accent-strong-rgb), 0.06);
}

body.light-theme .cv-download-btn:hover {
    background: rgba(var(--accent-strong-rgb), 0.14);
    border-color: rgba(var(--accent-strong-rgb), 0.75);
}

body.light-theme .contact-card .secondary-options {
    border-top-color: rgba(15, 23, 42, 0.08);
}

/* Contact availability */
.contact-availability {
    text-align: center;
    color: var(--text-secondary);
    margin: 0 auto 1.5rem;
    max-width: 680px;
    font-size: 1rem;
    line-height: 1.55;
}

/* Primary CTA */
.primary-cta {
    text-align: center;
    margin: 0 auto 2rem;
}

.cta-primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.3);
    white-space: nowrap;
}

.cta-primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.4);
}

.cta-title {
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

.primary-cta .cta-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.75rem;
    text-align: center;
}

.cta-primary-btn i {
    width: 18px;
    height: 18px;
    color: white;
}

/* Divider */
.contact-divider {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 2rem 0 1.5rem;
}

/* Secondary Options */
.secondary-options {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.secondary-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    background: none;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
}

.secondary-link:hover {
    border-color: var(--accent-primary);
    background: rgba(var(--accent-rgb), 0.05);
    color: var(--accent-primary);
}

.secondary-link i {
    width: 20px;
    height: 20px;
}

/* Contact Testimonial - Compact Quote Boxes */
.testimonials-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.quote-box {
    position: relative;
    padding: 1.75rem;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.05), rgba(var(--accent-secondary-rgb), 0.03));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.quote-box:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--accent-rgb), 0.4);
    box-shadow: 0 16px 36px -12px rgba(var(--accent-rgb), 0.25);
}

.quote-author {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.quote-text {
    position: relative;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-secondary);
    font-style: italic;
    margin: 0;
}

.quote-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(var(--accent-rgb), 0.3);
    box-shadow: 0 4px 12px -4px rgba(var(--accent-rgb), 0.35);
}

.quote-author-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    padding-right: 2.6rem;
}

.quote-author strong {
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.quote-author span {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.source-link {
    position: absolute;
    top: 1.45rem;
    right: 1.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    opacity: 0.72;
    transition: all 0.2s ease;
}

.source-link:hover {
    color: var(--accent-primary);
    border-color: rgba(var(--accent-rgb), 0.45);
    background: rgba(var(--accent-rgb), 0.08);
    opacity: 1;
}

.source-link i {
    width: 14px;
    height: 14px;
}

/* Contact Testimonial */
.contact-testimonial {
    max-width: 700px;
    margin: 3rem auto 0;
    padding: 2rem;
    background: rgba(var(--accent-rgb), 0.03);
    border-left: 4px solid var(--accent-primary);
    border-radius: 12px;
}

.testimonial-text {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1rem;
}

.contact-testimonial .testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-testimonial .testimonial-author strong {
    font-size: 1rem;
    color: var(--text-primary);
}

.contact-testimonial .testimonial-author span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .cta-primary-btn {
        padding: 0.85rem 1.5rem;
        flex-direction: row;
    }

    .cta-title {
        font-size: 1.125rem;
    }

    .secondary-options {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .secondary-link {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .testimonials-compact {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   CERTIFICATIONS SECTION
   ========================================== */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    padding: 1rem 0;
    max-width: 1180px;
    margin: 0 auto;
    justify-content: center;
}

@media (min-width: 1100px) {
    .certifications-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.cert-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
    background: var(--card-bg);
    border: 2px solid transparent;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.cert-item:hover {
    transform: translateY(-4px);
    border-color: var(--cert-accent, var(--accent-primary));
    box-shadow: 0 12px 40px var(--cert-glow, rgba(var(--accent-rgb), 0.15));
}

body.light-theme .cert-item:hover {
    box-shadow: 0 12px 40px var(--cert-glow, rgba(var(--accent-rgb), 0.12));
}

/* Cert badge - unique per certification, neutral container */
.cert-badge {
    width: 72px;
    height: 72px;
    margin-bottom: 1.5rem;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cert-badge::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, var(--cert-accent, rgba(255,255,255,0.1)), transparent 50%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.cert-badge svg {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cert-item:hover .cert-badge {
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 12px 28px rgba(0, 0, 0, 0.3),
        0 0 24px var(--cert-glow, rgba(46, 242, 160, 0.12));
}

.cert-item:hover .cert-badge::before {
    opacity: 1;
}

.cert-item:hover .cert-badge svg {
    transform: scale(1.08);
}

/* Per-cert accent colors for the badge glow ring */
.cert-azure     { --cert-accent: #00A4EF; --cert-glow: rgba(0, 164, 239, 0.22); }
.cert-powerbi   { --cert-accent: #F2C811; --cert-glow: rgba(242, 200, 17, 0.2); }
.cert-dl        { --cert-accent: #C8102E; --cert-glow: rgba(200, 16, 46, 0.22); }
.cert-capgemini { --cert-accent: #12B0F0; --cert-glow: rgba(18, 176, 240, 0.22); }
.cert-modeling  { --cert-accent: #0070AD; --cert-glow: rgba(0, 112, 173, 0.22); }
.cert-sql       { --cert-accent: #03EF62; --cert-glow: rgba(3, 239, 98, 0.22); }
.cert-sixsigma  { --cert-accent: #C9A227; --cert-glow: rgba(201, 162, 39, 0.22); }

body.light-theme .cert-badge {
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 4px 16px rgba(15, 23, 42, 0.06);
}

body.light-theme .progress-bar {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    box-shadow:
        0 8px 16px rgba(var(--accent-rgb), 0.25),
        0 0 25px rgba(var(--accent-rgb), 0.15);
}

body.light-theme .progress-bar::after {
    box-shadow:
        0 12px 24px rgba(var(--accent-rgb), 0.35),
        0 0 40px rgba(var(--accent-rgb), 0.25);
}

/* Text content */
.cert-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 700;
    position: relative;
    z-index: 1;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.cert-item:hover h4 {
    color: var(--cert-accent, var(--accent-primary));
}

.cert-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    position: relative;
    z-index: 1;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
}

/* Shimmer effect on hover */
@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.cert-item:hover::before {
    animation: shimmer 2s ease-in-out infinite;
}

/* ==========================================
   PERSONAL INFO SECTION
   ========================================== */
.personal-info {
    padding: 2.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-item i {
    color: var(--accent-primary);
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.info-item strong {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.info-item p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ==========================================
   ROLE DESCRIPTION LISTS
   ========================================== */
/* Triangle-bullet rules removed — using single green-dot style in the primary block above. */

/* Responsive */
@media (max-width: 768px) {

    /* Preloader Mobile Fix */
    .preloader-content {
        width: 95%;
        max-width: 340px;
        border-radius: 12px;
    }

    .code-header {
        padding: 0.75rem 1rem;
    }

    .code-header .filename {
        font-size: 0.75rem;
    }

    .code-body {
        padding: 1rem;
        min-height: 120px;
    }

    .code-line {
        font-size: 0.55rem;
        margin-bottom: 0.4rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .line-number {
        min-width: 1rem;
        margin-right: 0.5rem;
    }

    .loading-bar-container {
        padding: 0.75rem 1rem;
    }

    .loading-text {
        font-size: 0.7rem;
    }

    .progress-percentage {
        font-size: 0.8rem;
    }

    /* Hero Mobile */
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    /* Section Mobile */
    .section {
        padding: 3rem 1rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    /* About Mobile */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stats-grid {
        gap: 2rem;
    }

    /* Timeline Mobile */
    .timeline {
        padding-left: 1rem;
    }

    .timeline-item::before {
        left: -1.5rem;
        width: 10px;
        height: 10px;
    }

    .role-header {
        flex-direction: column;
        gap: 0.25rem;
    }

    /* Project Cards Mobile */
    .project-filters {
        overflow-x: auto;
        justify-content: flex-start;
        gap: 0.5rem;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .filter-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .ai-projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .ai-project-card {
        padding: 1.25rem;
    }

    .project-icon-wrapper {
        width: 48px;
        height: 48px;
    }

    .project-tags {
        gap: 0.35rem;
    }

    .project-tags span {
        font-size: 0.7rem;
        padding: 0.4rem 0.75rem;
    }

    /* Featured Project Mobile */
    .featured-project {
        min-height: 0;
        padding: 1rem;
    }

    .featured-content h3 {
        font-size: 2rem;
    }

    .project-orbit {
        width: 150px;
        height: 110px;
        opacity: 0.48;
    }

    .featured-metrics {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .metric-number {
        font-size: 2rem;
    }

    /* Contact Mobile - keep CTA as pill, not circle */
    .cta-primary-btn {
        flex-direction: row;
        text-align: center;
        padding: 0.85rem 1.5rem;
        width: auto;
        max-width: 100%;
    }

    .cta-content {
        text-align: center;
    }

    .secondary-options {
        flex-direction: column;
        gap: 1rem;
    }

    .secondary-link {
        width: 100%;
        justify-content: center;
    }

    .testimonials-compact {
        grid-template-columns: 1fr;
    }

    /* Navbar Mobile */
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    /* WhatsApp Widget Mobile */
    .whatsapp-widget {
        bottom: 15px;
        right: 15px;
    }

    .whatsapp-status {
        display: none;
    }
}

/* ==========================================
   COLLAPSIBLE PROJECT GRID
   ========================================== */
.show-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem auto 0;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.show-more-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.show-more-btn i {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.show-more-btn.expanded i {
    transform: rotate(180deg);
}

/* Card limit + show-more is handled by JS in script.js */

/* ==========================================
   ACCESSIBILITY
   ========================================== */

/* Keyboard focus rings — only on interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--accent-strong, var(--accent-primary));
    outline-offset: 2px;
    border-radius: 4px;
}

/* Never persist focus rings on cards after click */
.ai-project-card:focus:not(:focus-visible),
.featured-project:focus:not(:focus-visible) {
    outline: none;
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero-video {
        display: none;
    }
}

/* ==========================================
   TERMINAL — EMBEDDED IN CONTACT SECTION
   ========================================== */
.contact-terminal-wrap {
    max-width: 720px;
    margin: 1.5rem auto 0;
}

.contact-terminal-intro {
    text-align: center;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 0.65rem;
    opacity: 0.7;
}

@keyframes blink-cursor {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.terminal-window {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    height: min(380px, 52vh);
    background: #0a0e0a;
    border: 1px solid rgba(0, 255, 157, 0.2);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 14px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(0, 255, 157, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

.terminal-titlebar-spacer {
    width: 16px;
}

.terminal-input--pulse {
    animation: term-input-pulse 0.55s ease;
}

@keyframes term-input-pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 157, 0.5); }
    100% { box-shadow: 0 0 0 8px rgba(0, 255, 157, 0); }
}

.terminal-titlebar {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.9rem;
    background: #11161a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

.terminal-dots {
    display: flex;
    gap: 0.4rem;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot--red { background: #ff5f57; }
.terminal-dot--yellow { background: #febc2e; }
.terminal-dot--green { background: #28c840; }

.terminal-title {
    flex: 1;
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

.terminal-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    padding: 0.25rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.terminal-close:hover {
    color: #ff5f57;
}

.terminal-close i {
    width: 16px;
    height: 16px;
}

.terminal-body {
    flex: 1;
    padding: 1rem 1.2rem;
    overflow-y: auto;
    color: #00ff9d;
    font-size: 0.86rem;
    line-height: 1.7;
    background:
        radial-gradient(ellipse 80% 40% at 50% 0%, rgba(0, 255, 157, 0.04), transparent 70%),
        #0a0e0a;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 157, 0.3) transparent;
}

.terminal-body::-webkit-scrollbar { width: 6px; }
.terminal-body::-webkit-scrollbar-thumb { background: rgba(0, 255, 157, 0.3); border-radius: 3px; }

.terminal-line {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.terminal-line--system { color: #00ff9d; }
.terminal-line--system::before { content: "> "; color: rgba(0, 255, 157, 0.6); }

.terminal-line--user { color: #ffffff; margin-top: 0.6rem; }
.terminal-line--user::before { content: "$ "; color: rgba(255, 255, 255, 0.55); }

.terminal-line--link {
    color: #00ff9d;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.terminal-line--link::before { content: ""; }
.terminal-line--link a { color: inherit; text-decoration: inherit; }
.terminal-line--link a:hover { color: #5eead4; }

.terminal-line--error { color: #ff6b6b; }
.terminal-line--error::before { content: "! "; color: rgba(255, 107, 107, 0.7); }

.terminal-line--muted { color: rgba(255, 255, 255, 0.5); }
.terminal-line--muted::before { content: ""; }

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 1em;
    background: #00ff9d;
    vertical-align: text-bottom;
    margin-left: 2px;
    animation: blink-cursor 1s step-end infinite;
}

.terminal-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.7rem 1rem;
    background: #0a0e0a;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-chip {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.75);
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.15s ease;
}

.terminal-chip:hover {
    border-color: rgba(0, 255, 157, 0.5);
    color: #00ff9d;
    background: rgba(0, 255, 157, 0.06);
}

.terminal-chip--press {
    animation: chip-press 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes chip-press {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 255, 157, 0); }
    25% { transform: scale(0.92); box-shadow: 0 0 0 0 rgba(0, 255, 157, 0.6); }
    100% { transform: scale(1); box-shadow: 0 0 0 12px rgba(0, 255, 157, 0); }
}

.terminal-line--typing::after {
    content: "▍";
    color: #00ff9d;
    margin-left: 2px;
    animation: blink-cursor 0.8s step-end infinite;
}

.terminal-input-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    background: #0a0e0a;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-input-prompt {
    color: #00ff9d;
    font-weight: 700;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: box-shadow 0.2s ease;
}

.terminal-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.terminal-submit {
    background: transparent;
    border: none;
    color: rgba(0, 255, 157, 0.6);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.terminal-submit:hover {
    color: #00ff9d;
}

.terminal-submit i {
    width: 18px;
    height: 18px;
}

/* ---- Terminal Light Theme ---- */
body.light-theme .terminal-window {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow:
        0 14px 40px rgba(15, 23, 42, 0.08),
        0 0 0 1px rgba(15, 23, 42, 0.06);
}
body.light-theme .terminal-titlebar {
    background: #f8fafc;
    border-bottom-color: rgba(15, 23, 42, 0.08);
}
body.light-theme .terminal-body {
    color: #1e293b;
    background: #ffffff;
}
body.light-theme .terminal-body::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.15); }
body.light-theme .terminal-line--system { color: #2563eb; }
body.light-theme .terminal-line--system::before { color: rgba(59, 130, 246, 0.5); }
body.light-theme .terminal-line--user { color: #0f172a; }
body.light-theme .terminal-line--user::before { color: rgba(15, 23, 42, 0.4); }
body.light-theme .terminal-line--link { color: #2563eb; }
body.light-theme .terminal-line--link a:hover { color: #3b82f6; }
body.light-theme .terminal-line--muted { color: rgba(15, 23, 42, 0.4); }
body.light-theme .terminal-chips {
    background: #ffffff;
    border-top-color: rgba(15, 23, 42, 0.08);
}
body.light-theme .terminal-chip {
    border-color: rgba(15, 23, 42, 0.15);
    color: #334155;
}
body.light-theme .terminal-chip:hover {
    border-color: var(--accent-strong);
    color: var(--accent-strong);
    background: rgba(var(--accent-strong-rgb), 0.05);
}
body.light-theme .terminal-input-row {
    background: #ffffff;
    border-top-color: rgba(15, 23, 42, 0.08);
}
body.light-theme .terminal-input-prompt { color: var(--accent-strong); }
body.light-theme .terminal-input { color: #0f172a; }
body.light-theme .terminal-input::placeholder { color: rgba(15, 23, 42, 0.3); }
body.light-theme .terminal-submit { color: rgba(var(--accent-strong-rgb), 0.5); }
body.light-theme .terminal-submit:hover { color: var(--accent-strong); }
body.light-theme .terminal-cursor { background: var(--accent-strong); }
body.light-theme .terminal-line--typing::after { color: var(--accent-strong); }
body.light-theme .terminal-title { color: rgba(15, 23, 42, 0.5); }
body.light-theme .terminal-close { color: rgba(15, 23, 42, 0.4); }

/* ---- Rocket cockpit Light Theme ---- */
body.light-theme .rocket-pov .cockpit-frame {
    filter: brightness(2.8) saturate(0.35) contrast(0.65);
}

@media (max-width: 640px) {
    .terminal-toggle-label { display: none; }
    .terminal-window { height: 90vh; }
    .terminal-chips { padding: 0.5rem 0.7rem; }
    .terminal-chip { font-size: 0.65rem; padding: 0.3rem 0.5rem; }
}

/* ==========================================
   FINAL POLISH PASS
   1. Custom scrollbar (animated, accent-coloured)
   2. Contact + terminal fits 100vh on landing
   3. Project card title alignment (subgrid-like fix)
   4. Mobile-first responsive rebuild
   5. Touch-friendly tap targets
   6. Smooth focus states for a11y
   7. Reduced motion respect
   8. Smoother section transitions
   ========================================== */

/* 1. Custom scrollbar — minimal, accent-tinted, animated */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--accent-rgb), 0.4) transparent;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg,
        rgba(var(--accent-rgb), 0.35) 0%,
        rgba(var(--accent-rgb), 0.55) 50%,
        rgba(var(--accent-rgb), 0.35) 100%);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg,
        rgba(var(--accent-rgb), 0.6) 0%,
        rgba(var(--accent-rgb), 0.85) 50%,
        rgba(var(--accent-rgb), 0.6) 100%);
    background-clip: padding-box;
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.6);
}

body.light-theme ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg,
        rgba(var(--accent-strong-rgb), 0.35) 0%,
        rgba(var(--accent-strong-rgb), 0.55) 50%,
        rgba(var(--accent-strong-rgb), 0.35) 100%);
    background-clip: padding-box;
}

/* 2. Contact section fits viewport after rocket lands */
@media (min-width: 769px) {
    #contact.section {
        padding-top: 4rem;
        padding-bottom: 4rem;
        gap: 0;
    }

    #contact .section-header {
        margin-bottom: 1rem;
    }

    #contact .section-header h2 {
        font-size: 1.85rem;
    }

    #contact .contact-card {
        padding: 1.25rem 1.5rem;
    }

    #contact .contact-terminal-wrap {
        margin-top: 1rem;
    }

    #contact .terminal-window {
        height: min(320px, 42vh);
    }
}

/* Slightly looser on tall screens */
@media (min-width: 769px) and (min-height: 1000px) {
    #contact .terminal-window {
        height: 380px;
    }
}

/* 3. Project card title alignment — handled in main .ai-project-card flex rules.
   Intentionally NOT using -webkit-line-clamp here because it forces
   display: -webkit-box and breaks the flex centering. min-height: 2.6em
   on h3 already keeps titles aligned across cards. */

/* 4. Mobile responsive rebuild */
@media (max-width: 768px) {
    /* Typography scaling */
    h1 { font-size: 2.4rem; line-height: 1.15; margin-bottom: 1rem; }
    h2 { font-size: 1.85rem; }
    h3 { font-size: 1.2rem; }

    .section {
        padding: 2.5rem 1rem;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    /* Navbar mobile */
    .navbar { height: 64px; }
    .nav-container { padding: 0 1rem; gap: 0.5rem; }
    .nav-links {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--nav-bg);
        padding: 1.25rem;
        gap: 1.25rem;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-120%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    .nav-links.is-open { transform: translateY(0); }
    .nav-links a { font-size: 1rem; }
    .nav-links .btn-primary { width: 100%; text-align: center; }
    .mobile-menu-btn { display: inline-flex !important; }

    /* Hero compact on mobile */
    .hero { padding: 5rem 1rem 3rem !important; min-height: auto !important; }

    /* Project filters scrollable */
    .project-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0 1rem 0.5rem;
        margin: 0 -1rem 1.5rem;
        gap: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .project-filters::-webkit-scrollbar { display: none; }
    .filter-btn {
        flex: 0 0 auto;
        padding: 0.5rem 1rem;
        font-size: 0.82rem;
    }

    /* Cards: single column on mobile */
    .ai-projects-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
        padding: 0 0.5rem;
        grid-auto-rows: auto !important;
    }
    .ai-project-card {
        padding: 1.25rem;
        min-height: 280px;
    }
    .ai-project-card h3 {
        min-height: auto;
        font-size: 1.15rem;
    }
    .ai-project-card p {
        font-size: 0.9rem;
    }
    .ai-project-card .project-tags {
        min-height: auto;
    }

    /* Featured cards stack */
    .featured-projects-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    .featured-project { padding: 1.25rem 1.1rem 1rem; }

    /* Contact mobile */
    .contact-card {
        padding: 1.25rem 1rem;
        max-width: 100%;
    }
    .contact-card .primary-cta {
        margin: 0 0 1rem;
    }
    .contact-card .primary-cta a {
        width: auto;
        max-width: 100%;
    }
    .cta-primary-btn {
        padding: 0.65rem 1.25rem;
        gap: 0.5rem;
        font-size: 0.9rem;
    }
    .cta-title {
        font-size: 0.9rem;
    }
    .cta-primary-btn i {
        width: 14px;
        height: 14px;
    }
    .secondary-options {
        flex-direction: column;
        gap: 0.5rem;
    }
    .secondary-link {
        width: 100%;
        justify-content: center;
    }

    /* Terminal mobile */
    .terminal-window {
        height: min(420px, 60vh);
        font-size: 0.78rem;
    }

    /* Certifications grid */
    .certifications-grid {
        grid-template-columns: 1fr !important;
        gap: 0.85rem;
    }

    /* Timeline mobile */
    .timeline-item {
        flex-direction: column !important;
        gap: 0.5rem;
    }
    .timeline-date {
        font-size: 0.8rem;
    }

    /* Skills grid */
    .skills-grid {
        grid-template-columns: 1fr !important;
    }

    /* Warp hint smaller on mobile */
    .xray-hint {
        bottom: 12px !important;
        right: 12px !important;
        padding: 0.4rem 0.65rem !important;
        font-size: 0.65rem !important;
    }

    /* Hide cockpit shake on mobile (perf) */
    body.xray .rocket-pov .cockpit-frame {
        animation: none;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.55rem; }
    .ai-project-card { padding: 1rem; }
    .terminal-window { height: 360px; font-size: 0.72rem; }
    .terminal-chip { font-size: 0.62rem; padding: 0.25rem 0.45rem; }
}

/* 5. Touch-friendly tap targets — minimum 44x44 on mobile */
@media (hover: none) and (pointer: coarse) {
    .filter-btn,
    .nav-links a,
    .cv-download-btn,
    .cta-primary-btn,
    .secondary-link,
    .terminal-chip,
    .theme-toggle-btn,
    .mobile-menu-btn {
        min-height: 44px;
    }
}

/* 6. Smooth focus states for keyboard nav */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 3px;
    border-radius: 4px;
}

button:focus-visible,
a:focus-visible {
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.25);
}

/* 7. Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    body.xray .rocket-pov .cockpit-frame { animation: none; }
}

/* 8. Selection styling */
::selection {
    background: rgba(var(--accent-rgb), 0.35);
    color: var(--text-primary);
}

body.light-theme ::selection {
    background: rgba(var(--accent-strong-rgb), 0.3);
}

/* 9. Smoother hero → projects transition (was abrupt) */
#projects {
    padding-top: 5rem;
    background:
        linear-gradient(180deg,
            transparent 0%,
            rgba(var(--accent-rgb), 0.02) 50%,
            transparent 100%);
}

/* 10. Image / icon defaults — prevent jank */
img, svg, video {
    max-width: 100%;
    height: auto;
}

i[data-lucide] {
    flex-shrink: 0;
}

/* ==========================================
   SCROLL REVEAL — premium fade-in on scroll
   ========================================== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: calc(var(--reveal-index, 0) * 70ms);
    will-change: opacity, transform;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Don't reveal-animate the hero (it has its own intro) */
.hero .reveal,
#home .reveal {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ==========================================
   HERO ENTRANCE ANIMATION
   ========================================== */
@keyframes hero-rise {
    from {
        opacity: 0;
        transform: translateY(28px);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.hero h1 {
    background: linear-gradient(
        180deg,
        #ffffff 0%,
        #E8FFF6 60%,
        #2EF2A0 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: hero-rise 0.95s cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.light-theme .hero h1 {
    background: linear-gradient(
        135deg,
        #0f172a 0%,
        #1e293b 50%,
        var(--accent-strong) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 2px 12px rgba(15, 23, 42, 0.08));
}

.hero-subtitle {
    animation: hero-rise 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hero-actions {
    animation: hero-rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.hero .badge {
    animation: hero-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

@media (prefers-reduced-motion: reduce) {
    .hero h1,
    .hero-subtitle,
    .hero-actions,
    .hero .badge {
        animation: none !important;
    }
}

/* ==========================================
   SKILLS SECTION POLISH
   ========================================== */
.skill-category {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(var(--accent-rgb), 0.025) 0%, transparent 50%),
        var(--card-bg);
    transition:
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--accent-primary) 30%,
        var(--accent-primary) 70%,
        transparent
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

.skill-category:hover {
    transform: translateY(-3px);
}

.skill-category:hover::before {
    opacity: 1;
}

.skill-category h3 {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.005em;
}

.skill-category h3 i {
    color: var(--accent-primary);
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    padding: 4px;
    background: rgba(var(--accent-rgb), 0.1);
    border-radius: 6px;
    box-sizing: content-box;
    transition: all 0.3s ease;
}

.skill-category:hover h3 i {
    background: rgba(var(--accent-rgb), 0.18);
    box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.25);
    transform: scale(1.05);
}

.skill-tags span {
    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        transform 0.2s ease;
    cursor: default;
}

.skill-tags span:hover {
    background: rgba(var(--accent-rgb), 0.14);
    border-color: rgba(var(--accent-rgb), 0.4);
    color: var(--accent-primary);
    transform: translateY(-1px);
}

/* ==========================================
   TIMELINE POLISH - premium experience cards
   ========================================== */

/* Animated pulse on timeline dots */
@keyframes timeline-dot-pulse {
    0%, 100% {
        box-shadow:
            0 0 10px var(--accent-primary),
            0 0 0 0 rgba(var(--accent-rgb), 0.5);
    }
    50% {
        box-shadow:
            0 0 14px var(--accent-primary),
            0 0 0 6px rgba(var(--accent-rgb), 0);
    }
}

.timeline-item:first-child::before {
    animation: timeline-dot-pulse 2.4s ease-in-out infinite;
}

/* Timeline cards: subtle hover lift and accent edge */
.timeline-content.glow-card {
    position: relative;
    padding: 1.5rem 1.75rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    transition:
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.3s ease,
        box-shadow 0.4s ease;
    overflow: hidden;
}

.timeline-content.glow-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg,
        var(--accent-primary),
        rgba(var(--accent-rgb), 0));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.timeline-content.glow-card:hover {
    transform: translateX(4px);
    border-color: rgba(var(--accent-rgb), 0.35);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.15),
        0 0 24px rgba(var(--accent-rgb), 0.06);
}

.timeline-content.glow-card:hover::before {
    opacity: 1;
}

body.light-theme .timeline-content.glow-card:hover {
    box-shadow:
        0 12px 32px rgba(15, 23, 42, 0.08),
        0 0 24px rgba(var(--accent-rgb), 0.06);
}

/* Tags inside timeline get hover state */
.timeline-content .tags span {
    transition: all 0.25s ease;
}

.timeline-content .tags span:hover {
    background: rgba(var(--accent-rgb), 0.12);
    border-color: rgba(var(--accent-rgb), 0.4);
    color: var(--accent-primary);
}

/* ==========================================
   HERO REDESIGN — premium command center
   ========================================== */
.hero-deco {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(46, 242, 160, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(46, 242, 160, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    opacity: 0.6;
}

body.light-theme .hero-grid {
    background-image:
        linear-gradient(rgba(0, 112, 173, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 112, 173, 0.06) 1px, transparent 1px);
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    will-change: transform;
}

.hero-orb--1 {
    width: 360px; height: 360px;
    background: radial-gradient(circle, rgba(46, 242, 160, 0.4), transparent 70%);
    top: 12%; left: 8%;
    animation: orb-float-1 18s ease-in-out infinite;
}

.hero-orb--2 {
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(138, 124, 255, 0.32), transparent 70%);
    bottom: 14%; right: 10%;
    animation: orb-float-2 22s ease-in-out infinite;
}

.hero-orb--3 {
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(76, 201, 176, 0.3), transparent 70%);
    top: 55%; left: 48%;
    animation: orb-float-3 26s ease-in-out infinite;
}

@keyframes orb-float-1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(40px, -30px); }
}
@keyframes orb-float-2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-50px, 25px); }
}
@keyframes orb-float-3 {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(30px, 35px); }
    66% { transform: translate(-25px, -20px); }
}

.hero-rings {
    position: absolute;
    width: 90vmin;
    height: 90vmin;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.6;
    animation: hero-rings-rotate 60s linear infinite;
}

@keyframes hero-rings-rotate {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 1rem;
    background: rgba(7, 17, 31, 0.55);
    border: 1px solid rgba(46, 242, 160, 0.25);
    border-radius: 100px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(46, 242, 160, 0.9);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: hero-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

body.light-theme .hero-eyebrow {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 112, 173, 0.25);
    color: var(--accent-strong);
}

.hero-pulse {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #2EF2A0;
    border-radius: 50%;
    box-shadow: 0 0 10px #2EF2A0;
    animation: hero-pulse 1.8s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes hero-pulse {
    0%, 100% { box-shadow: 0 0 8px #2EF2A0, 0 0 0 0 rgba(46, 242, 160, 0.6); }
    70% { box-shadow: 0 0 12px #2EF2A0, 0 0 0 8px rgba(46, 242, 160, 0); }
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    animation: hero-rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

body.light-theme .hero-stats {
    border-top-color: rgba(15, 23, 42, 0.08);
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.hero-stat strong {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent-primary);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.02em;
}

.hero-stat span {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 500;
}

.hero-stat-divider {
    width: 1px;
    height: 32px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

body.light-theme .hero-stat-divider {
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.1), transparent);
}

.hero-scroll-cue {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    z-index: 10;
    animation: hero-rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.9s both;
    transition: color 0.3s ease;
}

.hero-scroll-cue:hover {
    color: var(--accent-primary);
}

.hero-scroll-line {
    width: 1px;
    height: 36px;
    background: linear-gradient(180deg, transparent, currentColor);
    position: relative;
    overflow: hidden;
}

.hero-scroll-line::after {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(180deg, transparent, var(--accent-primary));
    animation: scroll-line-flow 2.2s ease-in-out infinite;
}

@keyframes scroll-line-flow {
    0% { transform: translateY(0); opacity: 0; }
    30% { opacity: 1; }
    100% { transform: translateY(56px); opacity: 0; }
}

.hero-scroll-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    font-weight: 600;
}

body.light-theme .hero-scroll-cue {
    color: rgba(15, 23, 42, 0.5);
}

@media (max-width: 768px) {
    .hero-stats { gap: 0.75rem; margin-top: 2rem; padding-top: 1.5rem; }
    .hero-stat strong { font-size: 1.1rem; }
    .hero-stat span { font-size: 0.6rem; }
    .hero-stat-divider { height: 24px; }
    .hero-scroll-cue { bottom: 20px; }
    .hero-scroll-label { font-size: 0.55rem; }
    .hero-orb--1, .hero-orb--2, .hero-orb--3 { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-orb, .hero-rings, .hero-pulse, .hero-scroll-line::after {
        animation: none !important;
    }
}

/* ==========================================
   ROCKET CINEMATIC POLISH
   ========================================== */
@keyframes grain-shift {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-3px, 4px); }
    50% { transform: translate(3px, -3px); }
    75% { transform: translate(-4px, -2px); }
    100% { transform: translate(2px, 3px); }
}

body.xray .rocket-pov .cockpit-frame {
    filter: none;
}

@media (prefers-reduced-motion: reduce) {
    body.xray::before { animation: none !important; }
}

/* ==========================================
   ACTIVE NAV LINK
   ========================================== */
.nav-links a.is-active:not(.btn-primary) {
    color: var(--accent-primary);
    position: relative;
}

.nav-links a.is-active:not(.btn-primary)::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.55);
}

body.light-theme .nav-links a.is-active:not(.btn-primary) {
    color: var(--accent-strong);
}

body.light-theme .nav-links a.is-active:not(.btn-primary)::after {
    background: var(--accent-strong);
    box-shadow: 0 0 8px rgba(var(--accent-strong-rgb, 0, 112, 173), 0.4);
}

/* ==========================================
   READABILITY BUMP (analysis #4)
   ========================================== */

/* Project cards: bigger body text, more line-height */
.ai-project-card p {
    font-size: 0.98rem !important;
    line-height: 1.7 !important;
    color: var(--text-secondary);
}

body.light-theme .ai-project-card p {
    color: #334155;
}

/* Featured cards: bump description */
.featured-project .featured-content p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(226, 232, 240, 0.88);
}

body.light-theme .featured-project .featured-content p {
    color: #1e293b;
}

/* Timeline / experience: bigger bullets */
.role-description {
    font-size: 1rem;
    line-height: 1.75;
}

.role-description li {
    margin-bottom: 0.8rem;
}

/* About text: larger and more legible */
.about-text p {
    font-size: 1.05rem;
    line-height: 1.75;
}

/* Skill tags: slightly larger */
.skill-tags span {
    font-size: 0.85rem;
}

/* Section eyebrows + labels: improve contrast */
.section-eyebrow {
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    opacity: 0.95;
}

/* ==========================================
   FEATURED CARD ARCHITECTURE DIAGRAMS (#5)
   ========================================== */
.card-diagram {
    margin: 1rem 0 1.1rem;
    padding: 0.85rem 0.6rem;
    background: rgba(7, 17, 31, 0.45);
    border: 1px solid rgba(var(--case-accent-rgb), 0.16);
    border-radius: 10px;
    overflow: hidden;
}

.card-diagram svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 170px;
}

body.light-theme .card-diagram {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(var(--case-accent-rgb), 0.18);
}

body.light-theme .card-diagram svg text {
    fill: var(--accent-strong) !important;
}

body.light-theme .card-diagram svg rect[stroke*="46,242,160"] {
    stroke: rgba(0, 112, 173, 0.5) !important;
}

@media (max-width: 768px) {
    .card-diagram { display: none; }
}

/* ==========================================
   MOBILE POLISH FIXES
   ========================================== */
@media (max-width: 768px) {
    /* CTA button must stay a pill, not turn into a circle */
    .cta-primary-btn,
    .contact-card .primary-cta a.cta-primary-btn {
        flex-direction: row !important;
        align-items: center;
        justify-content: center;
        width: auto;
        max-width: 100%;
        padding: 0.9rem 1.6rem !important;
        border-radius: 999px !important;
        white-space: nowrap;
    }

    /* Stats grid: vertical stack with clear separation */
    .stats-grid {
        display: flex;
        flex-direction: column;
        gap: 1.75rem;
        align-items: center;
        text-align: center;
        margin-top: 2rem;
    }

    .stat-item {
        align-items: center;
        text-align: center;
        width: 100%;
        gap: 0.25rem;
    }

    .stat-number {
        font-size: 2.5rem;
        margin-bottom: 0.25rem;
    }

    .stat-label {
        font-size: 0.85rem;
        max-width: none;
    }

    /* Contact header centered + breathing room */
    #contact .section-header,
    #contact .contact-header {
        text-align: center;
        margin-bottom: 1.5rem;
    }

    #contact .section-header h2,
    #contact .contact-header h2 {
        text-align: center;
        display: block;
        font-size: 1.85rem;
        margin: 0 auto;
    }

    /* Hero on mobile: tighter spacing */
    .hero-stats {
        flex-wrap: wrap;
        gap: 1rem 1.25rem;
        justify-content: center;
    }
    .hero-stat-divider {
        display: none;
    }
    .hero-stat {
        min-width: 28%;
    }

    /* Hide architecture diagrams - they don't scale well */
    .card-diagram {
        display: none;
    }
}

@media (max-width: 480px) {
    .stat-number {
        font-size: 2.2rem;
    }
    .hero-stat strong {
        font-size: 1rem;
    }
    .hero-stat span {
        font-size: 0.55rem;
    }
}

/* ==========================================
   HERO CALM-DOWN — remove busy decoration
   Replaces hero-rings + 3 orbs + grid + scroll cue
   ========================================== */
.hero-grid,
.hero-rings,
.hero-orb--1,
.hero-orb--2,
.hero-orb--3,
.hero-scroll-cue {
    display: none !important;
}

.hero-orb--solo {
    position: absolute;
    width: 560px;
    height: 560px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(46, 242, 160, 0.16), transparent 65%);
    filter: blur(40px);
    opacity: 0.55;
    pointer-events: none;
    will-change: opacity;
    animation: hero-orb-solo-breathe 8s ease-in-out infinite;
}

@keyframes hero-orb-solo-breathe {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 0.7; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-orb--solo { animation: none; }
}

/* ==========================================
   FEATURED CARDS COMPRESSED
   ========================================== */
.featured-project {
    padding: 1.25rem 1.35rem 1.1rem !important;
}

.featured-project--flagship .featured-content h3,
.featured-project--secure .featured-content h3 {
    font-size: clamp(1.45rem, 2.1vw, 1.95rem) !important;
}

.featured-project .featured-content p {
    font-size: 0.95rem;
    line-height: 1.55;
}

.secure-rail {
    margin: 0.85rem 0 0.85rem !important;
}

.card-metrics {
    margin-top: 0.75rem !important;
    padding-top: 0.9rem !important;
}

/* ==========================================
   LIGHT THEME HERO PUNCH (10% better polish)
   ========================================== */

/* Stats: pale -> strong */
body.light-theme .hero-stat strong {
    color: var(--accent-strong);
}

body.light-theme .stat-number {
    color: var(--accent-strong);
}

/* CTA primary button: stronger gradient */
body.light-theme .btn-primary,
body.light-theme .cta-primary-btn {
    background: linear-gradient(135deg, var(--accent-strong), #1d4ed8);
    color: #ffffff;
    box-shadow:
        0 4px 14px rgba(59, 130, 246, 0.32),
        0 1px 0 rgba(255, 255, 255, 0.4) inset;
}

body.light-theme .btn-primary:hover,
body.light-theme .cta-primary-btn:hover {
    box-shadow:
        0 10px 28px rgba(59, 130, 246, 0.4),
        0 1px 0 rgba(255, 255, 255, 0.4) inset;
    transform: translateY(-2px);
}

body.light-theme .btn-primary i,
body.light-theme .cta-primary-btn i {
    color: #ffffff;
}

/* Eyebrow chip light theme — refined */
body.light-theme .hero-eyebrow {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(59, 130, 246, 0.18);
    color: var(--accent-strong);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 4px 16px rgba(59, 130, 246, 0.08);
    padding: 0.4rem 0.95rem 0.4rem 0.85rem;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    gap: 0.55rem;
}

body.light-theme .hero-pulse {
    width: 6px;
    height: 6px;
    background: #16a34a;
    box-shadow: 0 0 8px rgba(22, 163, 74, 0.55);
}

@keyframes hero-pulse-light {
    0%, 100% { box-shadow: 0 0 6px #16a34a, 0 0 0 0 rgba(22, 163, 74, 0.5); }
    70%      { box-shadow: 0 0 10px #16a34a, 0 0 0 7px rgba(22, 163, 74, 0); }
}

body.light-theme .hero-pulse {
    animation-name: hero-pulse-light;
}

/* Subtitle slightly darker for better readability */
body.light-theme .hero-subtitle {
    color: #475569;
}

/* Background video overlay: less washed out */
body.light-theme .hero::after {
    background: linear-gradient(180deg,
        rgba(248, 250, 252, 0.55) 0%,
        rgba(248, 250, 252, 0.75) 100%);
}

/* Solo orb tinted blue in light theme */
body.light-theme .hero-orb--solo {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.18), transparent 65%);
}

/* ==========================================
   FEATURED CARDS — guaranteed alignment
   Three zones: card-top / featured-content / card-metrics
   All cards equal height via grid stretch + metrics pinned bottom.
   ========================================== */
.featured-projects-grid {
    align-items: stretch;
}

.featured-project {
    display: flex !important;
    flex-direction: column !important;
    height: 100%;
}

.featured-project .featured-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    margin-bottom: 1.25rem;
}

.featured-project .featured-content p {
    flex: 1 1 auto;
    margin-top: 0.4rem;
}

.featured-project .card-metrics {
    flex: 0 0 auto;
    margin-top: auto !important;
}

/* ==========================================
   HERO LESS NEON — softer saturation
   ========================================== */

/* H1 ends in softer mint instead of full saturation (DARK THEME ONLY) */
body.dark-theme .hero h1,
body:not(.light-theme) .hero h1 {
    background: linear-gradient(
        180deg,
        #ffffff 0%,
        #E8FFF6 55%,
        #7FEDC3 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* CTA primary button: softer mint to muted indigo, less arcade */
body:not(.light-theme) .hero .btn-primary,
body.dark-theme .hero .btn-primary {
    background: linear-gradient(135deg, #4EDDAE 0%, #6E63D6 100%);
    color: #07111F;
    box-shadow: 0 6px 22px -8px rgba(78, 221, 174, 0.45);
}

body:not(.light-theme) .hero .btn-primary:hover,
body.dark-theme .hero .btn-primary:hover {
    box-shadow: 0 12px 32px -10px rgba(78, 221, 174, 0.55);
    filter: brightness(1.06);
}

body:not(.light-theme) .hero .btn-primary i {
    color: #07111F;
}

/* Hero stats: tone down the mint */
.hero-stat strong {
    color: #5BD9A1;
}

/* Eyebrow: dim color slightly */
.hero-eyebrow {
    color: rgba(91, 217, 161, 0.85);
    border-color: rgba(91, 217, 161, 0.28);
}

.hero-pulse {
    background: #5BD9A1;
    box-shadow: 0 0 10px #5BD9A1;
}

@keyframes hero-pulse {
    0%, 100% { box-shadow: 0 0 8px #5BD9A1, 0 0 0 0 rgba(91, 217, 161, 0.55); }
    70% { box-shadow: 0 0 12px #5BD9A1, 0 0 0 8px rgba(91, 217, 161, 0); }
}

/* Solo background orb: softer */
.hero-orb--solo {
    background: radial-gradient(circle, rgba(91, 217, 161, 0.12), transparent 65%);
}

/* ==========================================
   KILL ALL VERTICAL EDGE LINES DURING WARP
   - Hide scrollbar (was visible mint stripe on right)
   - Lock overflow to prevent any edge artifacts
   ========================================== */
body.xray {
    overflow: hidden !important;
    scrollbar-width: none;
}
body.xray::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}
html:has(body.xray) {
    overflow: hidden !important;
    scrollbar-width: none;
}
html:has(body.xray)::-webkit-scrollbar {
    display: none;
}

/* ==========================================
   LIGHT THEME CONTRAST FIX
   - Featured card metadata was unreadable pale blue (#bfdbfe)
   - Subtitle text too pale against busy background
   ========================================== */
body.light-theme .featured-project .card-company {
    color: #475569;
}

body.light-theme .featured-project .card-status {
    color: var(--accent-strong);
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
}

body.light-theme .featured-project .card-status .status-dot {
    background: var(--accent-strong);
    box-shadow: 0 0 8px var(--accent-strong);
}

body.light-theme .featured-project .card-metric {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(15, 23, 42, 0.12);
}

body.light-theme .featured-project .card-metric-label {
    color: #475569;
}

body.light-theme .featured-project .card-metric-value {
    color: #0f172a;
}

/* Hero subtitle: stronger color, no weight change (Robin: not bolder) */
body.light-theme .hero-subtitle {
    color: #0f172a;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* Hero video overlay: stronger backdrop so text reads cleanly */
body.light-theme .hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(248, 250, 252, 0.55) 0%,
        rgba(248, 250, 252, 0.75) 60%,
        rgba(248, 250, 252, 0.85) 100%);
    z-index: 1;
    pointer-events: none;
}

/* ==========================================
   WARP HUD — pure HTML overlay (no SVG, no rectangle artifacts)
   ========================================== */
.warp-hud {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

body.xray .warp-hud {
    opacity: 1;
}

/* Top dark glass panel with destination */
.warp-stage {
    position: absolute;
    top: 56px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    padding: 1.1rem 2.2rem 1.2rem;
    background: rgba(5, 10, 20, 0.85);
    border: 1px solid rgba(46, 242, 160, 0.32);
    border-radius: 16px;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(46, 242, 160, 0.08) inset,
        0 0 38px rgba(46, 242, 160, 0.22);
    min-width: 340px;
}

.warp-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5em;
    color: #2EF2A0;
    margin-bottom: 0.55rem;
    text-transform: uppercase;
    padding-left: 0.5em;
}

.warp-big {
    font-family: 'Inter', sans-serif;
    font-size: clamp(40px, 5vw, 64px);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.01em;
    line-height: 1;
    margin: 0.1rem 0 0.7rem;
    text-shadow:
        0 2px 24px rgba(0, 0, 0, 0.7),
        0 0 18px rgba(46, 242, 160, 0.45);
    transition: opacity 0.18s ease-out;
}

.warp-hint {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(232, 240, 250, 0.8);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Bottom dark glass panel with route + velocity */
.warp-bottom {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
    padding: 1.1rem 1.75rem;
    background: rgba(5, 10, 20, 0.88);
    border: 1px solid rgba(46, 242, 160, 0.28);
    border-radius: 18px;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow:
        0 16px 50px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(46, 242, 160, 0.06) inset,
        0 0 32px rgba(46, 242, 160, 0.15);
    width: min(960px, 92vw);
}

/* Bus-stop timeline inside the dark panel */
.warp-route {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0;
    padding: 0;
    margin: 0;
    list-style: none;
    flex: 1 1 auto;
    position: relative;
    font-family: 'JetBrains Mono', monospace;
}

.warp-route::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 4%;
    right: 4%;
    height: 1px;
    background: linear-gradient(90deg,
        rgba(46, 242, 160, 0.2),
        rgba(46, 242, 160, 0.5) 50%,
        rgba(46, 242, 160, 0.2));
}

.warp-stop {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: default;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.warp-stop-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #0a0f17;
    border: 1.5px solid rgba(46, 242, 160, 0.5);
    margin-top: 1px;
    transition:
        width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.4s ease;
}

.warp-stop-label {
    margin-top: 0.7rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(232, 240, 250, 0.55);
    transition: color 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.warp-stop.is-active .warp-stop-dot {
    width: 20px;
    height: 20px;
    margin-top: -2px;
    background: #2EF2A0;
    border-color: #E8FFF6;
    box-shadow:
        0 0 0 4px rgba(46, 242, 160, 0.22),
        0 0 18px rgba(46, 242, 160, 0.75),
        0 0 32px rgba(46, 242, 160, 0.4);
    animation: warp-stop-pulse 1.6s ease-in-out infinite;
}

.warp-stop.is-active .warp-stop-label {
    color: #ffffff;
    transform: scale(1.08);
    text-shadow: 0 0 12px rgba(46, 242, 160, 0.5);
}

.warp-stop.is-past .warp-stop-dot {
    background: rgba(46, 242, 160, 0.6);
    border-color: rgba(46, 242, 160, 0.85);
}

.warp-stop.is-past .warp-stop-label {
    color: rgba(46, 242, 160, 0.75);
}

@keyframes warp-stop-pulse {
    0%, 100% {
        box-shadow:
            0 0 0 4px rgba(46, 242, 160, 0.22),
            0 0 18px rgba(46, 242, 160, 0.75),
            0 0 32px rgba(46, 242, 160, 0.4);
    }
    50% {
        box-shadow:
            0 0 0 8px rgba(46, 242, 160, 0.12),
            0 0 28px rgba(46, 242, 160, 0.9),
            0 0 50px rgba(46, 242, 160, 0.55);
    }
}

/* Velocity compact on the right side of bottom panel */
.warp-velocity {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
    color: #2EF2A0;
    padding-left: 1.75rem;
    border-left: 1px solid rgba(46, 242, 160, 0.18);
    min-width: 130px;
}

.warp-velocity-label {
    font-size: 0.6rem;
    letter-spacing: 0.32em;
    opacity: 0.55;
    text-transform: uppercase;
}

.warp-velocity-value {
    font-size: 1.5rem;
    font-weight: 800;
    margin-top: 0.15rem;
    color: #2EF2A0;
    text-shadow: 0 0 14px rgba(46, 242, 160, 0.45);
}

.warp-velocity-status {
    font-size: 0.6rem;
    letter-spacing: 0.16em;
    opacity: 0.55;
    margin-top: 0.2rem;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .warp-stage { top: 28px; padding: 0.9rem 1.4rem 1rem; min-width: 0; width: 88vw; }
    .warp-big { font-size: clamp(28px, 8vw, 44px); }
    .warp-bottom { bottom: 20px; padding: 0.9rem 1rem; gap: 1rem; flex-direction: column; }
    .warp-route { width: 100%; }
    .warp-stop-label { font-size: 0.55rem; }
    .warp-stop-dot { width: 10px; height: 10px; }
    .warp-stop.is-active .warp-stop-dot { width: 14px; height: 14px; }
    .warp-velocity { flex-direction: row; align-items: center; gap: 0.75rem; padding-left: 0; border-left: 0; border-top: 1px solid rgba(46,242,160,0.18); padding-top: 0.5rem; width: 100%; justify-content: center; min-width: 0; }
    .warp-velocity-value { font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
}
