/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --white: #ffffff;
    --accent-blue: #3498db;

    --color-bg: var(--white);
    --color-surface: var(--white);
    --color-border: rgba(0, 0, 0, 0.14);
    --color-text: #000000;
    --color-text-muted: rgba(0, 0, 0, 0.7);
    --color-text-faint: rgba(0, 0, 0, 0.56);
    --color-field-bg: #EFEFEF;
    --color-field-text: #000000;

    --color-primary: var(--accent-blue);
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    --max-width: 1400px;
    --transition: all 0.3s ease;
    --theme-transition-duration: 0.8s;

    /* Padding and margins */
    --container-pad: clamp(1rem, 4vw, 3rem);
    --masonry-gap: 1.5rem;

    /* Fonts */
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-display: "Bebas Neue", var(--font-body);

    /* Scroll behavior */
    scroll-behavior: smooth;
    scroll-padding-top: 88px;

    /* Theme-dependent component vars */
    --header-bg: rgba(255, 255, 255, 0.92);
    --brand-logo-light-display: block;
    --brand-logo-dark-display: none;
    --nav-toggle-bg: rgba(0, 0, 0, 0.03);
    --portfolio-related-link-bg: rgba(0, 0, 0, 0.03);
    --portfolio-related-link-hover-bg: rgba(0, 0, 0, 0.06);
    --gallery-item-hover-bg: rgba(0, 0, 0, 0.03);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        /* Dark theme baseline (requested) */
        --color-bg: #222;
        --color-surface: #222;
        --color-border: rgba(255, 255, 255, 0.16);
        --color-text: #ffffff;
        --color-text-muted: rgba(255, 255, 255, 0.76);
        --color-text-faint: rgba(255, 255, 255, 0.6);

        --header-bg: rgba(34, 34, 34, 0.92);
        --brand-logo-light-display: none;
        --brand-logo-dark-display: block;
        --nav-toggle-bg: rgba(255, 255, 255, 0.04);
        --portfolio-related-link-bg: rgba(255, 255, 255, 0.05);
        --portfolio-related-link-hover-bg: rgba(255, 255, 255, 0.08);
        --gallery-item-hover-bg: rgba(255, 255, 255, 0.05);
    }
}

:root[data-theme="dark"] {
    /* Dark theme baseline (requested) */
    --color-bg: #222;
    --color-surface: #222;
    --color-border: rgba(255, 255, 255, 0.16);
    --color-text: #ffffff;
    --color-text-muted: rgba(255, 255, 255, 0.76);
    --color-text-faint: rgba(255, 255, 255, 0.6);

    --header-bg: rgba(34, 34, 34, 0.92);
    --brand-logo-light-display: none;
    --brand-logo-dark-display: block;
    --nav-toggle-bg: rgba(255, 255, 255, 0.04);
    --portfolio-related-link-bg: rgba(255, 255, 255, 0.05);
    --portfolio-related-link-hover-bg: rgba(255, 255, 255, 0.08);
    --gallery-item-hover-bg: rgba(255, 255, 255, 0.05);

    --project-block-bg: rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] {
    --color-bg: var(--white);
    --color-surface: var(--white);
    --color-border: rgba(0, 0, 0, 0.14);
    --color-text: #000000;
    --color-text-muted: rgba(0, 0, 0, 0.7);
    --color-text-faint: rgba(0, 0, 0, 0.56);

    --header-bg: rgba(255, 255, 255, 0.92);
    --brand-logo-light-display: block;
    --brand-logo-dark-display: none;
    --nav-toggle-bg: rgba(0, 0, 0, 0.03);
    --portfolio-related-link-bg: rgba(0, 0, 0, 0.03);
    --portfolio-related-link-hover-bg: rgba(0, 0, 0, 0.06);
    --gallery-item-hover-bg: rgba(0, 0, 0, 0.03);

    --project-block-bg: rgba(0, 0, 0, 0.05);
}

/* Theme switch smoothness (CSS-only) */
*,
*::before,
*::after {
    transition-property: color, background-color, border-color, background, filter;
    transition-duration: var(--theme-transition-duration);
    transition-timing-function: ease;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
    }
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-inline: var(--container-pad);
}

/* Links + Buttons */
a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
    text-decoration-color: rgba(52, 152, 219, 0.55);
}

a:hover {
    color: #2980b9;
    text-decoration-thickness: 2px;
    text-decoration-color: rgba(52, 152, 219, 0.85);
}

