/* ==================== CSS Variables ==================== */
:root {
    /* Colors - Cyber Holographic Palette */
    --void-black: #0a0a0a;
    --void-dark: #1a1a1a;
    --void-gray: #2a2a2a;
    --void-accent: #00f5ff; /* Cyan électrique */
    --void-accent-secondary: #9d4edd; /* Violet */
    --void-light: #ffffff;
    --void-glow: rgba(0, 245, 255, 0.4);
    --void-glow-secondary: rgba(157, 78, 221, 0.4);

    /* Glassmorphism */
    --glass-bg: rgba(26, 26, 26, 0.7);
    --glass-border: rgba(0, 245, 255, 0.2);
    --glass-blur: 10px;

    /* Gradient Animation */
    --gradient-start: #00f5ff;
    --gradient-mid: #9d4edd;
    --gradient-end: #00f5ff;

    /* Typography */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-title: 'Playfair Display', serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Transitions */
    --transition-smooth: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.3s ease;
}

/* ==================== Reset & Base ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--void-black);
    color: var(--void-light);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: none; /* Hide default cursor for custom spotlight */
}

/* Custom cursor spotlight */
body::after {
    content: '';
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 245, 255, 0.15) 0%, rgba(157, 78, 221, 0.08) 40%, transparent 70%);
    pointer-events: none;
    z-index: 100;
    left: var(--cursor-x, 0);
    top: var(--cursor-y, 0);
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

body.cursor-active::after {
    opacity: 1;
}

/* Show normal cursor on interactive elements */
a, button, input, textarea {
    cursor: pointer !important;
}

/* Film grain overlay for cinematic effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    mix-blend-mode: overlay;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAB9JREFUeNpiYGBg+A/EDAyMDEgALsP4DAyMDCANAAEGAAaOAgHvgw4KAAAAAElFTkSuQmCC');
    animation: grainAnimation 8s steps(10) infinite;
}

@keyframes grainAnimation {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -5%); }
    20% { transform: translate(-10%, 5%); }
    30% { transform: translate(5%, -10%); }
    40% { transform: translate(-5%, 15%); }
    50% { transform: translate(-10%, 5%); }
    60% { transform: translate(15%, 0); }
    70% { transform: translate(0, 10%); }
    80% { transform: translate(-15%, 0); }
    90% { transform: translate(10%, 5%); }
}

/* ==================== Canvas Background ==================== */
#void-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ==================== Container ==================== */
.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

/* ==================== Section Numbers (Hidden) ==================== */
section {
    position: relative;
}

section::before,
section::after {
    display: none;
}

/* ==================== Hero Section ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    position: relative;
    padding-bottom: 15vh; /* Position in lower third */
}

.title {
    font-family: var(--font-title);
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-sm);
    opacity: 0; /* Hidden until JS animation triggers */
    text-shadow: 0 0 30px var(--void-glow);
    will-change: transform, opacity;
    transform: translateZ(0);
}

.title span {
    display: inline-block;
    opacity: 0;
}

.tagline {
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 300;
    letter-spacing: 0.1em;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-mid), var(--gradient-end));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0; /* Will be animated by JS when logo appears */
    will-change: transform, opacity, background-position;
    transform: translateZ(0) translateY(30px); /* Start position for animation */
}

/* ==================== Description Section ==================== */
.description {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl) var(--spacing-md);
}

.poetic-text {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    line-height: 1.8;
    text-align: center;
    max-width: 800px;
    opacity: 0;
    animation: fadeIn 1.5s ease forwards;
    animation-delay: 1.5s;
    color: rgba(255, 255, 255, 0.85);
}

.emphasis {
    color: var(--void-accent);
    font-style: italic;
    display: inline-block;
    margin-top: var(--spacing-md);
    font-weight: 400;
}

/* ==================== Contact Section ==================== */
.contact {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-lg);
    margin: var(--spacing-xl) auto;
    max-width: 600px;
    position: relative;

    /* Force remove glassmorphism */
    background: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.contact-intro {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-sm);
    opacity: 0.8;
}

