* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f2ed;
    color: #111;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}


/* HEADER */

.site-header {
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    padding: 28px 5vw;

    display: flex;
    justify-content: space-between;
    align-items: center;

    z-index: 10;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.18em;

    text-decoration: none;
}

nav {
    display: flex;
    gap: 32px;
}

nav a {
    text-decoration: none;
    font-size: 14px;
}


/* HERO */

.hero {
    min-height: 100vh;

    display: flex;
    align-items: flex-end;

    padding: 130px 5vw 8vh;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
}

.hero h1 {
    margin: 15px 0 25px;

    font-size: clamp(60px, 11vw, 170px);
    line-height: 0.85;
    letter-spacing: -0.055em;
    font-weight: 500;
}

.intro {
    max-width: 480px;

    font-size: 18px;
    line-height: 1.6;
}


/* SECTIONS */

.portfolio,
.about,
.contact {
    padding: 100px 5vw;
}

.section-heading {
    margin-bottom: 50px;
}

.section-heading p,
.contact > p {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 11px;
}

.section-heading h2,
.contact h2 {
    margin: 10px 0;

    font-size: clamp(38px, 6vw, 80px);
    font-weight: 500;
}


/* JUSTIFIED GALLERY */

.gallery {
    display: block;
}

.gallery-row {
    display: flex;
    align-items: flex-start;

    gap: 16px;

    margin-bottom: 28px;
}

.gallery-item {
    flex: 0 0 auto;

    min-width: 0;

    cursor: pointer;
}

.gallery-item img {
    display: block;

    width: 100%;

    object-fit: contain;
}

.gallery-title {
    margin: 9px 0 0;

    font-size: 13px;
    line-height: 1.3;
}


/* ABOUT */

.about {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 5vw;
}

.about-text {
    align-self: end;

    max-width: 600px;

    font-size: 24px;
    line-height: 1.5;
}


/* CONTACT */

.contact {
    min-height: 65vh;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact a {
    margin-top: 25px;

    font-size: clamp(20px, 3vw, 40px);
}


/* FOOTER */

footer {
    padding: 30px 5vw 50px;

    font-size: 12px;
}


/* LIGHTBOX */

.lightbox {
    position: fixed;

    inset: 0;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 4vw;

    background: rgba(0, 0, 0, 0.94);

    z-index: 100;
}

.lightbox.open {
    display: flex;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;

    max-width: 95vw;
    max-height: 94vh;
}

.lightbox-content img {
    max-width: 95vw;
    max-height: 86vh;

    object-fit: contain;
}

.lightbox-meta {
    width: 100%;

    display: flex;
    justify-content: space-between;

    gap: 30px;

    margin-top: 12px;

    color: rgba(255, 255, 255, 0.85);

    font-size: 13px;
    letter-spacing: 0.04em;
}

#lightbox-counter {
    white-space: nowrap;

    color: rgba(255, 255, 255, 0.55);
}


/* LIGHTBOX CLOSE */

.lightbox-close {
    position: absolute;

    top: 20px;
    right: 25px;

    border: 0;

    background: transparent;
    color: white;

    font-size: 42px;

    cursor: pointer;

    z-index: 120;
}


/* LIGHTBOX NAVIGATION */

.lightbox-nav {
    position: absolute;

    top: 50%;

    transform: translateY(-50%);

    width: 60px;
    height: 90px;

    border: 0;

    background: rgba(0, 0, 0, 0.25);
    color: white;

    font-size: 60px;
    line-height: 1;

    cursor: pointer;

    z-index: 110;

    transition: background 0.2s ease;
}

.lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.55);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}


/* MOBILE */

/* VISUAL REFINEMENT */

body {
    background: #f2f0ea;
}

.hero {
    position: relative;

    min-height: 100svh;

    display: flex;
    align-items: flex-end;

    padding: 130px 5vw 10vh;

    overflow: hidden;

    color: white;
}

.hero-media {
    position: absolute;
    inset: 0;

    z-index: 0;
}

.hero-media img {
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center top;

    display: block;
}

.hero-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, 0.65) 0%,
            rgba(0, 0, 0, 0.25) 45%,
            rgba(0, 0, 0, 0.10) 100%
        );

    z-index: 1;
}

.hero-copy {
    position: relative;

    z-index: 2;

    max-width: 1600px;
}

