/* ============================================
   ARTIST PORTFOLIO — Main Stylesheet
   Минималистичный дизайн для художника
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #000000;
    --color-text: #ffffff;
    --color-text-muted: rgba(255,255,255,0.6);
    --color-accent: #ffffff;
    --color-overlay: rgba(0,0,0,0.4);
    --color-header-bg: rgba(0,0,0,0.0);
    --color-header-bg-scrolled: rgba(0,0,0,0.85);
    --font-primary: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --transition-speed: 0.4s;
    --header-height: 70px;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--color-text-muted);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

h1 {
    font-size: clamp(1.5rem, 4vw, 3rem);
}

h2 {
    font-size: clamp(1.2rem, 3vw, 2rem);
    margin-bottom: 1.5rem;
}

h3 {
    font-size: clamp(1rem, 2vw, 1.5rem);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.2rem;
    font-weight: 300;
    line-height: 1.8;
}

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    background: var(--color-header-bg);
    transition: background var(--transition-speed) ease,
                backdrop-filter var(--transition-speed) ease;
    display: flex;
    align-items: center;
}

.site-header.scrolled {
    background: var(--color-header-bg-scrolled);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.site-header .inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.site-logo a {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text);
    transition: opacity var(--transition-speed) ease;
}

.site-logo a:hover {
    opacity: 0.7;
    color: var(--color-text);
}

/* Navigation */
.main-navigation ul {
    display: flex;
    gap: 35px;
    align-items: center;
}

.main-navigation a {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text);
    position: relative;
    padding: 5px 0;
    transition: opacity var(--transition-speed) ease;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-text);
    transition: width var(--transition-speed) ease;
}

.main-navigation a:hover::after,
.main-navigation a.active::after {
    width: 100%;
}

.main-navigation a:hover {
    color: var(--color-text);
    opacity: 0.8;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--color-text);
    margin: 5px 0;
    transition: all var(--transition-speed) ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Fullscreen Slideshow --- */
.fullscreen-slideshow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
}

.fullscreen-slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.fullscreen-slideshow .slide.active {
    opacity: 1;
}

.fullscreen-slideshow .slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-overlay);
}

/* Slideshow Navigation */
.slideshow-nav {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 12px;
}

.slideshow-nav button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.5);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    padding: 0;
}

.slideshow-nav button.active {
    background: var(--color-text);
    border-color: var(--color-text);
}

.slideshow-nav button:hover {
    border-color: var(--color-text);
}

/* Slideshow Arrows */
.slideshow-arrows {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.slideshow-arrows button {
    pointer-events: all;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity var(--transition-speed) ease;
    padding: 20px;
}

.slideshow-arrows button:hover {
    opacity: 1;
}

/* Hero Title Overlay */
.hero-title {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    text-align: center;
    pointer-events: none;
}

.hero-title h1 {
    font-size: clamp(2rem, 6vw, 5rem);
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-text);
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

/* --- Main Content Area --- */
.site-content {
    position: relative;
    z-index: 2;
    background: var(--color-bg);
}

.site-content.page-content {
    padding-top: var(--header-height);
}

/* --- Page Hero --- */
.page-hero {
    position: relative;
    height: 50vh;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.page-hero .hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.4;
}

.page-hero .hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.8));
}

.page-hero h1 {
    position: relative;
    z-index: 1;
    text-align: center;
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    font-weight: 300;
    letter-spacing: 0.25em;
}

/* --- Content Sections --- */
.content-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 30px;
}

.content-section.narrow {
    max-width: 800px;
}

.content-section.wide {
    max-width: 1400px;
}

/* --- Artwork Grid --- */
.artworks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 15px;
}

.artwork-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: auto;
}

.artwork-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

.artwork-item:hover img {
    transform: scale(1.03);
    opacity: 0.85;
}

.artwork-item .artwork-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition-speed) ease;
}

.artwork-item:hover .artwork-info {
    opacity: 1;
    transform: translateY(0);
}

.artwork-info h3 {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.artwork-info span {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
}

/* --- Masonry Grid --- */
.masonry-grid {
    columns: 3;
    column-gap: 15px;
}

.masonry-grid .artwork-item {
    break-inside: avoid;
    margin-bottom: 15px;
    display: inline-block;
    width: 100%;
}

/* --- Exhibition List --- */
.exhibition-list {
    display: flex;
    flex-direction: column;
}

.exhibition-item {
    padding: 40px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-speed) ease;
}

.exhibition-item:first-child {
    border-top: 1px solid rgba(255,255,255,0.1);
}

.exhibition-item:hover {
    padding-left: 20px;
    opacity: 0.8;
}

.exhibition-item .ex-title {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 300;
    letter-spacing: 0.1em;
}

.exhibition-item .ex-date {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
    white-space: nowrap;
    margin-left: 20px;
}

