/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    display: grid;
    min-height: 100%;
    grid-template-rows: auto;
    grid-template-columns: 1fr;
    font-family: Arial, Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.2;

    /* Colors */
    --red: #dc2626;
    --black: #000;
    --white: #fff;

    /* Font */
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

    /* Borders */
    --border-thick: 4px;
    --border-thin: 2px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    overflow-x: hidden;
}

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

a {
    color: inherit;
    text-decoration: inherit;
}

h1,
h2,
h3,
p {
    margin: 0;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
}

/* ===== Utility ===== */
.section-border {
    border-bottom: var(--border-thick) solid var(--black);
}

/* ===== Page Wrapper ===== */
.page {
    overflow-x: hidden;
    background-color: var(--white);
    color: var(--black);
    font-family: var(--font-mono);
}

/* ===== Nav ===== */
.nav {
    min-height: 52px;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 50;
    width: 100%;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    background-color: var(--white);
    border-bottom: var(--border-thick) solid var(--black);
}

.nav__logo {
    display: flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    border-right: var(--border-thick) solid var(--black);
}

.nav__logo-text {
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nav__links {
    display: flex;
    align-items: stretch;
}

.nav__link {
    display: flex;
    align-items: center;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.15s ease, background-color 0.15s ease;
    border-left: var(--border-thick) solid var(--black);
}

.nav__link:hover {
    background-color: var(--black);
    color: var(--white);
}

.nav__link--contact {
    background-color: var(--red);
    color: var(--white);
    border-left: var(--border-thick) solid var(--black);
    border-right: var(--border-thick) solid var(--black);
}

.nav__link--contact:hover {
    background-color: var(--black);
}

/* ===== Marquee ===== */
.marquee {
    height: 28px;
    position: fixed;
    left: 0;
    top: 52px;
    z-index: 40;
    width: 100%;
    overflow: hidden;
    background-color: var(--black);
    color: var(--white);
    border-bottom: var(--border-thin) solid var(--red);
}

.marquee--inline {
    position: static;
    height: 44px;
    display: flex;
    border-bottom: var(--border-thick) solid var(--red);
}

.marquee--footer {
    position: static;
    height: 32px;
    border-top: var(--border-thick) solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
}

.marquee__track {
    width: max-content;
    height: 100%;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.marquee__track--top {
    animation: marquee 28s linear infinite;
}

.marquee__track--mid {
    animation: marquee 18s linear infinite;
}

.marquee__track--footer {
    animation: marquee 22s linear infinite;
}

.marquee__text {
    padding-left: 2rem;
    padding-right: 2rem;
    font-size: 0.75rem;
    line-height: 1rem;
    letter-spacing: 0.1em;
    opacity: 0.7;
}

.marquee__text--mid {
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 900;
    opacity: 1;
}

.marquee__text--footer {
    font-size: 10px;
    font-weight: 900;
    opacity: 0.2;
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* ===== Section Header ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 3rem;
    border-bottom: var(--border-thick) solid var(--black);
}

.section-header--dark {
    background-color: var(--black);
    color: var(--white);
}

.section-header--red {
    background-color: var(--red);
    color: var(--white);
}

.section-header__title {
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.section-header__subtitle {
    font-size: 0.75rem;
    line-height: 1rem;
    font-family: var(--font-mono);
    opacity: 0.4;
}

.section-header--red .section-header__subtitle {
    opacity: 0.7;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-top: 80px;
    border-bottom: var(--border-thick) solid var(--black);
}

.hero__bg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
    opacity: 0.1;
    mix-blend-mode: multiply;
}

.hero__grid-overlay {
    background-image:
        repeating-linear-gradient(0deg, #000 0, #000 1px, transparent 1px, transparent 40px),
        repeating-linear-gradient(90deg, #000 0, #000 1px, transparent 1px, transparent 40px);
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0.05;
}

.hero__content {
    position: relative;
    z-index: 10;
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 3rem 3rem 0;
}

.hero__tags {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
}

.hero__tag {
    padding: 0.25rem 0.75rem;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: var(--border-thin) solid var(--black);
    border-left: 0;
}

.hero__tag:first-child {
    background-color: var(--red);
    color: var(--white);
    border-left: var(--border-thin) solid var(--black);
}

.hero__name-wrap {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
}

.hero__name {
    letter-spacing: -0.02em;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    font-size: 3.5rem;
}

.hero__name-accent {
    position: relative;
    display: inline-block;
}

.hero__name-underline {
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    height: 0.5rem;
    width: 100%;
    background-color: var(--red);
}

.hero__tagline-wrap {
    margin-top: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 2.5rem;
}

.hero__tagline {
    max-width: 20rem;
}

.hero__tagline p {
    padding-left: 0.75rem;
    font-size: 0.75rem;
    line-height: 1.625;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.7;
    border-left: var(--border-thick) solid var(--red);
}

.hero__formulas {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.75rem;
    line-height: 1rem;
    opacity: 0.4;
}

.hero__stats {
    margin: 3rem -3rem 0;
    display: flex;
    align-items: stretch;
    border-top: var(--border-thick) solid var(--black);
}

.hero__stat {
    flex: 1;
    padding: 1rem 1.5rem;
    text-align: center;
    border-right: var(--border-thick) solid var(--black);
}

.hero__stat:last-child {
    border-right: none;
}

.hero__stat-value {
    font-size: 1.875rem;
    line-height: 2.25rem;
    font-weight: 900;
}

.hero__stat-accent {
    color: var(--red);
}

.hero__stat-label {
    margin-top: 0.25rem;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.5;
}

/* ===== Case Studies ===== */
.case-studies {
    border-bottom: var(--border-thick) solid var(--black);
}

.case-study {
    display: flex;
    flex-direction: row;
    border-bottom: var(--border-thick) solid var(--black);
    position: relative;
}

.case-study::before {
    content: '';
    position: absolute;
    left: calc(50% - 2px);
    top: 0;
    bottom: 0;
    width: var(--border-thick);
    background-color: var(--black);
    z-index: 1;
    pointer-events: none;
}

.case-study:last-child {
    border-bottom: none;
}

.case-study--reverse {
    flex-direction: row-reverse;
}

.case-study__image-wrap {
    position: relative;
    overflow: hidden;
    width: 50%;
}

.case-study__image-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.4);
    transition: background-color 0.5s ease;
    pointer-events: none;
}

.case-study__image-wrap:hover::after {
    background-color: rgba(0, 0, 0, 0.2);
}

.case-study--reverse .case-study__image-wrap {}

.case-study__image {
    display: block;
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.case-study__image:hover {
    transform: scale(1.05);
}

.case-study__label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    background-color: var(--red);
    padding: 0.25rem 0.5rem;
    font-size: 10px;
    color: var(--white);
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.case-study--reverse .case-study__label {
    left: auto;
    right: 1rem;
    background-color: var(--black);
}

.case-study__body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 50%;
    padding: 3rem;
}

.case-study--reverse .case-study__body {
    background-color: var(--black);
    color: var(--white);
}

.case-study__tags {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.case-study__tag {
    padding: 0.125rem 0.5rem;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid var(--black);
}

.case-study--reverse .case-study__tag {
    border-color: rgba(255, 255, 255, 0.3);
}

.case-study__title {
    margin-bottom: 1rem;
    font-size: 2.25rem;
    line-height: 2.5rem;
    font-weight: 900;
    text-transform: uppercase;
}

.case-study__title-accent {
    color: var(--red);
}

.case-study__desc {
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    font-size: 0.875rem;
    line-height: 1.625;
    opacity: 0.6;
    border-left: var(--border-thick) solid var(--black);
}

.case-study--reverse .case-study__desc {
    border-left-color: var(--red);
}

.case-study__metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 1.5rem;
    border: var(--border-thin) solid var(--black);
}

.case-study--reverse .case-study__metrics {
    border-color: rgba(255, 255, 255, 0.2);
}

.case-study__metric {
    text-align: center;
    padding: 0.75rem;
    border-right: var(--border-thin) solid var(--black);
}

.case-study--reverse .case-study__metric {
    border-right-color: rgba(255, 255, 255, 0.2);
}

.case-study__metric:last-child {
    border-right: none;
}

.case-study__metric-value {
    font-size: 1.125rem;
    line-height: 1.75rem;
    font-weight: 900;
}

.case-study__metric-value--red {
    color: var(--red);
}

.case-study__metric-label {
    font-size: 9px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.5;
}

.case-study__cta {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.15s ease, background-color 0.15s ease;
    border: var(--border-thick) solid var(--black);
    background-color: var(--white);
}

.case-study__cta:hover {
    background-color: var(--black);
    color: var(--white);
}

.case-study--reverse .case-study__cta {
    border-color: var(--white);
    background-color: transparent;
    color: var(--white);
}

.case-study--reverse .case-study__cta:hover {
    background-color: var(--white);
    color: var(--black);
}

.case-study__cta-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.case-study__cta:hover .case-study__cta-arrow {
    transform: translateX(0.25rem);
}

/* ===== Process ===== */
.process {
    background-color: var(--white);
    border-bottom: var(--border-thick) solid var(--black);
}

.process__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.process__card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
    padding: 2rem;
}

.process__card--dark {
    background-color: var(--black);
    color: var(--white);
}

.process__number-bg {
    position: absolute;
    right: -1rem;
    top: -1.5rem;
    user-select: none;
    font-size: 120px;
    font-weight: 900;
    line-height: 1;
    opacity: 0.05;
}

.process__card--dark .process__number-bg {
    color: var(--white);
}

.process__phase {
    font-size: 0.75rem;
    line-height: 1rem;
    color: var(--red);
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.process__title {
    font-size: 1.5rem;
    line-height: 1.25;
    font-weight: 900;
    text-transform: uppercase;
}

.process__desc {
    font-size: 0.75rem;
    line-height: 1.625;
    opacity: 0.6;
}

/* Wireframe mini-diagrams */
.process__card .wf {
    margin-top: auto;
    min-height: 9rem;
}

.wf {
    position: relative;
    margin-top: 0.5rem;
    border: var(--border-thin) solid var(--black);
    padding: 1rem;
}

.wf--light {
    background-color: var(--white);
}

.wf--dark {
    border-color: rgba(255, 255, 255, 0.3);
}

.wf__row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.wf__row:last-child {
    margin-bottom: 0;
}

.wf__bar {
    height: 0.5rem;
    background-color: var(--black);
}

.wf__bar--75 {
    width: 75%;
}

.wf__bar--100 {
    width: 100%;
}

.wf__bar--66 {
    width: 66.67%;
}

.wf__bar--80 {
    width: 80%;
}

.wf__bar--red {
    background-color: var(--red);
}

.wf__bar--muted {
    background-color: rgba(0, 0, 0, 0.2);
    height: 0.375rem;
}

.wf__bar--muted-light {
    background-color: rgba(255, 255, 255, 0.2);
    height: 0.375rem;
    border-radius: 0.25rem;
}

.wf__grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 0.75rem;
    gap: 0.25rem;
}

.wf__cell {
    height: 2rem;
    border: var(--border-thin) solid var(--black);
}

.wf__cell--filled {
    background-color: rgba(0, 0, 0, 0.1);
}

.wf__cell--red {
    border-color: var(--red);
}

/* Phase 2 wireframe (dark) */
.wf__dots {
    display: flex;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}

.wf__dot {
    height: 0.625rem;
    width: 0.625rem;
    border-radius: 9999px;
}

.wf__dot--red {
    background-color: var(--red);
}

.wf__dot--muted {
    background-color: rgba(255, 255, 255, 0.3);
}

.wf__btn-row {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

.wf__btn {
    height: 2rem;
    flex: 1;
    border: var(--border-thin) solid rgba(255, 255, 255, 0.3);
}

.wf__btn--exploit {
    display: flex;
    align-items: center;
    justify-content: center;
    border-color: var(--red);
}

.wf__btn-label {
    font-size: 8px;
    color: var(--red);
    font-weight: 900;
}

/* Phase 3 wireframe */
.wf__header-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.wf__icon {
    height: 0.75rem;
    width: 0.75rem;
    background-color: var(--red);
}

.wf__header-bar {
    height: 0.375rem;
    width: 66.67%;
    background-color: var(--black);
}

.wf__checklist {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 0.375rem;
}

.wf__check-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wf__check-box {
    height: 0.375rem;
    width: 0.375rem;
    border: var(--border-thin) solid var(--black);
}

.wf__check-box--filled {
    border: none;
    background-color: var(--red);
}

.wf__check-line {
    height: 0.25rem;
    flex: 1;
    background-color: rgba(0, 0, 0, 0.2);
}

.wf__status-row {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.5rem;
    border-top: var(--border-thin) solid var(--black);
}

.wf__status-label {
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    opacity: 0.5;
}

.wf__status-badge {
    background-color: var(--black);
    padding: 0.125rem 0.5rem;
    font-size: 9px;
    color: var(--white);
    font-weight: 900;
    text-transform: uppercase;
}

/* ===== Photos ===== */
.photos {
    border-bottom: var(--border-thick) solid rgb(51, 51, 51);
}

.photos__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.photo-hero {
    min-height: 480px;
    position: relative;
    overflow: hidden;
}

.photo-hero__image {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 1s ease;
}

.photo-hero__image:hover {
    transform: scale(1.1);
}

.photo-hero__overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.4);
    transition: background-color 0.5s ease;
}

