/* ============================================
   LANDING PAGE STYLES - Unique Design System
   Colors derived from: rossstyletree.png, animeheader.png, animeboy.webp
   ============================================ */

:root {
    /* Color Palette - Compatible with reference images */
    --landing-primary: #2d3436;
    --landing-secondary: #636e72;
    --landing-accent: #4A90E2;
    --landing-accent-light: #6BB6FF;
    --landing-accent-dark: #2E5C8A;
    --landing-bg-dark: #0f0f23;
    --landing-bg-medium: #1a1a2e;
    --landing-bg-light: #16213e;
    --landing-text-primary: #dfe6e9;
    --landing-text-secondary: #b2bec3;
    --landing-border: rgba(74, 144, 226, 0.2);
    --landing-glow: rgba(74, 144, 226, 0.4);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-space: 'Space Grotesk', 'Inter', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.6s ease;
    
    /* Z-index layers */
    --z-background: 1;
    --z-content: 10;
    --z-header: 100;
    --z-overlay: 1000;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

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

body.landing-page {
    font-family: var(--font-primary);
    background: var(--landing-bg-dark);
    color: var(--landing-text-primary);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    line-height: 1.6;
}

/* Global dim overlay to deepen background contrast */
body.landing-page::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: rgba(5, 5, 15, 0.35);
    mix-blend-mode: multiply;
    z-index: 5; /* above bg canvas, below content */
}

/* ============================================
   THREE.JS BACKGROUND CONTAINER
   ============================================ */

#threejs-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-background);
    pointer-events: none;
    opacity: 0.6;
    /* Ensure no background images or content can leak through */
    background: transparent;
    overflow: hidden;
}

/* Ensure canvas inside threejs-background is properly contained */
#threejs-background canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

/* ============================================
   INTRO LOADING TREE
   ============================================ */

.landing-intro {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 50% 50%, rgba(5, 5, 12, 0.9) 0%, rgba(5, 5, 12, 0.7) 45%, rgba(5, 5, 12, 0.35) 70%, rgba(0, 0, 0, 0) 100%),
        radial-gradient(circle at 50% 60%, rgba(10, 9, 26, 0.6), rgba(4, 3, 12, 0.7));
    z-index: 12000;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.landing-intro.intro-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.intro-backlight {
    position: absolute;
    width: min(65vmin, 520px);
    height: min(65vmin, 520px);
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 62%),
        repeating-conic-gradient(
            from 0deg,
            rgba(255, 255, 255, 0.24) 0deg 10deg,
            rgba(255, 255, 255, 0) 10deg 22deg
        );
    filter: blur(18px) brightness(1.2);
    opacity: 0.9;
    animation: introRayPulse 4.2s ease-in-out infinite;
    mix-blend-mode: screen;
}

.intro-tree {
    width: min(42vmin, 320px);
    height: auto;
    position: relative;
    z-index: 1;
    filter:
        drop-shadow(0 0 24px rgba(255, 242, 213, 0.65))
        drop-shadow(0 0 48px rgba(74, 144, 226, 0.45));
    transform-origin: center;
    will-change: transform, opacity;
}

@keyframes introRayPulse {
    0%   { transform: scale(0.92) rotate(0deg); opacity: 0.85; }
    40%  { transform: scale(1.06) rotate(22deg); opacity: 1; }
    70%  { transform: scale(1.12) rotate(38deg); opacity: 0.9; }
    100% { transform: scale(0.96) rotate(64deg); opacity: 0.82; }
}

/* ============================================
   UNIQUE LANDING HEADER
   ============================================ */

.landing-header {
    position: relative;
    z-index: var(--z-header);
    padding: var(--spacing-md) var(--spacing-md);
    padding-bottom: var(--spacing-md);
    min-height: clamp(3.5rem, 4vw + 2rem, 5rem);
    background: rgba(15, 15, 35, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--landing-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
}

.landing-header-brand {
    display: flex;
    align-items: center;
    z-index: calc(var(--z-header) + 1);
}

.landing-navbar {
    background: transparent !important;
    padding: var(--spacing-sm) var(--spacing-md);
}

/* Landing Page Minimal Navbar Overrides */
.landing-minimal-navbar {
    position: relative;
    top: auto;
    right: auto;
    z-index: calc(var(--z-header) + 1);
}

.landing-minimal-navbar .navbar-toggle {
    background: rgba(15, 15, 35, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--landing-border);
}

.landing-minimal-navbar .navbar-menu {
    background: linear-gradient(135deg, 
        rgba(15, 15, 35, 0.98) 0%, 
        rgba(26, 26, 46, 0.97) 50%,
        rgba(15, 15, 35, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--landing-border);
}

.landing-minimal-navbar .navbar-backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.landing-brand {
    font-family: var(--font-space);
    font-size: clamp(2rem, 2.5vw, 2.5rem);
    font-weight: 600;
    color: var(--landing-text-primary) !important;
    text-decoration: none;
    transition: color var(--transition-normal);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    flex: 0 0 auto;
}

.brand-text {
    font-family: var(--font-space);
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #E8F4FF;
    text-shadow:
        0 0 10px rgba(74, 144, 226, 0.6),
        0 0 18px rgba(74, 144, 226, 0.35);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    text-align: center;
    font-size: clamp(1.5rem, 2.2vw, 2.2rem);
    line-height: 1.2;
    padding: 0.15rem 0.85rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(15, 15, 35, 0.65), rgba(25, 25, 55, 0.4));
    max-width: 100%;
    overflow: hidden;
}

/* MathJax formulas in brand text - larger and more spacious */
.brand-text mjx-container {
    font-size: 1.25em !important;
    line-height: 1.3 !important;
    margin: 0 0.15em;
    vertical-align: middle;
}

.brand-text mjx-container mjx-math {
    font-size: 1em;
}

.brand-text mjx-container svg {
    display: inline-block;
    vertical-align: middle;
}

.brand-typing::after {
    content: '|';
    position: absolute;
    right: -0.2ch;
    color: var(--landing-accent);
    animation: brandCaret 0.9s steps(2) infinite;
}

@keyframes brandCaret {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.brand-text.typing-reveal {
    animation: brandReveal var(--brand-type-duration, 1.2s) steps(24, end);
}

@keyframes brandReveal {
    from { clip-path: inset(0 100% 0 0); }
    to   { clip-path: inset(0 0 0 0); }
}

.landing-brand:hover {
    color: var(--landing-accent-light) !important;
}

.landing-brand::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--landing-accent);
    transition: width var(--transition-normal);
}

.landing-brand:hover::after {
    width: 100%;
}

.brand-insight-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(circle at 20% 20%, rgba(74, 144, 226, 0.18), transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(107, 182, 255, 0.18), transparent 38%),
        rgba(6, 6, 18, 0.78);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    z-index: calc(var(--z-overlay) + 10);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.brand-insight-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.brand-insight-card {
    position: relative;
    width: min(560px, 94vw);
    padding: 1.6rem 1.9rem;
    background: linear-gradient(145deg, rgba(22, 33, 62, 0.92), rgba(15, 15, 35, 0.94));
    border: 1px solid var(--landing-border);
    border-radius: 20px;
    box-shadow:
        0 20px 80px rgba(0, 0, 0, 0.6),
        0 0 50px rgba(74, 144, 226, 0.18);
    overflow: visible;
}

.brand-insight-card::before {
    content: '';
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle at 30% 30%, rgba(74, 144, 226, 0.12), transparent 40%);
    filter: blur(18px);
    opacity: 0.8;
    pointer-events: none;
}

.brand-insight-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--landing-text-primary);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 2;
}

.brand-insight-close:hover {
    background: rgba(74, 144, 226, 0.16);
    color: #fff;
    border-color: var(--landing-border);
    transform: translateY(-1px);
}

.brand-insight-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1.1rem 0.5rem 0.85rem;
    clip-path: polygon(
        0% 0%,
        calc(100% - 12px) 0%,
        100% 50%,
        calc(100% - 12px) 100%,
        0% 100%,
        8px 50%
    );
    border: 1px solid var(--landing-border);
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.12), rgba(107, 182, 255, 0.08));
    color: var(--landing-text-secondary);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    position: relative;
    transform: perspective(100px) rotateX(1deg);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-insight-chip::before {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(
        0% 0%,
        calc(100% - 12px) 0%,
        100% 50%,
        calc(100% - 12px) 100%,
        0% 100%,
        8px 50%
    );
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.15), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

