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

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

body {
    background-color: #1a0a10;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a0a10;
}
::-webkit-scrollbar-thumb {
    background: #781f37;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8c1735;
}

/* Selection color */
::selection {
    background: #d43758;
    color: #FDF8F5;
}

/* Geometric pattern overlay for sections */
section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(120, 31, 55, 0.15) 1px, transparent 0);
    background-size: 40px 40px;
    pointer-events: none;
    opacity: 0.5;
}

section > *:not(.absolute) {
    position: relative;
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(26, 10, 16, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(120, 31, 55, 0.3);
}

/* Mobile menu animations */
#mobile-menu.open {
    max-height: 400px;
}

#menu-btn[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menu-btn[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-btn[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 5rem;
}

/* Mobile link transition */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Card hover glow effect */
.group:hover .bg-blush-500,
.group:hover .bg-burgundy-500,
.group:hover .bg-blush-400,
.group:hover .bg-burgundy-400 {
    box-shadow: 0 0 30px rgba(212, 55, 88, 0.4);
}

/* Subtle float animation for decorative elements */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

@keyframes float-reverse {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(10px) rotate(-2deg); }
}

/* Scroll reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #F4CBB3;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}

/* Ensure text contrast on all backgrounds */
.text-burgundy-300 { color: #f294aa; }
.text-burgundy-400 { color: #e8607f; }
.text-burgundy-500 { color: #d43758; }
.text-blush-300 { color: #EDAA82; }
.text-blush-400 { color: #E47F4C; }
.text-white { color: #ffffff; }
