/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ---- Spacing rhythm per breakpoint (drives section padding &
   the gaps between major blocks via tokens) ---- */
@media only screen and (max-width: 991px) {
    :root {
        --section-y: 88px;
        --block-gap: 60px;
        --block-gap-sm: 36px;
    }
}

@media only screen and (max-width: 767px) {
    :root {
        --section-y: 64px;
        --block-gap: 48px;
        --block-gap-sm: 30px;
    }
}

/* ---- Height-based hero adjustments ---- */
@media only screen and (max-height: 850px) {
    .person .page-scroll {
        row-gap: 1.4em;
    }
}

@media only screen and (max-height: 600px) {
    .person-img-wrapper {
        width: 100px;
        height: 100px;
    }

    .bck,
    .bck .overlay {
        height: auto;
        min-height: 100%;
    }

    .person {
        height: auto;
        min-height: 100vh;
        padding-bottom: 32px;
        padding-top: 80px;
    }
}

@media only screen and (min-height: 601px) and (max-height: 800px) {
    .person-img-wrapper {
        width: 140px;
        height: 140px;
    }
}

@media only screen and (min-height: 801px) and (max-height: 900px) {
    .person-img-wrapper {
        width: 168px;
        height: 168px;
    }
}

/* ---- Large Devices ---- */
@media only screen and (max-width: 1199px) {

    .person h1 {
        font-size: 54px;
    }

    .navbar-nav > li + li > a {
        margin-left: 30px;
    }

}

/* ---- Medium Devices ---- */
@media only screen and (max-width: 991px) {

    h4 {
        font-size: 24px;
    }

    .c-btn {
        min-width: 120px;
        line-height: 46px !important;
        padding: 0 25px;
        font-size: 11px;
        width: 220px;
    }

    .navbar-nav > li > a {
        font-size: 10px;
    }

    .navbar-nav > li + li > a {
        margin-left: 22px;
    }

    .person h1 {
        font-size: 44px;
    }

    .site-section h2 {
        font-size: 32px;
    }

    .service {
        padding: 32px 26px 28px;
    }

    .service h4 {
        font-size: 18px;
    }

}

