/* static/styles.css */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
    --max-width: 1200px;
    --border-radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    position: relative;
    color: white;
    padding: 20px 0;
    text-align: center;
    min-height: 25vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Hero Background */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-image {
    position: absolute;
    width: 120%;
    height: 120%;
    background-size: cover;
    background-position: center;
    filter: blur(8px) brightness(0.7);
    opacity: 0.6;
    animation-duration: 20s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.hero-image-1 {
    top: -10%;
    left: -10%;
    animation-name: float-1;
    animation-delay: 0s;
}

.hero-image-2 {
    top: -15%;
    right: -15%;
    animation-name: float-2;
    animation-delay: -5s;
    opacity: 0.4;
}

.hero-image-3 {
    bottom: -10%;
    left: -10%;
    animation-name: float-3;
    animation-delay: -10s;
    opacity: 0.5;
}

.hero-image-4 {
    top: -5%;
    left: 50%;
    transform: translateX(-50%);
    animation-name: float-4;
    animation-delay: -15s;
    opacity: 0.3;
}

.hero-image-5 {
    bottom: -15%;
    right: -10%;
    animation-name: float-5;
    animation-delay: -8s;
    opacity: 0.4;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    z-index: 2;
}

/* Animation Keyframes */
@keyframes float-1 {
    0%, 100% { transform: translateY(0) translateX(0) rotate(0deg) scale(1); }
    25% { transform: translateY(-20px) translateX(10px) rotate(1deg) scale(1.02); }
    50% { transform: translateY(-10px) translateX(-5px) rotate(-0.5deg) scale(0.98); }
    75% { transform: translateY(15px) translateX(5px) rotate(0.5deg) scale(1.01); }
}

@keyframes float-2 {
    0%, 100% { transform: translateY(0) translateX(0) rotate(0deg) scale(1); }
    33% { transform: translateY(25px) translateX(-15px) rotate(-1deg) scale(1.03); }
    66% { transform: translateY(-15px) translateX(10px) rotate(0.8deg) scale(0.97); }
}

@keyframes float-3 {
    0%, 100% { transform: translateY(0) translateX(0) rotate(0deg) scale(1); }
    20% { transform: translateY(-30px) translateX(20px) rotate(1.2deg) scale(1.01); }
    40% { transform: translateY(10px) translateX(-10px) rotate(-0.8deg) scale(0.99); }
    60% { transform: translateY(-5px) translateX(15px) rotate(0.3deg) scale(1.02); }
    80% { transform: translateY(20px) translateX(-5px) rotate(-0.5deg) scale(0.98); }
}

@keyframes float-4 {
    0%, 100% { transform: translateX(-50%) translateY(0) rotate(0deg) scale(1); }
    30% { transform: translateX(-50%) translateY(-25px) rotate(-0.7deg) scale(1.01); }
    70% { transform: translateX(-50%) translateY(15px) rotate(0.9deg) scale(0.99); }
}

@keyframes float-5 {
    0%, 100% { transform: translateY(0) translateX(0) rotate(0deg) scale(1); }
    40% { transform: translateY(-20px) translateX(-20px) rotate(1.5deg) scale(1.02); }
    80% { transform: translateY(25px) translateX(10px) rotate(-1deg) scale(0.98); }
}

/* Header Content */
header .container {
    position: relative;
    z-index: 3;
}

.avatar-container {
    margin-bottom: 20px;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: var(--shadow-lg);
    object-fit: cover;
}

.site-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.site-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    font-weight: 300;
}

/* Section Styles */
section {
    padding: 60px 0;
}

section:nth-child(even) {
    background-color: var(--bg-light);
}

h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 15px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* Biography Section */
.bio-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
}

.bio-text p {
    margin-bottom: 20px;
    text-align: justify;
}

.bio-text p:first-child {
    font-size: 1.2rem;
    color: var(--text-color);
}

