:root {
    --bg-dark: #0F0F11;
    --accent-color: #E2B65A;
    --text-white: #F8FAFC;
    --text-muted: #b6b6b6;
    --font-poppins: "Poppins", sans-serif;
    --font-mono: "Roboto Mono", monospace;
}

/* HERO */
.projects-page {
    min-height: 100vh;
}

.portfolio-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 75px 20px;
    position: relative;
}

.hero-title {
    font-size: 7.5rem;
    font-weight: 800;
    color: var(--accent-color);
    text-transform: uppercase;
    text-shadow: 0 0 100px rgba(226, 182, 90, 0.8),
                 0 0 40px rgba(226, 182, 90, 0.05);
}

.hero-subtitle {
    color: var(--text-white);
    font-size: 1.3rem;
    max-width: 1200px;
    margin: 0 auto;
    line-height: 1.6;
    letter-spacing: 0.5px;
    font-weight: 200;
}

.hero-subtitle span {
    color: var(--text-white);
    font-weight: 600;
}


/* FILTER & GRID PROJECTS */
.portfolio-content {
    width: 100%;
    margin: 0 auto;
    padding: 32px 100px 100px;
}

.portfolio-layout-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.category-sidebar {
    width: 383px;
    background-color: var(--bg-dark);
    border: 2px solid var(--accent-color);
    padding: 24px;
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(226, 182, 90, 0.4);
}