a:focus-visible {
    outline: 2px solid rgba(52, 152, 219, 0.65);
    outline-offset: 3px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.1rem;
    border-radius: 0;
    border: 1px solid var(--color-border);
    transition: var(--transition);
    font-weight: 500;
    text-decoration: none;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--white);
    border-color: transparent;
}

.btn-primary:hover {
    filter: brightness(1.05);
}

.btn:hover {
    text-decoration: none;
}

/* Header + Primary nav */
.site-header {
    position: relative;
    background: var(--color-bg);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding-block: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
}

.container.header-inner {
    max-width: none;
}

.header-cluster {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: nowrap;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    flex-shrink: 0;
}

.header-nav--left {
    justify-content: flex-end;
}

.brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex: 0 0 auto;
    width: 120px;
    height: 120px;
    line-height: 0;
    text-decoration: none;
}

.brand__logo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand__logo--light {
    display: var(--brand-logo-light-display);
}

.brand__logo--dark {
    display: var(--brand-logo-dark-display);
}

.header-nav--right {
    justify-content: flex-start;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.25rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    color: var(--color-text);
    background: rgba(52, 152, 219, 0.12);
}

.social-link:focus-visible {
    outline: 2px solid rgba(52, 152, 219, 0.65);
    outline-offset: 3px;
}

.social-link__icon {
    display: block;
}

.nav-link {
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    padding: 0.5rem 0.3rem;
    border-radius: 0;
    transition: var(--transition);
    text-decoration: none;
}

.nav-link:hover {
    color: var(--color-text);
    background: rgba(52, 152, 219, 0.08);
}

/* Portfolio nav dropdown (native <details>, no JS required) */
.nav-dropdown {
    position: relative;
}

.nav-dropdown__summary {
    list-style: none;
    cursor: pointer;
}

.nav-dropdown__summary::-webkit-details-marker {
    display: none;
}

.nav-dropdown__label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    padding: 0.5rem 0.3rem;
    transition: var(--transition);
}

.nav-dropdown__label::after {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-0.1rem);
    transition: transform 0.2s ease;
}

.social-instagram-dropdown .nav-dropdown__label {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    font-size: 0;
    letter-spacing: 0;
    text-transform: none;
    justify-content: center;
    color: var(--color-text-muted);
}

.social-instagram-dropdown .nav-dropdown__label::after {
    content: none;
}

.nav-dropdown[open] .nav-dropdown__label::after {
    transform: rotate(-135deg) translateY(0.1rem);
}

.nav-dropdown__summary:hover .nav-dropdown__label,
.nav-dropdown[open] .nav-dropdown__summary .nav-dropdown__label {
    color: var(--color-text);
    background: rgba(52, 152, 219, 0.08);
}

.nav-dropdown__summary:focus-visible {
    outline: 2px solid rgba(52, 152, 219, 0.65);
    outline-offset: 3px;
}

.nav-dropdown__panel {
    display: none;
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    min-width: 16rem;
    max-width: min(22rem, 92vw);
    max-height: min(70vh, 28rem);
    overflow: auto;
    padding: 0.65rem 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    z-index: 120;
}

.social-instagram-dropdown .nav-dropdown__panel {
    left: auto;
    right: 0;
    min-width: 16rem;
}

.nav-dropdown[open] .nav-dropdown__panel {
    display: block;
}

.nav-dropdown__link {
    display: block;
    padding: 0.45rem 1rem;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
    text-transform: none;
    color: var(--color-text-muted);
    text-decoration: none;
}

.nav-dropdown__link:hover {
    color: var(--color-text);
    background: rgba(52, 152, 219, 0.08);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    border: 1px solid var(--color-border);
    background: var(--nav-toggle-bg);
    color: var(--color-text);
    border-radius: 0;
    padding: 0.6rem 0.9rem;
    font-weight: 500;
}

/* Main Content */
.main {
    min-height: 60vh;
}

.section {
    padding: var(--spacing-xl) 0;
}

.section-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--spacing-lg);
    align-items: start;
}

.section-grid--about {
    grid-template-columns: 1fr;
    justify-items: start;
    text-align: left;
    max-width: 70ch;
}