.email-link {
    font-size: clamp(1.3rem, 3vw, 2rem);
    color: var(--void-accent);
    text-decoration: none;
    position: relative;
    transition: var(--transition-fast);
    padding: var(--spacing-sm);
    display: inline-block;
}

.email-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--void-accent);
    transition: width 0.4s ease;
}

.email-link:hover::after {
    width: 100%;
}

.email-link:hover {
    text-shadow: 0 0 20px var(--void-glow);
    transform: translateY(-2px);
}

.email-link:focus {
    outline: 2px solid var(--void-accent);
    outline-offset: 4px;
}

/* ==================== Footer ==================== */
footer {
    text-align: center;
    padding: var(--spacing-md);
    font-size: 0.9rem;
    opacity: 0.7;
    color: var(--void-light);
    position: relative;
}

/* ASCII Rabbit Easter Egg */
.ascii-rabbit {
    display: inline-block;
    margin-top: var(--spacing-sm);
    font-family: monospace;
    font-size: 0.7rem;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    /* Increase touch target for mobile */
    padding: var(--spacing-sm);
    margin: var(--spacing-sm);
    /* Make it more visible on mobile */
    -webkit-tap-highlight-color: rgba(0, 245, 255, 0.2);
    touch-action: manipulation;
}

.ascii-rabbit:hover {
    color: var(--void-accent);
    text-shadow: 0 0 10px var(--void-glow);
    transform: scale(1.1);
}

/* Active state for mobile touch */
.ascii-rabbit:active {
    color: var(--void-accent);
    text-shadow: 0 0 10px var(--void-glow);
    transform: scale(1.05);
}


/* ==================== Animations ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes letterReveal {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    /* Disable custom cursor on mobile (no mouse) */
    body {
        cursor: auto !important;
    }

    body::after {
        display: none !important;
    }

    /* Hide section numbers on mobile */
    section::before,
    section::after {
        display: none;
    }

    .container {
        padding: var(--spacing-sm);
    }

    .title {
        font-size: 3rem;
        letter-spacing: 0.03em;
    }

    .tagline {
        font-size: 1.2rem;
    }

    .poetic-text {
        font-size: 1.1rem;
        line-height: 1.7;
        padding: 0 var(--spacing-sm);
    }

    .email-link {
        font-size: 1.3rem;
    }

    #void-canvas {
        opacity: 0.7;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height for mobile */
        padding: var(--spacing-md) var(--spacing-sm);
        padding-bottom: 30vh; /* Position content in 3rd quarter */
        justify-content: flex-end; /* Align to bottom with padding */
    }

    .title {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .description {
        min-height: auto;
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    .contact {
        min-height: 30vh;
    }
}

/* Extra small screens (very small phones) */
@media (max-width: 380px) {
    .hero {
        padding-bottom: 28vh;
    }

    .title {
        font-size: 2rem;
    }

    .tagline {
        font-size: 0.9rem;
    }
}

/* Short screens in portrait mode */
@media (max-height: 700px) and (orientation: portrait) {
    .hero {
        min-height: 100vh;
        min-height: 100dvh;
        padding-bottom: 25vh;
        justify-content: flex-end;
    }

    .title {
        font-size: 2.2rem;
        margin-bottom: var(--spacing-xs);
    }

    .tagline {
        font-size: 1rem;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: var(--spacing-sm);
    }

    .title {
        font-size: 2rem;
    }
}

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

    #void-canvas {
        display: none;
    }

    /* Disable cursor spotlight animation on reduced motion */
    body {
        cursor: auto !important;
    }

    body::after {
        display: none !important;
    }

    /* Disable glassmorphism hover animation */
    .contact:hover {
        transform: none !important;
    }
}

/* ==================== Focus Visible ==================== */
:focus-visible {
    outline: 2px solid var(--void-accent);
    outline-offset: 4px;
}
