/* Custom Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;400;700&family=Space+Grotesk:wght@300;500;700&display=swap');

:root {
    --bg-color: #050505;
    --text-color: #f5f5f5;
    --accent-color: #333;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

h1,
h2,
h3,
.display-font {
    font-family: 'Space Grotesk', sans-serif;
}

/* Custom Selection Color */
::selection {
    background: #ffffff;
    color: #000000;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Utilities */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.hover-underline-animation::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: #fff;
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.hover-underline-animation:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.gallery-item--hidden {
    display: none;
}

/* 3D Container */
#canvas-container {
    width: 100%;
    height: 500px;
    position: relative;
    cursor: grab;
    overflow: hidden;
    border: 1px solid #222;
}

#canvas-container:active {
    cursor: grabbing;
}

/* Glitch effect for the name */
.glitch-wrapper {
    position: relative;
}

/* Glassmorphism container + app logo row */
.glass-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0;
    padding: 24px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.app-logo-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.app-logo {
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 88px;
    display: grid;
    place-items: center;
    border-radius: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.28);
    cursor: pointer;
    user-select: none;
    transition: transform 220ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease, border-radius 220ms ease;
}

.app-logo img {
    width: 68%;
    height: 68%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.45));
    transition: transform 220ms ease;
}

.app-logo:hover {
    transform: translateY(-3px) scale(1.07);
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35), 0 0 24px rgba(255, 255, 255, 0.08);
}

.app-logo:hover img {
    transform: scale(1.08);
}

.app-logo:active {
    transform: translateY(-1px) scale(1.13);
    border-color: rgba(255, 255, 255, 0.58);
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 34px rgba(255, 255, 255, 0.16);
}

.app-logo:active img {
    transform: scale(1.14);
}

@media (min-width: 768px) {
    .glass-card {
        padding: 28px;
    }

    .app-logo-row {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 16px;
    }

    .app-logo {
        min-height: 104px;
    }
}

/* Glass Buttons & Toggles */
.glass-btn {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: inherit;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.glass-btn:active {
    transform: scale(0.95);
}

/* Light Theme Overrides */
body.light-theme {
    background-color: #f5f5f5 !important;
    color: #111 !important;
}

body.light-theme .text-white { color: #111 !important; }
body.light-theme .bg-black { background-color: #fff !important; }
body.light-theme .bg-\[\#0a0a0a\] { background-color: #eee !important; }
body.light-theme .border-white\/10 { border-color: rgba(0,0,0,0.1) !important; }
body.light-theme .border-white\/20 { border-color: rgba(0,0,0,0.2) !important; }
body.light-theme .border-white\/30 { border-color: rgba(0,0,0,0.3) !important; }
body.light-theme .border-white\/40 { border-color: rgba(0,0,0,0.4) !important; }
body.light-theme .text-gray-300 { color: #444 !important; }
body.light-theme .text-gray-400 { color: #666 !important; }
body.light-theme .text-gray-500 { color: #888 !important; }
body.light-theme .hover\:border-white:hover { border-color: #111 !important; }
body.light-theme .hover\:text-gray-400:hover { color: #333 !important; }
body.light-theme .bg-gray-900 { background-color: #ddd !important; }
body.light-theme .drawer-bg { background-color: rgba(255,255,255,0.7) !important; }
body.light-theme .glass-card {
    background: rgba(255, 255, 255, 1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
body.light-theme .app-logo {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0,0,0,0.1);
    box-shadow: none;
}
body.light-theme .app-logo:hover {
    background: rgba(0, 0, 0, 0.08);
    box-shadow: none;
}
body.light-theme .app-logo:active {
    background: rgba(0, 0, 0, 0.12);
    box-shadow: none;
}
body.light-theme .app-logo img {
    filter: none;
}
body.light-theme .glass-btn {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
body.light-theme .glass-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    box-shadow: none;
}
body.light-theme #topo-bg { filter: invert(1); }

/* Animated Hero Grid */
@keyframes gridMoveDown {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 0 50px;
    }
}

.animated-grid {
    animation: gridMoveDown 3s linear infinite;
}