.photo-hero:hover .photo-hero__overlay {
    background-color: rgba(0, 0, 0, 0.2);
}

.photo-hero__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 1.5rem;
}

.photo-hero__caption-title {
    margin-bottom: 0.25rem;
    font-size: 1.25rem;
    line-height: 1.25;
    color: var(--white);
    font-weight: 900;
    text-transform: uppercase;
}

.photo-hero__caption-meta {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.photo-secondary {
    display: flex;
    flex-direction: column;
}

.photo-secondary__image-wrap {
    min-height: 240px;
    position: relative;
    flex: 1;
    overflow: hidden;
}

.photo-secondary__image {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.photo-secondary__image:hover {
    transform: scale(1.1);
}

.photo-secondary__overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.4);
    transition: background-color 0.5s ease;
}

.photo-secondary__image-wrap:hover .photo-secondary__overlay {
    background-color: rgba(0, 0, 0, 0.2);
}

.photo-secondary__label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    background-color: var(--white);
    padding: 0.25rem 0.5rem;
    font-size: 10px;
    color: var(--black);
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.photo-secondary__info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    background-color: var(--white);
    padding: 2rem;
}

.photo-secondary__desc {
    padding-left: 0.75rem;
    font-size: 0.75rem;
    line-height: 1.625;
    opacity: 0.6;
    border-left: var(--border-thick) solid var(--red);
    transition: opacity 0.4s ease;
}

