/* ==========================================================================
   Bootstrap integration layer
   Bootstrap handles the grid, navigation and component structure. This file
   maps the portfolio's art direction onto those Bootstrap primitives.
   ========================================================================== */

/* Bootstrap rows are used inside sections that previously used CSS grid. */
.row.disciplines__grid,
.row.stats__grid,
.row.work__grid,
.row.building__grid,
.row.about__grid,
.row.experience__grid,
.row.skills__grid,
.row.contact__grid,
.row.facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

/* Bootstrap buttons, kept square and monospaced for the visual system. */
.btn {
    --bs-btn-border-radius: 0;
    --bs-btn-focus-box-shadow: none;
    border-radius: 0;
    box-shadow: none;
}

.btn:focus,
.btn:focus-visible {
    box-shadow: none;
}

/* Bootstrap offcanvas, restyled as the full-screen monochrome menu. */
.mobile-offcanvas {
    --bs-offcanvas-width: 100%;
    width: 100%;
    max-width: 100%;
    background: var(--ink);
    color: var(--paper);
    border: 0;
}

.mobile-offcanvas .offcanvas-header {
    height: 84px;
    padding: 0 var(--gutter);
    border-bottom: 1px solid var(--line-light);
}

.mobile-offcanvas .offcanvas-body {
    display: flex;
    flex-direction: column;
    padding: 0 var(--gutter);
}

.mobile-offcanvas .btn-close {
    --bs-btn-close-white-filter: invert(1) grayscale(100%) brightness(200%);
    border-radius: 0;
    opacity: 0.8;
}

.mobile-offcanvas .btn-close:hover {
    opacity: 1;
}

.mobile-offcanvas .mobile-menu__nav {
    padding: 30px 0;
}

.mobile-offcanvas .mobile-menu__foot {
    flex-wrap: wrap;
    padding: 22px 0 28px;
    border-top: 1px solid var(--line-light);
}

.mobile-offcanvas .mobile-menu__foot p {
    margin-left: auto;
}

/* Align the Bootstrap navigation breakpoint with the visible menu toggle. */
@media (max-width: 991.98px) {
    .menu-toggle {
        display: block;
    }

    .discipline,
    .discipline:first-child {
        min-height: 0;
        padding: 28px 24px 30px;
        border-left: 0;
        border-right: 0;
        border-bottom: 1px solid var(--line-light);
    }

    .discipline:last-child {
        border-bottom: 0;
    }
}

/* Two-column stats between the Bootstrap sm and lg breakpoints. */
@media (min-width: 576px) and (max-width: 820px) {
    .stat:nth-child(2n) {
        border-right: 0;
    }

    .stat:nth-child(3),
    .stat:nth-child(4) {
        border-top: 1px solid var(--line-soft);
    }

    .stat:nth-child(3) {
        border-left: 1px solid var(--line-soft);
    }
}

/* --------------------------------------------------------------------------
   Type scale — slightly larger than the first pass, across the whole site
   -------------------------------------------------------------------------- */

.utility__status,
.utility__links {
    font-size: 9px;
}

.nav__link {
    font-size: 10.5px;
}

.brand {
    font-size: 17px;
}

.btn {
    font-size: 10px;
}

.hero__tag {
    font-size: 10px;
}

.hero__coords,
.hero__side-note {
    font-size: 9px;
}

.hero__intro {
    font-size: 15px;
}

.hero__meta {
    font-size: 9px;
}

.eyebrow {
    font-size: 10px;
}

.section-link,
.link-underline {
    font-size: 10px;
}

.section-head__note {
    font-size: 15px;
}

.section-title {
    font-size: clamp(52px, 7.2vw, 108px);
}

.building__title {
    font-size: clamp(58px, 7.8vw, 132px);
}

.building__body {
    font-size: 15px;
}

.chip-list li {
    font-size: 8.5px;
}

.building__role {
    font-size: 8.5px;
}

.building__caption {
    font-size: 8px;
}

.discipline p {
    font-size: 14px;
}

.discipline__link {
    font-size: 9px;
}

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

.stat span {
    font-size: 12px;
}

.project__meta {
    font-size: 9px;
}

.project__desc {
    font-size: 14.5px;
}

.tag-list li {
    font-size: 8px;
}

.more-builds__head p {
    font-size: 9px;
}

.more-build__year,
.more-build__stack {
    font-size: 8.5px;
}

.more-build__name {
    font-size: 15.5px;
}

.more-build__desc {
    font-size: 12.5px;
}

.about__copy p {
    font-size: 15px;
}

.facts dt {
    font-size: 8.5px;
}

.facts dd {
    font-size: 14px;
}

.quote cite {
    font-size: 9px;
}

.experience__note {
    font-size: 14px;
}

.experience__mail {
    font-size: 9px;
}

