/* ==========================================================================
   PORTFOLIO SECTION
   Organized and documented for easy customization
   ========================================================================== */

/* --------------------------------------------------------------------------
   PROJECTS SECTION BACKGROUND
   -------------------------------------------------------------------------- */
#projects {
    background-color: white;
}


/* --------------------------------------------------------------------------
   PORTFOLIO SECTION
   -------------------------------------------------------------------------- */
.portfolio {
    padding: 20px 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.portfolio-title {
    font-weight: 700;
    font-size: 4.5rem;
    text-align: center;
    margin-bottom: 2rem;
    margin-top: 20px;
    color: #4a5568;
}

.portfolio h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-align: center;
    color: var(--hero-3);
    line-height: 1.2;
}

.section-subtitle {
    text-align: center;
    color: var(--service-text);
    font-size: 1.1rem;
    margin-bottom: 20px;
}


/* --------------------------------------------------------------------------
   FILTER BUTTONS
   -------------------------------------------------------------------------- */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--hero-1);
    background-color: transparent;
    color: var(--hero-1);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
    background-color: var(--hero-1);
    color: var(--hsl-white);
}


/* --------------------------------------------------------------------------
   PORTFOLIO GRID
   -------------------------------------------------------------------------- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}


/* --------------------------------------------------------------------------
   PORTFOLIO ITEM CARD
   -------------------------------------------------------------------------- */
.portfolio-item {
    background: var(--hsl-white);
    padding: 25px;
    padding-bottom: 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color, #e5e7eb);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    opacity: 1;
    transform: translateY(0) scale(1);
    display: flex;
    flex-direction: column;
}

.portfolio-item:hover {
    transform: translateY(-5px) scale(1);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.portfolio-item h4 {
    color: var(--hero-1);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.portfolio-item-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--hero-3);
    margin-bottom: 10px;
}

.portfolio-item p {
    color: var(--service-text);
}


/* --------------------------------------------------------------------------
   TOOL BADGES
   -------------------------------------------------------------------------- */
.tool-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}

.tool-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 600;
}

/* Analytics Tools */
.tool-badge.python { background-color: rgba(55, 118, 171, 0.75); color: white; }
.tool-badge.powerbi { background-color: rgba(242, 200, 17, 0.75); color: black; }
.tool-badge.tableau { background-color: rgba(233, 118, 39, 0.75); color: white; }
.tool-badge.sql { background-color: rgba(204, 41, 39, 0.75); color: white; }
.tool-badge.excel { background-color: rgba(33, 115, 70, 0.75); color: white; }
.tool-badge.googlesheet { background-color: rgba(15, 157, 88, 0.75); color: white; }
.tool-badge.d3 { background-color: rgba(249, 177, 0, 0.75); color: black; }
.tool-badge.quarto { background-color: rgba(39, 109, 195, 0.75); color: white; }

/* IoT Tools */
.tool-badge.html { background-color: rgba(227, 79, 38, 0.75); color: white; }
.tool-badge.css { background-color: rgba(21, 114, 182, 0.75); color: white; }
.tool-badge.javascript { background-color: rgba(247, 223, 30, 0.75); color: black; }
.tool-badge.bootstrap { background-color: rgba(121, 82, 179, 0.75); color: white; }
.tool-badge.php { background-color: rgba(119, 123, 180, 0.75); color: white; }
.tool-badge.esp32 { background-color: rgba(231, 53, 44, 0.75); color: white; }

/* Systems Tools */
.tool-badge.java { background-color: rgba(237, 139, 0, 0.75); color: whitesmoke; }


/* --------------------------------------------------------------------------
   BUTTONS
   -------------------------------------------------------------------------- */
.more-details-btn {
    margin-top: auto;
    align-self: flex-start;
    padding: 8px 16px;
    padding-bottom: 13px;
    background-color: var(--hero-1);
    color: var(--hsl-white);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    height: 30px;
    width: 125px;
    justify-content: center;
    font-family: inherit;
    box-sizing: border-box;
}

.more-details-btn::-moz-focus-inner {
    border: 0;
    padding: 0;
}

.more-details-btn:hover {
    background-color: var(--hero-1);
    transform: scale(1.075);
}

.more-details-btn i {
    font-size: 1.1rem;
    margin-right: 5px;
    margin-left: 0;
    margin-top: 3px;
    margin-bottom: 0;
}

.more-details-btn span {
    margin-top: 5px;
    margin-bottom: 0;
    margin-left: 3px;
    margin-right: 0;
}


/* -------------------------------------------------------------------------- 
   MODAL (Under Construction) - Portfolio Modal
   -------------------------------------------------------------------------- */
/* Override Bootstrap modal styles */
#underConstructionModal.modal {
    display: none;
    position: fixed !important;
}

#underConstructionModal {
    display: none;
    position: fixed !important;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#underConstructionModal.show {
    display: flex !important;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

#underConstructionModal .modal-content {
    background-color: #ffffff;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    padding: 40px;
    border-radius: 15px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: modalSlideIn 0.4s ease;
    border: 1px solid #e0e4e5;
    margin: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: var(--service-text);
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.close-btn:hover {
    color: #dc2626;
}

.error-icon {
    font-size: 3.5rem;
    color: #dc2626;
    margin-bottom: 15px;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.modal-content h2 {
    color: #dc2626;
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 700;
}

.error-message {
    color: #7f1d1d;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.error-submessage {
    color: var(--service-text);
    font-size: 0.95rem;
    margin-bottom: 25px;
}


/* --------------------------------------------------------------------------
   RESPONSIVE STYLES
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .portfolio h2 {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }
    .section-subtitle {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .portfolio-item {
        padding: 20px;
    }
    .portfolio-item h4 {
        font-size: 1.05rem;
    }
    .portfolio-item-title {
        font-size: 2rem;
    }
    .filter-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    .modal-content {
        width: 90%;
        max-width: 400px;
    }
    .error-icon {
        font-size: 2.8rem;
    }
    .modal-content h2 {
        font-size: 1.3rem;
    }
    .error-message {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .portfolio h2 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    .section-subtitle {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    .portfolio-grid {
        gap: 15px;
    }
    .portfolio-item {
        padding: 15px;
    }
    .portfolio-item h4 {
        font-size: 0.95rem;
    }
    .portfolio-item-title {
        font-size: 2rem;
    }
    .portfolio-item p {
        font-size: 0.9rem;
    }
    .filter-btn {
        padding: 7px 12px;
        font-size: 0.85rem;
    }
    .modal-content {
        width: 90%;
        max-width: 320px;
    }
    .close-btn {
        top: 10px;
        right: 15px;
        font-size: 24px;
    }
    .error-icon {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }
    .modal-content h2 {
        font-size: 1.15rem;
        margin-bottom: 12px;
    }
    .error-message {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }
    .error-submessage {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }
}
