:root {
    --color-bg: #0f0e0d;
    --color-bg-alt: #171513;
    --color-surface: #1e1b19;
    --color-text: #f3ede6;
    --color-text-muted: #b7aea5;
    --color-accent: #c9a15a;
    --color-border: #322d29;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --heading-font: 'Playfair Display', Georgia, serif;
    --max-width: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
    font-family: var(--heading-font);
    font-style: italic;
    font-weight: normal;
    margin: 0 0 0.5em;
    line-height: 1.2;
}

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

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 14, 13, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

.site-header.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent);
    backdrop-filter: none;
    border-bottom: none;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.logo img { max-height: 44px; }

.logo-text {
    display: inline-flex;
    align-items: baseline;
    gap: 0.18em;
    font-size: 1.4rem;
    line-height: 1;
}

.logo-word-bold {
    font-family: var(--font-body);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text);
}

.logo-word-script {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 400;
    letter-spacing: 0.01em;
    color: var(--color-accent);
}

.main-nav { display: flex; gap: 2rem; }

.main-nav a {
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    padding: 0.4rem 0;
    border-bottom: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.main-nav a:hover, .main-nav a.active { color: var(--color-accent); border-color: var(--color-accent); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--color-text); }

/* Hero */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--color-bg-alt);
    overflow: hidden;
    padding: 4rem 1.5rem;
    box-sizing: border-box;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(180deg, rgba(15,14,13,0.35), rgba(15,14,13,0.85));
    z-index: 1;
}

.hero-slider {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.4s ease;
}

.hero-slide.active { opacity: 1; }

.hero-dots {
    position: absolute;
    bottom: 1.8rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    gap: 0.6rem;
}

.hero-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(243, 237, 230, 0.35);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.hero-dot:hover { background: rgba(243, 237, 230, 0.6); }
.hero-dot.active { background: var(--color-accent); transform: scale(1.2); }

.hero-content { position: relative; z-index: 2; max-width: 720px; }

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-accent);
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
    display: block;
}

.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }

.hero p { color: var(--color-text-muted); font-size: 1.1rem; margin-top: 1rem; }

.btn {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.9rem 2.2rem;
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
    transition: background 0.2s, color 0.2s;
}
.btn:hover { background: var(--color-accent); color: #16130f; }
.btn-solid { background: var(--color-accent); color: #16130f; }
.btn-solid:hover { background: transparent; color: var(--color-accent); }

/* Section */
.section { padding: 5rem 0; }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.section-header h1, .section-header h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.section-header p { color: var(--color-text-muted); }

/* Gallery grid */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}
.gallery-filters a {
    padding: 0.45rem 1.1rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
.gallery-filters a.active, .gallery-filters a:hover { border-color: var(--color-accent); color: var(--color-accent); }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.75rem;
}

.artwork-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    overflow: hidden;
    position: relative;
}

.artwork-card .thumb { aspect-ratio: 4/5; overflow: hidden; background: #000; }
.artwork-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.artwork-card:hover .thumb img { transform: scale(1.06); }

.artwork-card .info { padding: 1.1rem 1.2rem; }
.artwork-card h3 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.artwork-card .meta { color: var(--color-text-muted); font-size: 0.85rem; }

.badge-sold {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--color-accent);
    color: #16130f;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.3rem 0.6rem;
}

/* Artwork detail */
.artwork-detail {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: start;
}
.artwork-detail img { border: 1px solid var(--color-border); }
.artwork-meta-list { margin: 1.5rem 0; border-top: 1px solid var(--color-border); }
.artwork-meta-list div {
    display: flex;
    justify-content: space-between;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.92rem;
}
.artwork-meta-list span:first-child { color: var(--color-text-muted); }

/* About page */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 3rem; align-items: start; }
.about-grid img { border: 1px solid var(--color-border); }
.cv-section { margin-top: 1.8rem; }
.cv-section h3 {
    font-family: var(--font-body);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: 0.6rem;
}
.cv-block { white-space: pre-line; color: var(--color-text-muted); }

/* Contact */
.contact-layout { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 2rem; align-items: start; }

.contact-info-panel, .contact-form-panel {
    background: transparent;
    border: none;
    border-radius: 16px;
    padding: 2.4rem;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.7rem;
}
.contact-info-item:last-child { margin-bottom: 0; }

.contact-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(201, 161, 90, 0.12);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
}
.contact-icon svg { width: 19px; height: 19px; }

.contact-label {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.25rem;
}
.contact-value { color: var(--color-text); font-size: 0.98rem; word-break: break-word; }

.contact-form-panel .alert { margin-bottom: 1.6rem; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.2rem;
}

form .field { margin-bottom: 1.3rem; }
form label { display: block; margin-bottom: 0.45rem; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); }
form input, form textarea {
    width: 100%;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-text);
    padding: 0.85rem 1.05rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
form textarea { resize: vertical; min-height: 120px; }
form input:focus, form textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(201, 161, 90, 0.15);
}

form button.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    border-radius: 10px;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}
form button.btn-submit svg { width: 16px; height: 16px; transition: transform 0.2s; }
form button.btn-submit:hover { transform: translateY(-2px); }
form button.btn-submit:hover svg { transform: translateX(3px); }

.alert { padding: 1rem 1.2rem; margin-bottom: 1.5rem; border-left: 3px solid var(--color-accent); background: var(--color-surface); font-size: 0.92rem; }
.alert-error { border-color: #c9584a; }

.empty-state { text-align: center; color: var(--color-text-muted); padding: 3rem 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--color-border); padding-top: 3rem; margin-top: 3rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; padding-bottom: 2rem; }
.footer-brand .logo-text { font-size: 1.3rem; }
.footer-brand p, .footer-contact span { color: var(--color-text-muted); font-size: 0.9rem; }
.footer-social { display: flex; gap: 1.2rem; }
.footer-social a { color: var(--color-text-muted); font-size: 0.9rem; }
.footer-social a:hover { color: var(--color-accent); }
.footer-contact { display: flex; flex-direction: column; gap: 0.3rem; text-align: right; }
.footer-bottom { border-top: 1px solid var(--color-border); padding: 1.2rem 0; text-align: center; }
.footer-bottom p { color: var(--color-text-muted); font-size: 0.8rem; margin: 0; }

/* Lightbox */
.lightbox {
    position: fixed; inset: 0; background: rgba(10,9,8,0.94);
    display: none; align-items: center; justify-content: center; z-index: 999; padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 88vh; max-width: 100%; border: 1px solid var(--color-border); }
.lightbox-close { position: absolute; top: 1.5rem; right: 2rem; color: var(--color-text); font-size: 2rem; cursor: pointer; background: none; border: none; }

@media (max-width: 860px) {
    .artwork-detail, .about-grid, .contact-layout { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; text-align: left; }
    .footer-contact { text-align: left; }
}

@media (max-width: 560px) {
    .form-row { grid-template-columns: 1fr; }
    .contact-info-panel, .contact-form-panel { padding: 1.8rem; }
}

@media (max-width: 720px) {
    .nav-toggle { display: flex; }
    .main-nav {
        position: absolute;
        top: 76px; left: 0; right: 0;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        flex-direction: column;
        padding: 1rem 1.5rem;
        gap: 1rem;
        display: none;
    }
    .main-nav.open { display: flex; }
}