.brand-insight-chip:hover::before {
    opacity: 1;
}

.brand-insight-title {
    margin: 0.6rem 0 1.1rem;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: #fff;
    line-height: 1.3;
}

.brand-insight-formula-wrapper {
    position: relative;
    margin-top: 0.4rem;
    margin-bottom: 0.2rem;
}

.brand-insight-formula {
    padding: 1.25rem 1.4rem;
    border-radius: 16px;
    border: 1px solid var(--landing-border);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(74, 144, 226, 0.06));
    color: var(--landing-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 85px;
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.05),
        0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.brand-insight-formula mjx-container {
    font-size: 1.15rem !important;
    line-height: 1.4 !important;
}

.brand-insight-code {
    display: inline-block;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--landing-border);
    background: rgba(0, 0, 0, 0.32);
    font-family: 'Space Grotesk', 'SFMono-Regular', 'Consolas', monospace;
    font-size: 1rem;
    color: var(--landing-text-primary);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.35),
        0 0 24px rgba(74, 144, 226, 0.16);
}

.brand-insight-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.brand-insight-nav-btn {
    position: absolute;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    background: rgba(22, 33, 62, 0.85);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 16px rgba(74, 144, 226, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 0.9rem;
}

.brand-insight-nav-btn:hover {
    background: rgba(74, 144, 226, 0.25);
    border-color: rgba(74, 144, 226, 0.7);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.5),
        0 0 24px rgba(74, 144, 226, 0.35);
}

.brand-insight-nav-btn:hover.brand-insight-nav-prev {
    transform: translateY(-50%) translateX(-2px) scale(1.08);
}

.brand-insight-nav-btn:hover.brand-insight-nav-next {
    transform: translateY(-50%) translateX(2px) scale(1.08);
}

.brand-insight-nav-btn:active {
    transform: translateY(-50%) scale(1.02);
}

.brand-insight-nav-prev {
    left: 0;
}

.brand-insight-nav-next {
    right: 0;
}

.brand-insight-description {
    margin-top: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.8;
    letter-spacing: 0.01em;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 144, 226, 0.4) rgba(0, 0, 0, 0.2);
}

.brand-insight-description::-webkit-scrollbar {
    width: 6px;
}

.brand-insight-description::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.brand-insight-description::-webkit-scrollbar-thumb {
    background: rgba(74, 144, 226, 0.4);
    border-radius: 3px;
}

.brand-insight-description::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 144, 226, 0.6);
}

.brand-insight-description p {
    margin: 0 0 1.2rem 0;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    padding: 0;
}

.brand-insight-description p:last-child {
    margin-bottom: 0;
}

.brand-insight-description strong {
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.brand-insight-description code,
.brand-insight-description .brand-insight-inline-code {
    font-family: 'Space Grotesk', 'SFMono-Regular', 'Consolas', monospace;
    font-size: 0.9em;
    padding: 0.2em 0.4em;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: rgba(107, 182, 255, 0.95);
}

.brand-insight-description mjx-container {
    display: inline-block;
    margin: 0 0.15em;
    vertical-align: baseline;
    line-height: 1.5;
}

.brand-insight-description mjx-container mjx-math {
    font-size: 1em;
    color: rgba(107, 182, 255, 0.95);
}

.brand-insight-description mjx-container[display="true"] {
    display: block;
    margin: 0.5em 0;
    text-align: center;
}

/* Ensure MathJax SVG rendering is properly styled */
.brand-insight-description mjx-container svg {
    display: inline-block;
    vertical-align: middle;
}

/* Style for MathJax text elements */
.brand-insight-description mjx-container mjx-math[display="true"] {
    display: block;
    text-align: center;
}

/* Hide MathJax error messages and ensure proper rendering */
.brand-insight-description mjx-container[data-mjx-error] {
    color: rgba(107, 182, 255, 0.95);
}

.brand-insight-description mjx-container[data-mjx-error]::before {
    display: none;
}

/* Ensure unprocessed LaTeX doesn't show broken syntax highlighting */
.brand-insight-description .MathJax,
.brand-insight-description .MathJax_Display {
    color: rgba(107, 182, 255, 0.95);
}

/* Hide any browser syntax highlighting on LaTeX delimiters */
.brand-insight-description:not(:has(mjx-container)) {
    /* Fallback: if MathJax hasn't processed, ensure text is readable */
}

/* Ensure proper spacing around MathJax elements */
.brand-insight-description mjx-container + *,
.brand-insight-description * + mjx-container {
    margin-left: 0.1em;
    margin-right: 0.1em;
}

.brand-insight-btn {
    padding: 0.65rem 1.2rem;
    border-radius: 12px;
    border: 1px solid var(--landing-border);
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.15), rgba(107, 182, 255, 0.15));
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.35),
        0 0 18px rgba(74, 144, 226, 0.18);
}

.brand-insight-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(74, 144, 226, 0.65);
}

.brand-insight-btn:active {
    transform: translateY(0);
}

.brand-insight-btn.ghost {
    background: rgba(255, 255, 255, 0.06);
    color: var(--landing-text-secondary);
    box-shadow: none;
}

.brand-insight-prompt {
    padding: 1.4rem 1.5rem;
    text-align: center;
}

.brand-insight-prompt-text {
    margin: 0.75rem 0 1.1rem;
    color: var(--landing-text-secondary);
    font-size: 0.95rem;
}

.brand-insight-prompt-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 576px) {
    .brand-insight-card {
        padding: 1.3rem 1.4rem;
    }
    
    .brand-insight-title {
        font-size: 1.2rem;
        margin: 0.5rem 0 1rem;
    }
    
    .brand-insight-formula {
        padding: 1rem 1.1rem;
        min-height: 75px;
    }
    
    .brand-insight-formula mjx-container {
        font-size: 1rem !important;
    }
    
    .brand-insight-description {
        font-size: 0.95rem;
        line-height: 1.7;
        margin-top: 1rem;
    }
    
    .brand-insight-close {
        width: 34px;
        height: 34px;
        top: 10px;
        right: 10px;
    }
    
    .brand-insight-nav-btn {
        width: 38px;
        height: 38px;
        font-size: 0.8rem;
        opacity: 0.9;
    }
    
    .brand-insight-nav-btn:active {
        opacity: 1;
    }
    
    .brand-insight-formula-wrapper {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    .brand-insight-nav-btn {
        width: 42px;
        height: 42px;
    }
}

.landing-navbar .nav-link {
    color: var(--landing-text-secondary) !important;
    font-weight: 500;
    padding: 0.65rem 1.25rem !important;
    margin: 0 0.3rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    font-family: var(--font-primary);
    display: inline-block;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 0.875rem;
    border-radius: 12px;
    overflow: visible;
    z-index: 1;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

/* Animated background gradient on hover */
.landing-navbar .nav-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(74, 144, 226, 0.15) 0%, 
        rgba(107, 182, 255, 0.12) 50%,
        rgba(74, 144, 226, 0.15) 100%);
    border-radius: 12px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
    filter: blur(8px);
    pointer-events: none;
}

/* Glowing underline effect */
.landing-navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--landing-accent-light) 20%,
        var(--landing-accent) 50%,
        var(--landing-accent-light) 80%,
        transparent 100%);
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    opacity: 0;
    box-shadow: 0 0 12px rgba(107, 182, 255, 0.6),
                0 0 24px rgba(74, 144, 226, 0.4);
    z-index: -1;
}

/* Full border tour animation element */
.landing-navbar .nav-link .border-tour {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    opacity: 0;
    pointer-events: none;
    box-sizing: border-box;
    border: 2px solid var(--landing-accent);
    border-radius: 14px;
    z-index: 0;
    transition: opacity var(--transition-normal);
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.5),
                inset 0 0 20px rgba(74, 144, 226, 0.1);
}

.landing-navbar .nav-link.border-tour-active .border-tour {
    opacity: 1;
    animation: borderTour 2.5s ease-in-out forwards;
}

