/* Base styles */
@keyframes rotateBackground {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 200px 200px;  /* matches background-size */
    }
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%23f7f7f7' stroke-width='0.5'%3E%3Ccircle cx='100' cy='100' r='60'/%3E%3Cpath d='M100 40 Q120 70 100 100 Q80 70 100 40'/%3E%3Cpath d='M100 160 Q120 130 100 100 Q80 130 100 160'/%3E%3Cpath d='M40 100 Q70 120 100 100 Q70 80 40 100'/%3E%3Cpath d='M160 100 Q130 120 100 100 Q130 80 160 100'/%3E%3Cpath d='M58 58 Q85 85 100 100 Q85 85 58 58'/%3E%3Cpath d='M142 58 Q115 85 100 100 Q115 85 142 58'/%3E%3Cpath d='M58 142 Q85 115 100 100 Q85 115 58 142'/%3E%3Cpath d='M142 142 Q115 115 100 100 Q115 115 142 142'/%3E%3Ccircle cx='100' cy='100' r='8'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
    background-position: center;
    animation: rotateBackground 30s linear infinite;
    color: #333;
}

/* Header and Navigation */
.site-header {
    text-align: center;
    padding: 2rem 1rem 0.5rem;
}

.site-title {
    font-family: 'Lovers Quarrel', cursive;
    font-size: 4rem;      /* Increased size */
    margin: 0 0 1rem; 
    font-weight: normal;
    color: #333;
    line-height: 1;       /* Added to control vertical spacing */
}

nav {
    padding: 0.5rem 1rem 2rem;
    text-align: center;
}

.nav-content {
    display: inline-flex;
    gap: 2rem;
    padding: 0.5rem;
    border-radius: 8px;
}

.nav-links a {
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    color: #000;
    background: #f5f5f5;
}

.nav-links a.active {
    color: #000;
    background: #f0f0f0;
}

/* Gallery Layout */
.gallery-container {
    width: 80%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: .5rem;
    width: 100%;
    padding: 1rem 0;
}

/* Artwork Cards */
.artwork-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
}

.artwork-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.artwork-card:hover .artwork-image {
    transform: scale(1.05);
}

/* Video Indicator */
.video-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-indicator::after {
    content: '';
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-left: 12px solid white;
    border-bottom: 8px solid transparent;
    margin-left: 3px;
}

/* Detail Page */
.artwork-detail {
    width: 80%;
    max-width: 1400px;
    margin: 0rem auto;
    padding: 1rem 1rem;
}

.artwork-detail-container {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.artwork-detail-media {
    flex: 1;
    max-width: 70%;
}

.artwork-detail-media img,
.artwork-detail-media video {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.artwork-detail-info {
    flex: 0 0 25%;
    position: sticky;
    top: 2rem;
}

.detail-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.detail-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 1rem;
}

.detail-date {
    font-size: 0.9rem;
    color: #666;
}

/* About Page */
.about-content {
    max-width: 600px;
    margin: 0rem auto;
    padding: 1rem 2rem;
    text-align: center;
}

.portrait-container {
    max-width: 300px;
    margin: 0 auto 2rem;
}

.ammamma-portrait {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    text-align: center;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .artwork-detail-container {
        flex-direction: column;
    }
    
    .artwork-detail-media {
        max-width: 100%;
    }
    
    .artwork-detail-info {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .gallery-container {
        width: 95%;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0.5rem 0;
    }

    .site-title {
        font-size: 3rem;
    }
}