.exp__company,
.exp__date {
    font-size: 8.5px;
}

.exp__location {
    font-size: 8px;
}

.exp__body ul:not(.tag-list) li {
    font-size: 14px;
}

.education__row p,
.education__row > span {
    font-size: 8.5px;
}

.skill-group h3 {
    font-size: 9px;
}

.skill-group li {
    font-size: 14px;
}

.ticker__track span {
    font-size: 10px;
}

.contact__availability {
    font-size: 9px;
}

.contact__label {
    font-size: 8.5px;
}

.copy-btn {
    font-size: 8.5px;
}

.contact__row > span {
    font-size: 8px;
}

.contact__row p {
    font-size: 13.5px;
}

.contact__title {
    font-size: clamp(52px, 9vw, 144px);
}

.about__heading .section-title {
    font-size: clamp(50px, 6.4vw, 98px);
}

.experience .section-title {
    font-size: clamp(50px, 6vw, 92px);
}

.footer__nav a {
    font-size: 9px;
}

.footer__bottom {
    font-size: 8.5px;
}

/* --------------------------------------------------------------------------
   Hero portrait is 90% of the viewport height on every screen.
   On narrow screens it is centered and the hero clips the transparent margins.
   -------------------------------------------------------------------------- */

.hero__portrait {
    height: 90svh;
    aspect-ratio: 1088 / 1398;
}

.hero__stage {
    min-height: 90svh;
}

/* Desktop: keep the intro clear of the giant name on short laptops. */
@media (min-width: 1200px) {
    .hero__intro {
        top: 7%;
        width: min(300px, 23vw);
    }

    .hero__title {
        top: max(18%, 190px);
        font-size: clamp(72px, 13vw, 175px);
    }
}

@media (max-width: 760px) {
    .container {
        width: 100%;
    }

    .header__row {
        height: 72px;
    }

    .site-header.is-scrolled .header__row {
        height: 62px;
    }

    .hero__stage {
        min-height: 0;
    }

    .hero__portrait {
        height: 90svh;
        max-width: none;
        width: auto;
    }

    .hero__portrait img {
        height: 100%;
        width: auto;
        max-width: none;
    }

    .section-title {
        font-size: clamp(50px, 12.5vw, 82px);
    }

    .about__heading .section-title {
        font-size: clamp(48px, 12.5vw, 82px);
    }

    .experience .section-title {
        font-size: clamp(48px, 12vw, 82px);
    }

    .contact__title {
        font-size: clamp(50px, 13vw, 96px);
    }
}

/* Tablet: stack the hero instead of squeezing the desktop overlay. */
@media (min-width: 761px) and (max-width: 991.98px) {
    .hero__stage {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-height: 0;
        margin-top: 0;
    }

    .hero__intro {
        position: static;
        order: 1;
        align-self: flex-start;
        width: min(100%, 440px);
        margin-top: 20px;
        padding: 14px 0 0;
        border-left: 0;
        border-top: 1px solid var(--line);
        font-size: 15px;
    }

    .hero__title {
        position: static;
        order: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin-top: 26px;
        transform: none;
        font-size: clamp(96px, 20vw, 180px);
        line-height: 0.8;
        letter-spacing: -0.06em;
        white-space: normal;
    }

    .hero__word--last {
        align-self: center;
        margin-left: 0;
    }

    .hero__portrait {
        position: relative;
        left: auto;
        bottom: auto;
        order: 3;
        width: auto;
        max-width: none;
        height: 90svh;
        margin-top: 20px;
        transform: none;
    }

    .hero__portrait picture,
    .hero__portrait img {
        width: auto;
        max-width: none;
        height: 100%;
    }

    .hero__side-note {
        display: none;
    }
}

/* Compact desktop: keep the overlay, but give the copy and name room. */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero__intro {
        top: 6%;
        width: min(330px, 32vw);
        font-size: 15px;
    }

    .hero__title {
        top: 33%;
        font-size: clamp(92px, 10vw, 120px);
    }
}

@media (max-width: 560px) {
    .brand {
        font-size: 13px;
    }

    .utility__status,
    .utility__links {
        font-size: 7.5px;
    }

    .hero__portrait {
        width: auto;
        margin-left: 0;
    }

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

    .stat span {
        font-size: 11px;
    }
}

/* --------------------------------------------------------------------------
   Real product screenshots
   -------------------------------------------------------------------------- */

.product__frame {
    display: block;
    aspect-ratio: 16 / 10;
}

.product__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.project__cover--image {
    padding: 0;
}

.project__cover--image .project__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.7s var(--ease-out);
}

.project__cover--image:hover .project__image {
    transform: translateY(-6px) scale(1.012);
}

.project__cover--image .project__number {
    padding: 4px 6px;
    background: rgba(244, 242, 238, 0.92);
    color: var(--ink);
}