.category-list {
    list-style: none;
    padding: 8px 0 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-link {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(248, 250, 252, 0.4);
    text-decoration: none;
    font-size: 1.1rem;
    padding: 12px 24px;
    transition: all 0.3s ease;
    margin-left: -24px;
    margin-right: -24px;
    transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

.category-link:hover {
    color: var(--accent-color);
    background-color: rgba(226, 182, 90, 0.05);
}

.category-link.active {
    color: var(--accent-color);
    font-weight: 700;
    background-color: rgba(226, 182, 90, 0.1);
}

.category-link span {
    font-size: 0.75rem;
    color: #555555;
}

.category-link.active span {
    color: #e2b65a;
}

.grid-dinamico-proyectos {
    width: 100%;
    max-width: 1270px;
    margin: 0 auto;
    column-count: 3;
    column-gap: 24px;
}

.filter-toggle {
    display: none;
}

.portfolio-item {
    break-inside: avoid; 
    width: 100%;
    margin-bottom: 24px;
    border-radius: 20px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border: 2px solid var(--bg-dark); 
    text-decoration: none; 
    color: inherit;
    cursor: pointer;
    opacity: 1;
    transform: scale(1);
    transition: 
        border-color 0.3s ease, 
        box-shadow 0.3s ease, 
        opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
        transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item.is-hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.portfolio-item:not(.is-hidden):hover {
    border-color: var(--accent-color); 
    box-shadow: 0 0 15px rgba(226, 182, 90, 0.2);
}

.portfolio-item:not(.is-hidden):hover .label {
    opacity: 1;
}

.portfolio-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
}

.label {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.portfolio-item:hover {
    border-color: var(--accent-color); 
    box-shadow: 0 0 15px rgba(226, 182, 90, 0.2);
}

.portfolio-item:hover .label {
    opacity: 1;
}

.label h2 {
    color: var(--text-white);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
    text-align: center;
    text-shadow: 0 0 5px rgba(15, 15, 17, 0.25);
}

.software-badge {
    background-color: var(--accent-color);
    color: var(--bg-dark);
    font-size: 0.7rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-top: -6px;
}

.software-badge img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    filter: brightness(0) saturate(100%) invert(6%) sepia(2%) saturate(2080%) hue-rotate(219deg) brightness(95%) contrast(100%);
}

.software-icon-text {
    background-color: #000000;
    color: #e2b65a;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 2px 4px;
    border-radius: 4px;
    line-height: 1;
}

.f-21-9 { 
    background-color: #0b172b; 
    aspect-ratio: 21 / 9;
    height: auto; 
}

.f-16-9 { 
    background-color: #053525; 
    aspect-ratio: 16 / 9;
    height: auto; 
}

.f-1-1  { 
    background-color: #211342; 
    aspect-ratio: 1 / 1;
    height: auto; 
}

.f-4-5  { 
    background-color: #493004; 
    aspect-ratio: 4 / 5;
    height: auto; 
}

.f-9-16 { 
    background-color: #4d1616; 
    aspect-ratio: 9 / 16;
    height: auto; 
}


/* FOOTER */
.portfolio-footer {
    background-color: var(--accent-color);
    padding: 60px 20px 30px 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 120px;
}

.footer-cta-card {
    background-color: var(--text-white);
    border-radius: 30px;
    max-width: 1100px;
    width: 100%;
    margin-top: -140px;
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 105px;
    position: relative;
    overflow: visible;
    min-height: 225px;
}

.cta-content {
    padding: 40px 0;
}

.cta-content h2 {
    color: var(--bg-dark);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 18px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.btn-send-message {
    display: inline-block;
    background-color: #e2b65a;
    color: #000000;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    padding: 10px 72px;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(226, 182, 90, 0.2);
}

.btn-send-message:hover {
    transform: translateY(-3px);
    background-color: #d1a547;
    box-shadow: 0 6px 18px rgba(226, 182, 90, 0.3);
}

.cta-avatar-wrapper {
    position: relative;
    align-self: flex-end;
    height: 100%;
}

.cta-avatar {
    display: block;
    height: 220px;
    width: auto;
    object-fit: contain;
    margin-bottom: -4px;
    transform: translateY(-4px);
    filter: drop-shadow(2px -2px 2px rgba(0, 0, 0, 0.5)) grayscale(100%) brightness(1.2) contrast(1);
    transition: filter 0.4s ease, transform 0.3s ease;
}

.cta-avatar:hover {
    filter: drop-shadow(2px -2px 2px rgba(0, 0, 0, 0.5)) grayscale(0%) brightness(1) contrast(1);
    transform: translateY(-8px) scale(1.04);
}

.footer-credits {
    margin: 40px 0 10px;
    text-align: center;
}

.footer-credits p {
    color: var(--text-white);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 400;
}


/* RESPONSIVE DESIGN */

/* PC & LAPTOPS */
@media (max-width: 1400px) {
    .portfolio-content {
        padding: 32px 40px 80px;
    }

    .hero-title {
        font-size: 6rem;
    }

    .label h2 {
        font-size: 1.5rem;
    }
}

/* SMALL LAPTOP & TABLETS */
@media (max-width: 1150px) {
    .hero-title {
        font-size: 5rem;
    }
    .portfolio-layout-container {
        gap: 24px;
    }
    .category-sidebar {
        width: 280px;
    }
    .grid-dinamico-proyectos {
        column-count: 2;
    }
}

@media (min-width: 1025px) {
    .category-sidebar {
        position: sticky;
        top: 40px;
    }
}

/* VERTICAL TABLETS & MOBILES */
@media (max-width: 1024px) {
    .portfolio-hero {
        padding: 50px 20px 20px;
    }
    .hero-title {
        font-size: 5rem;
        text-shadow: 0 0 60px rgba(226, 182, 90, 0.6);
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }

    .portfolio-layout-container {
        flex-direction: column;
        gap: 32px;
        align-items: stretch;
    }

    .category-sidebar {
        width: 100%;
        padding: 16px;
        position: relative;
        z-index: 10;
        border-radius: 12px;
    }

    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .sidebar-title {
        font-size: 1.4rem;
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    .filter-toggle {
        display: flex;
        align-items: center;
        gap: 12px;
        background-color: rgba(226, 182, 90, 0.1);
        border: 1px solid var(--accent-color);
        color: var(--accent-color);
        padding: 8px 16px;
        border-radius: 8px;
        font-family: var(--font-poppins);
        font-weight: 600;
        font-size: 0.95rem;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .filter-toggle:hover {
        background-color: rgba(226, 182, 90, 0.2);
    }

    .toggle-icon {
        font-size: 0.75rem;
        transition: transform 0.3s ease;
    }

    .category-sidebar.is-open .toggle-icon {
        transform: rotate(180deg);
    }

    .category-list {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        gap: 4px;
        padding: 0;
        margin-top: 0;
        transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, margin-top 0.3s ease;
    }

    .category-sidebar.is-open .category-list {
        max-height: 300px;
        opacity: 1;
        margin-top: 16px;
        padding-top: 12px;
        border-top: 1px solid rgba(226, 182, 90, 0.2);
    }

    .category-link {
        margin-left: 0;
        margin-right: 0;
        padding: 10px 16px;
        border-radius: 8px;
    }

    .label h2 {
        font-size: 1.7rem;
    }

    .footer-cta-card {
        padding: 0 60px;
    }
}

/* SMALL MOBILES */
@media (max-width: 768px) {
    .portfolio-content {
        padding: 16px 20px 60px;
    }
    
    .hero-title {
        font-size: 3rem;
    }

    .grid-dinamico-proyectos {
        column-count: 1;
        column-gap: 0;
    }

    .portfolio-item {
        margin-bottom: 16px;
        border-radius: 16px;
    }

    .footer-cta-card {
        flex-direction: column;
        text-align: center;
        padding: 32px 24px 0;
        min-height: auto;
        gap: 24px;
    }

    .cta-content {
        padding: 0;
    }

    .cta-content h2 {
        font-size: 1.6rem;
    }

    .btn-send-message {
        width: 100%;
        padding: 12px 0;
    }

    .cta-avatar-wrapper {
        align-self: center;
    }

    .cta-avatar {
        height: 160px;
    }
}