* {
    margin: 10;
    padding: 10;
    box-sizing: border-box;
    font-family: sans-serif;
}

.navbar {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    background-color: #333;
    color: white;
    padding: 15px 30px;
    position: relative;
    min-height: 110px;
}

.header-title {
    justify-content: flex-start;
}

.header-title h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
}

.header-title p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.8; /* Makes the subtitle slightly subtle */
}

.header-title a {
    color: white;
    text-decoration: none;
}

.header-title a:hover {
    color: red;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: white;
    text-decoration: none;
}

.nav-links a:hover {
    color: red;
    text-decoration: none;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: white;
    background-color: #333;
    margin: 0;
    padding: 40px 20px;
}

footer {
    text-align: center;
    padding: 20px;
    color: white;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 40px;
}

.hamburger {
    display: none;
    align-items: flex-end;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: white;
}

#header-logo {
    height:  60px;
    width: auto;
    display: flex;
}

.logo {
    display: flex;
    justify-content: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%); /* Moves the exact center of the logo block to the center of the screen */
    text-align: center;          /* Centers the h3 and paragraph text below the image */
}

.card-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    max-width: 1200px;
    width: 100%;
}

.portfolio-card {
    background-color: #222;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 320px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.portfolio-card:hover {
    transform: translateY(-4x);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.card-image-wrapper {
    width: 100%;
    height: 240px;
    overflow: hidden;
    background-color: #eaeaea;
}

.card-content {
    padding: 24px 16px;
    text-align: center;
}

.card-content h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.content-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1100px;
    gap: 4rem;
}

.content-container .text-side a {
    color: white;
    display: inline-block;
    text-align: left;
    width: 100%;
    line-height: 2;
}

.text-side {
    flex: 1;
}

.text-side h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: normal;
    text-align: left;
}

.text-side p {
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: justify;
}

.photo-side {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.photo-placeholder {
    width: 100%;
    max-width: 450px;
    aspect-ratio: 4 / 5;
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.photo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-container {
    max-width: 1000px;
    margin: 0 auto;
}

.play-game {
    text-align: center;
    font-size: small;
    color: gray;
}

.section-title {
    text-align: center;
    color: white;
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.title-divider {
    height: 2px;
    margin-bottom: 30px;
}

.project-header {
    text-align: center;
    margin-bottom: 40px;
}


.project-header h2 {
    color: white;
    font-size: 1.8rem;
    margin: 5px 0;
}

.project-header h3 {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 5px 0;
}

.project-header a {
    color: white;
    text-decoration: none;
}

.project-header a h2:hover {
    color: red;
    text-decoration: none;
}

.featured-section {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-bottom: 60px;
}

.featured-image {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.featured-image img {
    width: 100%;
    border: 4px solid #1c1c1c;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.carousel-slide {
    display: none;
    width: none;
    border: 4px solid #1c1c1c;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    cursor: pointer;
}

.carousel-slide.active {
    display: block;
    animation: fadeEffect 0.4s ease-in-out;
}

@keyframes fadeEffect {
    from{ opacity: 0.6;}
    to{ opacity: 1;}
}

.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.6);
    color: red;
    border: none;
    padding: 10px 16px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    user-select: none;
    transition: background-color 0.2s, color 0.2s;
}

.carousel-prev {left: 10px;}
.carousel-next {right: 10px;}

.carousel-prev:hover, .carousel-next:hover {
    background-color: red;
    color: white;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    background-color: #555;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.dot.active, .dot:hover {
    background-color: red;
}

.featured-image img:hover {
    opacity: 0.8    ;
}

.featured-text {
    flex: 1;
    font-size: 1.05rem;
    line-height: 1.6;
    color: white;
}

.featured-text strong {
    font-weight: bold;
}

@media (max-width: 768px) {

    .content-container {
        flex-direction: column;
        gap: 2rem;
    }

    .photo-side {
        order: -1;
        justify-content: center;
        width: 100%;
    }

    .text-side {
        order: 1;
        width: 100%;
    }

    .featured-section {
        flex-direction: column;
        gap: 2rem;
    }  

    .featured-image {
        order: -1;
        justify-content: center;
        width: 100%;
    }

    .hamburger {
        display: flex;
        position: relative;
        z-index: 100;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #444;
        position: absolute;
        top: 70%; 
        left: 0;
        text-align: center;
        padding: 20px;
        z-index: 99;
    }
    .nav-links.active {
        display: flex;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    border: 4px solid #1c1c1c;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.5);
    animation-name: zoomIn;
    animation-duration: 0.3s;
}

@keyframes zoomIn {
    from {transform: scale(0.8); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: red;
    text-decoration: none;
    cursor: pointer;
}