/* Thorington Trace — Custom Styles */

/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: rgba(110, 231, 183, 0.3);
    color: #f0f4f8;
}

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

::-webkit-scrollbar-track {
    background: #0a1420;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #2e5278;
}

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

.animate-fade-in-up {
    animation-name: fadeInUp;
    animation-duration: 0.8s;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    animation-fill-mode: both;
}

/* Scroll Reveal (progressive enhancement — content visible without JS) */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(40px);
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
    }
    
    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: none;
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(10, 20, 32, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(110, 231, 183, 0.1);
}

/* Mobile menu open state */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Hamburger animation */
.menu-btn-active #bar1 {
    transform: translateY(6px) rotate(45deg);
}

.menu-btn-active #bar2 {
    opacity: 0;
}

.menu-btn-active #bar3 {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.5rem;
}

/* Form focus styles */
input:focus,
textarea:focus {
    outline: none;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Link underline animation */
a:not([class]) {
    position: relative;
    text-decoration: none;
}

a:not([class])::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: currentColor;
    transition: width 0.3s ease;
}

a:not([class]):hover::after {
    width: 100%;
}

/* Print styles */
@media print {
    header, footer, .reveal-up, .reveal-left, .reveal-right {
        opacity: 1 !important;
        transform: none !important;
    }
}
