/* === MODERN PORTFOLIO - COMPLETE REDESIGN === */

/* CSS Variables */
:root {
    /* Colors */
    --primary: #0a0e27;
    /* page background */
    --secondary: #667eea;
    /* accent blue */
    --accent: #764ba2;
    /* accent purple */
    --text-light: #f5f5f5;
    /* primary text */
    --text-muted: #b0b0b0;
    /* secondary text */
    --bg-dark: #0f1419;
    /* darker surface */
    --bg-light: #1a1f2e;
    /* lighter surface */
    --border: rgba(255, 255, 255, 0.1);

    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 48px;
    --spacing-xl: 96px;

    /* Timing */
    --ease-smooth: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);

    /* Layout */
    --header-height: 80px;
}

/* Theme: Dark (default) */
[data-theme="dark"] {
    --primary: #0a0e27;
    --text-light: #f5f5f5;
    --text-muted: #b0b0b0;
    --bg-dark: #0f1419;
    --bg-light: #1a1f2e;
    --border: rgba(255, 255, 255, 0.1);
}

/* Theme: Light */
[data-theme="light"] {
    --primary: #ffffff;
    --text-light: #0b1220;
    --text-muted: #5b6474;
    --bg-dark: #f2f5fb;
    --bg-light: #f7f9fd;
    --border: rgba(10, 14, 39, 0.1);
}

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--primary);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.45s var(--ease-in-out), color 0.45s var(--ease-in-out);
}

/* === TYPOGRAPHY === */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    letter-spacing: -0.5px;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

p {
    font-size: clamp(1rem, 2vw, 1.125rem);
}

/* === NAVBAR === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: transparent;
    backdrop-filter: none;
    border-bottom: 1px solid transparent;
    z-index: 1000;
    animation: slideDown 0.8s var(--ease-out);
    transition: background-color 400ms var(--ease-in-out), backdrop-filter 400ms var(--ease-in-out), border-color 400ms var(--ease-in-out), box-shadow 400ms var(--ease-in-out);
}

/* On scroll, transition to glassmorphism effect */
.navbar.scrolled {
    background: rgba(15, 20, 25, 0.6);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Light-mode navbar on scroll */
[data-theme="light"] .navbar.scrolled {
    background: rgba(255, 255, 255, 0.65);
    border-bottom: 1px solid rgba(10, 14, 39, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.nav-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-initials {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.75rem;
}

.brand-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: color 0.3s var(--ease-smooth);
}

/* Light mode brand title */
[data-theme="light"] .brand-title {
    color: rgba(10, 14, 39, 0.85);
}

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s var(--ease-smooth);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width 0.3s var(--ease-smooth);
}

.nav-link:hover {
    color: var(--text-light);
}

.nav-link:hover::after {
    width: 100%;
}

/* Light mode nav link colors */
[data-theme="light"] .nav-link {
    color: rgba(10, 14, 39, 0.7);
}

[data-theme="light"] .nav-link:hover {
    color: var(--text-light);
}

/* Theme Toggle */
.theme-toggle {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 16px;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
}

.theme-toggle:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.theme-toggle:active {
    transform: translateY(0);
}

/* Light mode theme toggle */
[data-theme="light"] .theme-toggle {
    border-color: rgba(10, 14, 39, 0.15);
    background: rgba(10, 14, 39, 0.05);
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(10, 14, 39, 0.08);
    border-color: rgba(10, 14, 39, 0.2);
}

.icon-sun,
.icon-moon {
    position: absolute;
    width: 18px;
    height: 18px;
    transition: opacity 0.3s var(--ease-smooth), transform 0.3s var(--ease-smooth);
}

.icon-sun {
    background: radial-gradient(circle, #facc15 0%, #f59e0b 70%, transparent 71%);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.4);
}

.icon-moon {
    border-radius: 50%;
    box-shadow: inset -6px -6px 0 0 #94a3b8;
    background: transparent;
}

[data-theme="dark"] .icon-sun {
    opacity: 0;
    transform: scale(0.7);
}

[data-theme="dark"] .icon-moon {
    opacity: 1;
    transform: scale(1);
}

[data-theme="light"] .icon-sun {
    opacity: 1;
    transform: scale(1);
}

[data-theme="light"] .icon-moon {
    opacity: 0;
    transform: scale(0.7);
}

/* === HERO SECTION === */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 120px var(--spacing-lg) var(--spacing-lg);
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--bg-light) 100%);
    transition: background 0.45s var(--ease-in-out);
}

