/* ============================================
   Dutch Flat Serenity Central — Custom Styles
   ============================================ */

/* Base Reset & Smooth Scrolling */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background: rgba(13, 148, 136, 0.4);
    color: #f0fdfa;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

#navbar.scrolled {
    background: rgba(8, 14, 26, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(13, 148, 136, 0.15);
}

/* ============================================
   Hero Animations
   ============================================ */
.hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards 0.3s;
}

.hero-title {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards 0.5s;
}

.hero-body {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards 0.7s;
}

.hero-cta {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.8s ease forwards 0.9s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.mobile-link {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Hamburger Animation */
#menu-toggle.active .menu-line:nth-child(1) {
    top: 11px;
    transform: rotate(45deg);
}

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

#menu-toggle.active .menu-line:nth-child(3) {
    top: 11px;
    width: 6px;
    left: calc(50% + 3px);
    transform: rotate(-45deg);
}

/* ============================================
   Reveal Animations (Scroll)
   ============================================ */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-up {
    transform: translateY(40px);
}

.reveal-left {
    transform: translateX(-40px);
}

.reveal-right {
    transform: translateX(40px);
}

.revealed {
    opacity: 1;
    transform: translate(0, 0);
}

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

textarea {
    field-sizing: content;
}

/* ============================================
   Image Hover Enhancements
   ============================================ */
img {
    display: block;
    max-width: 100%;
}

/* ============================================
   Focus Visible for Accessibility
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #5eead4;
    outline-offset: 2px;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 767px) {
    .hero-title {
        font-size: 2.75rem;
    }
    
    #about .relative > div:first-child {
        margin-top: 0;
    }
    
    .floating-accent {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-title {
        font-size: 4.5rem;
    }
}

/* ============================================
   Subtle Grain Texture Overlay
   ============================================ */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ============================================
   Smooth Scroll Offset for Fixed Nav
   ============================================ */
section[id] {
    scroll-margin-top: 80px;
}
