/* Base styles & custom utilities */
:root {
    --color-teal-50: #f0fdfa;
    --color-teal-100: #ccfbf1;
    --color-teal-400: #2dd4bf;
    --color-teal-600: #0d9488;
    --color-teal-700: #0f766e;
    --color-slate-50: #f8fafc;
    --color-slate-100: #f1f5f9;
    --color-slate-200: #e2e8f0;
    --color-slate-400: #94a3b8;
    --color-slate-500: #64748b;
    --color-slate-600: #475569;
    --color-slate-700: #334155;
    --color-slate-800: #1e293b;
    --color-slate-900: #0f172a;
}

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

body {
    overflow-x: hidden;
}

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Selection color */
::selection {
    background-color: rgba(13, 148, 136, 0.2);
    color: inherit;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--color-slate-300, #cbd5e1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-teal-400, #2dd4bf);
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation-name: fadeIn;
    animation-duration: 0.8s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    animation-fill-mode: both;
}

/* Reveal on scroll */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Navbar transition */
.nav-text, .nav-subtext {
    transition: color 0.3s ease;
}

/* Mobile menu link hover */
.mobile-link {
    transition: opacity 0.3s ease;
}

.mobile-link:hover {
    opacity: 0.7;
}

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

/* Button ripple effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Image lazy load fallback */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease;
}
img[loading="lazy"].loaded {
    opacity: 1;
}

/* Print styles */
@media print {
    nav, #contact, .reveal-on-scroll {
        display: none;
    }
    body {
        color: #000;
        background: #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-on-scroll {
        opacity: 1;
        transform: none;
    }
}

/* Tablet and up adjustments */
@media (min-width: 768px) {
    .reveal-on-scroll {
        transition-delay: 0.1s;
    }
}

/* Large screens */
@media (min-width: 1024px) {
    .reveal-on-scroll {
        transition-delay: 0.15s;
    }
}