/* Particle canvas sits behind hero content */
#particle-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

/* Typewriter cursor */
.type-cursor {
    display: inline-block;
    width: 10px;
    background: var(--secondary);
    margin-left: 6px;
    vertical-align: text-bottom;
    animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}

/* Respect reduced motion: hide cursor and show full text */
@media (prefers-reduced-motion: reduce) {
    .type-cursor {
        display: none;
    }
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    left: -100px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3), transparent);
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    bottom: -50px;
    right: -50px;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.3), transparent);
    animation-delay: -10s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    top: 50%;
    right: 10%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.2), transparent);
    animation-delay: -5s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(28px, 28px) scale(1.02);
    }
}

#particle-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-grid {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.hero-main {
    animation: fadeInUp 1s var(--ease-out) 0.1s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.title-word {
    display: block;
    animation: titleReveal 0.8s var(--ease-smooth) forwards;
}

.title-word:nth-child(1) {
    animation-delay: 0.1s;
}

.title-word:nth-child(2) {
    animation-delay: 0.25s;
}

.title-word:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes titleReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
        letter-spacing: 0.2em;
    }

    to {
        opacity: 1;
        transform: translateY(0);
        letter-spacing: 0;
    }
}

/* Refined title animation baseline for modular control */
.title-word {
    opacity: 0;
    transform: translateY(10px) translateZ(0);
    filter: blur(2px);
    transition: opacity 520ms cubic-bezier(.22, .99, .38, 1), transform 720ms cubic-bezier(.22, .99, .38, 1), filter 520ms ease-out;
    will-change: opacity, transform, filter;
}

.title-word.animated {
    opacity: 1;
    transform: translateY(0) translateZ(0);
    filter: blur(0);
}

/* stagger timing helpers (can be toggled via JS) */
.title-word[data-delay='0'] {
    transition-delay: 0s;
}

.title-word[data-delay='1'] {
    transition-delay: 0.08s;
}

.title-word[data-delay='2'] {
    transition-delay: 0.16s;
}

@media (prefers-reduced-motion: reduce) {
    .title-word {
        transition: none;
        filter: none;
        transform: none;
        opacity: 1;
    }
}

.hero-tagline {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
    animation: fadeInUp 0.8s var(--ease-out) 0.35s both;
}

.hero-quote-box {
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-left: 3px solid var(--secondary);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    border-radius: 8px;
    animation: fadeInUp 0.8s var(--ease-out) 0.5s both;
}

.hero-quote {
    font-style: italic;
    font-size: 1.125rem;
    margin-bottom: 12px;
    color: var(--text-light);
}

.quote-author {
    font-size: 0.9rem;
    color: var(--secondary);
    font-weight: 600;
}

.hero-actions {
    display: flex;
    gap: var(--spacing-md);
    animation: fadeInUp 0.8s var(--ease-out) 0.65s both;
}

.btn {
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.btn-outline {
    background: transparent;
    border-color: var(--secondary);
    color: var(--secondary);
}

.btn-outline:hover {
    background: rgba(102, 126, 234, 0.1);
}

/* LinkedIn CTA with periodic glow animation */
.btn-linkedin {
    position: relative;
    overflow: hidden;
}

/* Subtle periodic glow effect - triggers every 8 seconds */
.btn-linkedin::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 8px;
    background: linear-gradient(135deg,
            rgba(102, 126, 234, 0.4),
            rgba(118, 75, 162, 0.4));
    opacity: 0;
    filter: blur(8px);
    z-index: -1;
    animation: linkedinGlow 8s ease-in-out infinite;
}

