/* =========================================================
   M-RESEARCH
   PORTFOLIO PAGE
   ========================================================= */


/* =========================================================
   PORTFOLIO HERO
   ========================================================= */

.portfolio-hero {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background:
        linear-gradient(
            90deg,
            rgba(12, 29, 18, 0.95),
            rgba(12, 29, 18, 0.70)
        ),
        url("../images/portfolio/portfolio-hero.jpg")
        center / cover no-repeat;
    color: var(--mr-white);
}

.portfolio-hero-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.portfolio-hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
    padding: 80px 0;
}

.portfolio-hero-content .home-section-label {
    margin-bottom: 18px;
    color: var(--mr-gold-400);
}

.portfolio-hero-content h1 {
    max-width: 760px;
    margin: 0;
    color: var(--mr-white);
    font-size: clamp(42px, 6vw, 76px);
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.portfolio-hero-content h1 span {
    color: var(--mr-gold-400);
}

.portfolio-hero-content > p:last-child {
    max-width: 650px;
    margin: 26px 0 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 15px;
    line-height: 1.85;
}


/* =========================================================
   INTRO
   ========================================================= */

.portfolio-intro {
    padding: 100px 0;
    background: var(--mr-white);
}

.portfolio-intro-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);
    gap: 100px;
    align-items: start;
}

.portfolio-intro-grid h2 {
    max-width: 520px;
    margin: 18px 0 0;
    color: var(--mr-green-900);
    font-size: clamp(34px, 4vw, 54px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.portfolio-intro-grid h2 span {
    color: var(--mr-gold-600);
}

.portfolio-intro-grid > div:last-child {
    padding-top: 38px;
}

.portfolio-intro-grid > div:last-child p {
    max-width: 620px;
    margin: 0 0 18px;
    color: var(--mr-text-muted);
    font-size: 14px;
    line-height: 1.9;
}

.home-section-label {
    margin: 0;
    color: var(--mr-gold-600);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}


/* =========================================================
   PORTFOLIO PROJECTS
   ========================================================= */

.portfolio-projects {
    width: 100%;
    background: var(--mr-ivory);
}

.portfolio-projects > .container {
    width: 100%;
    max-width: none;
    padding: 0;
}

.portfolio-project {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.portfolio-project-grid {
    width: 100%;
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);
    gap: 80px;
    padding:
        105px max(48px, calc((100vw - 1240px) / 2));
}

.portfolio-project-number {
    position: absolute;
    top: 42px;
    right: max(48px, calc((100vw - 1240px) / 2));
    z-index: 2;
    color: var(--mr-gold-500);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
}


/* =========================================================
   PROJECT BRAND / LOGOS
   ========================================================= */

.portfolio-project-brand {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20px;
}

.portfolio-logo {
    width: 310px;
    height: 165px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 24px;
}

.portfolio-logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 300px;
    max-height: 150px;
    object-fit: contain;
    transition:
        transform var(--mr-transition),
        filter var(--mr-transition);
}

.portfolio-project-brand:hover .portfolio-logo img {
    transform: translateY(-3px);
}

.portfolio-project-brand > span {
    color: var(--mr-text-muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
}


/* =========================================================
   PROJECT CONTENT
   ========================================================= */

.portfolio-project-content {
    min-width: 0;
    max-width: 720px;
}

.portfolio-project-category {
    margin: 0 0 15px;
    color: var(--mr-gold-600);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.14em;
    line-height: 1.5;
}

.portfolio-project-content h2 {
    margin: 0 0 14px;
    color: var(--mr-green-900);
    font-size: clamp(42px, 5vw, 64px);
    font-weight: 500;
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.portfolio-project-content h3 {
    max-width: 650px;
    margin: 0 0 26px;
    color: var(--mr-green-700);
    font-size: 20px;
    font-weight: 500;
    line-height: 1.45;
}

.portfolio-project-content > p:not(.portfolio-project-category) {
    max-width: 700px;
    margin: 0 0 16px;
    color: var(--mr-text-muted);
    font-size: 13px;
    line-height: 1.85;
}


/* =========================================================
   PROJECT FEATURES
   ========================================================= */

.portfolio-feature-list {
    width: 100%;
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    margin-top: 32px;
    border-top: 1px solid var(--mr-border);
}

.portfolio-feature-list div {
    min-width: 0;
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--mr-border);
    color: var(--mr-green-900);
    font-size: 11px;
    font-weight: 500;
}

.portfolio-feature-list span {
    flex-shrink: 0;
    color: var(--mr-gold-600);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.05em;
}


/* =========================================================
   FEATURE DESCRIPTIONS
   ========================================================= */

.portfolio-feature-description {
    width: 100%;
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 20px;
}

.portfolio-feature-description p {
    margin: 0;
    color: var(--mr-text-muted);
    font-size: 10px;
    line-height: 1.7;
}


/* =========================================================
   PROJECT ACTION BUTTON
   ========================================================= */

.portfolio-project-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    min-height: 50px;
    margin-top: 34px;
    padding: 0 20px 0 22px;
    overflow: hidden;
    border: 1px solid var(--mr-gold-600);
    background: transparent;
    color: var(--mr-green-900);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition:
        background var(--mr-transition),
        color var(--mr-transition),
        border-color var(--mr-transition),
        transform var(--mr-transition),
        box-shadow var(--mr-transition);
}

.portfolio-project-link::before {
    content: "";
    position: absolute;
    inset: 0;
    width: 0;
    background: var(--mr-gold-500);
    transition: width 0.35s ease;
    z-index: 0;
}

.portfolio-project-link span,
.portfolio-project-link svg {
    position: relative;
    z-index: 1;
}

.portfolio-project-link svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--mr-gold-600);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition:
        transform var(--mr-transition),
        stroke var(--mr-transition);
}

