/* ============================================
   ALEKS SHAMETI — PIANIST
   Brutalist / Editorial Design System
   ============================================ */

/* Selection */
::selection {
    background: #8B0000;
    color: #F5F0E8;
}

::-webkit-scrollbar {
    width: 3px;
}

::-webkit-scrollbar-track {
    background: #1A1A1A;
}

::-webkit-scrollbar-thumb {
    background: #8B0000;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Hide default cursor on desktop */
@media (min-width: 768px) {
    body {
        cursor: none !important;
    }
    a, button {
        cursor: none !important;
    }
}

@media (max-width: 767px) {
    #cursor, #cursor-dot {
        display: none !important;
    }
    body {
        cursor: auto;
    }
}

/* Noise texture overlay */
.noise-overlay {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slashGrow {
    from {
        height: 0;
        opacity: 0;
    }
    to {
        height: 60vh;
        opacity: 0.15;
    }
}

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

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

@keyframes keyPulse {
    0%, 100% { opacity: 0.03; }
    50% { opacity: 0.08; }
}

.key-anim {
    animation: keyPulse 3s ease-in-out infinite;
}

/* ============================================
   HOVER EFFECTS
   ============================================ */

.hover-link {
    position: relative;
    display: inline-block;
}

.hover-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #8B0000;
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ============================================
   SCROLL REVEAL
   ============================================ */

.scroll-reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   WRITING MODE
   ============================================ */

.writing-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* ============================================
   GLITCH ON HOVER — Hero name
   ============================================ */

.hero-name-container:hover h1 {
    animation: glitch 0.3s ease;
}

.hero-name-container h1 {
    transition: color 0.3s ease;
}

.hero-name-container:hover h1 {
    color: #8B0000;
    transition: color 0.1s ease;
}

.hero-name-container h1:hover {
    color: #F5F0E8;
}

/* ============================================
   RED SLASH — Parallax element
   ============================================ */

.red-slash {
    will-change: transform;
    pointer-events: none;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .hero-name-container h1 {
        font-size: 18vw;
    }
}

/* ============================================
   MAGNETIC BUTTON EFFECT
   ============================================ */

.magnetic {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================
   PAGE LOAD OVERLAY
   ============================================ */

.page-loader {
    position: fixed;
    inset: 0;
    background: #8B0000;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 1.2s cubic-bezier(0.76, 0, 0.24, 1);
}

.page-loader.loaded {
    transform: translateY(-100%);
}

.page-loader span {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    color: #F5F0E8;
    font-size: 2rem;
    letter-spacing: 0.2em;
    animation: fadeIn 0.5s ease forwards;
}

/* ============================================
   HORIZONTAL SCROLLING TEXT
   ============================================ */

.marquee-track {
    display: flex;
    animation: marquee 25s linear infinite;
    white-space: nowrap;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