/* Pause animation on hover for better UX */
.btn-linkedin:hover::before {
    animation-play-state: paused;
}

/* Enhanced hover state for LinkedIn button */
.btn-linkedin:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.2);
}

/* Keyframes for periodic glow */
@keyframes linkedinGlow {

    0%,
    85% {
        opacity: 0;
        transform: scale(1);
    }

    90% {
        opacity: 0.6;
        transform: scale(1.05);
    }

    95% {
        opacity: 0.3;
        transform: scale(1.02);
    }

    100% {
        opacity: 0;
        transform: scale(1);
    }
}

/* Disable glow animation for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .btn-linkedin::before {
        animation: none;
        display: none;
    }
}

.hero-visual {
    position: relative;
    height: 400px;
    animation: fadeInUp 1s var(--ease-out) 0.2s both;
}

.floating-element {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 16px;
    background: rgba(102, 126, 234, 0.08);
    border: 1.5px solid rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    animation: float 6s ease-in-out infinite;
    backdrop-filter: blur(8px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.1);
}

.value-signal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.3;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: -0.5px;
}

.el-1 {
    top: 20px;
    left: 0;
    animation-delay: 0s;
}

.el-1:hover {
    background: rgba(102, 126, 234, 0.12);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.15);
}

.el-2 {
    top: 50%;
    right: 0;
    animation-delay: -3s;
    animation-duration: 7s;
}

.el-2:hover {
    background: rgba(102, 126, 234, 0.12);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.15);
}

.el-3 {
    bottom: 20px;
    left: 40px;
    animation-delay: -5s;
    animation-duration: 8s;
}

.el-3:hover {
    background: rgba(102, 126, 234, 0.12);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.15);
}

.scroll-prompt {
    position: absolute;
    bottom: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    text-align: center;
    animation: fade 2s ease-in-out infinite;
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.3s var(--ease-out);
    font-size: 0.95rem;
    font-weight: 500;
}

.scroll-prompt:hover {
    transform: translateX(-50%) translateY(-6px);
    animation: none;
    opacity: 1;
    color: var(--secondary);
}

.scroll-prompt:focus {
    outline: 2px solid var(--secondary);
    outline-offset: 4px;
}

.scroll-prompt:active {
    transform: translateX(-50%) translateY(-2px);
}

@media (max-width: 768px) {
    .scroll-prompt {
        bottom: calc(var(--spacing-lg) / 1.5);
        font-size: 0.9rem;
        padding: 10px 14px;
    }
}

@keyframes fade {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.scroll-animation {
    width: 2px;
    height: 20px;
    background: var(--secondary);
    margin: 8px auto;
    border-radius: 2px;
    animation: scroll 1.5s ease-in-out infinite;
}

@keyframes scroll {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(8px);
    }
}

/* === SECTION STYLING === */
section {
    position: relative;
    z-index: 2;
    padding: calc(var(--spacing-xl) * 0.85) var(--spacing-lg);
    /* Align scroll targets with fixed header */
    scroll-margin-top: calc(var(--header-height) + 12px);
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: calc(var(--spacing-xl) * 0.85);
    animation: fadeInUp 0.8s var(--ease-out) both;
}