@keyframes borderTour {
    0% {
        clip-path: polygon(0 0, 0 0, 0 0, 0 0);
    }
    25% {
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    }
    50% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 100% 100%);
    }
    75% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    100% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

/* Enhanced hover state with glow and depth */
.landing-navbar .nav-link:hover,
.landing-navbar .nav-link:focus {
    color: var(--landing-text-primary) !important;
    transform: translateY(-2px) scale(1.05);
    text-shadow: 0 0 12px rgba(107, 182, 255, 0.5),
                 0 0 24px rgba(74, 144, 226, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Background gradient appears on hover */
.landing-navbar .nav-link:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    filter: blur(4px);
}

/* Glowing underline expands on hover */
.landing-navbar .nav-link:hover::after {
    width: 90%;
    opacity: 1;
}

/* Active/pressed state */
.landing-navbar .nav-link:active {
    transform: translateY(0) scale(1.02);
    transition: all 0.15s ease;
}

/* Mobile Menu Toggle with FontAwesome Icons */
.landing-nav-toggler {
    border: 1px solid var(--landing-border);
    background: rgba(15, 15, 35, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    position: relative;
    transition: all var(--transition-normal);
    overflow: hidden;
}

.landing-nav-toggler:hover {
    background: rgba(74, 144, 226, 0.2);
    border-color: var(--landing-accent);
    transform: scale(1.05);
}

.landing-nav-toggler:focus {
    outline: 2px solid var(--landing-accent);
    outline-offset: 2px;
}

.landing-nav-toggler i {
    position: absolute;
    font-size: 1.25rem;
    color: var(--landing-text-primary);
    transition: all var(--transition-normal);
}

.menu-icon-open {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.menu-icon-close {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

.landing-nav-toggler[aria-expanded="true"] .menu-icon-open {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

.landing-nav-toggler[aria-expanded="true"] .menu-icon-close {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    color: var(--landing-accent-light);
    text-shadow: 0 0 8px rgba(107, 182, 255, 0.6);
}

/* Header Image Container - Hidden, image is now in Three.js 3D scene */
.header-image-container {
    display: none; /* Image is rendered in Three.js scene */
}

.header-image-effect {
    /* Keep for Three.js to access the src, but don't display */
    display: none;
}

/* Ensure navbar is above background image */
.landing-navbar {
    position: relative;
    z-index: calc(var(--z-header) + 1);
}

@media (max-width: 768px) {
    .landing-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: var(--spacing-sm);
    }
    
    .landing-header-brand {
        flex: 1;
    }
    
    .landing-minimal-navbar {
        position: relative;
        top: auto;
        right: auto;
    }
    
    .landing-minimal-navbar .navbar-toggle {
        width: 40px;
        height: 40px;
    }
}

/* Hide mobile brand clone on desktop */
.landing-navbar .navbar-collapse .mobile-brand-clone {
    display: none !important;
}

/* ============================================
   PROFESSIONAL MOBILE MENU STYLING
   ============================================ */
@media (max-width: 991px) {
    /* Mobile menu toggler should stay above menu overlay */
    .landing-nav-toggler {
        z-index: calc(var(--z-overlay) + 200); /* 1200 - above menu */
        position: relative;
    }
    
    /* Enhanced toggle button hover - desktop-like */
    .landing-nav-toggler:hover {
        background: rgba(74, 144, 226, 0.25) !important;
        border-color: var(--landing-accent) !important;
        transform: scale(1.08) !important;
        box-shadow: 0 0 16px rgba(74, 144, 226, 0.4),
                    0 0 32px rgba(107, 182, 255, 0.2) !important;
    }
    
    .landing-nav-toggler[aria-expanded="true"] {
        background: rgba(74, 144, 226, 0.2) !important;
        border-color: var(--landing-accent) !important;
        box-shadow: 0 0 12px rgba(74, 144, 226, 0.3) !important;
    }
    
    .landing-nav-toggler:active {
        transform: scale(0.95) !important;
        transition: transform 0.1s ease !important;
    }
    
    /* Ensure container-fluid doesn't interfere */
    .landing-navbar .container-fluid {
        position: relative;
        z-index: calc(var(--z-overlay) + 150);
    }
    
    /* Mobile menu container - Full overlay style */
    .landing-navbar .navbar-collapse {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        background: linear-gradient(135deg, 
            rgba(15, 15, 35, 0.98) 0%, 
            rgba(26, 26, 46, 0.97) 50%,
            rgba(15, 15, 35, 0.98) 100%) !important;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        border-radius: 0 !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding-top: 1.5rem !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        pointer-events: none;
        opacity: 0;
        visibility: hidden;
        z-index: calc(var(--z-overlay) + 100) !important;
        transform: translateZ(0); /* Force hardware acceleration */
    }
    
    /* Show brand/logo in mobile menu */
    .landing-navbar .navbar-collapse.show::after {
        content: '';
        display: block;
        width: 100%;
        max-width: 420px;
        margin: 0 auto 2rem auto;
        padding: 0 1.5rem;
        position: relative;
        z-index: 2;
        opacity: 0;
        animation: brandFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
    }
    
    @keyframes brandFadeIn {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Clone brand for mobile menu - positioned at top */
    .landing-navbar .navbar-collapse .mobile-brand-clone {
        display: block !important;
        width: 100%;
        max-width: 420px;
        margin: 0 auto 3rem auto;
        padding: 1.5rem 1.5rem 0 1.5rem;
        position: relative;
        z-index: 2;
        opacity: 0;
        transform: translateY(-20px);
        text-align: center;
    }
    
    .landing-navbar .navbar-collapse.show .mobile-brand-clone {
        animation: brandFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
    }
    
    .landing-navbar .navbar-collapse .mobile-brand-clone .landing-brand {
        display: inline-flex !important;
        justify-content: center;
        margin: 0 auto;
        padding: 0.5rem 1rem;
        border-radius: 12px;
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .landing-navbar .navbar-collapse .mobile-brand-clone .landing-brand:hover {
        color: var(--landing-accent-light) !important;
        transform: scale(1.05);
        background: rgba(74, 144, 226, 0.1);
        box-shadow: 0 0 20px rgba(74, 144, 226, 0.3);
    }
    
    .landing-navbar .navbar-collapse .mobile-brand-clone .landing-brand::after {
        width: 0;
        transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .landing-navbar .navbar-collapse .mobile-brand-clone .landing-brand:hover::after {
        width: 100%;
    }
    
    .landing-navbar .navbar-collapse .mobile-brand-clone .brand-text {
        font-size: clamp(1.3rem, 4vw, 1.6rem) !important;
    }
    
    /* When collapsing or hidden, completely remove from layout */
    .landing-navbar .navbar-collapse:not(.show):not(.collapsing) {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        z-index: -1 !important;
    }
    
    .landing-navbar .navbar-collapse.collapsing {
        display: flex !important;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        z-index: calc(var(--z-overlay) + 100) !important;
        transition: opacity 0.25s ease-out, visibility 0.25s ease-out;
    }
    
    .landing-navbar .navbar-collapse.show {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        z-index: calc(var(--z-overlay) + 100) !important;
        animation: menuFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    @keyframes menuFadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }
    
    .landing-navbar .navbar-collapse::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(
            circle at 30% 20%,
            rgba(74, 144, 226, 0.15) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 70% 80%,
            rgba(107, 182, 255, 0.1) 0%,
            transparent 50%
        );
        pointer-events: none;
        z-index: -1;
    }
    
    /* Navigation list container */
    .landing-navbar .navbar-nav {
        width: 100% !important;
        max-width: 420px !important;
        padding: 0 1.5rem 3rem 1.5rem !important;
        margin: 0 auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.5rem !important;
        position: relative !important;
        z-index: 1 !important;
        list-style: none !important;
    }
    
    /* Ensure nav items are properly displayed */
    .landing-navbar .navbar-nav .nav-item {
        width: 100% !important;
        display: block !important;
        list-style: none !important;
    }
    
    /* Mobile menu specific hover effects - Desktop-like styling */
    .landing-navbar .nav-link {
        position: relative !important;
        padding: 1rem 1.75rem !important;
        margin: 0 !important;
        border-radius: 12px !important;
        font-size: 0.9rem !important;
        font-weight: 500 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.03em !important;
        color: var(--landing-text-secondary) !important;
        background: rgba(26, 26, 46, 0.3) !important;
        border: 1px solid rgba(74, 144, 226, 0.15) !important;
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        width: 100% !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
        overflow: visible !important;
        text-decoration: none !important;
        min-height: 48px; /* Better touch target */
    }
    
    /* Desktop-like animated background gradient on hover */
    .landing-navbar .nav-link::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.9);
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, 
            rgba(74, 144, 226, 0.2) 0%, 
            rgba(107, 182, 255, 0.15) 50%,
            rgba(74, 144, 226, 0.2) 100%);
        border-radius: 12px;
        opacity: 0;
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: -1;
        filter: blur(6px);
        pointer-events: none;
    }
    
    /* Desktop-like glowing underline effect */
    .landing-navbar .nav-link::after {
        content: '';
        position: absolute;
        bottom: 4px;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 3px;
        background: linear-gradient(90deg, 
            transparent 0%, 
            var(--landing-accent-light) 20%,
            var(--landing-accent) 50%,
            var(--landing-accent-light) 80%,
            transparent 100%);
        border-radius: 2px;
        transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
        opacity: 0;
        box-shadow: 0 0 12px rgba(107, 182, 255, 0.6),
                    0 0 24px rgba(74, 144, 226, 0.4);
        z-index: -1;
    }
    
    /* Desktop-like border tour animation - enable on mobile */
    .landing-navbar .nav-link .border-tour {
        position: absolute !important;
        top: -2px !important;
        left: -2px !important;
        right: -2px !important;
        bottom: -2px !important;
        opacity: 0 !important;
        pointer-events: none !important;
        box-sizing: border-box !important;
        border: 2px solid var(--landing-accent) !important;
        border-radius: 14px !important;
        z-index: 0 !important;
        transition: opacity var(--transition-normal) !important;
        box-shadow: 0 0 20px rgba(74, 144, 226, 0.5),
                    inset 0 0 20px rgba(74, 144, 226, 0.1) !important;
        display: block !important;
    }
    
    .landing-navbar .nav-link.border-tour-active .border-tour {
        opacity: 1 !important;
        animation: borderTour 2.5s ease-in-out forwards;
    }
    
    /* Text content above background */
    .landing-navbar .nav-link > *:not(.border-tour) {
        position: relative;
        z-index: 2;
    }
    
    /* Desktop-like hover state */
    .landing-navbar .nav-link:hover,
    .landing-navbar .nav-link:focus,
    .landing-navbar .nav-link:active {
        color: var(--landing-text-primary) !important;
        transform: translateY(-2px) scale(1.02);
        text-shadow: 0 0 12px rgba(107, 182, 255, 0.6),
                     0 0 24px rgba(74, 144, 226, 0.4);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        background: rgba(26, 26, 46, 0.5) !important;
        border-color: rgba(74, 144, 226, 0.4) !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3),
                    0 0 20px rgba(74, 144, 226, 0.2) !important;
    }
    
    /* Touch feedback for mobile */
    .landing-navbar .nav-link:active {
        transform: translateY(0) scale(0.98) !important;
        transition: all 0.15s ease !important;
    }
    
    /* Background gradient appears on hover - desktop style */
    .landing-navbar .nav-link:hover::before,
    .landing-navbar .nav-link:focus::before,
    .landing-navbar .nav-link:active::before {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
        filter: blur(4px);
    }
    
    /* Glowing underline expands on hover - desktop style */
    .landing-navbar .nav-link:hover::after {
        width: 90%;
        opacity: 1;
    }
    
    
    /* Nav item container - Start hidden */
    .landing-navbar .navbar-collapse .nav-item {
        width: 100% !important;
        position: relative !important;
        opacity: 0;
        transform: translateY(30px);
        display: block !important;
    }
    
    /* Staggered animation for menu items when menu is shown */
    .landing-navbar .navbar-collapse.show .nav-item {
        animation: itemFadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    
    /* Ensure nav items are visible when menu is shown */
    .landing-navbar .navbar-collapse.show .nav-item,
    .landing-navbar .navbar-collapse.collapsing .nav-item {
        display: block !important;
    }
    
    .landing-navbar .navbar-collapse.show .nav-item:nth-child(1) { 
        animation-delay: 0.15s; 
    }
    .landing-navbar .navbar-collapse.show .nav-item:nth-child(2) { 
        animation-delay: 0.2s; 
    }
    .landing-navbar .navbar-collapse.show .nav-item:nth-child(3) { 
        animation-delay: 0.25s; 
    }
    .landing-navbar .navbar-collapse.show .nav-item:nth-child(4) { 
        animation-delay: 0.3s; 
    }
    .landing-navbar .navbar-collapse.show .nav-item:nth-child(5) { 
        animation-delay: 0.35s; 
    }
    .landing-navbar .navbar-collapse.show .nav-item:nth-child(6) { 
        animation-delay: 0.4s; 
    }
    .landing-navbar .navbar-collapse.show .nav-item:nth-child(7) { 
        animation-delay: 0.45s; 
    }
    .landing-navbar .navbar-collapse.show .nav-item:nth-child(8) { 
        animation-delay: 0.5s; 
    }
    
    @keyframes itemFadeInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Prevent body scroll when menu is open */
    body.mobile-menu-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    /* Custom scrollbar for mobile menu */
    .landing-navbar .navbar-collapse::-webkit-scrollbar {
        width: 6px;
    }
    
    .landing-navbar .navbar-collapse::-webkit-scrollbar-track {
        background: rgba(15, 15, 35, 0.3);
        border-radius: 10px;
    }
    
    .landing-navbar .navbar-collapse::-webkit-scrollbar-thumb {
        background: rgba(74, 144, 226, 0.4);
        border-radius: 10px;
        transition: background 0.3s ease;
    }
    
    .landing-navbar .navbar-collapse::-webkit-scrollbar-thumb:hover {
        background: rgba(74, 144, 226, 0.6);
    }
    
    /* Override any Bootstrap default styles that might interfere */
    .landing-navbar .navbar-collapse.show,
    .landing-navbar .navbar-collapse.collapsing {
        /* Remove any inline styles that might be set by Bootstrap */
        max-height: none !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
    
    /* Ensure text content is properly styled */
    .landing-navbar .navbar-collapse .nav-link span:not(.border-tour) {
        display: inline !important;
    }
    
    /* Hide any default Bootstrap navbar styles on mobile */
    .landing-navbar .navbar-collapse {
        background-color: transparent !important;
        box-shadow: none !important;
    }
    
    /* Ensure the menu doesn't show as inline text */
    .landing-navbar .navbar-collapse:not(.show):not(.collapsing) {
        height: 0 !important;
        min-height: 0 !important;
    }
    
    /* Allow mobile-brand-clone to show */
    .landing-navbar .navbar-collapse > .mobile-brand-clone {
        display: block !important;
    }
    
    /* Prevent other direct children from showing (except navbar-nav and mobile-brand-clone) */
    .landing-navbar .navbar-collapse > *:not(.navbar-nav):not(.mobile-brand-clone) {
        display: none !important;
    }
    
    /* Ensure only navbar-nav content is visible */
    .landing-navbar .navbar-collapse {
        font-size: 0; /* Hide any direct text content */
    }
    
    .landing-navbar .navbar-collapse .navbar-nav,
    .landing-navbar .navbar-collapse .mobile-brand-clone {
        font-size: initial; /* Restore font size for nav items and brand */
    }
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */

.landing-main {
    position: relative;
    z-index: var(--z-content);
    min-height: calc(100vh - 200px);
    padding: var(--spacing-xl) var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    isolation: isolate; /* Create new stacking context */
}

.landing-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* ============================================
   PROFILE SECTION - Animeboy Card
   ============================================ */

.profile-section {
    margin-bottom: var(--spacing-xl);
}

.profile-card-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--spacing-md);
    perspective: 1000px;
}

.profile-card {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(74, 144, 226, 0.3),
                0 0 0 1px var(--landing-border);
    transform-style: preserve-3d;
    transition: box-shadow var(--transition-normal);
    cursor: pointer;
    background: var(--landing-bg-medium);
    /* Ensure content is visible with 3D transforms */
    backface-visibility: visible;
    -webkit-backface-visibility: visible;
}

.profile-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    backface-visibility: visible;
    -webkit-backface-visibility: visible;
}

.profile-card:hover {
    box-shadow: 0 30px 80px rgba(74, 144, 226, 0.5),
                0 0 0 2px var(--landing-accent);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    /* Ensure image is visible with 3D transforms */
    backface-visibility: visible;
    -webkit-backface-visibility: visible;
    transform-style: preserve-3d;
    /* Prevent image from being hidden by 3D transforms - keep it forward */
    transform: translate3d(0, 0, 1px);
    transition: transform var(--transition-slow);
    filter: brightness(1.05) contrast(1.1);
    /* Ensure image renders properly */
    will-change: transform;
    /* Prevent image from disappearing during 3D rotations */
    -webkit-transform: translate3d(0, 0, 1px);
    pointer-events: none; /* Allow interactions to pass through to card */
    /* Force image to display */
    visibility: visible;
    opacity: 1;
}

.profile-card:hover .profile-image {
    transform: translate3d(0, 0, 1px) scale(1.1);
}

/* TV Noise Effect */
.tv-noise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    opacity: 0;
    pointer-events: none;
    z-index: 3;
    mix-blend-mode: screen;
    background-image: 
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.1) 0px,
            rgba(255, 255, 255, 0.15) 1px,
            rgba(0, 0, 0, 0.08) 2px,
            rgba(255, 255, 255, 0.12) 3px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.12) 0px,
            rgba(0, 0, 0, 0.1) 1px,
            rgba(255, 255, 255, 0.15) 2px,
            rgba(0, 0, 0, 0.08) 3px
        ),
        repeating-linear-gradient(
            45deg,
            rgba(255, 255, 255, 0.08) 0px,
            rgba(0, 0, 0, 0.12) 2px,
            rgba(255, 255, 255, 0.1) 3px,
            rgba(0, 0, 0, 0.09) 4px
        );
    background-size: 4px 4px, 4px 4px, 6px 6px;
    will-change: opacity, filter;
    filter: contrast(1.5) brightness(1.2);
    animation: tvNoiseShift 0.9s steps(2) infinite;
}