/* --- Single Artwork Page --- */
.single-artwork {
    padding-top: calc(var(--header-height) + 40px);
}

.single-artwork .artwork-image {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 40px;
}

.single-artwork .artwork-image img {
    width: 100%;
    height: auto;
}

.single-artwork .artwork-details {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 30px 80px;
}

.single-artwork .artwork-details h1 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    letter-spacing: 0.15em;
}

.single-artwork .artwork-meta {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 30px;
    line-height: 1.8;
}

.single-artwork .artwork-description {
    font-weight: 300;
    line-height: 1.8;
}

/* Navigation between artworks */
.artwork-nav {
    display: flex;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 30px 80px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.artwork-nav a {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.6;
    transition: opacity var(--transition-speed) ease;
}

.artwork-nav a:hover {
    opacity: 1;
    color: var(--color-text);
}

/* --- Contact Page --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-info h3 {
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    margin-bottom: 20px;
    color: var(--color-text);
}

.contact-info p,
.contact-info a {
    color: var(--color-text-muted);
    font-weight: 300;
    line-height: 2;
}

.contact-info a:hover {
    color: var(--color-text);
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.social-links a {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    transition: color var(--transition-speed) ease;
}

.social-links a:hover {
    color: var(--color-text);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--color-text);
    padding: 15px;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 300;
    transition: border-color var(--transition-speed) ease;
    outline: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255,255,255,0.3);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: rgba(255,255,255,0.6);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form button {
    background: var(--color-text);
    color: var(--color-bg);
    border: none;
    padding: 15px 40px;
    font-family: var(--font-primary);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity var(--transition-speed) ease;
    align-self: flex-start;
}

.contact-form button:hover {
    opacity: 0.8;
}

/* --- Press Page --- */
.press-item {
    padding: 30px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.press-item:first-child {
    border-top: 1px solid rgba(255,255,255,0.1);
}

.press-item h3 {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.press-item .press-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}

.press-item p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.press-item a {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--color-text);
    padding-bottom: 2px;
}

/* --- Studio / About Page --- */
.studio-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.studio-image img {
    width: 100%;
    height: auto;
}

.studio-text h2 {
    margin-bottom: 25px;
}

.studio-text p {
    color: var(--color-text-muted);
}

/* --- Footer --- */
.site-footer {
    position: relative;
    z-index: 2;
    padding: 40px 30px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.site-footer p {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
}

.site-footer a {
    color: var(--color-text-muted);
}

.site-footer a:hover {
    color: var(--color-text);
}

/* --- Scroll to Top --- */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
    font-size: 1.2rem;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: rgba(255,255,255,0.2);
}

/* --- Page Transition --- */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.page-transition-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* --- Loading --- */
.site-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease;
}

.site-loading.loaded {
    opacity: 0;
    pointer-events: none;
}

.site-loading .loader-text {
    font-size: 0.85rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--color-text);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* --- Responsive --- */
@media screen and (max-width: 1024px) {
    .masonry-grid {
        columns: 2;
    }

    .artworks-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media screen and (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    /* Mobile Navigation */
    .menu-toggle {
        display: block;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0,0,0,0.97);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-speed) ease;
        z-index: 1000;
    }

    .main-navigation.open {
        opacity: 1;
        visibility: visible;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }

    .main-navigation a {
        font-size: 1.2rem;
    }

    /* Responsive grids */
    .contact-grid,
    .studio-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .masonry-grid {
        columns: 2;
        column-gap: 10px;
    }

    .masonry-grid .artwork-item {
        margin-bottom: 10px;
    }

    .artworks-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .content-section {
        padding: 50px 20px;
    }

    .slideshow-arrows {
        display: none;
    }

    .exhibition-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .exhibition-item .ex-date {
        margin-left: 0;
    }

    /* Always show artwork info on mobile */
    .artwork-item .artwork-info {
        opacity: 1 !important;
        transform: translateY(0) !important;
        z-index: 10;
        background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 70%, transparent 100%) !important;
    }

    .artwork-item .artwork-info h3 {
        opacity: 1 !important;
    }

    .artwork-item .artwork-info span {
        opacity: 1 !important;
    }
}

@media screen and (max-width: 480px) {
    .masonry-grid {
        columns: 1;
    }

    .artworks-grid {
        grid-template-columns: 1fr;
    }

    .hero-title h1 {
        font-size: 1.8rem;
        letter-spacing: 0.15em;
    }

    .site-header .inner {
        padding: 0 20px;
    }
}

/* --- WordPress Specific --- */
.wp-block-image {
    margin: 0;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Gallery caption */
.wp-caption-text {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: 10px;
}

/* Post navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 30px 80px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.post-navigation a {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.6;
    transition: opacity var(--transition-speed) ease;
}

.post-navigation a:hover {
    opacity: 1;
}