.section-header h2 {
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, var(--text-light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.profile-header {
    margin-top: 12px;
    display: grid;
    gap: 8px;
    max-width: 980px;
}

.full-name {
    font-size: 1.25rem;
    margin-bottom: 4px;
    color: var(--text-light);
}

.full-name .suffix {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-left: 8px;
}

.contact-line {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.professional-summary {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-top: 6px;
}

/* === EXPERTISE SECTION === */
.expertise {
    background: linear-gradient(135deg, var(--primary), var(--bg-light));
    position: relative;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: calc(var(--spacing-lg) * 1.2);
}

.expertise-card {
    position: relative;
    padding: calc(var(--spacing-lg) * 1.25);
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(102, 126, 234, 0.15);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: fadeInUp 0.8s var(--ease-out) both;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

/* Subtle glow layer on hover */
.expertise-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 16px;
    background: linear-gradient(135deg,
            rgba(102, 126, 234, 0.1),
            rgba(118, 75, 162, 0.1));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

.expertise-card:nth-child(n) {
    animation-delay: calc(0.08s * (var(--card-index, 0) + 1));
}

.expertise-card:hover {
    background: rgba(102, 126, 234, 0.08);
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateY(-6px) scale(1.02);
    box-shadow:
        0 20px 40px rgba(102, 126, 234, 0.15),
        0 10px 20px rgba(0, 0, 0, 0.1);
}

.expertise-card:hover::before {
    opacity: 1;
}

/* Featured card - visually dominant */
.expertise-featured {
    grid-column: span 1;
    background: rgba(102, 126, 234, 0.06);
    border-color: rgba(102, 126, 234, 0.25);
}

.expertise-featured::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.expertise-featured:hover {
    background: rgba(102, 126, 234, 0.12);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow:
        0 24px 48px rgba(102, 126, 234, 0.2),
        0 12px 24px rgba(0, 0, 0, 0.12);
}

.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: calc(var(--spacing-md) * 1.2);
    transition: transform 0.3s ease;
}

.card-icon svg {
    width: 48px;
    height: 48px;
    color: var(--color-primary);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.expertise-card:hover .card-icon {
    transform: scale(1.1) translateY(-4px);
}

.expertise-card:hover .card-icon svg {
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.15));
}

.expertise-card h3 {
    margin-bottom: var(--spacing-md);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.expertise-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.65;
    font-weight: 400;
}

/* Disable transformations for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .expertise-card {
        transition: background 0.3s ease, border-color 0.3s ease;
    }

    .expertise-card:hover {
        transform: none;
    }

    .expertise-card:hover .card-icon {
        transform: none;
    }
}

/* Mobile expertise optimization */
@media (max-width: 768px) {
    .expertise-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .expertise-card {
        padding: var(--spacing-lg);
    }

    .expertise-featured {
        grid-column: span 1;
    }

    .expertise-card h3 {
        font-size: 1.2rem;
        margin-bottom: calc(var(--spacing-sm) * 1.2);
    }

    .expertise-card p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .card-icon {
        font-size: 2.25rem;
        margin-bottom: var(--spacing-md);
    }
}

/* === WORK SHOWCASE SECTION === */
.work-showcase {
    background: var(--primary);
}

.projects-showcase {
    display: grid;
    gap: var(--spacing-xl);
}

.project-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
    animation: fadeInUp 0.8s var(--ease-out) both;
}

.project-showcase:nth-child(even) {
    grid-template-columns: 1fr 1fr;
}

.project-showcase.project-reversed {
    direction: rtl;
}

.project-showcase.project-reversed>* {
    direction: ltr;
}

.project-visual {
    position: relative;
    /* Use a consistent 16:9 aspect ratio for all project visuals */
    aspect-ratio: 16 / 9;
    width: 100%;
    max-height: 420px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(102, 126, 234, 0.06);
    border: 1px solid var(--border);
}

.project-image {
    /* The image is positioned by the container. Keep it covering and centered. */
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 360ms var(--ease-out), filter 360ms var(--ease-out);
}

/* Subtle hover interaction for project visuals */
.project-visual:hover .project-image {
    transform: scale(1.03);
    filter: saturate(1.03) contrast(1.02);
}

.project-visual:hover .project-image {
    transform: scale(1.1) rotate(2deg);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    transition: opacity 0.3s var(--ease-smooth);
}

.project-visual:hover .project-overlay {
    opacity: 0.5;
}

.project-badge {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: rgba(15, 20, 25, 0.9);
    border: 1px solid var(--secondary);
    color: var(--secondary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
}

/* Light badge */
[data-theme="light"] .project-badge {
    background: rgba(255, 255, 255, 0.9);
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.project-details {
    animation: fadeInUp 0.8s var(--ease-out) 0.1s both;
}

.project-details h3 {
    margin-bottom: var(--spacing-md);
}

.project-details p {
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.project-tags span {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--secondary);
}

/* === EXPERIENCE SECTION === */
.experience {
    background: var(--bg-light);
    transition: background-color 0.45s var(--ease-in-out);
}

.timeline {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, rgba(118, 75, 162, 0.16), rgba(102, 126, 234, 0.12));

    /* Contact CTA refinements for recruiter-focused layout */
    #contact .section-header {
        /* tighter spacing for contact section to visually anchor headline */
        margin-bottom: var(--spacing-md);
    }

    #contact .section-header p {
        color: var(--text-muted);
        font-size: 0.95rem;
        margin-bottom: 8px;
        opacity: 0.95;
    }

    .contact-panel {
        padding-top: 0;
    }

    .contact-panel>h3 {
        /* dominant headline but editorial and restrained */
        font-size: clamp(1.5rem, 3.2vw, 2.25rem);
        line-height: 1.08;
        margin: 0 0 8px 0;
        color: var(--text-light);
    }

    #contact-subhead {
        margin-bottom: var(--spacing-md);
        color: var(--text-muted);
        font-size: 1rem;
    }

    .contact-actions {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    /* Muted supporting link for certifications (low visual weight) */
    .muted-link {
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        color: var(--text-muted) !important;
        font-size: 0.95rem;
        text-decoration: none;
        opacity: 0.95;
    }

    .muted-link small {
        color: var(--text-muted);
    }

    .muted-link:hover {
        text-decoration: underline;
    }

    .muted-link:focus {
        outline: 3px solid rgba(118, 75, 162, 0.12);
        outline-offset: 4px;
        border-radius: 6px;
    }

    /* Ensure primary CTAs remain prominent with consistent focus states */
    .contact-linkedin:focus,
    .contact-email:focus {
        outline: 3px solid rgba(102, 126, 234, 0.14);
        outline-offset: 4px;
    }

    /* Make sure no heavy borders show in dark mode for secondary content */
    [data-theme="dark"] .muted-link {
        color: rgba(255, 255, 255, 0.76);
    }

    [data-theme="light"] .muted-link {
        color: rgba(10, 14, 39, 0.62);
    }

    border-radius: 2px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 18px;
    align-items: start;
    padding: var(--spacing-lg);
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    animation: fadeInUp 0.8s var(--ease-out) both;
}

