:root {
    --nav-offset: 74px;
    --content-width: 85vw;
    --content-max-width: 1600px;
    --gap: 2rem;
    --image-percent: 50%;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: 'Inter', system-ui, sans-serif;
    color: #000000;
}

/* Page background + spacing */
.portfolio-page {
    padding-top: calc(var(--nav-offset) + 40px);  /* push content below title & navbar */
    padding-bottom: 60px;

    background: #F2CD13;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* TITLE OUTSIDE CONTENT */
.portfolio-header {
    width: 100%;
    text-align: center;
    margin-bottom: 30px;
}

.portfolio-title {
    font-size: 48px;
    font-weight: 800;
}

.portfolio-subtitle {
    font-size: 18px;
    opacity: 0.9;
}

/* Inner 75% container */
.portfolio-inner {
    width: var(--content-width);
    max-width: var(--content-max-width);
    min-width: 320px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border-radius: 20px;
    background:  #cfcfc0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.52);
}

/* Project item layout */
.item {
    display: flex;
    gap: var(--gap);
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid rgba(255,255,255,0.06);
    justify-content: center;
    margin-bottom: clamp(2rem, 5vw, 4rem);
}
/* Frame styling for both images and videos */
.item-image {
    display: inline-flex;           /* shrink-wrap the content */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    align-self: center;
    background: #242424;
    padding: 0.5rem 0.75rem;        /* balanced padding */
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);

    margin: 2rem auto;              /* center on page */
}

/* Images: scale naturally, keep inside frame */
.item-image .contentImage {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;        /* never exceed frame */
    max-height: 600px;      /* optional limit for tall images */
    object-fit: contain;
    border-radius: 12px;
}

/* Video container frame */
.video-container {
    align-self: center;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    background: #242424;
    padding: 0.75rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 5px solid #d64045;
    border-right: 5px solid #d64045;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);

    margin: 2rem auto;          /* center on page */
    width: 90%;                 /* make it bigger on large screens */
    max-width: 1200px;          /* max size for large displays */
}

/* Keep video proportional */
.video-container iframe {
    width: 100%;                /* fill container width */
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 12px;
    display: block;
}

/* Text column */
.item-content {
    align-self: center;
    width: calc(100% - var(--image-percent));
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.item-title {
    margin-bottom: 0.75rem;
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.02em;    
    align-items: center;
    text-align: center;
    color: #0f172a; /* deep slate */
}

.item-step-title {
    font-size: clamp(1.15rem, 2vw, 1.35rem);
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.4rem;
}

.item-description {
    max-width: 68ch;
    font-size: clamp(1.05rem, 1.1vw, 1.125rem);
    line-height: 1.8;
    color: #333c45;
    margin-bottom: 0.6rem;
}

.item-list {
    margin: 0.6rem 0 0.9rem 0;
    padding-left: 1.25rem;          /* same as paragraph rhythm */
    list-style-type: disc;
    font-size: clamp(1.05rem, 1.1vw, 1.125rem);
    line-height: 1.75;
    color: #333c45;
}

.item-list li {
    margin-bottom: 0.3rem;
}

.item-list li::marker {
    color: #333c45;
}

.portfolio-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-button {
    background: #d64045;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 999px;
    padding: 0.5rem 1.25rem;

    font-weight: 700;
    cursor: pointer;
    color: #ffffff;

    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition:
            background 0.2s ease,
            color 0.2s ease,
            transform 0.15s ease,
            box-shadow 0.2s ease;
}

.tab-button:hover {
    background: #b03338;          /* Slightly darker red */
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35); /* stronger shadow on hover */
    transform: translateY(-2px);   /* subtle lift effect */
}

.tab-button.active {
    background: #364336;
    color: #ffffff;
    border-color: #1F2A1F;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px);
}
/* ============================================
   TAB BUTTON SHINE ANIMATION (LEFT → RIGHT)
   ============================================ */

.tab-button {
    position: relative;
    overflow: hidden; /* required for sweep containment */
}

/* Shine layer */
.tab-button::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -120%;
    width: 60%;
    height: 200%;

    background: linear-gradient(
            120deg,
            transparent 0%,
            rgba(255, 255, 255, 0.45) 50%,
            transparent 100%
    );

    transform: skewX(-20deg);
    pointer-events: none;
    opacity: 0;
}

/* Animation trigger */
.tab-button:not(.active)::after {
    animation: shineSweep 4s ease-in-out infinite;
}

/* Pause on hover (polish) */
.tab-button:hover::after {
    animation-play-state: paused;
    opacity: 0.8;
}

/* Keyframes */
@keyframes shineSweep {
    0% {
        left: -120%;
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    40% {
        left: 120%;
        opacity: 0;
    }

    100% {
        left: 120%;
        opacity: 0;
    }
}

/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .tab-button::after {
        animation: none;
    }
}

.portfolio-section {
    display: none;
}

.portfolio-section.active {
    display: block;
}

.feature-card {
    align-self: center;
    margin: 2rem 0;
    padding: 1.4rem 1.6rem;

    background: #242424;
    color: #f5f5f5;

    border-radius: 14px;
    /*border-left: 5px solid #d64045;*/
    /*border-right: 5px solid #d64045;*/
    box-shadow: 0 6px 18px rgba(255, 0, 0, 0.35);
}

.feature-title {
    display: block;
    text-align: center;

    margin-bottom: 1rem;

    font-size: 1.25rem;
    font-weight: 600;
    color: #F2CD13; /* yellow accent */
}

.feature-description {
    font-size: 1.15rem;
    line-height: 1.55;
}
.feature-outcome {
    margin-top: 1.4rem;
    padding-top: 0.9rem;

    display: flex;
    gap: 0.75rem;
    align-items: center;

    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.outcome-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #F2CD13; /* yellow */
}

.outcome-text {
    font-size: 0.9rem;
    color: #f5f5f5;
}

.key-outcome {
    margin: 1rem 0;
    border-radius: 10px;
    background: #242424; /* dark card background */
    color: #f5f5f5;
    font-size: 1.15rem;
    line-height: 1.4;
}

.key-outcome strong {
    color: #F2CD13; /* yellow accent */
    font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    :root {
        --content-width: 86vw;
        --image-percent: 48%;
    }
}

@media (max-width: 1400px) {
    
    .item {
        flex-direction: column;
        text-align: start;
    }
    .item-image {
        width: 100%;
        max-width: 600px;
    }
    .item-content {
        width: 100%;
    }
    .types {
        justify-content: center;
    }
}
@media (max-width: 768px) {
    .contentImage {
        max-width: 85%;
    }
    .portfolio-tabs {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
}
@media (max-width: 480px) {
    .portfolio-title { font-size: 32px; }
    .item-title { font-size: 24px; }
    .item-description { font-size: 16px; }
}