.profile-image-wrapper.tv-noise-active .tv-noise-overlay {
    animation: tvNoiseFlicker var(--tv-noise-duration, 0.8s) ease-in-out;
}

@keyframes tvNoiseFlicker {
    0%, 100% {
        opacity: 0;
    }
    10% {
        opacity: calc(var(--tv-noise-intensity, 0.4) * 0.4);
    }
    25% {
        opacity: calc(var(--tv-noise-intensity, 0.4) * 0.7);
    }
    50% {
        opacity: var(--tv-noise-intensity, 0.4);
    }
    75% {
        opacity: calc(var(--tv-noise-intensity, 0.4) * 0.7);
    }
    90% {
        opacity: calc(var(--tv-noise-intensity, 0.4) * 0.4);
    }
}

@keyframes tvNoiseShift {
    0%   { background-position: 0 0, 0 0, 0 0; }
    25%  { background-position: 2px -2px, -2px 1px, 1px -1px; }
    50%  { background-position: -3px 3px, 3px -2px, -2px 2px; }
    75%  { background-position: 1px 2px, -2px -1px, 2px -3px; }
    100% { background-position: 0 0, 0 0, 0 0; }
}

/* Fallback if image doesn't load */
.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--landing-accent) 0%, var(--landing-accent-dark) 100%);
    z-index: 1;
    opacity: 0.3;
    border-radius: 20px;
}

