/* =========================================
   1. CORE TOKENS & RESET (Dark Premium)
   ========================================= */
:root {
    --bg-body: #111111;
    --text-main: #F5F5F5;
    --border-light: #2A2A2A;
    --brand-gold: #C89B6D;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
}

/* =========================================
   2. ADVANCED MOTION SYSTEM
   ========================================= */

@keyframes animationIn {
    0% { opacity: 0; transform: translateY(20px); filter: blur(10px); }
    100% { opacity: 1; transform: translateY(0); filter: blur(0px); }
}

.animate-on-scroll { opacity: 0; animation-fill-mode: forwards; }
.animate-on-scroll.active { animation: animationIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

.delay-100 { animation-delay: 0.1s; transition-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; transition-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; transition-delay: 0.3s; }
.delay-500 { animation-delay: 0.5s; transition-delay: 0.5s; }

/* Text Reveal */
.text-reveal-wrapper {
    overflow: hidden;
    display: inline-flex;
    vertical-align: bottom;
}

.text-reveal-content {
    transform: translateY(110%);
    opacity: 0;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.2s ease;
    display: block;
}

.reveal-active .text-reveal-content {
    transform: translateY(0);
    opacity: 1;
}

/* Float & Spin */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-float { animation: float 6s ease-in-out infinite; }

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin-slow { animation: spin 4s linear infinite; }

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

.animate-marquee { animation: marquee 40s linear infinite; }

/* =========================================
   3. SPECIAL EFFECTS & COMPONENTS
   ========================================= */

/* Transparent/Outline Text Gold */
.text-stroke-gold {
    color: transparent;
    -webkit-text-stroke: 1px rgba(200, 155, 109, 0.4);
    transition: all 0.5s ease;
}

.group:hover .text-stroke-gold,
.text-stroke-gold:hover {
    color: transparent;
    -webkit-text-stroke: 1px rgba(200, 155, 109, 1);
    text-shadow: 0 0 20px rgba(200, 155, 109, 0.2);
}

/* Flashlight/Glow Cards */
.flashlight-card {
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s;
}

.flashlight-card:hover {
    border-color: rgba(200, 155, 109, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(200, 155, 109, 0.1);
}

.flashlight-card::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(200, 155, 109, 0.1) 0%, transparent 60%);
    top: var(--mouse-y, -250px);
    left: var(--mouse-x, -250px);
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 2;
}

.flashlight-card:hover::after {
    opacity: 1;
}

/* Beam Button */
.beam-btn {
    position: relative;
    overflow: hidden;
    border-radius: 2px;
    padding: 1px;
    background: rgba(200, 155, 109, 0.2);
    cursor: pointer;
    display: inline-flex;
}

.beam-btn-content {
    padding: 12px 32px;
    border-radius: 2px;
    position: relative;
    z-index: 2;
    transition: background 0.3s;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.beam-spinner {
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent 0 340deg, #C89B6D 360deg);
    animation: spin 3s linear infinite;
}

/* Grid Background */
.bg-grid {
    background-size: 40px 40px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #111111; }
::-webkit-scrollbar-thumb { background: #2A2A2A; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #C89B6D; }

/* =========================================
   4. PORTFOLIO MOSAIC (Center Reveal)
   ========================================= */

.mosaic-card {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: #111;
    cursor: crosshair;
    min-height: 400px;
    transform: perspective(1000px) translateZ(0);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.6s;
    z-index: 1;
}

.mosaic-card:hover {
    transform: perspective(1000px) translateY(-5px) scale(1.15);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 1), 0 0 30px rgba(200, 155, 109, 0.2);
    border-color: rgba(200, 155, 109, 0.5);
    z-index: 50;
}

.mosaic-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.mosaic-card:hover .mosaic-image {
    transform: scale(1.05);
}

.mosaic-overlay {
    position: absolute;
    inset: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    background: rgba(17, 17, 17, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(200, 155, 109, 0.2);
    border-radius: 2px;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mosaic-card:hover .mosaic-overlay {
    opacity: 1;
    transform: scale(1);
}

.mosaic-title {
    transform: translateY(15px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
}

.mosaic-desc {
    transform: translateY(15px);
    opacity: 0;
    transition: opacity 0.4s ease 0.15s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

.mosaic-card:hover .mosaic-title {
    transform: translateY(0);
}

.mosaic-card:hover .mosaic-desc {
    opacity: 1;
    transform: translateY(0);
}

.mosaic-card.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
}

.mosaic-card.animate-on-scroll.active {
    animation: mosaicIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes mosaicIn {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}
