/* ========================================
   Anastasiia Kirsanova — Portfolio
   Color palette derived from illustrations:
   warm cream, terracotta, sage green, golden amber
   ======================================== */

:root {
    --cream: #FFFFFF;
    --cream-dark: #E8E8E8;
    --terracotta: #C65D3E;
    --terracotta-light: #D4785E;
    --sage: #5A7A5E;
    --sage-light: #7A9A7E;
    --amber: #D4A843;
    --navy: #2B3A4E;
    --text: #1A1A1A;
    --text-light: #555555;
    --white: #FFFFFF;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background-color: var(--cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ---- Navigation ---- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 3rem;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.nav {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.nav::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 12px;
    background: url('brush-stroke.svg') no-repeat center;
    background-size: 100% 100%;
}

.nav-icon {
    height: 32px;
    width: 32px;
    object-fit: contain;
    margin-right: 0.5rem;
    vertical-align: middle;
    border-radius: 50%;
}

.nav.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: none;
}

.nav-logo {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.25rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 0.01em;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--terracotta);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: transform 0.3s, opacity 0.3s;
}

/* ---- Hero ---- */

.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60vh;
    padding: 8rem 3rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.hero-content {
    max-width: 700px;
}

.hero h1 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1.05;
    color: var(--text);
    margin-bottom: 1rem;
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--terracotta);
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* ---- Sections ---- */

.section {
    padding: 6rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin-bottom: 3rem;
    color: var(--text);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--terracotta);
    margin-top: 0.75rem;
    border-radius: 2px;
}

/* ---- Projects Grid ---- */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.project-card {
    text-decoration: none;
    color: var(--text);
    border-radius: 6px;
    overflow: hidden;
    background: var(--white);
    box-shadow: 0 2px 12px rgba(58, 48, 40, 0.06);
    transition: transform 0.3s, box-shadow 0.3s, opacity 0.6s ease;
    opacity: 0;
    transform: translateY(20px);
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(58, 48, 40, 0.12);
}

.project-card-image {
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.project-card:hover .project-card-image img {
    transform: scale(1.04);
}

.project-card-info {
    padding: 1.25rem 1.5rem;
}

.project-card-info h3 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.project-card-client {
    font-size: 0.85rem;
    color: var(--terracotta);
    font-weight: 500;
    letter-spacing: 0.03em;
}

.gallery-heading {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* ---- Gallery ---- */

.gallery {
    columns: 3;
    column-gap: 1.25rem;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 1.25rem;
    border-radius: 4px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.02);
    filter: brightness(1.03);
}

/* ---- About ---- */

.about {
    background: var(--white);
    max-width: none;
    padding: 6rem 3rem;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 3rem;
}

.about-photo {
    flex-shrink: 0;
}

.about-photo img {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 30px rgba(58, 48, 40, 0.1);
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.about-rep {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--cream-dark);
    color: var(--text) !important;
    font-size: 1rem !important;
}

.about-rep strong {
    color: var(--terracotta);
}

/* ---- Clients ---- */

.clients-logos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    align-items: center;
    justify-items: center;
}

.client-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: filter 0.3s, opacity 0.3s;
}

.client-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.client-logo img {
    max-width: 160px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* ---- Contact ---- */

.contact {
    text-align: center;
    padding: 6rem 3rem 4rem;
}

.contact .section-title::after {
    margin-left: auto;
    margin-right: auto;
}

.contact p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

.contact-email {
    display: inline-block;
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    color: var(--terracotta);
    text-decoration: none;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.contact-email:hover {
    border-bottom-color: var(--terracotta);
}

.contact-social {
    margin-top: 1.5rem;
}

.contact-instagram {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s;
}

.contact-instagram:hover {
    color: var(--terracotta);
}

/* ---- Footer ---- */

.footer {
    text-align: center;
    padding: 2rem 3rem;
    border-top: 1px solid var(--cream-dark);
}

.footer p {
    font-size: 0.85rem;
    color: var(--text-light);
    letter-spacing: 0.02em;
}

/* ---- Lightbox ---- */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(42, 36, 30, 0.92);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    cursor: pointer;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--cream);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

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

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--cream);
    font-size: 3rem;
    cursor: pointer;
    padding: 1rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

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

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

/* ---- Mobile Menu ---- */

.menu-open .nav-links {
    display: flex;
}

.menu-open .nav-toggle span:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}

.menu-open .nav-toggle span:last-child {
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ---- Responsive ---- */

@media (max-width: 1024px) {
    .gallery {
        columns: 2;
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .about-photo img {
        width: 160px;
        height: 160px;
    }

    .about-text .section-title::after {
        margin-left: auto;
        margin-right: auto;
    }

    .clients-logos {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .nav {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
    }

    .menu-open .nav-links {
        display: flex;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .nav-toggle {
        display: flex;
        z-index: 101;
    }

    .hero {
        padding: 7rem 1.5rem 3rem;
        min-height: auto;
    }

    .hero-content {
        max-width: none;
    }

    .section {
        padding: 4rem 1.5rem;
    }

    .about {
        padding: 4rem 1.5rem;
    }

    .gallery {
        columns: 1;
        column-gap: 0.75rem;
    }

    .gallery-item {
        margin-bottom: 0.75rem;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .clients-list span {
        font-size: 1rem;
    }

    .clients-list span:not(:last-child)::after {
        margin: 0 0.75rem;
    }
}