.profile-card .profile-image[src] {
    z-index: 2;
}

.landing-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 4.5vw, 3.5rem);
    font-weight: 600;
    color: var(--landing-text-primary);
    margin-bottom: 0.1rem;
    letter-spacing: -0.015em;
    background: linear-gradient(135deg, var(--landing-text-primary) 0%, rgba(74, 144, 226, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow:
        0 6px 18px rgba(10, 8, 30, 0.4),
        0 0 24px rgba(74, 144, 226, 0.15);
    padding: 0.1rem 0.35rem;
    border-radius: 8px;
    position: relative;
    z-index: 4;
    display: inline-block;
    transform-style: preserve-3d;
    perspective: 1000px;
    /* 3D Layered Shadows for Depth */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3))
            drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25))
            drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2))
            drop-shadow(0 12px 24px rgba(0, 0, 0, 0.15))
            drop-shadow(0 0 20px rgba(74, 144, 226, 0.2))
            drop-shadow(0 0 40px rgba(74, 144, 226, 0.1));
    /* Professional Animation */
    animation: titleFloat 6s ease-in-out infinite,
               titleGlow 4s ease-in-out infinite alternate;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.4s ease;
    will-change: transform, filter;
}

/* 3D Shadow Layers via Pseudo-element */
.landing-title::before {
    content: 'Yunus Emre Vurgun';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--landing-text-primary) 0%, rgba(74, 144, 226, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    z-index: -1;
    transform: translateZ(-20px) translateY(4px) translateX(2px);
    filter: blur(8px) opacity(0.4);
    pointer-events: none;
    animation: titleShadowFloat 6s ease-in-out infinite;
}

/* Additional Depth Layer */
.landing-title::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 12px;
    background: radial-gradient(
        ellipse at 50% 0%,
        rgba(74, 144, 226, 0.15) 0%,
        rgba(74, 144, 226, 0.05) 40%,
        transparent 70%
    );
    z-index: -2;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    filter: blur(12px);
}

.landing-title:hover {
    transform: translateY(-2px) translateZ(10px) rotateX(2deg);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35))
            drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3))
            drop-shadow(0 12px 24px rgba(0, 0, 0, 0.25))
            drop-shadow(0 16px 32px rgba(0, 0, 0, 0.2))
            drop-shadow(0 0 30px rgba(74, 144, 226, 0.35))
            drop-shadow(0 0 60px rgba(74, 144, 226, 0.2));
    animation-play-state: paused;
}

.landing-title:hover::after {
    opacity: 1;
}

/* Floating Animation */
@keyframes titleFloat {
    0%, 100% {
        transform: translateY(0) translateZ(0) rotateX(0deg);
    }
    50% {
        transform: translateY(-4px) translateZ(5px) rotateX(1deg);
    }
}

/* Glow Pulse Animation */
@keyframes titleGlow {
    0% {
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3))
                drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25))
                drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2))
                drop-shadow(0 12px 24px rgba(0, 0, 0, 0.15))
                drop-shadow(0 0 20px rgba(74, 144, 226, 0.2))
                drop-shadow(0 0 40px rgba(74, 144, 226, 0.1));
    }
    100% {
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3))
                drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25))
                drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2))
                drop-shadow(0 12px 24px rgba(0, 0, 0, 0.15))
                drop-shadow(0 0 25px rgba(74, 144, 226, 0.3))
                drop-shadow(0 0 50px rgba(74, 144, 226, 0.15));
    }
}

/* Shadow Layer Animation */
@keyframes titleShadowFloat {
    0%, 100% {
        transform: translateZ(-20px) translateY(4px) translateX(2px);
        opacity: 0.4;
    }
    50% {
        transform: translateZ(-25px) translateY(8px) translateX(3px);
        opacity: 0.5;
    }
}