/* ---- Small Devices / Tablets ---- */
@media only screen and (max-width: 767px) {

    h4 {
        font-size: 20px;
    }

    .c-btn {
        font-size: 11px;
        min-width: 100px;
        line-height: 46px !important;
        padding: 0 20px;
        width: 100%;
        max-width: 280px;
        margin: 8px 0;
    }

    .hero-cta {
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 14px;
    }

    .hero-cta .c-btn {
        width: 100%;
        max-width: 280px;
        margin: 0;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .about-lead {
        font-size: 16.5px;
    }

    .about-col {
        padding: 24px 22px 20px;
    }

    .navbar-toggle-container {
        display: block;
    }

    .navbar-toggle {
        position: relative;
        margin: 0 4px 0 0;
        padding: 5px 0;
        border: 0;
        background-color: transparent;
        z-index: 200;
    }

    .navbar-toggle .icon-bar {
        display: block;
        width: 28px;
        height: 2px;
        border-radius: 2px;
        background-color: var(--heading);
        -webkit-transition: all 0.3s;
        transition: all 0.3s;
    }

    .navbar-toggle .icon-bar + .icon-bar {
        margin-top: 6px;
    }

    .navbar-toggle.act .icon-bar:first-child,
    .navbar-toggle.act .icon-bar:last-child {
        position: absolute;
        top: 10px;
        height: 2px;
        background-color: #fff;
    }

    .navbar-toggle.act .icon-bar:first-child {
        -webkit-transform: rotate(45deg);
        transform: rotate(45deg);
    }

    .navbar-toggle.act .icon-bar:last-child {
        -webkit-transform: rotate(-45deg);
        transform: rotate(-45deg);
    }

    .navbar-toggle.act .icon-bar:nth-child(2) {
        opacity: 0;
    }

    .navbar-toggle.act .icon-bar + .icon-bar {
        margin-top: 0;
    }

    .navbar-nav > li > a,
    .navbar-nav > li + li > a {
        display: inline-block;
        margin: 0;
        color: #fff !important;
        font-size: 16px;
        letter-spacing: 0.15em;
    }

    .navbar-nav > li > a::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .navbar-toggle.act {
        z-index: 9999;
        height: 25px;
    }

    .main-menu {
        background:
            radial-gradient(800px 600px at 50% 20%, rgba(47, 107, 255, 0.18), transparent 60%),
            rgba(5, 7, 15, 0.97);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        position: fixed;
        left: 0;
        top: 0;
        z-index: 100;
        width: 100%;
        height: 100vh;
        min-height: 100%;
        display: table;
        text-align: center;
        opacity: 0;
        -webkit-transition: all 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
        transition: all 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
        -webkit-transform: scale(0);
        transform: scale(0);
        overscroll-behavior: contain;
    }

    .main-menu.act {
        opacity: 1;
        -webkit-transform: scale(1);
        transform: scale(1);
    }

    .main-menu.act ul li {
        opacity: 1;
        -webkit-transform: translateX(0);
        transform: translateX(0);
    }

    .main-menu ul {
        display: table-cell;
        vertical-align: middle;
    }

    .main-menu li {
        padding: 14px 0;
        -webkit-transition: all 400ms 510ms;
        transition: all 400ms 510ms;
        opacity: 0;
    }

    .main-menu li:nth-child(odd) {
        -webkit-transform: translateX(30%);
        transform: translateX(30%);
    }

    .main-menu li:nth-child(even) {
        -webkit-transform: translateX(-30%);
        transform: translateX(-30%);
    }

    .person h1 {
        font-size: 36px;
        margin-bottom: 8px;
    }

    .section-contact {
        padding-bottom: var(--section-y);
    }

    .person > div {
        padding-right: 20px;
        padding-left: 20px;
    }

    .section-services > div {
        padding-right: 20px;
        padding-left: 20px;
    }

    .section-work > div {
        padding-right: 20px;
        padding-left: 20px;
    }

    .work-head {
        height: 84px;
    }

    .work-body {
        padding: 20px 20px 18px;
    }

    .work-title {
        font-size: 17px;
    }

    .site-section h2 {
        font-size: 28px;
    }

    .header-intro h2::after {
        margin: 14px auto 30px;
    }

    .txt-about {
        font-size: 16px;
        padding: 6px 6px;
    }

    .site-section p {
        margin-bottom: 22px;
    }

    .service h4 {
        margin: 12px 0 10px;
        font-size: 17px;
    }

    .contact-lead {
        font-size: 17px;
    }

    .contact-methods {
        grid-template-columns: 1fr;
    }

    .contact-method {
        padding: 16px 18px;
    }

    .stats {
        gap: 10px;
    }

    .stat {
        flex: 1 1 calc(50% - 10px);
        max-width: none;
        padding: 20px 12px;
    }

    .stat-num {
        font-size: 34px;
    }

    .section-about .timeline-title {
        font-size: 22px;
        margin-bottom: 30px;
    }

    .timeline-item {
        padding-left: 34px;
    }

    .timeline-card {
        padding: 18px 18px;
    }

    .section-about .timeline-role {
        font-size: 16px;
    }

    .section-about .certs-title {
        font-size: 22px;
        margin-bottom: 26px;
    }

    .cert {
        flex: 1 1 100%;
        max-width: none;
        padding: 16px 16px;
    }

    .cert-name {
        font-size: 14px;
    }
}

/* ---- Extra small phones ---- */
@media only screen and (max-width: 400px) {
    .person h1 {
        font-size: 31px;
    }

    .person-img-wrapper {
        width: 150px;
        height: 150px;
    }
}