.hero h1 {
    max-width: 1500px;

    margin: 18px 0 34px;

    font-size: clamp(72px, 12vw, 190px);
    line-height: 0.82;
    letter-spacing: -0.065em;
    font-weight: 500;
}

.hero .intro {
    max-width: 520px;

    font-size: 19px;
    line-height: 1.65;

    color: rgba(255, 255, 255, 0.82);
}

.hero-link {
    display: inline-block;

    margin-top: 30px;

    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.16em;

    color: white;
    text-decoration: none;

    border-bottom: 1px solid rgba(255, 255, 255, 0.8);

    padding-bottom: 5px;
}

.hero .eyebrow {
    color: rgba(255, 255, 255, 0.8);
}

.section-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    gap: 40px;
}

.section-note {
    max-width: 320px;

    margin: 0 0 8px;

    font-size: 14px;
    line-height: 1.5;

    color: rgba(17, 17, 17, 0.55);
}

/* ABOUT */

.about {
    min-height: 80vh;

    display: grid;
    grid-template-columns: 0.8fr 1.2fr;

    gap: 8vw;

    align-items: start;
}

.about-content {
    max-width: 760px;

    align-self: center;
}

.about-lead {
    margin: 0 0 36px;

    font-size: clamp(28px, 3vw, 46px);
    line-height: 1.25;
    letter-spacing: -0.025em;

    color: #111;
}

.about-copy {
    max-width: 580px;

    margin: 0;

    font-size: 17px;
    line-height: 1.75;

    color: rgba(17, 17, 17, 0.65);
}

.about-details {
    margin-top: 60px;
    padding-top: 24px;

    border-top: 1px solid rgba(17, 17, 17, 0.15);

    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 25px;
}

.about-details div {
    display: flex;
    flex-direction: column;

    gap: 8px;
}

.about-details span {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.16em;

    color: rgba(17, 17, 17, 0.45);
}

.about-details strong {
    font-size: 14px;
    font-weight: 500;
}

.contact {
    min-height: 75vh;
}

.contact h2 {
    max-width: 1100px;

    font-size: clamp(58px, 9vw, 140px);
    line-height: 0.9;
    letter-spacing: -0.05em;
}

.contact-text {
    margin: 30px 0 0;

    font-size: 15px;

    color: rgba(17, 17, 17, 0.6);
}

.contact-email {
    display: inline-block;

    width: fit-content;

    margin-top: 18px;

    font-size: clamp(22px, 3vw, 42px);

    text-decoration-thickness: 1px;
    text-underline-offset: 6px;
}

footer {
    border-top: 1px solid rgba(17, 17, 17, 0.12);
}

/* HEADER / NAV */

.site-header {
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;

    padding: 28px 5vw;

    display: flex;
    justify-content: space-between;
    align-items: center;

    z-index: 20;

    color: white;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.18em;

    text-decoration: none;
}

.site-nav {
    display: flex;
    gap: 30px;
}

.site-nav a {
    position: relative;

    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;

    text-decoration: none;

    color: rgba(255, 255, 255, 0.88);
}

.site-nav a::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: -6px;

    width: 0;
    height: 1px;

    background: white;

    transition: width 0.2s ease;
}

.site-nav a:hover::after {
    width: 100%;
}


/* CONTACT */

.contact {
    min-height: 80vh;

    display: flex;
    align-items: center;

    padding-top: 120px;
    padding-bottom: 120px;

    border-top: 1px solid rgba(17, 17, 17, 0.12);
}

.contact-inner {
    max-width: 1150px;
}

.contact h2 {
    margin: 14px 0 34px;

    font-size: clamp(62px, 9vw, 145px);
    line-height: 0.86;
    letter-spacing: -0.055em;

    font-weight: 500;
}

.contact-text {
    max-width: 520px;

    margin: 0;

    font-size: 17px;
    line-height: 1.7;

    color: rgba(17, 17, 17, 0.62);
}

.contact-email {
    display: inline-block;

    margin-top: 36px;

    font-size: clamp(24px, 3vw, 42px);

    text-decoration-thickness: 1px;
    text-underline-offset: 7px;
}


/* FOOTER */

.site-footer {
    padding: 28px 5vw 40px;

    border-top: 1px solid rgba(17, 17, 17, 0.12);

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 30px;

    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;

    color: rgba(17, 17, 17, 0.5);
}

.site-footer a {
    text-decoration: none;
}

.site-footer a:hover {
    color: #111;
}

/* POLISHING */