.landing-subtitle {
    font-family: var(--font-space);
    font-size: clamp(1.25rem, 2.6vw, 1.45rem);
    color: var(--landing-text-secondary);
    font-weight: 400;
    letter-spacing: 0.08em;
    display: inline-flex;
    align-items: center;
    gap: 0.16rem;
    position: relative;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    background: rgba(10, 10, 25, 0.35);
    box-shadow:
        0 8px 20px rgba(10, 8, 30, 0.35),
        inset 0 0 22px rgba(74, 144, 226, 0.08);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.landing-subtitle .subtitle-part {
    color: var(--landing-text-primary);
    text-shadow: 0 0 14px rgba(74, 144, 226, 0.25);
    transition: transform 0.5s ease, opacity 0.4s ease;
}

.landing-subtitle .subtitle-amp {
    display: inline-block;
    color: #D4E8FF;
    font-weight: 600;
    text-shadow:
        0 0 10px rgba(74, 144, 226, 0.5),
        0 0 16px rgba(255, 255, 255, 0.3);
    animation: ampersandGlow 6s ease-in-out infinite alternate;
    position: relative;
    top: 0.02rem;
}

@keyframes ampersandGlow {
    0%   { filter: drop-shadow(0 0 6px rgba(74, 144, 226,0.4)); transform: translateY(0) scale(1); }
    45%  { filter: drop-shadow(0 0 12px rgba(200,180,255,0.55)); transform: translateY(-1px) scale(1.02); }
    70%  { filter: drop-shadow(0 0 10px rgba(120,110,220,0.35)); transform: translateY(1px) scale(0.99); }
    100% { filter: drop-shadow(0 0 8px rgba(74, 144, 226,0.5)); transform: translateY(0) scale(1.015); }
}

.landing-subtitle.subtitle-reversed .role-a { order: 3; }
.landing-subtitle.subtitle-reversed .subtitle-amp { order: 2; }
.landing-subtitle.subtitle-reversed .role-b { order: 1; }
.landing-subtitle .role-a { order: 1; }
.landing-subtitle .subtitle-amp { order: 2; }
.landing-subtitle .role-b { order: 3; }

/* ============================================
   TREE SECTION
   ============================================ */

.tree-section {
    margin: var(--spacing-md) 0 var(--spacing-lg);
    padding-top: var(--spacing-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.tree-media-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.tree-preview-image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 2rem;
    cursor: pointer;
    z-index: 2;
    transform: translateZ(0);
    will-change: transform;
}

/* Backlight effect behind the image */
.tree-preview-image-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateZ(0);
    width: 120%;
    height: 120%;
    background:
        radial-gradient(
            ellipse at 50% 50%,
            rgba(74, 144, 226, 0.4) 0%,
            rgba(107, 182, 255, 0.25) 30%,
            rgba(74, 144, 226, 0.15) 50%,
            transparent 70%
        ),
        radial-gradient(
            circle at 30% 30%,
            rgba(107, 182, 255, 0.3) 0%,
            transparent 40%
        ),
        radial-gradient(
            circle at 70% 70%,
            rgba(74, 144, 226, 0.3) 0%,
            transparent 40%
        );
    filter: blur(40px) brightness(1.2);
    opacity: 0.8;
    z-index: -1;
    pointer-events: none;
    will-change: opacity, transform, filter;
    transition: 
        opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        filter 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    animation: backlightPulse 4s ease-in-out infinite;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

@keyframes backlightPulse {
    0%, 100% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.95;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.tree-preview-image-container:hover::before {
    opacity: 1;
    filter: blur(50px) brightness(1.4);
    transform: translate(-50%, -50%) scale(1.1);
    transition: 
        opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        filter 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tree-preview-image-container.is-hidden {
    opacity: 0;
    pointer-events: none;
    display: none !important;
}

/* Ensure mutual exclusivity: when tree container is visible, preview must be hidden */
.tree-media-stage:has(.tree-container:not(.is-hidden)) .tree-preview-image-container {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

/* Ensure when preview is visible, tree container is hidden */
.tree-media-stage:has(.tree-preview-image-container:not(.is-hidden)) .tree-container {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.tree-preview-image {
    width: min(320px, 80vw);
    height: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    position: relative;
    z-index: 1;
    margin: 0 auto;
    transition: 
        transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        filter 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    filter: 
        drop-shadow(0 0 20px rgba(74, 144, 226, 0.3))
        drop-shadow(0 0 40px rgba(107, 182, 255, 0.2));
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Hover effects: bigger, tilted, corner lighting */
.tree-preview-image-container:hover .tree-preview-image {
    transform: translateZ(0) scale(1.08) rotate(-3deg) perspective(1000px) rotateY(-2deg);
    filter: 
        drop-shadow(0 0 30px rgba(74, 144, 226, 0.5))
        drop-shadow(0 0 60px rgba(107, 182, 255, 0.3))
        /* Corner lighting effects following image shape - optimized */
        drop-shadow(-15px -15px 35px rgba(107, 182, 255, 0.5))
        drop-shadow(15px -15px 35px rgba(74, 144, 226, 0.5))
        drop-shadow(-15px 15px 35px rgba(74, 144, 226, 0.4))
        drop-shadow(15px 15px 35px rgba(107, 182, 255, 0.4));
    transition: 
        transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        filter 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.tree-preview-image-container:active .tree-preview-image {
    transform: translateZ(0) scale(1.05) rotate(-2deg) perspective(1000px) rotateY(-1deg);
    transition-duration: 0.2s;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.tree-preview-overlay {
    display: none;
}

@media (max-width: 768px) {
    .tree-preview-image-container {
        padding: 1.5rem;
    }
    
    .tree-preview-image {
        width: min(280px, 75vw);
    }
    
    .tree-preview-image-container:hover .tree-preview-image {
        transform: scale(1.05) rotate(-2deg);
    }
}

.tree-video-container {
    position: relative;
    width: min(420px, 100%);
    aspect-ratio: 16 / 9;
    border-radius: 22px;
    overflow: hidden;
    perspective: 1600px;
    transform-style: preserve-3d;
    background:
        radial-gradient(circle at 50% 35%, rgba(20, 18, 40, 0.92), rgba(8, 6, 20, 0.9)),
        linear-gradient(135deg, rgba(99, 93, 173, 0.45), rgba(45, 41, 88, 0.6));
    background-image: var(--video-thumb), 
        radial-gradient(circle at 50% 35%, rgba(20, 18, 40, 0.92), rgba(8, 6, 20, 0.9)),
        linear-gradient(135deg, rgba(99, 93, 173, 0.45), rgba(45, 41, 88, 0.6));
    background-size: cover, 100% 100%, 100% 100%;
    background-position: center, center, center;
    background-repeat: no-repeat;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.55),
        0 0 40px rgba(74, 144, 226, 0.35);
    opacity: 1;
    transition: opacity 0.6s ease;
    z-index: 2;
}

.tree-video-container.is-hidden {
    opacity: 0;
    pointer-events: none;
    display: none;
}

.tree-video-container.is-visible {
    opacity: 1;
    display: block;
}

.tree-video-container.is-gone {
    display: none !important;
}

.tree-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(14px) saturate(0.85) brightness(0.9) contrast(0.95);
    background: transparent;
    transform:
        translateZ(-220px)
        translateY(6px)
        scale(0.88)
        rotateX(12deg)
        rotateY(-8deg);
    opacity: 0.15;
    transition:
        transform 1.25s cubic-bezier(0.16, 1, 0.3, 1),
        filter 1s ease,
        opacity 0.9s ease,
        box-shadow 1s ease;
    box-shadow:
        0 18px 60px rgba(0, 0, 0, 0.45),
        0 0 32px rgba(74, 144, 226, 0.2);
}

.tree-video.ready {
    filter: saturate(1.08) contrast(1.08);
}

.tree-video.depth-on {
    transform:
        translateZ(0)
        translateY(0)
        scale(1)
        rotateX(0deg)
        rotateY(0deg);
    filter: saturate(1.12) contrast(1.08) brightness(1.02);
    opacity: 1;
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.35),
        0 0 38px rgba(74, 144, 226, 0.25);
}

.tree-video-container.is-playing {
    background-image: none;
}

.tree-video-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.12), transparent 45%),
        radial-gradient(circle at 70% 65%, rgba(74, 144, 226, 0.18), transparent 50%),
        linear-gradient(120deg, rgba(255, 255, 255, 0.08), rgba(74, 144, 226, 0.12));
    mix-blend-mode: screen;
    pointer-events: none;
    opacity: 0.7;
    animation: videoGlow 6s ease-in-out infinite;
}

@keyframes videoGlow {
    0%, 100% { opacity: 0.65; filter: blur(0px); }
    50%      { opacity: 0.9; filter: blur(1px); }
}

.tree-video-play {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: 1px solid rgba(232, 221, 255, 0.35);
    background: rgba(10, 9, 26, 0.75);
    color: #F0F7FF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 0 12px rgba(74, 144, 226, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
    opacity: 0;
    pointer-events: none;
    z-index: 3;
}

.tree-video-play.visible {
    opacity: 1;
    pointer-events: auto;
}

.tree-video-play:hover {
    transform: scale(1.05);
    box-shadow: 0 0 16px rgba(255, 215, 128, 0.45);
}

.tree-video-skip {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(232, 221, 255, 0.35);
    background: rgba(10, 9, 26, 0.85);
    color: #F0F7FF;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 0 12px rgba(74, 144, 226, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease, background 0.25s ease;
    opacity: 0;
    pointer-events: none;
    z-index: 3;
    cursor: pointer;
}

.tree-video-skip.visible {
    opacity: 1;
    pointer-events: auto;
}

.tree-video-skip:hover {
    transform: scale(1.05);
    background: rgba(10, 9, 26, 0.95);
    box-shadow: 0 0 18px rgba(255, 215, 128, 0.45);
}

.tree-video-skip i {
    font-size: 0.875rem;
}

.tree-video-skip .skip-text {
    font-family: inherit;
    letter-spacing: 0.02em;
}

@media (max-width: 768px) {
    .tree-video-skip {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        gap: 0.375rem;
    }
    
    .tree-video-skip i {
        font-size: 0.75rem;
    }
}

.tree-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-md);
    position: relative;
    transition: opacity 0.6s ease;
}

.tree-container.is-hidden {
    opacity: 0;
    pointer-events: none;
    height: 0;
    margin: 0;
    padding: 0;
    display: none !important;
}

.tree-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: 
        repeating-conic-gradient(
            from 0deg at 50% 50%,
            rgba(107, 182, 255, 0.25) 0deg 8deg,
            transparent 8deg 16deg,
            rgba(74, 144, 226, 0.2) 16deg 24deg,
            transparent 24deg 32deg
        ),
        radial-gradient(
            circle at 50% 50%,
            rgba(107, 182, 255, 0.15) 0%,
            rgba(74, 144, 226, 0.1) 30%,
            transparent 70%
        );
    z-index: -1;
    opacity: 0.8;
    animation: rayRotate 12s linear infinite;
    pointer-events: none;
    filter: blur(1px);
    mask: radial-gradient(
        circle at 50% 50%,
        transparent 35%,
        rgba(0, 0, 0, 0.8) 40%,
        rgba(0, 0, 0, 0.9) 50%,
        rgba(0, 0, 0, 0.7) 60%,
        transparent 75%
    );
    -webkit-mask: radial-gradient(
        circle at 50% 50%,
        transparent 35%,
        rgba(0, 0, 0, 0.8) 40%,
        rgba(0, 0, 0, 0.9) 50%,
        rgba(0, 0, 0, 0.7) 60%,
        transparent 75%
    );
}