.section-media--about {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.about-image {
    width: 200px;
    height: 200px;
    max-width: 200px;
    max-height: 200px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 1px solid var(--color-border);
}

.section-head {
    margin-bottom: var(--spacing-md);
}

.section-title {
    font-family: var(--font-display);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 2.1rem;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.section-lede,
.about-bio p {
    max-width: 70ch;
}

.about-bio {
    max-width: 70ch;
}

.about-bio p + p {
    margin-top: var(--spacing-sm);
}

/* Homepage project previews */
.project-block {
    max-width: min(var(--max-width), 100%);
    padding: var(--spacing-md);
    background-color: var(--project-block-bg);
    margin-bottom: var(--spacing-lg);
}

.project-block:last-child {
    margin-bottom: 0;
}

.project-block:first-child {
    margin-top: var(--spacing-md);
}

.project-block__head {
    max-width: 52ch;
    margin-bottom: var(--spacing-md);
    text-align: left;
}

.project-block__head .btn {
    margin-top: 0.25rem;
}

.project-block__title {
    font-family: var(--font-display);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 1.6rem;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.project-block__lede {
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

/* Column masonry: items pack top-down per column (no top gaps) */
.project-masonry,
.portfolio-masonry {
    column-gap: var(--masonry-gap);
    margin-inline: auto;
}

.project-masonry {
    column-count: 2;
}

.portfolio-masonry {
    column-count: 2;
    max-width: var(--max-width);
}

@media (min-width: 768px) {
    .portfolio-masonry {
        column-count: 4;
    }
}

/* .portfolio-breadcrumb {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.portfolio-breadcrumb a {
    text-decoration: none;
}

.portfolio-breadcrumb :where(a:hover) {
    text-decoration: underline;
} */

/* .portfolio-theme {
    margin-top: 0.5rem;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.portfolio-theme__label {
    font-weight: 600;
    color: var(--color-text);
} */

.portfolio-category-block {
    margin-top: var(--spacing-lg);
}

.portfolio-category-block__title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.portfolio-category-block__title a {
    color: inherit;
    text-decoration: none;
}

.portfolio-category-block__title a:hover {
    color: var(--color-primary);
}

.portfolio-category-block__desc {
    margin-top: 0.35rem;
    color: var(--color-text-muted);
    max-width: 52ch;
}

.portfolio-index--nested {
    margin-top: var(--spacing-sm);
}

.portfolio-index__theme {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.88rem;
    color: var(--color-text-faint);
}

.project-block__category {
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-faint);
    margin-bottom: 0.35rem;
}

.project-block__theme {
    margin: 0.5rem 0 0.75rem;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.portfolio-index {
    list-style: none;
    margin: var(--spacing-md) auto 0;
    padding: 0;
    max-width: 42rem;
    display: grid;
    gap: var(--spacing-sm);
    text-align: left;
}

.portfolio-index__item {
    margin: 0;
}

.portfolio-index__link {
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.portfolio-index__link:hover {
    background: rgba(52, 152, 219, 0.06);
}

.portfolio-index__title {
    font-family: var(--font-display);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 1.25rem;
}

.portfolio-index__desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* 
.portfolio-related {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin: var(--spacing-sm) 0 var(--spacing-lg);
}

.portfolio-related__link {
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--color-border);
    background: var(--portfolio-related-link-bg);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.85rem;
    transition: var(--transition);
    text-decoration: none;
}

.portfolio-related__link:hover {
    background: var(--portfolio-related-link-hover-bg);
    color: var(--color-text);
}

.portfolio-related__link:focus-visible {
    outline: 2px solid rgba(52, 152, 219, 0.65);
    outline-offset: 3px;
} */

/* .portfolio-empty {
    color: var(--color-text-muted);
    max-width: 42ch;
    margin-inline: auto;
} */

/* Gallery links + column masonry */
.gallery-item {
    display: block;
    position: relative;
    width: 100%;
    margin: 0;
    break-inside: avoid;
    border: 0;
    background: transparent;
    transition: var(--transition);
    line-height: 0;
    text-decoration: none;
}

.gallery-item:hover {
    background: var(--gallery-item-hover-bg);
}

.project-masonry .gallery-item,
.portfolio-masonry .gallery-item {
    margin-bottom: var(--masonry-gap);
}

/* Keyboard focus treatment: subtle white inner glow (no border box) */
.gallery-item:focus {
    outline: none;
}

.gallery-item:focus-visible {
    outline: none;
}

.gallery-item:focus-visible::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow:
        inset 0 0 0 2px rgba(255, 255, 255, 0.75),
        inset 0 0 18px rgba(255, 255, 255, 0.35);
}

@media (forced-colors: active) {
    .gallery-item:focus-visible::after {
        box-shadow: none;
    }

    .gallery-item:focus-visible {
        outline: 2px solid Highlight;
        outline-offset: 2px;
    }
}

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

/* Contact */
.contact-form {
    margin-top: var(--spacing-md);
    max-width: 560px;
    display: grid;
    gap: var(--spacing-sm);
}

.field {
    display: grid;
    gap: 0.4rem;
}

.field--hp {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.field-label {
    color: var(--color-text-faint);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.field-input,
.field-textarea {
    width: 100%;
    border: 1px solid var(--color-border);
    background: var(--color-field-bg);
    color: var(--color-field-text);
    padding: 0.85rem 0.9rem;
    font: inherit;
    line-height: 1.4;
}

.field-textarea {
    resize: vertical;
    min-height: 140px;
}

.field-input:focus,
.field-textarea:focus {
    outline: none;
    border-color: rgba(52, 152, 219, 0.55);
}

.form-actions {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.form-recaptcha-disclosure {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--color-text-faint);
}

.form-recaptcha-disclosure a {
    color: inherit;
}

.form-status {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    padding: var(--spacing-md) 0;
    text-align: center;
    margin-top: var(--spacing-xl);
}

.footer-meta {
    margin-top: 0.35rem;
    font-size: 0.9rem;
}

.footer-meta-link {
    text-decoration: none;
    color: var(--color-text-muted);
}

.footer-meta-link:hover {
    text-decoration: underline;
    color: var(--color-primary);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: var(--spacing-xs);
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text-muted);
    font: inherit;
    line-height: 1;
    cursor: pointer;
}

.theme-toggle:hover {
    color: var(--color-text);
    background: rgba(52, 152, 219, 0.08);
}

.theme-toggle:focus-visible {
    outline: 2px solid rgba(52, 152, 219, 0.75);
    outline-offset: 3px;
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        scroll-padding-top: 80px;
    }

    .section-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    /* keep gallery scaling smoothly (no width-based snapping) */
}

@media (max-width: 900px) {
    .header-inner {
        flex-wrap: wrap;
        justify-content: center;
        padding-inline: 3.75rem;
    }

    .header-cluster {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .header-nav--left,
    .header-nav--right {
        display: none;
        width: 100%;
    }

    .nav-toggle {
        display: inline-flex;
        position: absolute;
        right: var(--container-pad);
        top: 12px;
    }

    .header-inner.is-open .header-nav--left {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        order: 2;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
    }

    .header-inner.is-open .header-nav--right {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        order: 3;
        padding-bottom: 0.5rem;
    }

    .header-inner.is-open .brand {
        order: 1;
        width: 100%;
        justify-content: center;
    }

    .header-inner.is-open .social-links {
        margin-left: 0;
        margin-top: 0.25rem;
    }

    .nav-dropdown {
        width: 100%;
    }

    .nav-dropdown__panel {
        position: static;
        max-width: none;
        max-height: none;
        box-shadow: none;
        border: 0;
        padding: 0.25rem 0 0.5rem;
        margin-left: 0.5rem;
    }

    .social-instagram-dropdown .nav-dropdown__panel {
        margin-left: 0;
    }

    .nav-dropdown__summary {
        width: 100%;
    }

    .nav-dropdown__label {
        width: 100%;
        justify-content: space-between;
    }
}

/* Accessibility helpers */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Lightbox (gallery carousel) */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.lightbox__dialog {
    position: relative;
    height: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: clamp(1rem, 4vw, 2rem);
}

.lightbox__stage {
    display: grid;
    place-items: center;
    min-width: 0;
}

.lightbox__image {
    max-width: 96vw;
    max-height: 92vh;
    width: auto;
    height: auto;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.lightbox__close {
    position: absolute;
    top: clamp(0.75rem, 3vw, 1.5rem);
    right: clamp(0.75rem, 3vw, 1.5rem);
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.92);
    padding: 0.6rem 0.8rem;
    cursor: pointer;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.lightbox__nav {
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.92);
    padding: 0.75rem 0.85rem;
    cursor: pointer;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.lightbox__close:hover,
.lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.16);
}

.lightbox__close:focus-visible,
.lightbox__nav:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 3px;
}

@media (max-width: 600px) {
    .lightbox__dialog {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto auto;
        justify-items: center;
    }

    .lightbox__close {
        position: static;
        top: auto;
        right: auto;
        justify-self: end;
        grid-row: 1;
    }

    .lightbox__stage {
        grid-row: 2;
    }

    .lightbox__prev {
        grid-row: 3;
    }

    .lightbox__next {
        grid-row: 4;
    }

    .lightbox__prev,
    .lightbox__next {
        width: 100%;
        max-width: 360px;
        display: inline-flex;
        justify-content: center;
    }
}

