/* =========================================
   1. VARIABLES & THEME SETUP
   ========================================= */
:root {
    /* Colors */
    --bg-body: #0a0a0a;
    --bg-card: #141414;
    --bg-card-hover: #1f1f1f;

    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --accent-gold: #C6A87C;
    --accent-gold-hover: #dbc096;

    /* Glassmorphism */
    --glass-bg: rgba(20, 20, 20, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-blur: blur(12px);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;

    /* Transitions */
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* =========================================
   2. RESET & BASE STYLES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: #fff;
    font-weight: 500;
    line-height: 1.2;
}

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

.text-highlight {
    color: var(--accent-gold);
    font-weight: 500;
}

ul {
    list-style: none;
}

/* =========================================
   3. NAVIGATION
   ========================================= */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-bottom: var(--glass-border);
    padding: var(--spacing-md) var(--spacing-lg);
    display: flex;
    justify-content: center;
}

.navbar ul {
    display: flex;
    gap: var(--spacing-lg);
}

.navbar a {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    position: relative;
    padding: 0.5em 0;
}

.navbar a:hover,
.navbar a.active {
    color: var(--accent-gold);
}

/* Underline animation */
.navbar a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-gold);
    transition: width 0.3s var(--ease-out);
}

.navbar a:hover::after,
.navbar a.active::after {
    width: 100%;
}

/* =========================================
   4. LAYOUT & SECTIONS
   ========================================= */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
    min-height: 80vh;
}

.header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    padding-top: var(--spacing-lg);
}

.header h1 {
    font-size: 3rem;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, #999);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero Section (Index) */
.hero-image-container {
    width: 100%;
    height: 45vh;
    margin-bottom: var(--spacing-lg);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease-out);
}

.hero-image-container:hover .hero-image {
    transform: scale(1.05);
}

.homepage-content p,
.biography-content p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: var(--text-muted);
    text-align: left;
    margin-bottom: 1.5em;
}

.homepage-content h2 {
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--accent-gold);
    font-size: 1.5rem;
}

/* =========================================
   5. GALLERY GRID
   ========================================= */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding-bottom: 4rem;
}

.painting-card {
    background-color: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), background-color 0.3s;
    cursor: pointer;
}

.painting-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    background-color: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.1);
}

.painting-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.painting-info {
    padding: 1.5rem;
}

.painting-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.painting-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================================
   6. MODAL
   ========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);

    /* Center the content container horizontally & vertically */
    /*display: flex;*/
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90%;
    max-height: 90vh;
}

.modal-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 4px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.modal-caption {
    margin-top: 1rem;
    color: var(--text-main);
    font-size: 1.1rem;
    text-align: center;
    font-family: var(--font-heading);
}

/* The container that holds both the image and the caption */
.modal-content {
    display: flex;
    flex-direction: column;
    /* Stack items vertically */
    align-items: center;
    /* Center them horizontally */
    max-width: 80%;
    max-height: 80%;
    overflow: auto;
    /* In case caption is long, it can scroll */
    background-color: transparent;
    /* If you want no background, or set something else */
}

/* The "X" close button */
.modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
}

/* The enlarged image */
.modal-img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 0 10px #000;
}

/* The caption below the image */
.modal-caption {
    color: #ccc;
    margin-top: 1em;
    /* space above the caption */
    text-align: center;
    padding: 0 1em;
    /* optional horizontal padding */
    font: bold 1em/1 sans-serif;
    font-size: larger;
}



/* GALLERY */

/*.gallery-container {*/
/*    !* Grid layout creates evenly spaced columns *!*/
/*    display: grid;*/
/*    gap: 1.5em; !* Spacing between cards *!*/
/*    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));*/
/*    !* minmax(280px, 1fr) means each column is at least 280px wide*/
/*       but can grow if there's room *!*/
/*}*/

/*!* Each "card" for a painting *!*/
/*.painting-card {*/
/*    background-color: #1c1c1c; !* Dark background for the card *!*/
/*    border: 1px solid #333333;*/
/*    border-radius: 4px;*/
/*    overflow: hidden;*/
/*    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);*/
/*}*/

/*!* Images keep aspect ratio but fill the width of the card *!*/
/*.painting-card img {*/
/*    width: 100%;*/
/*    height: auto; !* let the browser adjust height properly *!*/
/*    display: block;*/
/*    object-fit: cover; !* if you want to crop edges, but not typically needed if*/
/*                        height is auto *!*/
/*}*/

/*!* Info area inside each card *!*/
/*.painting-info {*/
/*    padding: 1em;*/
/*    color: #ffffff;*/
/*}*/

/*!* Title and description text *!*/
/*.painting-title {*/
/*    font-size: 1.2em;*/
/*    margin-bottom: 0.5em;*/
/*    color: #ffffff;*/
/*}*/
/*.painting-description {*/
/*    font-size: 0.9em;*/
/*    line-height: 1.4em;*/
/*    color: #cccccc;*/
/*}*/


/* =========================================
   9. CONTACT PAGE
   ========================================= */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 80vh;
    padding-top: 2rem;
}

.contact-info {
    padding-left: 2rem;
}

.contact-heading {
    font-size: 3.5rem;
    font-family: var(--font-heading);
    margin-bottom: 2rem;
    color: var(--accent-gold);
    line-height: 1.1;
}

.contact-text {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 500px;
}

.contact-email {
    display: inline-block;
    font-size: 1.5rem;
    color: var(--text-main);
    border-bottom: 2px solid var(--accent-gold);
    padding-bottom: 0.2rem;
    transition: all 0.3s ease;
}

.contact-email:hover {
    color: var(--accent-gold);
    transform: translateY(-2px);
}

.contact-sub {
    margin-top: 3rem;
    font-size: 1rem;
    color: var(--text-muted);
    opacity: 0.8;
}

.contact-image-container {
    width: 100%;
    height: 70vh;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
}

.contact-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.5s ease;
}

.contact-image-container:hover .contact-image {
    transform: scale(1.03);
}

@media (max-width: 900px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .contact-info {
        padding-left: 0;
        order: 2;
    }

    .contact-image-container {
        order: 1;
        height: 40vh;
    }

    .contact-heading {
        font-size: 2.5rem;
    }
}