@keyframes rayRotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translate(-50%, -50%) rotate(180deg) scale(1.05);
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg) scale(1);
        opacity: 0.7;
    }
}

.tree-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 280px;
    min-width: 280px;
    min-height: 280px;
    background:
        radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.85) 0%, rgba(8, 8, 16, 0.7) 45%, rgba(5, 5, 12, 0.5) 65%, transparent 85%),
        repeating-conic-gradient(
            from 0deg at 50% 50%,
            rgba(107, 182, 255, 0.08) 0deg 15deg,
            transparent 15deg 30deg
        );
    clip-path: polygon(
        50% 0%, 61% 5%, 71% 15%, 79% 25%, 85% 35%,
        95% 50%, 85% 65%, 79% 75%, 71% 85%, 61% 95%,
        50% 100%, 39% 95%, 29% 85%, 21% 75%, 15% 65%,
        5% 50%, 15% 35%, 21% 25%, 29% 15%, 39% 5%
    );
    z-index: 1;
    pointer-events: none;
    animation: hexagonPulse 4s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(107, 182, 255, 0.2));
}

@keyframes hexagonPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.02) rotate(2deg);
        opacity: 0.95;
    }
}

.tree-image {
    max-width: 300px;
    width: 100%;
    height: auto;
    position: relative;
    z-index: 2;
    /* Enhanced blending with backlight - same as about page coffee mug */
    filter:
        drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6))
        drop-shadow(0 0 32px rgba(107, 182, 255, 0.25))
        drop-shadow(0 0 48px rgba(74, 144, 226, 0.15));
    transition: transform var(--transition-normal),
                filter var(--transition-normal);
    cursor: pointer;
    animation: treeFloat 6s ease-in-out infinite;
    object-fit: contain;
}

@keyframes treeFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

.tree-image:hover {
    transform: translateY(-15px) rotate(-2deg) scale(1.1);
    filter:
        drop-shadow(0 24px 48px rgba(0, 0, 0, 0.7))
        drop-shadow(0 0 40px rgba(107, 182, 255, 0.35))
        drop-shadow(0 0 60px rgba(74, 144, 226, 0.25));
}

@media (max-width: 768px) {
    .intro-tree {
        width: min(58vmin, 280px);
    }
    
    .intro-backlight {
        width: min(78vmin, 420px);
        height: min(78vmin, 420px);
    }
    
    .tree-video-container {
        width: 100%;
        border-radius: 16px;
    }

    .landing-title {
        font-size: clamp(2.4rem, 6.8vw, 3.1rem);
        margin-bottom: 0.08rem;
    }

    .landing-subtitle {
        font-size: clamp(1.15rem, 4vw, 1.35rem);
        gap: 0.12rem;
        letter-spacing: 0.06em;
    }

    .tree-section {
        margin: var(--spacing-md) 0 var(--spacing-lg);
        padding-top: var(--spacing-sm);
        gap: var(--spacing-sm);
    }
}

/* ============================================
   QUOTE SECTION
   ============================================ */

