html {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: #f9fafb;
    color: #1f2937;
    transition: background-color 300ms, color 300ms;
}

body.dark {
    background-color: #111827;
    color: #e5e7eb;
}

/* Scroll-reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 700ms ease-out, transform 700ms ease-out;
}

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

/* Animated blob fallback for hero */
.blob-animation {
    position: absolute;
    width: 384px;
    height: 384px;
    background-color: #d8b4fe;
    border-radius: 9999px;
    opacity: 0.3;
    transform: translate(-50%, -50%);
    filter: blur(48px);
    animation: blob 7s infinite;
}

.blob-2 {
    animation-delay: 2s;
}

.blob-3 {
    animation-delay: 4s;
}

@keyframes blob {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Animated glow ring for profile photo */
.profile-glow {
    box-shadow: 0 0 0 4px theme('colors.blue.500' / 20%);
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0% {
        box-shadow: 0 0 0 4px theme('colors.blue.500' / 20%);
    }

    50% {
        box-shadow: 0 0 0 12px theme('colors.blue.500' / 5%), 0 0 0 6px theme('colors.blue.500' / 10%);
    }

    100% {
        box-shadow: 0 0 0 4px theme('colors.blue.500' / 20%);
    }
}

/* Custom focus state */
.focus-ring:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #3b82f6, 0 0 0 4px #fff;
}

.dark .focus-ring:focus {
    box-shadow: 0 0 0 2px #3b82f6, 0 0 0 4px #111827;
}

/* Reduced motion overrides */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

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

    .profile-glow,
    .blob-animation {
        animation: none;
    }
}

/* Width of the scrollbar */
::-webkit-scrollbar {
    width: 5px;
}

/* Track (background of scrollbar) */
::-webkit-scrollbar-track {
    background: #111827; 
    border-radius: 0px;
}

/* Scrollbar handle */
::-webkit-scrollbar-thumb {
    background: #2b5bfb; 
    border-radius: 0px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: #284ecd; 
}

/* Button animation helper used across pages */
.btn-animate {
    transition: transform 160ms cubic-bezier(.2,.8,.2,1), box-shadow 160ms;
}
.btn-animate:active {
    transform: scale(0.97);
}
.btn-click {
    transform: scale(0.96);
    transition: transform 150ms ease-in-out;
}

/* Ensure reveal animation is slightly smoother */
.reveal {
    transition: opacity .7s ease, transform .7s ease;
}