:root {
    --background: #F3F0E8;
    --text: #23261F;
    --accent: #829576;
    --border: rgba(35, 38, 31, 0.16);
    --finance-background: #DCE8D4;
    --finance-text: #253021;
    --soys-background: #11120F;
    --soys-text: #F3F0E8;
    --title-size: clamp(50px, 4.8vw, 78px);
    --body-size: 18px;
}

/* =========================
   БАЗА
========================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    overscroll-behavior-x: none;
}

body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    position: relative;
    touch-action: pan-y pinch-zoom;
    overscroll-behavior-x: none;
    font-family: Arial, sans-serif;
    font-size: var(--body-size);
    background-color: var(--background);
    color: var(--text);
    overflow-x: clip;
}

main {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    overscroll-behavior-x: none;
}

@supports not (overflow: clip) {
    html,
    body,
    main {
        overflow-x: hidden;
    }
}

body.lightbox-open {
    overflow: hidden;
}

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

section,
article,
.container,
.hero-grid,
.stats-grid,
.project-card-inner,
.project-gallery,
.steps-grid,
.about-layout,
.contact-cards {
    min-width: 0;
}

a {
    color: inherit;
}

button {
    font: inherit;
}

.container {
    width: calc(100% - 100px);
    max-width: 1380px;
    margin: 0 auto;
}

h1,
h2 {
    margin: 0;
    font-size: var(--title-size);
    line-height: 0.95;
    letter-spacing: -0.01em;
}

p {
    margin: 0;
    line-height: 1.55;
}

.meta {
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.68;
}

.cta-button {
    width: fit-content;
    min-height: 58px;
    padding: 0 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 100px;
    background-color: var(--accent);
    color: var(--background);
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    filter: brightness(0.92);
}

.text-link {
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    transition: opacity 0.2s ease;
}

.text-link:hover {
    opacity: 0.55;
}

.section-heading {
    max-width: 900px;
    margin: 0 auto 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
    text-align: center;
}

.section-heading h2 {
    max-width: 900px;
    text-align: center;
}

.section-description {
    max-width: 560px;
    opacity: 0.65;
    text-align: center;
}

.center-action {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}

@media (max-width: 1000px) {
    :root {
        --title-size: clamp(46px, 6.7vw, 66px);
    }
}

@media (max-width: 700px), (max-width: 1100px) and (pointer: coarse) {
    :root {
        --title-size: clamp(34px, 10vw, 40px);
        --body-size: 16px;
    }

    .container {
        width: calc(100% - 36px);
    }

    h1 br {
        display: none;
    }

    .section-heading {
        margin-bottom: 36px;
        gap: 16px;
    }

    .cta-button,
    .project-cta {
        min-height: 56px;
        padding-inline: 22px;
        touch-action: manipulation;
    }
}

/* =========================
   ШАПКА
========================= */

.site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
}