.quote-section {
    margin: var(--spacing-xl) 0;
    padding: var(--spacing-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

.landing-quote {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.3rem, 2.2vw, 1.7rem);
    font-style: italic;
    color: var(--landing-text-primary);
    margin: 0;
    line-height: 1.7;
    letter-spacing: 0.01em;
    position: relative;
}

.quote-card {
    position: relative;
    max-width: 720px;
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: 16px;
    background: radial-gradient(circle at 20% 20%, rgba(74, 144, 226,0.09), transparent 55%),
                radial-gradient(circle at 80% 40%, rgba(255,255,255,0.06), transparent 60%),
                rgba(10, 10, 25, 0.55);
    box-shadow:
        0 18px 48px rgba(5, 5, 15, 0.45),
        inset 0 0 30px rgba(74, 144, 226, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.quote-mark {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: rgba(74, 144, 226, 0.85);
    text-shadow: 0 0 18px rgba(74, 144, 226, 0.35);
    line-height: 1;
}

.quote-mark.closing {
    align-self: flex-end;
    transform: translateY(6px);
}

.quote-typed {
    display: inline-block;
    min-height: 1.2em;
    position: relative;
    padding-right: 0.4ch;
}

.quote-typed::after {
    content: '';
    position: absolute;
    right: 0.05ch;
    top: 0;
    width: 0.18em;
    height: 1.05em;
    background: var(--landing-text-primary);
    opacity: 0;
}

.quote-typed.typing::after {
    animation: quoteCaret 0.9s steps(2) infinite;
    opacity: 1;
}

@keyframes quoteCaret {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* ============================================
   YUNOBOT CTA
   ============================================ */

.yunobot-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: var(--spacing-lg) 0 var(--spacing-xl);
}

.yunobot-card {
    position: relative;
    padding: var(--spacing-md);
    border-radius: 18px;
    background: radial-gradient(circle at 50% 30%, rgba(120, 109, 208, 0.18), rgba(18, 16, 32, 0.8));
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.4),
        0 0 28px rgba(74, 144, 226, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    min-width: min(320px, 90vw);
}

.yunobot-orb {
    position: absolute;
    top: 12px;
    left: 50%;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff 0%, #5B8FD8 50%, rgba(91, 143, 216, 0) 70%);
    transform: translateX(-50%);
    box-shadow:
        0 0 18px rgba(91, 143, 216, 0.45),
        0 0 32px rgba(93, 220, 255, 0.35);
    animation: yunobotPulse 2.8s ease-in-out infinite;
    overflow: visible;
}

.yunobot-orb::before,
.yunobot-orb::after {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 2px solid rgba(91, 143, 216, 0.28);
    filter: blur(1px);
    animation: yunobotRing 2.8s ease-in-out infinite;
}

.yunobot-orb::after {
    inset: -20px;
    border-color: rgba(93, 220, 255, 0.24);
    animation-delay: 0.5s;
}

@keyframes yunobotPulse {
    0%   { transform: translateX(-50%) scale(0.94); opacity: 0.85; }
    50%  { transform: translateX(-50%) scale(1.08); opacity: 1; }
    100% { transform: translateX(-50%) scale(0.94); opacity: 0.85; }
}

@keyframes yunobotRing {
    0%   { transform: scale(0.85); opacity: 0.7; }
    60%  { transform: scale(1.2); opacity: 0.0; }
    100% { transform: scale(1.25); opacity: 0.0; }
}

.yunobot-text {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    color: var(--landing-text-primary);
    margin: 0;
    padding-top: 18px;
    letter-spacing: 0.01em;
}

.yunobot-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 1.8rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #5B8FD8 0%, #5ddcff 50%, #5B8FD8 100%);
    color: #0b0b16;
    font-family: var(--font-space);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-decoration: none;
    box-shadow:
        0 18px 42px rgba(74, 144, 226, 0.35),
        0 0 18px rgba(93, 220, 255, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: translateZ(0);
    transition:
        transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.35s ease,
        filter 0.35s ease;
    overflow: hidden;
    perspective: 1200px;
    margin-top: var(--spacing-xs);
}

.yunobot-button .yunobot-label {
    position: relative;
    z-index: 2;
}

.yunobot-button .yunobot-glow {
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 45%),
                radial-gradient(circle at 70% 70%, rgba(93, 220, 255, 0.4), rgba(93, 220, 255, 0) 50%);
    filter: blur(18px);
    opacity: 0.65;
    z-index: 1;
    transform: translateZ(-20px);
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.yunobot-button:hover {
    transform: translateY(-3px) scale(1.02) rotateX(5deg);
    box-shadow:
        0 22px 48px rgba(74, 144, 226, 0.45),
        0 0 22px rgba(93, 220, 255, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    filter: saturate(1.05);
}

.yunobot-button:hover .yunobot-glow {
    opacity: 0.85;
}

.yunobot-button:active {
    transform: translateY(0px) scale(0.99) rotateX(0deg);
    box-shadow:
        0 12px 28px rgba(74, 144, 226, 0.35),
        0 0 16px rgba(93, 220, 255, 0.35);
}

@media (max-width: 768px) {
    .yunobot-card {
        padding: var(--spacing-md);
        min-width: 100%;
        gap: var(--spacing-xs);
    }
    
    .yunobot-button {
        width: 100%;
        font-size: 0.95rem;
        padding: 0.85rem 1.4rem;
    }

    .yunobot-text {
        font-size: clamp(1.25rem, 5vw, 1.55rem);
        padding-top: 10px;
    }

    .yunobot-orb {
        top: 8px;
        width: 38px;
        height: 38px;
    }
}

/* ============================================
   UNIQUE LANDING FOOTER
   ============================================ */

.landing-footer {
    position: relative;
    z-index: var(--z-header);
    padding: var(--spacing-md);
    background: rgba(15, 15, 35, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--landing-border);
    margin-top: var(--spacing-xl);
}

.footer-text {
    color: var(--landing-text-secondary);
    font-size: 0.9rem;
    margin: 0;
    font-family: var(--font-primary);
}

.footer-year {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    padding: 0 4px;
    border-radius: 4px;
    transition: color var(--transition-normal), text-shadow var(--transition-normal);
}

.footer-year:focus {
    outline: 1px dashed var(--landing-accent);
    outline-offset: 2px;
}

.footer-year:hover {
    color: var(--landing-accent-light);
    text-shadow: 0 0 8px rgba(74, 144, 226, 0.4);
}

/* Easter egg modal */
.easter-egg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.easter-egg-modal {
    background: rgba(15, 15, 35, 0.9);
    border: 1px solid var(--landing-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 30px rgba(74, 144, 226, 0.25);
    border-radius: 12px;
    padding: 1.2rem 1.4rem;
    max-width: 360px;
    width: 100%;
    color: var(--landing-text-primary);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.easter-egg-modal h4 {
    margin: 0 0 0.6rem 0;
    font-size: 1.1rem;
    color: var(--landing-accent-light);
}

.easter-egg-modal p {
    margin: 0 0 0.9rem 0;
    color: var(--landing-text-secondary);
    font-size: 0.95rem;
}

.easter-egg-input {
    width: 100%;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    border: 1px solid var(--landing-border);
    background: rgba(10, 10, 25, 0.65);
    color: var(--landing-text-primary);
    margin-bottom: 0.75rem;
}

.easter-egg-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.easter-egg-btn {
    border: 1px solid var(--landing-border);
    background: rgba(20, 20, 45, 0.8);
    color: var(--landing-text-primary);
    padding: 0.45rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.easter-egg-btn:hover {
    border-color: var(--landing-accent);
    box-shadow: 0 0 12px rgba(74, 144, 226, 0.35);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Large Desktop */
@media (min-width: 1200px) {
    .landing-brand {
        font-size: clamp(2rem, 2.5vw, 2.5rem);
    }

    .brand-text {
        font-size: clamp(1.5rem, 2.2vw, 2.2rem);
        padding: 0.15rem 0.85rem;
        max-width: none;
    }

    .landing-brand mjx-container,
    .brand-text mjx-container {
        font-size: 1.25em !important;
        line-height: 1.3 !important;
    }
}

/* Tablet */
@media (max-width: 992px) {
    .landing-title {
        font-size: 2.5rem;
    }
    
    .profile-card {
        width: 240px;
        height: 240px;
    }
    
    .tree-image {
        max-width: 250px;
    }
    
    .landing-quote {
        font-size: 1.25rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .landing-header {
        padding: var(--spacing-sm) var(--spacing-sm);
        padding-bottom: var(--spacing-md);
        min-height: 75px;
        margin-bottom: var(--spacing-sm);
    }
    
    .landing-navbar {
        padding: var(--spacing-xs) var(--spacing-sm);
    }
    
    .landing-brand {
        font-size: clamp(1.75rem, 4vw, 2rem);
    }
    
    .landing-main {
        padding: var(--spacing-lg) var(--spacing-sm);
        min-height: calc(100vh - 150px);
    }
    
    .profile-card {
        width: 200px;
        height: 200px;
    }
    
    .landing-title {
        font-size: 2rem;
    }
    
    .landing-subtitle {
        font-size: 1rem;
    }
    
    .tree-image {
        max-width: 200px;
    }
    
    .quote-section {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .landing-quote {
        font-size: 1.1rem;
        padding-left: var(--spacing-sm);
    }
    
    .landing-quote::before {
        font-size: 3rem;
        left: -5px;
        top: -15px;
    }
    
    .landing-footer {
        padding: var(--spacing-sm);
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .profile-card {
        width: 180px;
        height: 180px;
    }
    
    .landing-title {
        font-size: 1.75rem;
    }
    
    .tree-image {
        max-width: 150px;
    }
    
    .landing-quote {
        font-size: 1rem;
    }
}

/* ============================================
   ACCESSIBILITY & PERFORMANCE
   ============================================ */

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .landing-header,
    .landing-footer {
        border-width: 2px;
    }
    
    .profile-card {
        border-width: 2px;
    }
    
    .landing-quote {
        border-left-width: 4px;
    }
}

/* Print Styles */
@media print {
    #threejs-background,
    .header-image-container {
        display: none;
    }
    
    .landing-page {
        background: white;
        color: black;
    }
}

/* ============================================
   LOADING STATES & LAZY LOADING
   ============================================ */

img[loading="lazy"] {
    opacity: 0;
    transition: opacity var(--transition-normal);
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Placeholder for lazy-loaded images */
img[loading="lazy"]:not(.loaded) {
    background: linear-gradient(90deg, 
        var(--landing-bg-medium) 0%, 
        var(--landing-bg-light) 50%, 
        var(--landing-bg-medium) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