.photo-secondary__desc-wrap {
    display: grid;
}

.photo-secondary__desc-wrap .photo-secondary__desc {
    grid-area: 1 / 1;
}

.photo-secondary__desc--inactive {
    opacity: 0;
    pointer-events: none;
}

.photo-secondary__slider {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 200%;
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.photo-secondary__slide {
    width: 50%;
    position: relative;
}

.photo-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.photo-links__item {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: var(--border-thick) solid var(--black);
    background-color: var(--white);
    color: var(--black);
    transition: color 0.15s ease, background-color 0.15s ease;
    text-decoration: none;
}

.photo-links__item--muted {
    opacity: 0.45;
}

.photo-links__item:hover {
    background-color: var(--black);
    color: var(--white);
    opacity: 1;
}

.photo-links__item-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.photo-links__item:hover .photo-links__item-arrow {
    transform: translateX(0.25rem);
}

/* ===== Skills ===== */
.skills {
    background-color: var(--black);
    color: var(--white);
    border-bottom: var(--border-thick) solid var(--black);
}

.skills__header {
    padding: 1rem 3rem;
    border-bottom: var(--border-thick) solid rgba(255, 255, 255, 0.2);
}

.skills__header-title {
    font-size: 0.75rem;
    line-height: 1rem;
    color: var(--red);
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.skills__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.skill-card {
    display: flex;
    flex-direction: column;
    cursor: default;
    gap: 0.5rem;
    transition: color 0.2s ease, background-color 0.2s ease;
    padding: 1.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-card:hover {
    background-color: var(--red);
}

.skill-card--alt:hover {
    background-color: var(--white);
    color: var(--black);
}

.skill-card__icon {
    font-size: 1.875rem;
    line-height: 2.25rem;
    font-weight: 900;
}

.skill-card__name {
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.skill-card__bar-track {
    margin-top: 0.25rem;
    height: 0.125rem;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.2);
}

.skill-card__bar-fill {
    height: 0.125rem;
    background-color: var(--red);
    transition: background-color 0.15s ease;
}

.skill-card__bar-fill--white {
    background-color: var(--white);
}

.skill-card:hover .skill-card__bar-fill {
    background-color: var(--white);
}

.skill-card--alt:hover .skill-card__bar-fill {
    background-color: var(--black);
}

.skill-card__tools {
    margin-top: 0.25rem;
    font-size: 10px;
    opacity: 0.4;
}

/* ===== About ===== */
.about {
    display: flex;
    flex-direction: row;
    border-bottom: var(--border-thick) solid var(--black);
}

.about__bio {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 50%;
    border-right: var(--border-thick) solid var(--black);
    padding: 3.5rem;
}

.about__section-label {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: var(--border-thick) solid var(--black);
}

.about__section-title {
    font-size: 0.75rem;
    line-height: 1rem;
    color: var(--red);
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.about__heading {
    margin-bottom: 1.5rem;
    font-size: 2.25rem;
    line-height: 2.5rem;
    font-weight: 900;
    text-transform: uppercase;
}

.about__heading-highlight {
    background-color: var(--black);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    color: var(--white);
}

.about__text {
    margin-bottom: 1rem;
    font-size: 0.875rem;
    line-height: 1.625;
    opacity: 0.7;
}

.about__text:last-of-type {
    margin-bottom: 0;
}

.about__certs {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.about__cert {
    padding: 0.25rem 0.75rem;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: var(--border-thin) solid rgba(0, 0, 0, 0.3);
}

.about__cert--active {
    background-color: var(--red);
    border-color: var(--red);
    color: var(--white);
}

.about__timeline-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--black);
    color: var(--white);
    width: 50%;
    padding: 3.5rem;
}

.about__timeline-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: var(--border-thick) solid rgba(255, 255, 255, 0.2);
}

.about__timeline-title {
    font-size: 0.75rem;
    line-height: 1rem;
    color: var(--red);
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.about__timeline-dot-top {
    position: absolute;
    left: -6px;
    top: 0;
    height: 0.625rem;
    width: 0.625rem;
    background-color: var(--red);
}

.timeline {
    display: flex;
    flex-direction: column;
}

.timeline__item {
    position: relative;
    display: flex;
    padding-bottom: 2rem;
    padding-left: 1.25rem;
    border-left: var(--border-thick) solid rgba(255, 255, 255, 0.2);
}

.timeline__item:first-child {
    border-left-color: var(--red);
}

.timeline__item:last-child {
    padding-bottom: 0;
}

.timeline__dot {
    position: absolute;
    left: -6px;
    top: 0;
    height: 0.625rem;
    width: 0.625rem;
    background-color: rgba(255, 255, 255, 0.3);
}

.timeline__item:first-child .timeline__dot {
    background-color: var(--red);
}

.timeline__date {
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-family: var(--font-mono);
    opacity: 0.4;
}

.timeline__role {
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 900;
    text-transform: uppercase;
}

.timeline__org {
    font-size: 0.75rem;
    line-height: 1rem;
    opacity: 0.5;
}

/* ===== Contact ===== */
.contact {
    background-color: var(--white);
    border-bottom: var(--border-thick) solid var(--black);
}

.contact__body {
    display: flex;
    flex-direction: row;
}

.contact__cta {
    width: 50%;
    border-right: var(--border-thick) solid var(--black);
    padding: 4rem;
}

.contact__title {
    margin-bottom: 0.5rem;
    font-size: 3rem;
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
}

.contact__title-accent {
    color: var(--red);
}

.contact__desc {
    margin-top: 1.5rem;
    max-width: 20rem;
    font-size: 0.75rem;
    line-height: 1.625;
    opacity: 0.5;
}

.contact__links {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.contact__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contact__link-label {
    padding: 0.25rem 0.5rem;
    transition: color 0.15s ease, background-color 0.15s ease;
    border: var(--border-thin) solid var(--black);
}

.contact__link-label:hover {
    background-color: var(--black);
    color: var(--white);
}

.contact__link-value {
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.contact__link:hover .contact__link-value {
    opacity: 1;
}

.contact__form-wrap {
    display: flex;
    flex-direction: column;
    width: 50%;
    padding: 4rem;
}

.contact__form {
    display: flex;
    flex-direction: column;
    border: var(--border-thick) solid var(--black);
}

.contact__input,
.contact__select,
.contact__textarea {
    width: 100%;
    background-color: var(--white);
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 900;
    font-family: var(--font-mono);
    text-transform: uppercase;
    outline: 2px solid transparent;
    outline-offset: 2px;
    transition: background-color 0.15s ease;
    border: none;
    border-bottom: var(--border-thick) solid var(--black);
    color: inherit;
}

.contact__input:focus,
.contact__textarea:focus {
    background-color: rgba(220, 38, 38, 0.05);
}

.contact__select {
    cursor: pointer;
    appearance: none;
}

.contact__textarea {
    resize: none;
}

.contact__submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--black);
    padding: 1.25rem 2rem;
    text-align: left;
    font-size: 0.75rem;
    line-height: 1rem;
    color: var(--white);
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.contact__submit:hover {
    background-color: var(--red);
}

.contact__submit-arrow {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

/* ===== Footer ===== */
.footer {
    background-color: var(--black);
    color: var(--white);
    border-top: var(--border-thick) solid var(--red);
}

.footer__main {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
}

.footer__brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
}

.footer__brand-name {
    font-size: 1.25rem;
    line-height: 1.75rem;
    font-weight: 900;
    text-transform: uppercase;
}

.footer__brand-info {
    padding-left: 1rem;
    font-size: 10px;
    font-family: var(--font-mono);
    opacity: 0.3;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.footer__philosophy {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.4;
}

.footer__legal {
    display: flex;
    align-items: center;
    padding: 1.5rem 2rem;
}

.footer__legal-text {
    font-size: 10px;
    font-family: var(--font-mono);
    opacity: 0.3;
}

/* ===== Gallery Pages ===== */
.gallery {
    background-color: var(--white);
    border-bottom: var(--border-thick) solid var(--black);
}

.gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--border-thick);
    background-color: var(--black);
    border-top: var(--border-thick) solid var(--black);
}

.gallery__item {
    overflow: hidden;
    background-color: var(--white);
}

.gallery__item--featured {
    grid-column: span 2;
}

.gallery__image-wrap {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    position: relative;
    cursor: zoom-in;
}

.gallery__item--featured .gallery__image-wrap {
    aspect-ratio: 16 / 9;
}

.gallery__item--tall {
    grid-row: span 2;
    display: flex;
    flex-direction: column;
}

.gallery__item--tall .gallery__image-wrap {
    flex: 1;
    min-height: 0;
    aspect-ratio: unset;
}

.gallery__item--tall .gallery__caption {
    flex-shrink: 0;
}

.gallery__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery__item:hover .gallery__img {
    transform: scale(1.03);
}

.gallery__caption {
    padding: 0.75rem 1rem;
    border-top: var(--border-thick) solid var(--black);
}

.gallery__caption-title {
    font-size: 0.6875rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.gallery__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.gallery__tag {
    padding: 0.125rem 0.5rem;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid var(--black);
}

/* ===== Responsive (max-width: 1023px — Tablet) ===== */
@media (max-width: 1023px) {

    /* Nav: tighter link padding */
    .nav__link {
        padding-left: 0.875rem;
        padding-right: 0.875rem;
    }

    /* Section headers */
    .section-header {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    /* Hero */
    .hero__content {
        padding: 2rem 2rem 0;
    }

    .hero__name {
        font-size: 2.75rem;
    }

    .hero__stats {
        margin-left: -2rem;
        margin-right: -2rem;
    }

    /* Case studies: reduce body padding */
    .case-study__body,
    .case-study--reverse .case-study__body {
        padding: 2rem;
    }

    /* Process: 2-column grid */
    .process__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Skills: 2 columns instead of 4 */
    .skills__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .skills__header {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    /* About: reduce padding */
    .about__bio,
    .about__timeline-panel {
        padding: 2.5rem;
    }

    .about__heading {
        font-size: 1.875rem;
        line-height: 1.25;
    }

    /* Contact: reduce padding */
    .contact__cta,
    .contact__form-wrap {
        padding: 2.5rem;
    }

    .contact__title {
        font-size: 2.25rem;
    }
}

/* ===== Subpage: Detail Hero ===== */
.detail-hero {
    padding-top: 80px;
    display: flex;
    flex-direction: row;
    min-height: 540px;
    border-bottom: var(--border-thick) solid var(--black);
}

.detail-hero__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 55%;
    background-color: var(--black);
    color: var(--white);
    padding: 4rem;
    border-right: var(--border-thick) solid var(--black);
}

.detail-hero__image-wrap {
    position: relative;
    flex: 1;
    overflow: hidden;
    cursor: zoom-in;
}

.detail-hero__image {
    position: absolute;
    inset: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.detail-hero__back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.4;
    transition: opacity 0.15s ease;
    color: var(--white);
}

.detail-hero__back:hover {
    opacity: 1;
}

.detail-hero__eyebrow {
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--red);
}

.detail-hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.detail-hero__tag {
    padding: 0.25rem 0.75rem;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: var(--border-thin) solid rgba(255, 255, 255, 0.3);
}

.detail-hero__tag--accent {
    background-color: var(--red);
    border-color: var(--red);
}

.detail-hero__title {
    font-size: 3rem;
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.detail-hero__title-accent {
    color: var(--red);
}

.detail-hero__desc {
    max-width: 28rem;
    font-size: 0.875rem;
    line-height: 1.625;
    opacity: 0.6;
    padding-left: 1rem;
    border-left: var(--border-thick) solid var(--red);
}

/* ===== Subpage: Stats Bar ===== */
.detail-stats {
    display: flex;
    align-items: stretch;
    border-bottom: var(--border-thick) solid var(--black);
}

.detail-stats--dark {
    background-color: var(--black);
    color: var(--white);
}

.detail-stats--dark .detail-stat {
    border-right-color: rgba(255, 255, 255, 0.15);
}

.detail-stat {
    flex: 1;
    padding: 1.5rem;
    text-align: center;
    border-right: var(--border-thick) solid var(--black);
}

.detail-stat:last-child {
    border-right: none;
}

.detail-stat__value {
    font-size: 2.25rem;
    line-height: 1;
    font-weight: 900;
}

.detail-stat__accent {
    color: var(--red);
}

.detail-stats--dark .detail-stat__accent {
    color: var(--red);
}

.detail-stat__label {
    margin-top: 0.375rem;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.5;
}

/* ===== Subpage: Detail Section ===== */
.detail-section {
    display: flex;
    flex-direction: row;
    border-bottom: var(--border-thick) solid var(--black);
}

.detail-section--dark {
    background-color: var(--black);
    color: var(--white);
}

.detail-section__col {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 50%;
    padding: 3.5rem;
}

.detail-section__col--right-border {
    border-right: var(--border-thick) solid var(--black);
}

.detail-section--dark .detail-section__col--right-border {
    border-right-color: rgba(255, 255, 255, 0.15);
}

.detail-section__label {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--red);
    border-bottom: var(--border-thin) solid rgba(220, 38, 38, 0.4);
}

.detail-section--dark .detail-section__label {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.detail-section__heading {
    font-size: 2rem;
    line-height: 1.1;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.detail-section__text {
    font-size: 0.875rem;
    line-height: 1.625;
    opacity: 0.7;
    margin-bottom: 1rem;
}

.detail-section__text:last-child {
    margin-bottom: 0;
}

.detail-section__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-section__list-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
    opacity: 0.75;
}

.detail-section__list-item::before {
    content: '→';
    color: var(--red);
    font-weight: 900;
    flex-shrink: 0;
}

/* ===== Subpage: Findings ===== */
.findings {
    display: flex;
    flex-direction: column;
}

.finding {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.25rem 0;
    border-bottom: var(--border-thin) solid rgba(255, 255, 255, 0.1);
}

.finding:last-child {
    border-bottom: none;
}

.finding__severity {
    flex-shrink: 0;
    padding: 0.25rem 0.5rem;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    min-width: 5.5rem;
    text-align: center;
    border: var(--border-thin) solid;
    margin-top: 0.125rem;
}

.finding__severity--critical {
    color: var(--red);
    border-color: var(--red);
}

.finding__severity--high {
    color: #f97316;
    border-color: #f97316;
}

.finding__severity--medium {
    color: #eab308;
    border-color: #eab308;
}

.finding__severity--info {
    color: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.2);
}

.finding__title {
    font-size: 0.875rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.375rem;
}

.finding__desc {
    font-size: 0.75rem;
    line-height: 1.5;
    opacity: 0.5;
}

.finding__remediation {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: var(--red);
    text-transform: uppercase;
}

/* ===== Subpage: Proto Screens ===== */
.proto-screens {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: var(--border-thick) solid var(--black);
}

.proto-screen {
    padding: 2rem;
    border-right: var(--border-thick) solid var(--black);
}

.proto-screen:last-child {
    border-right: none;
}

.proto-screen__num {
    font-size: 0.75rem;
    font-weight: 900;
    color: var(--red);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.proto-screen__title {
    font-size: 1.125rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.proto-screen__desc {
    font-size: 0.75rem;
    line-height: 1.5;
    opacity: 0.6;
    margin-bottom: 1.5rem;
}

/* ===== Subpage: CTA Banner ===== */
.detail-cta {
    background-color: var(--red);
    color: var(--white);
    padding: 3.5rem 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    border-bottom: var(--border-thick) solid var(--black);
}

.detail-cta__label {
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.detail-cta__title {
    font-size: 1.875rem;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1;
}

.detail-cta__link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: var(--border-thick) solid var(--white);
    color: var(--white);
    transition: background-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.detail-cta__link:hover {
    background-color: var(--white);
    color: var(--red);
}

/* ===== Responsive (max-width: 1023px — Tablet, subpages) ===== */
@media (max-width: 1023px) {
    .detail-hero__body {
        padding: 2.5rem;
        width: 60%;
    }

    .detail-hero__title {
        font-size: 2.25rem;
    }

    .detail-section__col {
        padding: 2.5rem;
    }

    .proto-screens {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-cta {
        padding: 2.5rem;
    }
}

/* ===== Responsive (max-width: 767px — Mobile) ===== */
@media (max-width: 767px) {
    .detail-hero {
        flex-direction: column;
    }

    .detail-hero__body {
        width: 100%;
        padding: 2rem;
    }

    .detail-hero__image-wrap {
        width: 100%;
        min-height: 220px;
        position: relative;
    }

    .detail-hero__title {
        font-size: 2rem;
    }

    .detail-stats {
        flex-wrap: wrap;
    }

    .detail-stat {
        min-width: 50%;
    }

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

    .detail-section {
        flex-direction: column;
    }

    .detail-section__col {
        width: 100%;
        padding: 2rem;
    }

    .detail-section__col--right-border {
        border-right: none;
        border-bottom: var(--border-thick) solid var(--black);
    }

    .detail-section--dark .detail-section__col--right-border {
        border-right: none;
        border-bottom: var(--border-thick) solid rgba(255, 255, 255, 0.15);
    }

    .detail-section__heading {
        font-size: 1.5rem;
    }

    .finding {
        flex-direction: column;
        gap: 0.75rem;
    }

    .proto-screens {
        grid-template-columns: 1fr;
    }

    .proto-screen {
        border-right: none;
        border-bottom: var(--border-thick) solid var(--black);
    }

    .proto-screen:last-child {
        border-bottom: none;
    }

    .detail-cta {
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
    }

    .detail-cta__title {
        font-size: 1.5rem;
    }
}

/* ===== Responsive (max-width: 767px — Mobile) ===== */
@media (max-width: 767px) {

    /* Nav: allow horizontal scroll so links stay accessible */
    .nav__logo {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        flex-shrink: 0;
    }

    .nav__links {
        overflow-x: auto;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .nav__links::-webkit-scrollbar {
        display: none;
    }

    .nav__link {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        font-size: 9px;
        white-space: nowrap;
    }

    /* Section header: hide the code subtitle to save space */
    .section-header__subtitle {
        display: none;
    }

    .hero__content {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    /* Hero name */
    .hero__name {
        font-size: 2.25rem;
    }

    .hero__stats {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
    }

    .section-header {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    /* Case studies stack */
    .case-study,
    .case-study--reverse {
        flex-direction: column;
    }

    /* Hide the desktop center-divider pseudo-element when stacked */
    .case-study::before {
        display: none;
    }

    .case-study__image-wrap,
    .case-study--reverse .case-study__image-wrap {
        border-right: none;
        border-left: none;
        border-bottom: var(--border-thick) solid var(--black);
        width: 100%;
    }

    .case-study__body,
    .case-study--reverse .case-study__body {
        width: 100%;
        padding: 2rem;
    }

    .case-study__title {
        font-size: 1.875rem;
        line-height: 1.25;
    }

    /* Process single column */
    .process__grid {
        grid-template-columns: 1fr;
    }

    /* Photos single column */
    .photos__grid {
        grid-template-columns: 1fr;
    }

    /* Skills 2 columns */
    .skills__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .skills__header {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    /* About stacks */
    .about {
        flex-direction: column;
    }

    .about__bio {
        border-right: none;
        border-bottom: var(--border-thick) solid var(--black);
        width: 100%;
        padding: 2rem;
    }

    .about__heading {
        font-size: 1.875rem;
        line-height: 1.25;
    }

    .about__timeline-panel {
        width: 100%;
        padding: 2rem;
    }

    /* Contact stacks */
    .contact__body {
        flex-direction: column;
    }

    .contact__cta {
        border-right: none;
        border-bottom: var(--border-thick) solid var(--black);
        width: 100%;
        padding: 2.5rem;
    }

    .contact__title {
        font-size: 2.25rem;
    }

    .contact__form-wrap {
        width: 100%;
        padding: 2.5rem;
    }

    /* Footer stacks */
    .footer__main {
        flex-direction: column;
    }

    /* Gallery single column */
    .gallery__grid {
        grid-template-columns: 1fr;
    }

    .gallery__item--featured {
        grid-column: span 1;
    }

    .gallery__item--featured .gallery__image-wrap {
        aspect-ratio: 3 / 2;
    }

    .gallery__item--tall {
        grid-row: span 1;
    }

    .gallery__item--tall .gallery__image-wrap {
        flex: none;
        aspect-ratio: 2 / 3;
    }
}

/* ===== Gallery Lightbox ===== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox--open {
    display: flex;
}

.lightbox__nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: calc(80vw + 6rem);
    justify-content: center;
}

.lightbox__arrow {
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    cursor: pointer;
    padding: 0.375rem 0.75rem;
    opacity: 0.6;
    transition: opacity 0.2s, border-color 0.2s;
    flex-shrink: 0;
    user-select: none;
}

.lightbox__arrow:hover {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.8);
}

.lightbox__arrow:disabled {
    opacity: 0.2;
    cursor: default;
    border-color: rgba(255, 255, 255, 0.15);
}

.lightbox__img-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
    max-width: 80vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox__close {
    align-self: flex-end;
    background: none;
    border: none;
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 0.375rem 0;
    margin-bottom: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.lightbox__close:hover {
    opacity: 1;
}

.lightbox__img {
    max-width: 80vw;
    max-height: calc(90vh - 2.5rem);
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border: var(--border-thick) solid rgba(255, 255, 255, 0.15);
}

/* ===== Responsive (max-width: 479px — Small Mobile / iPhone SE) ===== */
@media (max-width: 479px) {

    /* Hero stats: wrap to 2×2 grid */
    .hero__stats {
        flex-wrap: wrap;
    }

    .hero__stat {
        flex: 0 0 50%;
        min-width: 50%;
    }

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

    .hero__stat:nth-child(n+3) {
        border-top: var(--border-thick) solid var(--black);
    }
}

/* ===== Responsive (max-width: 415px — Very Small Mobile) ===== */
@media (max-width: 415px) {

    /* Nav: remove first link's left border — too tight next to the logo */
    .nav__links .nav__link:first-child {
        border-left: none;
    }

    /* Third hero tag (Santa Fe, NM) wraps to its own row — restore left border
       and remove top border so it doesn't double up with the row above */
    .hero__tag:last-child {
        border-left: var(--border-thin) solid var(--black);
        border-top: none;
    }
}