
.page-header {
    background-color: #000;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 98%;
    margin: 0 auto;
    padding: 1rem 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
}

.nav-desktop-container {
    display: flex;
    justify-content: flex-end;
    flex: 1;
    min-width: 0;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
}

.brand-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    margin: 0;
    line-height: 0.85;
    margin-bottom: 0.05em;
    width: fit-content;
}

.brand-subtitle {
    font-size: clamp(0.85rem, 1.6vw, 1rem);
    font-weight: 700;
    margin: 0;
    opacity: 0.8;
    line-height: 1;
    text-transform: uppercase;
    width: 100%;
    display: flex;
    justify-content: space-between;
    letter-spacing: 0;
}

.brand-subtitle .letter {
    flex: 0 0 auto;
}

.nav-desktop {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-content: flex-start;
    flex: 1;
    min-width: 0;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    font-weight: 700;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    opacity: 0.7;
}

.nav-separator {
    color: #ffffff;
    opacity: 0.6;
    font-weight: bold;
    margin: 0 0.3rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 0.3rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: #ffffff;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.nav-mobile {
    display: none;
    background-color: #000;
    border-top: 1px solid #333;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-mobile.active {
    max-height: 200px;
}

.nav-mobile-content {
    padding: 1rem 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    max-width: 98%;
    margin: 0 auto;
}

.nav-mobile-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.nav-mobile-link:hover {
    opacity: 0.7;
}

.portfolio-container {
    min-height: calc(100vh - 160px);
    padding: 1.5rem 0.5rem;
    max-width: 98%;
    margin: 0 auto;
    font-weight: bold;
}

.portfolio-intro-text {
    text-align: left;
    max-width: 100%;
    margin: 0 auto 1.5rem auto;
    padding: 0 2px;
}

.portfolio-intro-text p {
    font-size: clamp(0.85rem, 2vw, 1.1rem);
    color: #ccc;
    line-height: 1.6;
    margin: 0;
    font-weight: bold;
    text-align: justify;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    margin-top: 2rem;
}

/* Large screens: 4 items per row */
@media (max-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 900px;
        justify-content: center;
    }
}

/* Tablet screens: 3 items per row */
@media (max-width: 900px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 100%;
        gap: 1rem;
        justify-content: center;
    }
}

.portfolio-card {
    background: transparent;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    border-color: #555;
}

.portfolio-image {
    width: 100px;
    height: 100px;
    margin: 0 auto 0.8rem auto;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #333;
    flex-shrink: 0;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-card:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.portfolio-name {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
    color: #ffffff;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.portfolio-role {
    font-size: 0.85rem;
    font-weight: bold;
    color: #ccc;
    margin-bottom: 0.8rem;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    flex: 1;
}

.portfolio-details-btn {
    background-color: #333;
    color: #ffffff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: 600;
    font-family: 'Courier New', Courier, monospace;
    transition: background-color 0.3s ease;
    display: inline-block;
    font-size: 0.75rem;
    margin-top: auto;
    white-space: nowrap;
    text-align: center;
    min-width: fit-content;
}

.portfolio-details-btn:hover {
    background-color: #555;
}

@media (max-width: 600px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
        max-width: 95%;
        justify-content: center;
    }

    .portfolio-container {
        padding: 15px 5px;
    }

    .portfolio-card {
        padding: 0.8rem;
    }

    .portfolio-image {
        width: 80px;
        height: 80px;
        margin-bottom: 0.6rem;
    }

    .portfolio-name {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }

    .portfolio-role {
        font-size: 0.75rem;
        margin-bottom: 0.6rem;
    }

    .portfolio-details-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.6rem;
        max-width: 98%;
        justify-content: center;
    }

    .portfolio-card {
        padding: 0.6rem;
    }

    .portfolio-image {
        width: 70px;
        height: 70px;
        margin-bottom: 0.5rem;
    }

    .portfolio-name {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
    }

    .portfolio-role {
        font-size: 0.7rem;
        margin-bottom: 0.5rem;
    }

    .portfolio-details-btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.65rem;
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }

    .nav-toggle {
        display: flex;
        order: 2;
        margin-left: 2rem;
    }

    .nav-mobile {
        display: block;
    }

    .header-content {
        padding: 1rem 8px;
    }

    .brand-title {
        font-size: 1.5rem;
        line-height: 0.9;
        margin-bottom: 0.1em;
    }

    .brand-subtitle {
        font-size: 0.8rem;
        text-align: justify;
        text-align-last: justify;
        letter-spacing: 0.1em;
    }

    .portfolio-container {
        padding: 20px 15px;
    }
    
    .portfolio-intro-text {
        padding: 0 10px;
    }
}

@media (max-width: 380px) {
    .header-content {
        padding: 0.8rem 5px;
    }

    .brand-title {
        font-size: 1.3rem;
        line-height: 0.9;
        margin-bottom: 0.1em;
    }

    .brand-subtitle {
        font-size: 0.7rem;
        text-align: justify;
        text-align-last: justify;
        letter-spacing: 0.05em;
    }
}