.portfolio-project-link:hover {
    border-color: var(--mr-gold-500);
    color: var(--mr-green-950);
    transform: translateY(-3px);
    box-shadow:
        0 10px 24px rgba(12, 29, 18, 0.12);
}

.portfolio-project-link:hover::before {
    width: 100%;
}

.portfolio-project-link:hover svg {
    stroke: var(--mr-green-950);
    transform: translateX(5px);
}

.portfolio-project-link:focus-visible {
    outline: 2px solid var(--mr-gold-500);
    outline-offset: 4px;
}


/* =========================================================
   DARK PROJECT
   ========================================================= */

.portfolio-project-dark {
    background: var(--mr-green-950);
}

.portfolio-project-dark .portfolio-project-brand > span {
    color: rgba(255, 255, 255, 0.46);
}

.portfolio-project-dark .portfolio-project-category {
    color: var(--mr-gold-400);
}

.portfolio-project-dark .portfolio-project-content h2 {
    color: var(--mr-white);
}

.portfolio-project-dark .portfolio-project-content h3 {
    color: rgba(255, 255, 255, 0.78);
}

.portfolio-project-dark .portfolio-project-content > p:not(.portfolio-project-category) {
    color: rgba(255, 255, 255, 0.56);
}

.portfolio-project-dark .portfolio-feature-list {
    border-color: rgba(255, 255, 255, 0.1);
}

.portfolio-project-dark .portfolio-feature-list div {
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.72);
}

.portfolio-project-dark .portfolio-feature-list span {
    color: var(--mr-gold-400);
}

.portfolio-project-dark .portfolio-feature-description p {
    color: rgba(255, 255, 255, 0.42);
}

.portfolio-project-dark .portfolio-project-link {
    border-color: rgba(208, 167, 83, 0.7);
    color: var(--mr-white);
}

.portfolio-project-dark .portfolio-project-link svg {
    stroke: var(--mr-gold-400);
}

.portfolio-project-dark .portfolio-project-link:hover {
    color: var(--mr-green-950);
}


/* =========================================================
   LIGHT PROJECT
   ========================================================= */

.portfolio-project-light {
    background: var(--mr-white);
}


/* =========================================================
   PORTFOLIO STATEMENT
   ========================================================= */

.portfolio-statement {
    padding: 110px 0;
    background: var(--mr-ivory);
}

.portfolio-statement-inner {
    max-width: 820px;
}

.portfolio-statement-inner h2 {
    max-width: 780px;
    margin: 18px 0 24px;
    color: var(--mr-green-900);
    font-size: clamp(38px, 5vw, 62px);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.portfolio-statement-inner h2 span {
    color: var(--mr-gold-600);
}

.portfolio-statement-inner > p:last-child {
    max-width: 680px;
    margin: 0;
    color: var(--mr-text-muted);
    font-size: 14px;
    line-height: 1.9;
}


/* =========================================================
   CTA
   ========================================================= */

.portfolio-cta {
    padding: 90px 0;
    background: var(--mr-green-900);
}

.portfolio-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 70px;
}

.portfolio-cta-inner > div {
    max-width: 760px;
}

.portfolio-cta-inner .home-section-label {
    color: var(--mr-gold-400);
}

.portfolio-cta-inner h2 {
    margin: 18px 0 20px;
    color: var(--mr-white);
    font-size: clamp(36px, 5vw, 58px);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.portfolio-cta-inner h2 span {
    color: var(--mr-gold-400);
}

.portfolio-cta-inner p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: 13px;
    line-height: 1.85;
}


/* =========================================================
   CTA BUTTON
   ========================================================= */

.portfolio-cta-button {
    position: relative;
    flex-shrink: 0;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    padding: 0 24px 0 26px;
    overflow: hidden;
    border: 1px solid var(--mr-gold-500);
    background: var(--mr-gold-500);
    color: var(--mr-green-950);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    white-space: nowrap;
    text-decoration: none;
    transition:
        background var(--mr-transition),
        color var(--mr-transition),
        border-color var(--mr-transition),
        transform var(--mr-transition),
        box-shadow var(--mr-transition);
}

