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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: #2c2c2c;
    background-color: #fefefe;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: #8b4513;
}

a:focus {
    outline: 2px solid #8b4513;
    outline-offset: 2px;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: normal;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2rem;
    letter-spacing: 0.05em;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

h4 {
    font-size: 1.2rem;
}

p {
    margin-bottom: 1rem;
    max-width: 65ch;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(254, 254, 254, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid #e5e5e5;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px; /* Ensure consistent header height */
}

.logo a {
    font-size: 1.5rem;
    font-weight: normal;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    font-size: 1rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.nav-links a.active,
.nav-links a:hover {
    border-bottom-color: #8b4513;
}

.nav-social {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-social:hover {
    color: #8b4513;
}

/* Main Content */
main {
    padding-top: 100px; /* Increased for desktop header height */
    min-height: calc(100vh - 100px);
}

/* Ensure main element gets proper spacing regardless of class */
main.cv-page {
    padding-top: 100px !important; /* Override any conflicting styles */
}

/* Artist Introduction Section */
.artist-intro {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    padding-top: 6rem;
}

.intro-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.intro-text h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.intro-text .location {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
    font-style: italic;
}

.intro-text .artist-description {
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: none;
}

.intro-image {
    justify-self: end;
}

.intro-image img {
    width: 100%;
    max-width: 400px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

/* Portfolio Section (Combined) */
.portfolio {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #f9f9f9;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.portfolio-item:hover {
    transform: scale(1.02);
}

.portfolio-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.placeholder-content {
    height: 400px;
    background-color: #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-style: italic;
}

.placeholder-content.large {
    height: 400px;
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 2rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    text-align: left;
}

.portfolio-info p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
}

.portfolio-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* CV Page - Consistent Layout System */
.cv-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 6rem;
    /* Removed padding-top - main element handles this */
}

.cv-intro {
    margin-bottom: 4rem;
}

.cv-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 6rem;
    align-items: start;
}

.cv-image {
    margin-top: 2rem; /* Move profile image down a bit */
}

.cv-text h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.cv-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: none;
}

.cv-image img {
    width: 100%;
    border-radius: 8px;
}

/* CV Details Sections */
.cv-details {
    display: grid;
    gap: 3rem;
}

.cv-card {
    margin-bottom: 0;
}

.cv-card h3 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: #2c2c2c;
    border-bottom: 1px solid #8b4513;
    padding-bottom: 0.5rem;
}

.cv-card-grid {
    display: grid;
    gap: 1.5rem;
}

.cv-item-card {
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.cv-item-card:last-child {
    border-bottom: none;
}

.cv-item-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #2c2c2c;
}

.cv-item-card p {
    color: #666;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: none;
}

.cv-item-card .quote {
    font-style: italic;
    color: #555;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e0e0e0;
}

.exhibition-type {
    font-size: 1.2rem;
    margin: 2rem 0 1rem 0;
    color: #666;
    font-style: italic;
    font-weight: 500;
}

/* Responsive grid for exhibitions */
.exhibitions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

@media (min-width: 768px) {
    .exhibitions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Footer - Design System Approach */
.site-footer {
    background-color: #2c2c2c;
    color: #e5e5e5;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
    border-top: 1px solid #444;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.footer-cta {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.cta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid #444;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
    cursor: pointer;
}

.cta-item:hover {
    border-color: #d4a574;
    background-color: rgba(212, 165, 116, 0.05);
    transform: translateY(-1px);
}

.cta-icon {
    flex-shrink: 0;
    color: #d4a574;
}

.cta-item span,
.cta-item a {
    color: #e5e5e5;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.cta-item:hover span,
.cta-item:hover a {
    color: #ffffff;
}

.footer-meta {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.acknowledgement {
    font-size: 0.9rem;
    color: #ccc;
    font-style: italic;
    margin: 0;
    max-width: none;
    width: auto;
}

.copyright {
    font-size: 0.8rem;
    color: #999;
    margin: 0;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 3rem;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: opacity 0.3s ease;
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-caption {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    padding: 1rem 2rem;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    max-width: 80%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    main {
        padding-top: 160px; /* Increased for stacked mobile nav (logo + nav + gap) */
    }
    
    main.cv-page {
        padding-top: 160px !important; /* Override for mobile */
    }
    
    .hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1rem;
        text-align: center;
    }
    
    .artist-intro {
        padding: 2rem 1rem;
        padding-top: 8rem;
    }
    
    .intro-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .intro-text h1 {
        font-size: 2.5rem;
    }
    
    .intro-image {
        justify-self: center;
    }
    
    .portfolio {
        padding: 2rem 1rem;
    }
    
    .page-header h2 {
        font-size: 2.5rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .work-page {
        padding-top: 8rem; /* More space for mobile stacked nav */
    }
    
    .cv-page {
        padding: 1rem;
        /* Removed padding-top - main element handles this */
    }
    
    .cv-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .exhibitions-grid {
        grid-template-columns: 1fr;
    }
    
    .cv-text h2 {
        font-size: 2rem;
    }
    
    .footer-cta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cta-item {
        padding: 1rem 1.5rem;
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .lightbox-close {
        top: 1rem;
        right: 1rem;
        font-size: 2rem;
    }
    
    .lightbox-caption {
        bottom: 1rem;
        max-width: 90%;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    main {
        padding-top: 180px; /* Even more space for very small screens */
    }
    
    main.cv-page {
        padding-top: 180px !important; /* Override for very small screens */
    }
    
    .nav-container {
        padding: 1.5rem 1rem; /* More padding for better touch targets */
    }
    
    .intro-text h1 {
        font-size: 2rem;
    }
    
    .page-header h2 {
        font-size: 2rem;
    }
    
    .portfolio-item img {
        height: 300px;
    }
}

/* Focus and Accessibility */
.portfolio-item:focus {
    outline: 2px solid #8b4513;
    outline-offset: 2px;
}

.work-item:focus {
    outline: 2px solid #8b4513;
    outline-offset: 2px;
    transform: translateY(-5px);
}

/* Print Styles */
@media print {
    .main-nav,
    .site-footer,
    .lightbox {
        display: none;
    }
    
    main {
        margin-top: 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .hero,
    .featured-work,
    .cv-content {
        padding: 1rem 0;
    }
    
    .work-grid,
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}