/* Ensure content is above decorative layers and not clipped */
.timeline-item {
    z-index: 3;
    overflow: visible;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: background 200ms var(--ease-out), border-color 200ms var(--ease-out);
}

/* Focus styles for keyboard users */
.timeline-item:focus-within {
    outline: 3px solid rgba(118, 75, 162, 0.16);
    outline-offset: 4px;
}

.timeline-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--secondary);
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.18);
    margin: 6px 0 0 0;
    grid-column: 1 / 2;
    transition: all 280ms var(--ease-out);
}

.timeline-content {
    display: flex;
    flex-direction: column;
    grid-column: 2 / -1;
    gap: var(--spacing-sm);
}

/* Timeline Header: Role title and company */
.timeline-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timeline-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-light);
    line-height: 1.3;
    margin: 0;
}

.timeline-company {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--secondary);
    margin: 0;
    letter-spacing: 0.3px;
}

/* Timeline Summary: One-line description (always visible) */
.timeline-summary {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Timeline Details: Full narrative (collapsed by default) */
.timeline-details {
    display: none;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: opacity 280ms var(--ease-out) 80ms, max-height 280ms var(--ease-out) 80ms;
}

.timeline-item.expanded .timeline-details {
    display: block;
    max-height: 2000px;
    opacity: 1;
}

.timeline-narrative {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.8;
    text-align: justify;
    hyphens: auto;
}

/* Timeline Toggle Button: Subtle interactive cue */
.timeline-toggle {
    align-self: flex-start;
    background: transparent;
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: var(--secondary);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 200ms var(--ease-out);
    margin-top: 8px;
}

.timeline-toggle:hover {
    background: rgba(102, 126, 234, 0.08);
    border-color: var(--secondary);
    color: var(--text-light);
    transform: translateX(2px);
}

.timeline-toggle:focus {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

.timeline-toggle:active {
    transform: translateX(0);
}

.timeline-toggle .toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-weight: 700;
    transition: transform 240ms var(--ease-out);
}

.timeline-item.expanded .timeline-toggle .toggle-icon {
    transform: rotate(45deg);
}

/* Hover state for interactive affordance */
.timeline-item {
    background: rgba(102, 126, 234, 0.02);
    border: 1px solid rgba(102, 126, 234, 0.08);
    border-radius: 8px;
    padding: var(--spacing-lg);
}

.timeline-item:hover {
    background: rgba(102, 126, 234, 0.05);
    border-color: rgba(102, 126, 234, 0.12);
}

.timeline-item.expanded {
    background: rgba(102, 126, 234, 0.06);
    border-color: rgba(102, 126, 234, 0.18);
}

/* Theme-specific toggle styling */
[data-theme="light"] .timeline-toggle {
    border-color: rgba(102, 126, 234, 0.25);
    color: var(--secondary);
}

[data-theme="light"] .timeline-toggle:hover {
    background: rgba(102, 126, 234, 0.06);
}

/* Emphasize the current role visually */
.timeline-item.current {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.09), rgba(118, 75, 162, 0.07));
    border: 1px solid rgba(102, 126, 234, 0.25);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.timeline-item.current:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.1));
    border-color: rgba(102, 126, 234, 0.35);
}