.header-inner {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.logo {
    font-weight: 800;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.site-nav {
    display: flex;
    gap: 32px;
}

.site-nav a {
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.site-nav a:hover {
    opacity: 0.55;
}

@media (max-width: 700px), (max-width: 1100px) and (pointer: coarse) {
    .header-inner {
        min-height: 72px;
    }

    .logo,
    .site-nav a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        touch-action: manipulation;
    }

    .logo {
        min-width: 44px;
    }

    .site-nav {
        gap: 12px;
    }

    .site-nav a {
        padding: 0 4px;
    }

    .site-nav a:nth-child(2),
    .site-nav a:nth-child(3) {
        display: none;
    }
}

/* =========================
   HERO
========================= */

.hero {
    min-height: 100vh;
    padding: 140px 0 70px;
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 70px;
    align-items: center;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
}

.hero-copy h1 {
    max-width: 800px;
}

.hero-copy > p:not(.meta) {
    max-width: 650px;
    opacity: 0.72;
}

.hero-description-mobile {
    display: none;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.hero-person {
    width: 100%;
    max-width: 430px;
    justify-self: end;
}

.hero-photo-wrapper {
    position: relative;
    isolation: isolate;
}

.hero-photo-wrapper::before {
    content: "";
    position: absolute;
    inset: -22px;
    background-image: url("images/me.jpg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    filter: blur(34px);
    opacity: 0.34;
    transform: scale(1.04);
    z-index: -2;
}

.hero-photo-wrapper::after {
    content: "";
    position: absolute;
    inset: -12px;
    background: radial-gradient(
        ellipse at center,
        transparent 56%,
        rgba(243, 240, 232, 0.12) 70%,
        rgba(243, 240, 232, 0.48) 87%,
        rgba(243, 240, 232, 0.92) 100%
    );
    pointer-events: none;
    z-index: 2;
}

.hero-photo {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    filter: drop-shadow(0 18px 35px rgba(35, 38, 31, 0.14));
    -webkit-mask-image: radial-gradient(
        ellipse at center,
        black 60%,
        rgba(0, 0, 0, 0.95) 76%,
        rgba(0, 0, 0, 0.45) 91%,
        transparent 100%
    );
    mask-image: radial-gradient(
        ellipse at center,
        black 60%,
        rgba(0, 0, 0, 0.95) 76%,
        rgba(0, 0, 0, 0.45) 91%,
        transparent 100%
    );
}

.hero-person-info {
    margin-top: 24px;
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    gap: 30px;
    border-top: 1px solid var(--border);
}

.hero-person-info span {
    text-align: right;
    opacity: 0.65;
}

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

    .hero-person {
        justify-self: center;
    }
}

@media (max-width: 700px), (max-width: 1100px) and (pointer: coarse) {
    .hero {
        min-height: auto;
        padding: 104px 0 64px;
    }

    .hero-grid {
        gap: 36px;
    }

    .hero-copy {
        gap: 22px;
    }

    .hero-copy h1 {
        max-width: 100%;
        line-height: 0.98;
    }

    .hero-description-desktop {
        display: none;
    }

    .hero-description-mobile {
        display: block;
        max-width: 340px;
    }

    .hero-actions {
        width: 100%;
    }

    .hero-actions .cta-button {
        width: 100%;
        min-height: 56px;
    }

    .hero-actions .text-link {
        display: none;
    }

    .hero-person {
        max-width: 300px;
        justify-self: center;
    }

    .hero-person-info {
        margin-top: 18px;
        padding-top: 14px;
        justify-content: center;
    }

    .hero-person-info strong {
        width: 100%;
        text-align: center;
    }

    .hero-person-info span {
        display: none;
    }
}

/* =========================
   З ЧИМ Я ПРАЦЮЮ
========================= */

.stats-section {
    padding: 100px 0 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stats-heading {
    margin-bottom: 55px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    text-align: center;
}

.stats-heading h2 {
    max-width: 700px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--border);
}

.stat {
    min-height: 160px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat:nth-child(2n) {
    border-right: none;
}

.stat:nth-child(3),
.stat:nth-child(4) {
    border-bottom: none;
}

.stat strong {
    font-size: clamp(36px, 3.8vw, 60px);
    line-height: 0.96;
    letter-spacing: -0.01em;
    text-align: center;
}

@media (max-width: 700px), (max-width: 1100px) and (pointer: coarse) {
    .stats-section {
        padding-top: 64px;
    }

    .stats-heading {
        margin-bottom: 32px;
        gap: 16px;
    }

    .stat {
        min-height: 96px;
        padding: 18px 12px;
    }

    .stat strong {
        font-size: 26px;
    }
}

/* =========================
   ПРОЄКТИ
========================= */

.projects-section {
    padding-top: 110px;
    border-top: 1px solid var(--border);
}

.projects-intro .section-heading {
    margin-bottom: 90px;
}

.project-card {
    --project-background: var(--background);
    --project-text: var(--text);
    --project-border: rgba(35, 38, 31, 0.16);
    --project-button: var(--accent);
    --project-button-text: var(--background);
    --project-nav-background: rgba(35, 38, 31, 0.9);
    --project-nav-text: var(--background);
    padding: 95px 0;
    background-color: var(--project-background);
    color: var(--project-text);
}

.project-card--finance {
    --project-background: var(--finance-background);
    --project-text: var(--finance-text);
    --project-border: rgba(37, 48, 33, 0.18);
    --project-button: #64785C;
    --project-button-text: #F3F0E8;
    --project-nav-background: rgba(37, 48, 33, 0.9);
    --project-nav-text: #F3F0E8;
}

.project-card--soys {
    --project-background: var(--soys-background);
    --project-text: var(--soys-text);
    --project-border: rgba(243, 240, 232, 0.18);
    --project-button: var(--accent);
    --project-button-text: var(--background);
    --project-nav-background: rgba(243, 240, 232, 0.92);
    --project-nav-text: #11120F;
}

.project-card-top {
    max-width: 900px;
    margin: 0 auto 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    text-align: center;
}

.project-title {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.project-title h2 {
    max-width: 850px;
    text-align: center;
}

.project-description {
    max-width: 620px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
    text-align: center;
}

.project-description > p {
    opacity: 0.7;
}

.project-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 22px;
}

.project-cta {
    min-height: 58px;
    padding: 0 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 100px;
    background-color: var(--project-button);
    color: var(--project-button-text);
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.project-cta:hover {
    transform: translateY(-2px);
    filter: brightness(0.92);
}

.project-text-link {
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    transition: opacity 0.2s ease;
}

.project-text-link:hover {
    opacity: 0.55;
}

.project-specs {
    margin-bottom: 55px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--project-border);
    border-bottom: 1px solid var(--project-border);
}

.project-specs > div {
    min-height: 155px;
    padding: 24px;
    border-right: 1px solid var(--project-border);
}

.project-specs > div:last-child {
    border-right: none;
}

.project-specs strong {
    display: block;
    margin-bottom: 18px;
}

.project-specs p {
    opacity: 0.66;
}

.project-gallery {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.gallery-stage {
    position: relative;
    width: 100%;
    height: clamp(360px, 42vw, 560px);
    overflow: hidden;
    border: 1px solid var(--project-border);
    background-color: rgba(255, 255, 255, 0.055);
}

.gallery-stage.is-swiping {
    cursor: grabbing;
}

.project-card--finance .gallery-stage {
    background-color: rgba(243, 240, 232, 0.45);
}

.project-card--soys .gallery-stage {
    background-color: rgba(255, 255, 255, 0.025);
}

.gallery-stage-button {
    width: 100%;
    height: 100%;
    padding: 0;
    display: block;
    overflow: hidden;
    border: none;
    background: transparent;
    cursor: zoom-in;
}

.gallery-stage-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.18s ease;
}

.gallery-stage-button:hover img {
    transform: scale(1.025);
}

.gallery-stage-button img.is-switching {
    opacity: 0;
    transform: scale(0.99);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background-color: var(--project-nav-background);
    color: var(--project-nav-text);
    cursor: pointer;
    transform: translateY(-50%);
    z-index: 3;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.gallery-nav:hover {
    transform: translateY(-50%) scale(1.07);
}

.gallery-nav-prev {
    left: 18px;
}

.gallery-nav-next {
    right: 18px;
}

.gallery-info {
    min-height: 62px;
    padding: 18px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-bottom: 1px solid var(--project-border);
}

.gallery-info p {
    width: 100%;
    font-weight: 700;
    text-align: center;
}

.gallery-mobile-hint {
    display: none;
}

.gallery-thumbnails {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 155px));
    gap: 12px;
}

.gallery-thumb {
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--project-border);
    background: transparent;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.gallery-thumb:hover {
    opacity: 0.82;
    transform: translateY(-2px);
}

.gallery-thumb.is-active {
    opacity: 1;
    border-color: currentColor;
}

.gallery-thumb img {
    width: 100%;
    height: 86px;
    object-fit: cover;
}

@media (max-width: 1000px) {
    .project-specs {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-specs > div:nth-child(2) {
        border-right: none;
    }

    .project-specs > div:nth-child(1),
    .project-specs > div:nth-child(2) {
        border-bottom: 1px solid var(--project-border);
    }

    .gallery-stage {
        height: clamp(330px, 52vw, 500px);
    }
}

@media (max-width: 700px), (max-width: 1100px) and (pointer: coarse) {
    .projects-section {
        padding-top: 64px;
    }

    .projects-intro .section-heading {
        margin-bottom: 40px;
    }

    .project-card {
        padding: 52px 0;
    }

    .project-card-top {
        margin-bottom: 28px;
        gap: 20px;
    }

    .project-description {
        width: 100%;
        gap: 20px;
    }

    .project-description > p {
        max-width: 330px;
    }

    .project-actions {
        width: 100%;
        flex-direction: column;
        gap: 0;
    }

    .project-cta {
        width: 100%;
        min-height: 56px;
    }

    .project-actions .project-text-link,
    .project-specs {
        display: none;
    }

    .project-card,
    .project-card-inner,
    .project-gallery,
    .gallery-stage,
    .gallery-stage-button {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .project-gallery {
        overflow: hidden;
    }

    .gallery-stage {
        width: 100%;
        max-width: 100%;
        height: clamp(230px, 66vw, 320px);
        overflow: hidden;
        touch-action: pan-y pinch-zoom;
        user-select: none;
        -webkit-user-select: none;
        overscroll-behavior: contain;
    }

    .gallery-stage-button {
        touch-action: pan-y pinch-zoom;
        user-select: none;
        -webkit-user-select: none;
    }

    .gallery-stage-button img {
        pointer-events: none;
        user-select: none;
        -webkit-user-select: none;
        -webkit-user-drag: none;
    }

    .gallery-stage-button:hover img {
        transform: none;
    }

    .gallery-nav {
        width: 48px;
        height: 48px;
        font-weight: 700;
    }

    .gallery-nav-prev {
        left: 10px;
    }

    .gallery-nav-next {
        right: 10px;
    }

    .gallery-info {
        min-height: 58px;
        padding: 14px 0;
        justify-content: center;
        gap: 12px;
        min-width: 0;
        text-align: center;
    }

    .gallery-info p {
        width: 100%;
        min-width: 0;
        text-align: center;
        overflow-wrap: anywhere;
    }

    .gallery-mobile-hint {
        display: none;
    }

    .gallery-thumbnails {
        margin-top: 12px;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 2px;
    }

    .gallery-thumb {
        width: 36px;
        height: 36px;
        padding: 0;
        display: grid;
        place-items: center;
        border: none;
        border-radius: 50%;
        opacity: 1;
        touch-action: manipulation;
    }

    .gallery-thumb::before {
        content: "";
        width: 10px;
        height: 10px;
        border: 1px solid currentColor;
        border-radius: 50%;
        opacity: 0.35;
    }

    .gallery-thumb:hover {
        transform: none;
    }

    .gallery-thumb.is-active {
        background: transparent;
    }

    .gallery-thumb.is-active::before {
        background-color: currentColor;
        opacity: 1;
    }

    .gallery-thumb img {
        display: none;
    }
}

/* =========================
   НАВИЧКИ
========================= */

.skills-section {
    padding: 110px 0;
    border-top: 1px solid var(--border);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.step-card {
    min-height: 390px;
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-right: 1px solid var(--border);
}

.step-card:last-child {
    border-right: none;
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.step-content h2 {
    font-size: clamp(46px, 4vw, 66px);
    line-height: 0.96;
    letter-spacing: -0.01em;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-items span {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 100px;
    white-space: nowrap;
}

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

    .step-card {
        min-height: 270px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .step-card:last-child {
        border-bottom: none;
    }
}

@media (max-width: 700px), (max-width: 1100px) and (pointer: coarse) {
    .skills-section {
        padding: 64px 0;
    }

    .skills-section .section-heading {
        margin-bottom: 32px;
    }

    .skills-section .section-description {
        display: none;
    }

    .step-card {
        min-height: auto;
        padding: 22px 0;
    }

    .step-content {
        gap: 14px;
    }

    .step-content h2 {
        font-size: 26px;
    }

    .skill-items {
        gap: 8px;
    }

    .skill-items span {
        padding: 8px 12px;
    }

    .skills-section .center-action {
        margin-top: 30px;
    }

    .skills-section .cta-button {
        width: 100%;
    }
}

/* =========================
   ПРО МЕНЕ
========================= */

.about-section {
    padding: 110px 0;
    border-top: 1px solid var(--border);
}

.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: stretch;
}

.about-facts,
.about-details {
    border-top: 1px solid var(--border);
}

.about-facts > div,
.about-details > div {
    min-height: 120px;
    padding: 22px 0;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.about-facts > div {
    justify-content: space-between;
    gap: 30px;
}

.about-facts strong,
.about-facts p {
    font-size: var(--body-size);
}

.about-facts p {
    text-align: right;
    opacity: 0.62;
}

.about-details p {
    max-width: 590px;
    font-size: var(--body-size);
    line-height: 1.55;
    opacity: 0.72;
}

@media (max-width: 1000px) {
    .about-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 700px), (max-width: 1100px) and (pointer: coarse) {
    .about-section {
        padding: 64px 0;
    }

    .about-section .section-heading {
        margin-bottom: 32px;
    }

    .about-layout {
        display: block;
    }

    .about-details {
        display: none;
    }

    .about-facts > div {
        min-height: auto;
        padding: 18px 0;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    .about-facts p {
        max-width: 145px;
        text-align: right;
    }
}

/* =========================
   ДОСВІД
========================= */

.experience-section {
    padding: 110px 0;
    border-top: 1px solid var(--border);
}

.experience-list {
    border-top: 1px solid var(--border);
}

.experience-list article {
    min-height: 120px;
    padding: 28px 15px;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 40px;
    align-items: center;
    border-bottom: 1px solid var(--border);
    transition: padding 0.2s ease, opacity 0.2s ease;
}

.experience-list article:hover {
    padding-left: 25px;
    padding-right: 25px;
    opacity: 0.7;
}

.experience-list article > p {
    opacity: 0.65;
}

@media (max-width: 700px), (max-width: 1100px) and (pointer: coarse) {
    .experience-section {
        display: none;
    }
}

/* =========================
   КОНТАКТИ
========================= */

.contact-cards {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    border: none;
    transform: translateY(-70px);
}

.contact-card {
    width: 100%;
    min-height: 135px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 1px solid var(--border);
    background-color: var(--background);
    color: var(--text);
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.contact-card strong,
.contact-card span {
    display: block;
    text-align: center;
}

.contact-card strong {
    color: inherit;
}

.contact-card span {
    color: inherit;
    opacity: 0.62;
}

.contact-card:hover {
    background-color: var(--text);
    color: var(--background);
    transform: translateY(-4px);
}

@media (max-width: 1000px) {
    .contact-cards {
        grid-template-columns: 1fr 1fr;
        transform: translateY(-40px);
    }
}

@media (max-width: 700px), (max-width: 1100px) and (pointer: coarse) {
    .contact-cards {
        width: calc(100% - 36px);
        max-width: 520px;
        margin: 64px auto;
        grid-template-columns: 1fr;
        gap: 12px;
        transform: none;
    }

    .contact-card {
        min-height: 96px;
        padding: 18px 20px;
        gap: 8px;
        touch-action: manipulation;
    }
}

/* =========================
   FOOTER
========================= */

footer {
    border-top: 1px solid var(--border);
}

.footer-inner {
    min-height: 90px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    opacity: 0.62;
}

@media (max-width: 700px), (max-width: 1100px) and (pointer: coarse) {
    .footer-inner {
        min-height: 104px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 6px;
        text-align: center;
    }
}

/* =========================
   LIGHTBOX
========================= */

.lightbox {
    position: fixed;
    inset: 0;
    padding: 40px;
    display: grid;
    grid-template-columns: 70px 1fr 70px;
    gap: 20px;
    align-items: center;
    background-color: rgba(17, 18, 15, 0.97);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.24s ease, visibility 0.24s ease;
    z-index: 1000;
}

.lightbox[hidden] {
    display: none;
}

.lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    width: 100%;
    height: calc(100vh - 80px);
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    opacity: 0;
    transform: translateY(10px) scale(0.965);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.lightbox.is-open .lightbox-content {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.lightbox-content img {
    width: 100%;
    max-height: calc(100vh - 140px);
    object-fit: contain;
    opacity: 1;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.lightbox-content img.is-switching {
    opacity: 0;
    transform: scale(0.985);
}

.lightbox-content figcaption {
    color: var(--background);
}

.lightbox-close,
.lightbox-arrow {
    border: 1px solid rgba(243, 240, 232, 0.3);
    background: transparent;
    color: var(--background);
    cursor: pointer;
    opacity: 0;
    transition: background-color 0.2s ease, color 0.2s ease, opacity 0.3s ease;
}

.lightbox.is-open .lightbox-close,
.lightbox.is-open .lightbox-arrow {
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 28px;
}

.lightbox-arrow {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    font-size: 24px;
}

.lightbox-close:hover,
.lightbox-arrow:hover {
    background-color: var(--background);
    color: var(--text);
}

@media (max-width: 700px), (max-width: 1100px) and (pointer: coarse) {
    .lightbox {
        padding: 18px;
        grid-template-columns: 1fr;
    }

    .lightbox-close,
    .lightbox-arrow {
        width: 52px;
        height: 52px;
        font-size: 26px;
        touch-action: manipulation;
    }

    .lightbox-close {
        top: 18px;
        right: 18px;
    }

    .lightbox-arrow {
        position: absolute;
        bottom: 18px;
    }

    .lightbox-prev {
        left: 18px;
    }

    .lightbox-next {
        right: 18px;
    }

    .lightbox-content {
        height: calc(100vh - 116px);
    }

    .lightbox-content figcaption {
        padding-bottom: 58px;
    }
}


@media (max-width: 360px) {
    .container,
    .contact-cards {
        width: calc(100% - 28px);
    }

    .site-nav {
        gap: 6px;
    }

    .gallery-info {
        gap: 8px;
    }

    .gallery-mobile-hint {
        white-space: normal;
        text-align: right;
    }

    .about-facts > div {
        gap: 10px;
    }
}

/* =========================
   REDUCED MOTION
========================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
