/* ============================================
   Koga Roy MD — Custom Styles
   ============================================ */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Base font smoothing */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(80, 33, 57, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #a35582, #f59e0b);
    border-radius: 1px;
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after {
    width: 60%;
    left: 20%;
}

/* ============================================
   Floating Cards Animation
   ============================================ */
.floating-card {
    animation: float 4s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -1.3s;
    animation-duration: 4.5s;
}

.floating-card:nth-child(3) {
    animation-delay: -2.6s;
    animation-duration: 3.8s;
}

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

/* ============================================
   Card Hover Effects
   ============================================ */
.card-hover {
    will-change: transform;
}

/* ============================================
   Reveal Animations (Progressive Enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal:nth-child(2) { transition-delay: 100ms; }
    .reveal:nth-child(3) { transition-delay: 200ms; }
    .reveal:nth-child(4) { transition-delay: 300ms; }
    .reveal:nth-child(5) { transition-delay: 400ms; }
    .reveal:nth-child(6) { transition-delay: 500ms; }
}

/* Ensure content is visible without JS */
.no-js .reveal,
.js:not(body) .reveal {
    opacity: 1;
    transform: none;
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-nav-link {
    display: block;
    transition: background-color 0.2s ease, padding-left 0.2s ease;
}

.mobile-nav-link:hover {
    padding-left: 12px;
}

/* ============================================
   Custom Selection Color
   ============================================ */
::selection {
    background-color: rgba(163, 85, 130, 0.2);
    color: #502139;
}

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

::-webkit-scrollbar-track {
    background: #faf5fb;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d9aecf, #c07da8);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #c07da8, #a35582);
}

/* ============================================
   Form Focus States
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ============================================
   Subtle gradient text utility
   ============================================ */
.gradient-text {
    background: linear-gradient(135deg, #a35582, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 640px) {
    .floating-card {
        display: none;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    nav, #contact, footer, .floating-card {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}