/* Additional roles styling (subtle, less emphasis) */
.timeline-item.additional {
    opacity: 0.92;
}

.timeline-item.additional .timeline-marker {
    opacity: 0.75;
}

.timeline-item.additional .timeline-title {
    opacity: 0.9;
}

@media (max-width: 1024px) {
    .timeline-item.current {
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.08);
    }

    .timeline {
        padding-left: 18px;
    }

    .timeline::before {
        left: 8px;
    }
}

/* === CONTACT SECTION === */
.contact {
    background: linear-gradient(135deg, var(--primary), var(--bg-light));
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: background 0.45s var(--ease-in-out);
}

/* Reduce contact height on mobile */
@media (max-width: 768px) {
    .contact {
        min-height: auto;
        padding: calc(var(--spacing-lg) * 0.75) var(--spacing-md);
    }

    .contact-panel {
        padding: 0;
    }

    .contact-panel>h3 {
        font-size: clamp(1.25rem, 2.8vw, 1.75rem);
        margin: 0 0 12px 0;
    }

    .contact-actions {
        gap: calc(var(--spacing-sm) * 0.75);
    }
}

/* === FOOTER === */
.footer {
    border-top: 1px solid var(--border);
    padding: var(--spacing-xl) var(--spacing-lg);
    background: transparent;
    transition: border-color 0.45s var(--ease-in-out);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.footer-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.footer-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.3;
    letter-spacing: -0.015em;
}

.footer-title {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.footer-contacts {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.footer-link {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    padding: 10px 14px;
    border-radius: 8px;
    transition: all 200ms var(--ease-out);
    position: relative;
    cursor: pointer;
}

.footer-link:hover {
    color: var(--secondary);
    background: rgba(102, 126, 234, 0.08);
    transform: translateY(-1px);
}

.footer-link:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 4px;
}

.footer-link-secondary {
    color: var(--text-muted);
}

.footer-link-secondary:hover {
    color: var(--secondary);
}

.footer-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: inherit;
}

.footer-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    color: inherit;
}

.footer-link-text {
    font-size: 0.95rem;
    color: inherit;
    font-weight: 500;
}

.footer-note {
    color: var(--text-muted);
    margin-top: 16px;
    width: 100%;
    font-size: 0.9rem;
    letter-spacing: -0.01em;
}

