/* ========================================
   Dr. Balagopal K. Keralavarma — Styles
   ======================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: #D4A017;
    color: #1e0b1c;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f9f0f7;
}
::-webkit-scrollbar-thumb {
    background: #a33d7e;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #832a61;
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(74, 25, 66, 0.08);
}

/* Nav links underline animation */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #D4A017;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu transitions */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu-link {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(74, 25, 66, 0.06);
}
.mobile-menu-link:last-child {
    border-bottom: none;
}

/* Reveal animations — progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Image loading placeholder */
img {
    background-color: #f3dfee;
}

/* Print styles */
@media print {
    #navbar, #mobile-menu, .reveal {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
    a {
        color: #000;
    }
}