.portfolio-cta-button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--mr-white);
    transform: translateX(-101%);
    transition: transform 0.35s ease;
}

.portfolio-cta-button svg {
    position: relative;
    z-index: 1;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--mr-green-950);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition:
        transform var(--mr-transition),
        stroke var(--mr-transition);
}

.portfolio-cta-button {
    isolation: isolate;
}

.portfolio-cta-button::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
}

.portfolio-cta-button:hover {
    border-color: var(--mr-white);
    color: var(--mr-green-950);
    transform: translateY(-3px);
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.18);
}

.portfolio-cta-button:hover::before {
    transform: translateX(0);
}

.portfolio-cta-button:hover svg {
    transform: translateX(5px);
}

.portfolio-cta-button:focus-visible {
    outline: 2px solid var(--mr-gold-400);
    outline-offset: 4px;
}


/* =========================================================
   LARGE TABLET
   ========================================================= */

@media (max-width: 1050px) {

    .portfolio-intro-grid {
        gap: 60px;
    }

    .portfolio-project-grid {
        gap: 55px;
        padding: 90px 40px;
    }

    .portfolio-project-number {
        right: 40px;
    }

    .portfolio-logo {
        width: 280px;
        height: 150px;
    }

    .portfolio-logo img {
        max-width: 270px;
        max-height: 140px;
    }

    .portfolio-cta-inner {
        gap: 45px;
    }
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 800px) {

    .portfolio-hero {
        min-height: 370px;
    }

    .portfolio-hero-content {
        padding: 70px 0;
    }

    .portfolio-intro {
        padding: 80px 0;
    }

    .portfolio-intro-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .portfolio-intro-grid > div:last-child {
        padding-top: 0;
    }

    .portfolio-project-grid {
        grid-template-columns: 1fr;
        gap: 45px;
        padding: 80px 40px;
    }

    .portfolio-project-brand {
        padding-top: 10px;
    }

    .portfolio-logo {
        width: 320px;
        height: 150px;
    }

    .portfolio-logo img {
        max-width: 310px;
        max-height: 140px;
    }

    .portfolio-project-content {
        max-width: 760px;
    }

    .portfolio-project-link {
        margin-top: 30px;
    }

    .portfolio-statement {
        padding: 85px 0;
    }

    .portfolio-cta {
        padding: 75px 0;
    }

    .portfolio-cta-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 35px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .portfolio-hero {
        min-height: 330px;
        background-position: center;
    }

    .portfolio-hero-content {
        padding: 60px 0;
    }

    .portfolio-hero-content h1 {
        font-size: clamp(38px, 11vw, 52px);
    }

    .portfolio-hero-content > p:last-child {
        margin-top: 20px;
        font-size: 13px;
        line-height: 1.75;
    }

    .portfolio-intro {
        padding: 65px 0;
    }

    .portfolio-intro-grid h2 {
        font-size: 38px;
    }

    .portfolio-project-grid {
        gap: 35px;
        padding: 70px 24px;
    }

    .portfolio-project-number {
        top: 28px;
        right: 24px;
    }

    .portfolio-logo {
        width: 250px;
        height: 125px;
        margin-bottom: 20px;
    }

    .portfolio-logo img {
        max-width: 240px;
        max-height: 115px;
    }

    .portfolio-project-content h2 {
        font-size: 42px;
    }

    .portfolio-project-content h3 {
        font-size: 17px;
    }

    .portfolio-project-content > p:not(.portfolio-project-category) {
        font-size: 12px;
        line-height: 1.8;
    }

    .portfolio-feature-list {
        grid-template-columns: 1fr;
    }

    .portfolio-feature-list div {
        min-height: 52px;
    }

    .portfolio-feature-description {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .portfolio-project-link {
        width: 100%;
        min-height: 52px;
        margin-top: 28px;
    }

    .portfolio-statement {
        padding: 70px 0;
    }

    .portfolio-statement-inner h2 {
        font-size: 40px;
    }

    .portfolio-cta {
        padding: 65px 0;
    }

    .portfolio-cta-inner h2 {
        font-size: 40px;
    }

    .portfolio-cta-button {
        width: 100%;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

    .portfolio-hero {
        min-height: 310px;
    }

    .portfolio-hero-content {
        padding: 52px 0;
    }

    .portfolio-hero-content h1 {
        font-size: 36px;
    }

    .portfolio-intro-grid h2 {
        font-size: 34px;
    }

    .portfolio-project-grid {
        padding: 62px 16px;
    }

    .portfolio-project-number {
        right: 16px;
    }

    .portfolio-logo {
        width: 225px;
        height: 110px;
    }

    .portfolio-logo img {
        max-width: 215px;
        max-height: 100px;
    }

    .portfolio-project-content h2 {
        font-size: 38px;
    }

    .portfolio-project-content h3 {
        font-size: 16px;
    }

    .portfolio-project-category {
        font-size: 9px;
    }

    .portfolio-statement-inner h2,
    .portfolio-cta-inner h2 {
        font-size: 35px;
    }
}