@media (max-width: 720px) {
    .footer {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }

    .footer-main {
        width: 100%;
    }

    .footer-contacts {
        width: 100%;
        gap: 4px;
        flex-direction: column;
    }

    .footer-link {
        width: 100%;
        justify-content: flex-start;
        padding: 11px 12px;
    }

    .footer-link-text {
        font-size: 0.95rem;
    }

    .footer-note {
        margin-top: 16px;
        font-size: 0.9rem;
    }
}

/* Theme switch flash overlay */
.theme-flash {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2000;
    background: radial-gradient(1200px 1200px at var(--fx, 50%) var(--fy, 50%), rgba(102, 126, 234, 0.28), transparent 60%);
    animation: flashFade 600ms ease-out forwards;
}

@keyframes flashFade {
    0% {
        opacity: 0;
    }

    30% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-main h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-links {
    margin: var(--spacing-md) 0;
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
}

.footer-links a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.3s var(--ease-smooth);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-note {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: var(--spacing-md);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-toggle {
        position: absolute;
        top: -9999px;
        left: -9999px;
        width: 1px;
        height: 1px;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .hero {
        /* Use full viewport height on mobile for maximum visual impact */
        height: 100vh;
        min-height: 100vh;
        /* Reduced padding to fit content within viewport */
        padding: 80px var(--spacing-md) 60px;
        /* Use flexbox column to stack content vertically */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: calc(var(--spacing-lg) * 0.6);
        width: 100%;
        max-width: 100%;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .hero-main {
        /* Allow content to breathe without excess whitespace */
        flex-shrink: 0;
    }

    .hero-title {
        font-size: clamp(2rem, 7vw, 3rem);
        margin-bottom: calc(var(--spacing-md) * 0.75);
        line-height: 1.1;
    }

    .hero-tagline {
        font-size: 1rem;
        margin-bottom: calc(var(--spacing-lg) * 0.5);
    }

    .hero-quote-box {
        margin-bottom: calc(var(--spacing-lg) * 0.5);
        padding: calc(var(--spacing-md) * 0.75);
    }

    .hero-quote {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .hero-actions {
        flex-direction: column;
        gap: calc(var(--spacing-md) * 0.75);
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 12px 16px;
        font-size: 0.95rem;
    }

    .hero-visual {
        /* Hide on mobile to prevent layout issues; floating cards aren't needed */
        display: none;
    }

    .floating-element {
        display: none;
    }

    .scroll-prompt {
        /* Adjust for tighter mobile hero footer space */
        bottom: calc(var(--spacing-lg) * 0.5);
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    .project-showcase {
        grid-template-columns: 1fr;
        /* Force consistent single-column layout */
        display: flex;
        flex-direction: column;
        gap: calc(var(--spacing-lg) * 0.6);
    }

    /* Neutralize reversed layout on mobile - all cards render identically */
    .project-showcase.project-reversed {
        direction: ltr;
        /* Override desktop reversed logic */
        flex-direction: column;
    }

    /* Ensure visual always comes first, details always second */
    .project-visual {
        order: 1;
    }

    .project-details {
        order: 2;
    }

    .floating-element {
        width: 100px;
        height: 100px;
    }

    .timeline {
        grid-template-columns: 1fr;
    }

    section {
        /* Aggressive mobile spacing reduction - tighter but still readable */
        padding: calc(var(--spacing-lg) * 0.7) var(--spacing-md);
        margin: 0;
        /* Keep sections filling the viewport once reached */
        min-height: calc(100vh - var(--header-height));
        scroll-margin-top: calc(var(--header-height) + 8px);
    }

    .section-header {
        /* Reduce bottom margin on mobile sections */
        margin-bottom: calc(var(--spacing-lg) * 0.65);
    }

    /* Mobile-only: enforce uniform project image behavior */
    .project-visual {
        /* Fixed container height for consistency across all project cards */
        height: 240px;
        max-height: 240px;
        aspect-ratio: auto;
        width: 100%;
    }

    .project-image {
        /* Ensure image is always centered and covers the container uniformly */
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
    }

    .project-placeholder {
        /* Placeholder should fill container exactly like images do */
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }
}

/* Mobile Explore pill + overlay navigation (distinct from classic hamburger) */
.mobile-explore {
    display: none;
}

@media (max-width: 768px) {
    .mobile-explore {
        display: inline-flex;
        position: fixed;
        right: 18px;
        bottom: 22px;
        z-index: 1200;
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.96), rgba(118, 75, 162, 0.94));
        color: white;
        padding: 12px 18px;
        border-radius: 999px;
        gap: 10px;
        align-items: center;
        box-shadow: 0 8px 24px rgba(102, 126, 234, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
        cursor: pointer;
        font-weight: 600;
        font-size: 0.95rem;
        letter-spacing: 0.3px;
        backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.15);
        transition: all 240ms var(--ease-out);
    }

    .mobile-explore:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 32px rgba(102, 126, 234, 0.45), 0 4px 12px rgba(0, 0, 0, 0.25);
    }

    .mobile-explore:active {
        transform: translateY(0);
    }

    .mobile-explore .pill-icon {
        width: 18px;
        height: 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-explore .pill-label {
        font-weight: 600;
    }
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 15, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1190;
    opacity: 0;
    pointer-events: none;
    transition: opacity 320ms var(--ease-out), backdrop-filter 320ms var(--ease-out);
}

.mobile-nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-panel {
    width: min(92%, 520px);
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: var(--spacing-lg);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: translateY(12px) scale(0.98);
    opacity: 0;
    transition: transform 280ms var(--ease-out), opacity 280ms var(--ease-out);
}

.mobile-nav-overlay.open .mobile-nav-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.mobile-nav-panel .close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 200ms var(--ease-out);
    opacity: 0.7;
}

.mobile-nav-panel .close-btn:hover {
    background: rgba(102, 126, 234, 0.08);
    color: var(--text-light);
    opacity: 1;
    transform: rotate(90deg);
}

.mobile-nav-panel .close-btn:active {
    transform: rotate(90deg) scale(0.95);
}

.mobile-nav-panel .close-btn svg {
    display: block;
    transition: transform 200ms var(--ease-out);
}

.mobile-nav-panel .nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 0;
}

.mobile-nav-panel .nav-link {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-light);
    padding: 14px 12px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 200ms var(--ease-out);
    position: relative;
}

