/* Self-hosted fonts with font-display: block, so text never renders in a
   fallback face and then swaps. */
@font-face {
    font-family: 'UnifrakturCook';
    font-style: normal;
    font-weight: 700;
    font-display: block;
    src: url(fonts/unifrakturcook-700.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Cinzel';
    font-style: normal;
    font-weight: 500 600;
    font-display: block;
    src: url(fonts/cinzel-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Cinzel';
    font-style: normal;
    font-weight: 500 600;
    font-display: block;
    src: url(fonts/cinzel-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.6;
}

/* Navigation */
nav {
    padding: 30px 40px;
    border-bottom: none;
    display: flex;
    justify-content: center;
    gap: 48px;
    align-items: center;
    position: relative;
    left: 0;
}

.nav-name {
    font-family: 'UnifrakturCook', serif;
    font-size: 38px;
    font-weight: 500;
    color: #3a3a3a;
    text-transform: none;
    letter-spacing: 0.08em;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: center;
    margin: 0;
    margin-top: 9px;
}

.nav-instagram {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0;
}

nav a {
    text-decoration: none;
    color: #000000;
    font-size: 13px;
    text-transform: lowercase;
    letter-spacing: 1px;
    transition: opacity 0.3s;
}

#nav-menu li:not(.nav-instagram) a {
    color: #9a9a9a;
    transition: color 0.3s;
}

nav a:hover {
    color: #b00000;
    opacity: 1;
}

.nav-name:hover {
    color: #3a3a3a;
}

#nav-menu li:not(.nav-instagram) a:hover,
#nav-menu li:not(.nav-instagram) a:active {
    color: #4a4a4a;
}

nav a:active {
    color: #000000;
}

.instagram-link {
    display: inline-flex;
    align-items: center;
    padding: 4px;
    position: relative;
    top: 2px;
}

.instagram-link svg {
    display: block;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background-color: #000;
    margin: 3px 0;
    transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Hero Image */
.hero-image {
    width: 100%;
    margin: 0;
    padding: 0;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Main Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 40px;
}

/* Paintings Grid - Masonry Layout */
.paintings-grid {
    column-count: 3;
    column-gap: 40px;
    margin-top: 40px;
}

.paintings-grid.single-painting {
    column-count: 1;
    max-width: 880px;
    margin: 40px auto 0;
}

.drawings-page .paintings-grid.single-painting,
.home-page .paintings-grid.single-painting {
    max-width: 980px;
}

.painting-item {
    cursor: pointer;
    transition: opacity 0.3s;
    break-inside: avoid;
    margin-bottom: 40px;
    display: inline-block;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.painting-item:hover {
    opacity: 1;
}

.no-lightbox {
    cursor: default;
    pointer-events: none;
    touch-action: none;
}

.no-lightbox:hover {
    opacity: 1;
}

/* Static caption below image (no hover overlay) */
.painting-caption {
    margin-top: 12px;
    text-align: center;
    font-family: 'Cinzel', serif;
    letter-spacing: 0.12em;
}

.painting-caption .painting-title {
    font-weight: 500;
    color: #000;
    margin-bottom: 4px;
    letter-spacing: 0.16em;
    word-spacing: 0.5em;
}

.painting-caption .painting-meta {
    font-size: 13px;
    color: #4a4a4a;
    letter-spacing: 0.08em;
}

.no-hover .painting-info {
    display: none;
}

.painting-item img {
    width: 100%;
    height: auto;
    display: block;
}

.painting-info {
    margin-top: 0;
    position: absolute;
    inset: 0;
    padding: 16px;
    font-size: 13px;
    color: #f2f2f2;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    font-family: 'Cinzel', serif;
    letter-spacing: 0.12em;
}

.painting-title {
    font-weight: 500;
    color: #fff;
    margin-bottom: 5px;
    transition: none;
    letter-spacing: 0.16em;
    word-spacing: 0.5em;
}

.painting-item:not(.no-hover):hover .painting-info {
    opacity: 1;
    transform: scale(1);
}

.painting-item:not(.no-hover).touch-preview .painting-info,
.painting-item:not(.no-hover):active .painting-info {
    opacity: 1;
    transform: scale(1);
}

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

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    width: min(90vw, 1200px);
    max-height: 75vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.lightbox-image {
    width: 100%;
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #000;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    transition: opacity 0.3s;
}

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

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #000;
    font-size: 60px;
    font-weight: 300;
    cursor: pointer;
    background: none;
    border: none;
    padding: 20px;
    transition: opacity 0.3s;
    z-index: 1001;
}

.lightbox-prev,
.lightbox-next {
    display: none;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 0.6;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-info {
    position: relative;
    width: min(90vw, 1200px);
    margin-top: 18px;
    text-align: center;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.lightbox-meta {
    font-family: 'Cinzel', serif;
    font-size: clamp(12px, 1.4vw, 18px);
    letter-spacing: 0.12em;
    color: #666;
    background: transparent;
    padding: 0;
    border-radius: 0;
    transition: color 0.25s ease;
}

.lightbox-meta:hover {
    color: #7a4a2a;
}

.lightbox-content:hover .lightbox-info {
    opacity: 1;
}

/* CV Page */
.about-portrait {
    width: min(422px, 75vw);
    aspect-ratio: 1 / 1;
    margin: 0 auto 1mm;
    overflow: hidden;
}

.about-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.cv-content {
    max-width: 800px;
    margin: 0 auto;
}

.cv-section {
    margin-bottom: 50px;
}

.cv-section h2 {
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    font-weight: 600;
}

.cv-entry {
    margin-bottom: 15px;
    line-height: 1.8;
}

.bio-origin {
    text-align: center;
    margin-top: 0;
    margin-bottom: 32px;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    letter-spacing: 0.04em;
    line-height: 1.4;
}

.soft-gray {
    color: #4a4a4a;
}

.cv-year {
    font-weight: 500;
    display: inline-block;
    width: 120px;
    margin-right: 20px;
    text-align: center;
    white-space: nowrap;
    vertical-align: top;
}

.press-image {
    display: block;
    width: min(520px, 100%);
    margin: 0 auto;
    height: auto;
}

.press-heading {
    text-align: center;
    font-family: 'Cinzel', serif;
    letter-spacing: 0.06em;
}

.home-quote {
    margin-top: 12px;
    text-align: center;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    letter-spacing: 0.02em;
}

/* Contact Page */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-content h1 {
    font-size: 24px;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: #4a4a4a;
}

.contact-page .contact-content h1 {
    font-family: 'Cinzel', serif;
    letter-spacing: 0.06em;
}

.contact-info {
    font-size: 16px;
    line-height: 2;
    color: #4a4a4a;
}

.contact-info a {
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #000;
    transition: opacity 0.3s;
}

.contact-info a:hover {
    opacity: 0.6;
}

.email-address {
    color: #4a4a4a;
}

.email-dotcom {
    color: #7a4a2a;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    nav {
        padding: 10px 12px;
        justify-content: space-between;
        gap: 0;
        left: 0;
        align-items: center;
    }

    .nav-name {
        font-size: 32px;
    }

    .hamburger {
        display: flex;
        position: relative;
        z-index: 1003;
        margin-right: 4px;
    }

    nav ul {
        position: fixed;
        top: 0 !important;
        right: -100%;
        width: min(48vw, 260px);
        height: 100vh;
        background-color: #fff;
        flex-direction: column;
        align-items: flex-start;
        padding: 64px 20px 24px;
        gap: 16px;
        margin-top: 0;
        transition: right 0.3s ease;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        z-index: 1001;
        overflow-y: auto;
    }

    .nav-instagram {
        position: static;
        right: auto;
        top: auto;
        transform: none;
        margin-left: 0;
        margin-top: auto;
        align-self: flex-end;
        padding-top: 16px;
    }

    nav ul.active {
        right: 0;
    }

    nav ul li {
        width: 100%;
    }

    nav a {
        font-size: 14px;
    }

    .container {
        padding: 30px 16px;
    }

    .paintings-grid {
        column-count: 1;
        column-gap: 0;
        margin-top: 24px;
    }

    .paintings-grid.single-painting {
        margin-top: 20px;
    }

    .painting-item {
        margin-bottom: 24px;
    }

    .painting-title {
        word-spacing: 0.2em;
        letter-spacing: 0.08em;
        font-size: 14px;
    }

    .painting-caption .painting-meta {
        font-size: 12px;
    }

    .cv-content {
        max-width: 100%;
    }

    .cv-section {
        margin-bottom: 34px;
    }

    .cv-section h2 {
        font-size: 16px;
        margin-bottom: 14px;
    }

    .cv-year {
        display: block;
        margin-bottom: 5px;
        width: auto;
        margin-right: 0;
        text-align: left;
    }

    .bio-origin {
        font-size: 14px;
        margin-top: 0;
    }

    .home-quote {
        margin-top: 10px;
        font-size: 14px;
        line-height: 1.5;
        padding: 0 6px;
    }

    .press-image {
        width: 100%;
    }

    /* Lightbox responsive */
    .lightbox {
        padding: 40px 10px;
    }

    .lightbox-content {
        width: 94vw;
        max-height: 70vh;
    }

    .lightbox-image {
        max-height: 70vh;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 40px;
        padding: 10px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        display: none;
    }

    .lightbox-info {
        margin-top: 12px;
    }

    .lightbox-meta {
        font-size: clamp(11px, 3.5vw, 14px);
        letter-spacing: 0.08em;
    }
}

@media screen and (max-width: 480px) {
    nav ul {
        width: 48vw;
        gap: 12px;
        padding: 60px 16px 20px;
    }

    .nav-name {
        font-size: 30px;
    }

    .paintings-grid {
        column-count: 1;
        column-gap: 0;
    }

    .painting-item {
        margin-bottom: 30px;
    }

    .contact-content h1 {
        font-size: 20px;
    }

    .container {
        padding: 24px 14px;
    }

    /* Lightbox mobile */
    .lightbox {
        padding: 30px 10px;
    }

    .lightbox-content {
        max-height: 65vh;
    }

    .lightbox-image {
        max-height: 65vh;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 30px;
        padding: 5px;
    }

    .lightbox-info {
        width: 100%;
        margin-top: 10px;
        padding: 0 8px;
    }

    .lightbox-meta {
        font-size: 11px;
        letter-spacing: 0.06em;
    }
}
