/* Custom styles for Pria's personal website */

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

/* Base transitions for theme switching */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Focus states for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* Theme toggle button animation */
#theme-toggle svg {
    transition: transform 0.2s ease;
}

#theme-toggle:hover svg {
    transform: scale(1.1);
}

/* Card hover effect */
article {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

article:hover {
    transform: translateY(-2px);
}

/* Link underline animation */
footer a span,
header a span {
    position: relative;
}

footer a span::after,
header a span::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background-color: currentColor;
    transition: width 0.2s ease;
}

footer a:hover span::after,
header a:hover span::after {
    width: 100%;
}

/* Selection color - teal */
::selection {
    background-color: #0d9488;
    color: white;
}

/* Scrollbar styling (webkit browsers) */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Hero headline animation on load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header h1 span {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

header h1 span:nth-child(1) {
    animation-delay: 0.1s;
}

header h1 span:nth-child(2) {
    animation-delay: 0.2s;
}

header h1 span:nth-child(3) {
    animation-delay: 0.3s;
}

header p {
    animation: fadeInUp 0.6s ease-out forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

header > div > div {
    animation: fadeInUp 0.6s ease-out forwards;
    animation-delay: 0.5s;
    opacity: 0;
}