/* Albums Grid */
.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.album-item {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.album-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.album-image-container {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: var(--bg-light);
}

.album-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.album-item:hover .album-image-container img {
    transform: scale(1.05);
}

.album-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.album-item-info {
    padding: 20px;
}

.album-item-info h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.album-date {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 6px;
    font-weight: 500;
}

.work-year {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 4px;
}

.work-medium {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 4px;
}

.album-type {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Contact Section */
.contact {
    background: var(--bg-light);
}

.contact-intro {
    max-width: 600px;
    margin: 0 auto 40px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
}

.contact-info {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.email-notice {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.email-display {
    font-size: 1.3rem;
    font-weight: 500;
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

.email-user, .email-at, .email-domain {
    transition: color 0.3s ease;
}

.email-display:hover .email-user,
.email-display:hover .email-at,
.email-display:hover .email-domain {
    color: var(--secondary-color);
}

.contact-note {
    font-size: 1rem;
    color: var(--text-light);
    margin-top: 20px;
    line-height: 1.6;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 30px 0;
    text-align: center;
}

.footer-credit {
    margin-top: 10px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-credit a {
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: border-color 0.3s ease;
}

.footer-credit a:hover {
    border-bottom-color: rgba(255, 255, 255, 0.8);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-content {
    position: relative;
    max-width: 1000px;
    max-height: 90vh;
    width: 100%;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-back {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 1rem;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    z-index: 1001;
    transition: background-color 0.3s ease;
    font-family: inherit;
}

.lightbox-back:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-back:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.lightbox-image {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
    background: #000;
}

.lightbox-info {
    padding: 30px;
    background: white;
}

.lightbox-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.lightbox-details p {
    margin-bottom: 10px;
    color: var(--text-light);
}

.lightbox-details p:empty {
    display: none;
}

.lightbox-date {
    color: var(--secondary-color);
    font-weight: 500;
}

.lightbox-year {
    font-weight: 500;
}

.lightbox-medium {
    font-style: italic;
}

.lightbox-description {
    margin-top: 15px;
    line-height: 1.6;
}

/* Album Gallery View */
.album-gallery-view {
    padding: 30px;
    max-height: 80vh;
    overflow-y: auto;
}

.album-header {
    text-align: center;
    margin-bottom: 30px;
}

.album-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.album-info {
    color: var(--text-light);
    font-size: 1rem;
}

.album-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.album-image-item {
    cursor: pointer;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.album-image-item:hover {
    transform: scale(1.05);
}

.album-image-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.album-description {
    text-align: center;
    color: var(--text-light);
    line-height: 1.6;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Reduce header height and animations on mobile for performance */
    header {
        min-height: 35vh;
        padding: 30px 0;
    }
    
    /* Reduce animation complexity on mobile */
    .hero-image {
        animation-duration: 30s;
        filter: blur(6px) brightness(0.8);
    }
    
    .site-title {
        font-size: 2rem;
    }
    
    .site-subtitle {
        font-size: 1rem;
    }
    
    .avatar {
        width: 120px;
        height: 120px;
    }
    
    section {
        padding: 40px 0;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .album-image-container {
        height: 220px;
    }
    
    .album-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .bio-text {
        font-size: 1rem;
    }
    
    .lightbox-content {
        flex-direction: column;
    }
    
    .lightbox-image {
        max-height: 50vh;
    }
}

@media (max-width: 480px) {
    .albums-grid {
        grid-template-columns: 1fr;
    }
    
    .album-images-grid {
        grid-template-columns: 1fr;
    }
    
    .site-title {
        font-size: 1.6rem;
    }
    
    .bio-text p {
        text-align: left;
    }
}

/* Accessibility */
:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
    
    /* For users who prefer reduced motion, show static background */
    .hero-image {
        animation: none !important;
        transform: none !important;
        filter: blur(4px) brightness(0.8);
    }
    
    /* Keep the overlay but make it more opaque for better text contrast */
    .hero-overlay {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    }
}