/* Add animation effects to the website */

/* Fade-in animation for period sections */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.period-content.active {
    animation: fadeIn 0.8s ease-out;
}

/* Hover effects for navigation links */
.period-btn {
    position: relative;
    overflow: hidden;
}

.period-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--light-text);
    transition: width 0.3s ease;
}

.period-btn:hover::after {
    width: 100%;
}

/* Pulsing effect for buttons */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.toggle-btn:hover, .download-btn:hover {
    animation: pulse 1s infinite;
}

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

/* Page transition effects */
.container {
    transition: opacity 0.4s ease;
}

body.transitioning .container {
    opacity: 0;
}

/* Subtle background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(var(--shadow-color) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    opacity: 0.3;
    z-index: -1;
}

/* Featured work sample hover effect */
.work-sample {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.work-sample:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Download button animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

.download-btn:hover {
    animation: bounce 1s ease;
}

/* Period navigation highlight effect */
.period-btn.active {
    position: relative;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.period-btn.active::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--accent-color);
}

/* Mobile-friendly animations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
