*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Thin decorative lines */
.thin-line {
    opacity: 0;
    animation: lineReveal 1s ease forwards;
}

.thin-line:nth-child(1) { animation-delay: 0.5s; }
.thin-line:nth-child(2) { animation-delay: 0.7s; }
.thin-line:nth-child(3) { animation-delay: 0.9s; }
.thin-line:nth-child(4) { animation-delay: 0.6s; }
.thin-line:nth-child(5) { animation-delay: 0.8s; }

@keyframes lineReveal {
    from { opacity: 0; transform: scaleX(0); }
    to { opacity: 1; transform: scaleX(1); }
}

/* Hero fade-in animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.8s ease forwards;
}

/* Scroll reveal */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal[data-revealed="false"] {
    opacity: 0;
    transform: translateY(30px);
}

/* Writing mode for scroll indicator */
.writing-mode-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* Mobile menu animations */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Menu lines animation */
#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 6px;
}

/* Select styling */
select option {
    background: #1C2025;
    color: #fff;
}

/* Date input styling */
input[type="date"] {
    color-scheme: dark;
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(18, 20, 23, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

/* Selection color */
::selection {
    background: rgba(255, 107, 74, 0.3);
    color: #fff;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Mobile menu link hover */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #FF6B4A;
    transition: width 0.3s ease;
}

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

/* Image lazy loading placeholder */
img {
    background: linear-gradient(135deg, #1C2025 0%, #2A2F35 100%);
}
