/* =============================================================
   RESPONSIVE.CSS
   Marion Susan Nafula Portfolio

   Breakpoints:
   - 1200px → Small desktop
   - 1024px → Tablet landscape
   - 768px  → Tablet portrait / mobile
   - 600px  → Large phone
   - 400px  → Small phone

   IMPORTANT:
   max-width breakpoints are cumulative.
   Therefore, smaller screens inherit the styles above them
   unless those styles are explicitly overridden.
============================================================= */


/* =============================================================
   1. SMALL DESKTOP
   ≤ 1200px
============================================================= */

@media (max-width: 1200px) {

    :root {
        --container: 96%;
    }

    .cta-banner {
        margin: 0 24px;
        width: auto;
    }
}


/* =============================================================
   2. TABLET LANDSCAPE
   ≤ 1024px
============================================================= */

@media (max-width: 1024px) {

    /* ---------------------------------------------------------
       GENERAL
    --------------------------------------------------------- */

    section {
        padding: 68px 0;
    }


    /* ---------------------------------------------------------
       HOMEPAGE — HERO
    --------------------------------------------------------- */

    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-media {
        order: -1;
        margin-bottom: 56px;
    }

    .hero-copy {
        text-align: center;
    }

    .hero-copy p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-dots {
        display: none;
    }

    .expertise-card {
        width: min(320px, 90%);
    }


    /* ---------------------------------------------------------
       HOMEPAGE — PROFESSIONAL SUMMARY
    --------------------------------------------------------- */

    .summary-grid {
        grid-template-columns: 1fr 1fr;
    }

    .summary-grid .summary-card:last-child {
        grid-column: 1 / -1;
        max-width: 60%;
        margin: 0 auto;
    }


    /* ---------------------------------------------------------
       HOMEPAGE — SKILLS
    --------------------------------------------------------- */

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


    /* ---------------------------------------------------------
       HOMEPAGE — CAREER TIMELINE
    --------------------------------------------------------- */

    .timeline-grid {
        grid-template-columns: 1fr;
        max-width: 560px;
        margin: 0 auto;
    }


    /* ---------------------------------------------------------
       HOMEPAGE — EDUCATION
    --------------------------------------------------------- */

    .edu-grid {
        grid-template-columns: 1fr 1fr;
    }

    .edu-photo {
        grid-column: span 2;
        min-height: 260px;
    }


    /* ---------------------------------------------------------
       FOOTER
    --------------------------------------------------------- */

    .footer-top {
        grid-template-columns: 1fr 1fr;
        row-gap: 40px;
    }


    /* =========================================================
       ABOUT PAGE
    ========================================================= */

    .about-hero-grid {
        grid-template-columns: 1fr;
    }

    .about-hero-media {
        order: -1;
        margin-bottom: 40px;
    }

    .about-hero-copy {
        text-align: center;
    }

    .about-hero-copy > p {
        margin-left: auto;
        margin-right: auto;
    }

    .about-features {
        justify-content: center;
    }

    .feature-item {
        text-align: left;
    }

    .about-photo-frame {
        width: 70%;
    }

    .story-grid {
        grid-template-columns: 1fr;
    }

    .story-copy {
        text-align: center;
    }

    .signature {
        text-align: center;
    }

    .values-grid {
        grid-template-columns: repeat(3, 1fr);
        row-gap: 34px;
    }


    /* =========================================================
       EXPERIENCE PAGE
    ========================================================= */

    .exp-hero-grid {
        grid-template-columns: 1fr;
    }

    .exp-hero-media {
        order: -1;
        margin-bottom: 40px;
    }

    .exp-hero-copy {
        text-align: center;
    }

    .exp-hero-copy p {
        margin-left: auto;
        margin-right: auto;
    }

    .exp-hero-photo {
        width: 66%;
    }

    .journey-item {
        grid-template-columns: 110px 40px 1fr;
    }

    .journey-timeline::before {
        left: 130px;
    }

    .strengths-grid {
        grid-template-columns: repeat(3, 1fr);
        row-gap: 34px;
    }


    /* =========================================================
       QUALIFICATIONS PAGE
    ========================================================= */

    .qual-hero-grid {
        grid-template-columns: 1fr;
    }

    .qual-hero-media {
        order: -1;
        margin-bottom: 40px;
    }

    .qual-hero-copy {
        text-align: center;
    }

    .qual-hero-copy p {
        margin-left: auto;
        margin-right: auto;
    }

    .qual-hero-photo {
        max-width: 480px;
        margin: 0 auto;
    }

    .certs-grid {
        grid-template-columns: 1fr;
        max-width: 560px;
        margin: 0 auto;
    }

    .edu-wide-card {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .edu-wide-card::before {
        display: none;
    }

    .info-row {
        grid-template-columns: 1fr;
    }


    /* =========================================================
       CONTACT PAGE
    ========================================================= */

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

    .contact-hero-media {
        order: -1;
        margin-bottom: 40px;
    }

    .contact-hero-copy {
        text-align: center;
    }

    .contact-hero-copy > p {
        margin-left: auto;
        margin-right: auto;
    }

    .contact-features {
        justify-content: center;
    }

    .contact-photo-frame {
        width: 62%;
    }

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

    .impact-banner {
        grid-template-columns: 1fr;
        padding: 32px;
    }

    .impact-media img {
        max-width: 420px;
        margin: 0 auto;
    }

    .impact-copy {
        text-align: center;
    }

    .impact-copy p {
        margin-left: auto;
        margin-right: auto;
    }
}


/* =============================================================
   3. TABLET PORTRAIT / MOBILE
   ≤ 768px

   This is where the desktop/tablet navigation changes
   into the hamburger/mobile navigation.
============================================================= */

@media (max-width: 768px) {

    /* =========================================================
       NAVIGATION — MOBILE
    ========================================================= */

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;

        background: var(--navy);

        flex-direction: column;
        align-items: flex-start;
        gap: 0;

        padding: 4px 24px 18px;

        max-height: 0;
        overflow: hidden;

        transition: max-height 0.25s ease;
    }

    .nav-links.open {
        max-height: 320px;
    }

    .nav-links a {
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .nav-toggle {
        display: block;
    }

    /* Hide Download CV completely on mobile */
    .nav-cta .btn-gold {
        display: none;
    }


    /* =========================================================
       HOMEPAGE
    ========================================================= */

    .hero-copy h1 {
        font-size: 2.3rem;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .summary-grid .summary-card:last-child {
        max-width: 100%;
    }

    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }

    .edu-grid {
        grid-template-columns: 1fr;
    }

    .edu-photo {
        grid-column: span 1;
        min-height: 220px;
        order: -1;
    }

    .cta-banner {
        flex-direction: column;
        text-align: center;
        padding: 34px 26px;
    }

    .cta-left {
        flex-direction: column;
        text-align: center;
    }

    .footer-top {
        grid-template-columns: 1fr;
        text-align: left;
    }


    /* =========================================================
       HERO — MOBILE COMPOSITION
    ========================================================= */

    .hero {
        padding: 20px 0 60px;
        overflow: hidden;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hero-media {
        position: relative;

        width: 100%;
        height: 380px;
        min-height: 380px;

        margin-top: 10px;

        display: block;
    }

    .hero-arc {
        position: absolute;

        z-index: 1;

        width: 64%;
        height: 325px;

        left: 3%;
        bottom: 0;

        background: var(--cream-arc);

        border-radius: 42px 42px 0 0;
    }

    .hero-photo {
        position: absolute;

        z-index: 2;

        width: 60%;
        height: 320px;

        left: 2%;
        bottom: 0;

        display: flex;
        justify-content: center;
        align-items: flex-end;

        overflow: visible;

        border-radius: 0;
        box-shadow: none;
    }

    .hero-photo img {
        display: block;

        width: 125%;
        height: 100%;

        max-width: none;
        max-height: none;

        object-fit: contain;
        object-position: center bottom;

        transform: none;
    }

    .expertise-card {
        position: absolute !important;

        z-index: 10 !important;

        width: 150px !important;
        max-width: 150px !important;

        height: auto !important;

        top: auto !important;
        left: auto !important;

        right: 2% !important;
        bottom: -3px !important;

        margin: 0 !important;

        padding: 13px 12px !important;

        background: var(--white);

        border-radius: 15px;

        box-shadow: var(--shadow-card);

        transform: none !important;
    }

    .expertise-card h4 {
        font-size: 0.78rem;
        line-height: 1.2;
        margin-bottom: 9px;
    }

    .expertise-card ul {
        display: flex;
        flex-direction: column;
        gap: 7px;
    }

    .expertise-card li {
        display: flex;
        align-items: center;
        gap: 7px;
        font-size: 0.68rem;
        line-height: 1.2;
    }

    .hero-dots {
        position: absolute;

        z-index: 0;

        top: 8px;
        right: 12px;

        width: 40px;
        height: 65px;

        background-size: 10px 10px;
    }


    /* =========================================================
       ABOUT PAGE
    ========================================================= */

    .about-hero-copy h1 {
        font-size: 2.1rem;
    }

    .about-photo-frame {
        width: 80%;
    }

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

    .timeline-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 34px;

        padding: 0 0 0 28px;
        max-width: 420px;
    }

    .timeline-row::before {
        top: 0;
        bottom: 0;
        left: 27px;
        right: auto;

        width: 0;
        border-top: none;
        border-left: 2px dotted var(--gold);
    }

    .timeline-row::after {
        top: 0;
        left: 23px;
        box-shadow: 0 calc(100% - 8px) 0 var(--gold);
    }

    .timeline-node {
        flex-direction: row;
        text-align: left;
        align-items: center;
        gap: 16px;
    }

    .timeline-node .timeline-icon {
        margin-bottom: 0;
    }

    .timeline-node .timeline-pill {
        position: absolute;
        top: -26px;
        left: 56px;
        margin-bottom: 0;
    }

    .timeline-node h4,
    .timeline-node p {
        padding: 0;
    }


    /* =========================================================
       EXPERIENCE PAGE
    ========================================================= */
    
    .exp-hero-copy h1 {
        font-size: 2.1rem;
    }

    .exp-hero-photo {
        width: 78%;
    }

    .journey-timeline::before {
        display: none;
    }

    .journey-item {
        grid-template-columns: 1fr;
        row-gap: 14px;
        justify-items: center;
        text-align: center;
    }

    .journey-dot-col {
        display: none;
    }

    .journey-marker {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .journey-card {
        text-align: left;
        width: 100%;
    }

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


    /* =========================================================
       QUALIFICATIONS PAGE
    ========================================================= */

    .qual-hero-copy h1 {
        font-size: 2.1rem;
    }

    .cert-card {
        grid-template-columns: 1fr;
    }

    .cert-thumb {
        max-width: 220px;
        margin: 0 auto;
    }

    .cert-body {
        text-align: center;
    }

    .cert-body .icon-circle {
        margin: 0 auto 14px;
    }

    .lang-item {
        flex-wrap: wrap;
    }

    .lang-bar-track {
        flex: 1 1 100%;
        margin-left: 40px;
        width: calc(100% - 40px);
    }


    /* =========================================================
       CONTACT PAGE
    ========================================================= */

    .contact-hero-copy h1 {
        font-size: 2.1rem;
    }

    .contact-photo-frame {
        width: 74%;
    }

    .contact-features {
        flex-direction: column;
        align-items: center;
    }

    .feature-item {
        max-width: 320px;
        text-align: left;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .message-card {
        padding: 24px;
    }

    .form-submit-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-submit-row .btn {
        width: 100%;
        justify-content: center;
    }

    .impact-copy h2 {
        font-size: 1.6rem;
    }
}


/* =============================================================
   4. LARGE PHONE
   ≤ 600px

   These styles apply only after the 768px mobile rules.
============================================================= */

@media (max-width: 600px) {

    /* ---------------------------------------------------------
       GLOBAL
    --------------------------------------------------------- */

    .container {
        padding: 0 18px;
    }

    section {
        padding: 56px 0;
    }


    /* ---------------------------------------------------------
       LOGO
    --------------------------------------------------------- */

    .logo .logo-text b {
        font-size: 0.92rem;
    }


    /* ---------------------------------------------------------
       HOMEPAGE
    --------------------------------------------------------- */

    .hero {
        padding: 48px 0 64px;
    }

    .hero-copy h1 {
        font-size: 1.9rem;
    }

    .hero-copy .eyebrow {
        font-size: 0.68rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-photo {
        width: 92%;
    }

    .section-head h2 {
        font-size: 1.55rem;
    }

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

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

    .edu-card {
        padding: 22px 18px;
    }


    /* ---------------------------------------------------------
       ABOUT PAGE
    --------------------------------------------------------- */

    .about-hero-copy h1 {
        font-size: 1.8rem;
    }

    .about-photo-accent {
        display: none;
    }

    .about-features {
        flex-direction: column;
        gap: 18px;
    }

    .feature-item {
        max-width: none;
    }

    .story-copy h2 {
        font-size: 1.6rem;
    }

    .story-card {
        padding: 24px 20px;
    }

    .values-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 26px 16px;
    }

    .timeline-row {
        padding-left: 24px;
    }

    .timeline-icon {
        width: 48px;
        height: 48px;
        font-size: 1.05rem;
    }


    /* ---------------------------------------------------------
       EXPERIENCE PAGE
    --------------------------------------------------------- */

    .exp-hero-copy h1 {
        font-size: 1.85rem;
    }

    .exp-hero-photo {
        width: 88%;
    }

    .journey-card {
        padding: 22px 18px;
    }

    .journey-tags {
        gap: 8px;
    }

    .tag {
        font-size: 0.72rem;
        padding: 6px 10px;
    }


    /* ---------------------------------------------------------
       QUALIFICATIONS PAGE
    --------------------------------------------------------- */

    .qual-hero-copy h1 {
        font-size: 1.8rem;
    }

    .edu-wide-card {
        padding: 24px 20px;
    }

    .edu-entry {
        flex-direction: column;
    }

    .info-card {
        padding: 24px 20px;
    }


    /* ---------------------------------------------------------
       CONTACT PAGE
    --------------------------------------------------------- */

    .contact-hero-copy h1 {
        font-size: 1.85rem;
    }

    .contact-photo-frame {
        width: 88%;
    }

    .reach-card {
        padding: 16px 18px;
    }

    .impact-banner {
        padding: 24px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }


    /* ---------------------------------------------------------
       SHARED
    --------------------------------------------------------- */

    .footer-actions,
    .footer-links,
    .footer-contact-col {
        break-inside: avoid;
    }
}


/* =============================================================
   5. SMALL PHONE
   ≤ 400px

   Final adjustments for very narrow screens.
============================================================= */

@media (max-width: 400px) {

    /* ---------------------------------------------------------
       NAVIGATION
    --------------------------------------------------------- */

    .nav-wrap {
        padding: 14px 16px;
    }


    /* ---------------------------------------------------------
       HOMEPAGE
    --------------------------------------------------------- */

    .hero-copy h1 {
        font-size: 1.6rem;
    }

    .hero-copy p {
        font-size: 0.92rem;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .skill-card {
        padding: 20px 8px;
    }

    .cta-left h2 {
        font-size: 1.2rem;
    }


    /* ---------------------------------------------------------
       ABOUT PAGE
    --------------------------------------------------------- */

    .about-hero-copy h1 {
        font-size: 1.55rem;
    }

    .about-photo-frame {
        width: 92%;
        padding: 10px;
    }

    .story-point {
        gap: 12px;
    }

    .values-grid {
        grid-template-columns: 1fr 1fr;
    }


    /* ---------------------------------------------------------
       EXPERIENCE PAGE
    --------------------------------------------------------- */

    .exp-hero-copy h1 {
        font-size: 1.55rem;
        text-align: left;
    }
    .journey-icon {
        width: 52px;
        height: 52px;
        font-size: 1.1rem;
    }


    /* ---------------------------------------------------------
       QUALIFICATIONS PAGE
    --------------------------------------------------------- */

    .qual-hero-copy h1 {
        font-size: 1.5rem;
    }

    .cert-card {
        padding: 18px;
    }

    .lang-bar-track {
        margin-left: 0;
        width: 100%;
    }

    .lang-info {
        flex: 0 0 90px;
    }


    /* ---------------------------------------------------------
       CONTACT PAGE
    --------------------------------------------------------- */

    .contact-hero-copy h1 {
        font-size: 1.55rem;
    }

    .message-card {
        padding: 18px;
    }

    .form-field input,
    .form-field textarea {
        font-size: 0.86rem;
    }

    .impact-copy h2 {
        font-size: 1.4rem;
    }


    /* ---------------------------------------------------------
       DEVELOPER CARD
    --------------------------------------------------------- */

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

@media (max-width: 768px) {

    .exp-hero-copy {
        text-align: center;
    }

    .eyebrow-row {
        justify-content: center;
    }

    .exp-hero-copy h1 {
        text-align: center;
    }

    .exp-hero-copy p {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

}