.mobile-nav-panel .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    border-radius: 0 2px 2px 0;
    transition: height 200ms var(--ease-out);
}

.mobile-nav-panel .nav-link:hover,
.mobile-nav-panel .nav-link:focus {
    background: rgba(102, 126, 234, 0.08);
    color: var(--secondary);
    transform: translateX(4px);
}

.mobile-nav-panel .nav-link:hover::before,
.mobile-nav-panel .nav-link:focus::before {
    height: 60%;
}

/* Theme-specific panel styling for proper contrast */
[data-theme="dark"] .mobile-nav-overlay {
    background: rgba(5, 8, 15, 0.8);
}

[data-theme="dark"] .mobile-nav-panel {
    background: linear-gradient(135deg, #1a1f2e 0%, #151a27 100%);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .mobile-nav-overlay {
    background: rgba(240, 242, 248, 0.75);
}

[data-theme="light"] .mobile-nav-panel {
    background: linear-gradient(135deg, #ffffff 0%, #f7f9fd 100%);
    box-shadow: 0 24px 64px rgba(10, 14, 39, 0.15), 0 0 0 1px rgba(10, 14, 39, 0.06);
}

/* Accessibility focus */
.mobile-nav-panel .nav-link:focus {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

/* Subtle periodic pulse for mobile explore pill — runs briefly when the class is present */
.mobile-explore.pulse {
    animation: mobilePulse 1.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes mobilePulse {
    0% {
        transform: translateY(0) scale(1);
        box-shadow: 0 8px 24px rgba(102, 126, 234, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    40% {
        transform: translateY(-2px) scale(1.01);
        box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5), 0 4px 12px rgba(118, 75, 162, 0.25);
    }

    100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 8px 24px rgba(102, 126, 234, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
    }
}