/* Плавное появление контента */
.hero-copy,
.section-heading,
.about-content,
.contact-inner,
.site-footer {
    animation: fade-up 0.7s ease both;
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Галерея */

.gallery-item {
    overflow: hidden;
}

.gallery-item img {
    transition:
        transform 0.35s ease,
        opacity 0.25s ease;
}

.gallery-item:hover img {
    transform: scale(1.015);
}

.gallery-item:hover .gallery-title {
    opacity: 0.65;
}

.gallery-title {
    transition: opacity 0.2s ease;
}


/* HERO LINK */

.hero-link {
    transition:
        opacity 0.2s ease,
        border-color 0.2s ease;
}

.hero-link:hover {
    opacity: 0.7;
}


/* EMAIL */

.contact-email {
    transition: opacity 0.2s ease;
}

.contact-email:hover {
    opacity: 0.55;
}


/* Более приятное выделение текста */

::selection {
    background: #111;
    color: #fff;
}

@media (max-width: 700px) {

    .site-header {
        padding: 22px 20px;
    }

    .site-nav {
        gap: 15px;
    }

    .site-nav a {
        font-size: 10px;
        letter-spacing: 0.08em;
    }


    /* CONTACT MOBILE */

    .contact {
        min-height: auto;

        padding-top: 90px;
        padding-bottom: 90px;
    }

    .contact h2 {
        font-size: clamp(58px, 17vw, 90px);
    }

    .contact-text {
        font-size: 16px;
    }

    .contact-email {
        margin-top: 28px;

        font-size: 22px;

        word-break: break-word;
    }


    /* FOOTER MOBILE */

    .site-footer {
        padding: 25px 20px 35px;

        flex-direction: column;
        align-items: flex-start;

        gap: 14px;

        font-size: 10px;
    }

    nav {
        gap: 14px;
    }

    nav a {
        font-size: 12px;
    }


    /* HERO */

    .hero {
        min-height: 100svh;

        padding:
            110px 20px
            8vh;
    }

    .hero h1 {
        font-size: clamp(62px, 20vw, 105px);
    }

    .hero .intro {
        font-size: 16px;
        line-height: 1.55;
    }

    .hero-overlay {
        background:
            linear-gradient(
                to top,
                rgba(0, 0, 0, 0.72) 0%,
                rgba(0, 0, 0, 0.30) 55%,
                rgba(0, 0, 0, 0.12) 100%
            );
    }

    .hero {
        padding-left: 20px;
        padding-right: 20px;
    }

    .section-heading-row {
        display: block;
    }

    .section-note {
    margin-top: 20px;
    }

    .about-lead {
        font-size: 28px;
    }

    .contact h2 {
        font-size: clamp(56px, 17vw, 90px);
    }


    /* SECTIONS */

    .portfolio,
    .about,
    .contact {
        padding: 75px 20px;
    }


    /* MOBILE GALLERY */

    .gallery {
        display: block;
    }

    .gallery-row {
        display: block;

        margin-bottom: 0;
    }

    .gallery-item {
        width: 100% !important;

        height: auto;

        margin-bottom: 45px;
    }

    .gallery-item:hover img {
        transform: none;
    }

    .gallery-item img {
        width: 100%;

        height: auto !important;

        max-height: none;

        object-fit: contain;
    }

    .gallery-title {
        margin-top: 10px;

        font-size: 13px;
    }


    /* ABOUT */

    .about {
        display: block;
        min-height: auto;
    }

    .about-content {
        margin-top: 45px;
    }

    .about-lead {
        font-size: 28px;
    }

    .about-copy {
        font-size: 16px;
    }

    .about-details {
        margin-top: 45px;

        grid-template-columns: 1fr;

        gap: 24px;
    }


    /* LIGHTBOX */

    .lightbox {
        padding: 15px;
    }

    .lightbox-content {
        max-width: 100%;
        max-height: 95vh;
    }

    .lightbox-content img {
        max-width: 100%;
        max-height: 82vh;
    }

    .lightbox-meta {
        padding: 0 5px;

        font-size: 12px;
    }

    .lightbox-nav {
        width: 48px;
        height: 70px;

        font-size: 48px;
    }

    .lightbox-prev {
        left: 5px;
    }

    .lightbox-next {
        right: 5px;
    }

    .lightbox-close {
        top: 10px;
        right: 15px;

        font-size: 38px;
    }
}

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}