
html {
    margin: 0;
    padding: 0;
    height: 100%;
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-y: auto;
}

body {
    display: flex;
    flex-direction: column;
    background-color: var(--bg-color);
    background-image: var(--bg-image);
    background-size: var(--bg-size);
    background-repeat: no-repeat;
    background-position: var(--bg-position);
    transition: background-color 0.3s ease;
}


body {
    --bg-color: #d6ebd6;
    --accent-color: #0b470b;
    --accent-hover: #417944;
    --dropdown-bg: #406e50;
    --dropdown-hover: #417944;
    --bg-image: none;
    --bg-size: 30%;
    --bg-position: right bottom;
}

body.theme-home {
    overflow: hidden;
}

body.theme-about {
    --bg-color: #dec2f5;
    --accent-color: #360953;
    --accent-hover: #9655be;
    --dropdown-bg: #874dac;
    --dropdown-hover: #9655be;
    --bg-image: url('../images/games.png');
    --bg-size: 30%;
    --bg-position: right bottom;
}

body.theme-projects {
    --bg-color: #abd1f3;
    --accent-color: #063258;
    --accent-hover: #3d7bb1;
    --dropdown-bg: #346fa3;
    --dropdown-hover: #3d7bb1;
    --bg-image: url('../images/project.png');
    --bg-size: 25%;
    --bg-position: 95% 100%;
}

body.theme-contact {
    --bg-color: #f5cfde;
    --accent-color: #b94f79;
    --accent-hover: #c55582;
    --dropdown-bg: #b94f79;
    --dropdown-hover: #c55582;
    --bg-image: url('../images/contact.png');
    --bg-size: 30%;
    --bg-position: 95% 100%;
}


.header-wrapper {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 24px;
    background-color: var(--bg-color);
    padding: 12px 20px;
    transition: background-color 0.3s ease;
}

.header-wrapper a {
    text-decoration: none;
    font-family: 'Poppins';
    font-size: 12px;
    font-weight: bold;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-wrapper a:hover {
    color: var(--accent-hover);
}

.header-wrapper a:last-child {
    margin-left: auto;
}


.content {
    display: none;
}

.content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}


.name-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-left: 10%;
    width: 60%;
}

.header-name {
    font-family: 'Abril Fatface';
    margin-bottom: -10px;
    font-size: 36px;
}

.title-name {
    font-family: 'Abril Fatface';
    font-size: 30px;
    margin-bottom: 5px;
}

.underline {
    width: 100%;
    height: 4px;
    background-color: #000000;
    margin-bottom: 10px;
}


#paragraph1 {
    display: flex;
    justify-content: flex-start;
    padding-left: 10%;
    width: 80%;
    margin-top: 0px;
    gap: 20px;
}

#first-p {
    flex: 1 1 60%;
    color: #000000;
    max-width: 600%;
    line-height: 1.5;
    margin: 0px;
    font-size: 24px;
    font-family: 'Poppins';
}

.pfp {
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    height: auto;
}

#pfp1 {
    width: 100%;
    max-width: 400px;
    height: auto;
    object-fit: cover;
    position: relative;
}

.skills-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-left: 10%;
    width: 100%;
}

#skills-button {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 30px;
}

#skills {
    background-color: transparent;
    color: black;
    border: none;
    cursor: pointer;
    font-family: 'Poppins';
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
}

.skills-img {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-left: 50px;
    font-weight: bold;
    font-family: 'Poppins';
}

.skills-img div {
    visibility: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease, visibility 0.4s ease;
}

.skills-img div.show {
    visibility: visible;
    transform: translateY(0);
    opacity: 1;
}

.skills-img div:nth-child(1) { transition-delay: 0.05s; }
.skills-img div:nth-child(2) { transition-delay: 0.1s; }
.skills-img div:nth-child(3) { transition-delay: 0.15s; }
.skills-img div:nth-child(4) { transition-delay: 0.2s; }
.skills-img div:nth-child(5) { transition-delay: 0.25s; }

.skill-tag {
    font-family: 'Poppins';
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #000;
    border: 2px solid #000;
    border-radius: 20px;
    padding: 6px 18px;
}


.text-wrapper {
    display: flex;
    flex-direction: column;
    padding-left: 10%;
    width: 75%;
    margin-top: 0px;
    gap: 20px;
}

.first-section {
    color: #000000;
    max-width: 80%;
    font-size: 24px;
    margin-bottom: 0;
    margin-top: -20px;
    font-family: 'Poppins';
    font-weight: 550;
}

.second-section {
    color: #000000;
    max-width: 80%;
    font-size: 24px;
    margin-top: -40px;
    font-family: 'Poppins';
    font-weight: 550;
}

.photo-strip-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0 20px;
    padding-left: 10%;
}

.photo-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: hidden;
    width: min(700px, 70vw);
}

.photo-strip img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: default;
    flex-shrink: 0;
    border: 3px solid transparent;
    opacity: 0.5;
    pointer-events: none;
}

.photo-strip img.active {
    width: 160px;
    height: 160px;
    border-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    opacity: 1;
    cursor: pointer;
    pointer-events: auto;
}

.carousel-btn {
    background: none;
    color: rgba(0, 0, 0, 0.3);
    border: none;
    padding: 4px 6px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease;
    flex-shrink: 0;
}

.carousel-btn:hover {
    color: rgba(0, 0, 0, 0.75);
}

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

.container img {
    max-width: 40%;
    height: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
}

.closebtn {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 24px;
    color: white;
    cursor: pointer;
}

.closebtn:hover { color: red; }

#imgtext {
    color: white;
    margin-top: 10px;
    font-size: 16px;
    text-align: center;
}


/* ── Projects layout ── */
#section-projects.active {
    display: flex;
    flex-direction: column;
}

.projects-body {
    display: flex;
    gap: 32px;
    padding: 8px 10% 24px;
    align-items: flex-start;
}

.project-detail-area {
    display: none;
    flex: 1;
    min-width: 0;
}

.project-detail-area.active {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.project-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex-shrink: 0;
    width: 120px;
}

.project-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    width: 120px;
    opacity: 0.55;
    transition: opacity 0.2s ease;
}

.project-thumb.active,
.project-thumb:hover {
    opacity: 1;
}

.project-thumb img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    transition: box-shadow 0.2s ease;
}

.project-thumb.active img {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

.project-thumb span {
    font-family: 'Poppins';
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    color: #000;
}

.detail-title {
    font-family: 'Abril Fatface';
    font-size: 28px;
    margin: 0;
}

.detail-slideshow {
    position: relative;
    display: block;
    width: fit-content;
}

.detail-slideshow img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
}

.detail-slideshow .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    padding: 6px 8px;
    font-size: 22px;
    color: #000;
    background: none;
    transition: opacity 0.15s ease;
}

.detail-slideshow .carousel-btn:hover {
    opacity: 0.6;
}

.detail-slideshow .carousel-btn:first-child { left: 8px; }
.detail-slideshow .carousel-btn:last-child  { right: 8px; }

.detail-desc {
    font-family: 'Poppins';
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    color: #222;
    max-width: 680px;
}

.detail-link {
    font-family: 'Poppins';
    font-size: 13px;
    font-weight: bold;
    color: #000;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.detail-link:hover { text-decoration: underline; }


.contact-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding-left: 10%;
    gap: 20px;
}

.contact-text {
    font-family: 'Poppins';
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    text-align: left;
}

.contact-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
}

.contact-input {
    width: 400px;
    height: 50px;
    border: none;
    outline: none;
    padding-left: 25px;
    font-weight: 500;
    color: #666;
    border-radius: 30px;
}

.contact-left textarea {
    height: 140px;
    padding-top: 15px;
    border-radius: 20px;
}

.contact-input:focus {
    border: 2px solid var(--accent-hover);
}

.contact-left button {
    display: flex;
    align-items: center;
    padding: 15px 30px;
    font-size: 16px;
    color: #fff;
    gap: 10px;
    border: none;
    border-radius: 50px;
    background: var(--accent-color);
    cursor: pointer;
    font-family: 'Poppins';
}

footer {
    background-color: transparent;
    color: #000;
    text-align: center;
    padding: 20px 0;
    font-family: 'Poppins', sans-serif;
    position: relative;
    z-index: 1;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.social-icons a img {
    width: 30px;
    height: 30px;
    transition: transform 0.3s ease;
}

.social-icons a img:hover {
    transform: scale(1.1);
}

@media (max-width: 1024px) {
    .name-section {
        width: 90%;
        padding-left: 5%;
        text-align: center;
    }

    .header-name, .title-name {
        font-size: 30px;
    }

    #paragraph1 {
        flex-direction: column;
        padding-left: 5%;
        width: 90%;
    }

    .text-wrapper {
        flex-direction: column;
        padding-left: 5%;
        width: 90%;
    }

    .second-section {
        font-size: 24px;
    }

    .projects-body {
        flex-direction: column;
        padding: 8px 5% 24px;
    }

    .project-thumbnails {
        flex-direction: row;
        flex-wrap: wrap;
        width: auto;
    }

    .contact-container {
        padding-left: 5%;
        width: 90%;
    }

    .contact-text {
        font-size: 16px;
        text-align: center;
    }

    .contact-input {
        width: 300px;
    }

    .photo-strip-wrapper {
        padding-left: 5%;
    }

    .photo-strip {
        width: min(500px, 80vw);
    }

    .container img {
        max-width: 70%;
    }
}

@media (max-width: 768px) {
    body {
        background-image: none;
    }

    .header-wrapper {
        gap: 16px;
        padding: 8px 12px;
    }

    .name-section {
        width: 90%;
        text-align: center;
    }

    .header-name, .title-name {
        font-size: 30px;
    }

    .text-wrapper {
        flex-direction: column;
        padding-left: 5%;
    }

    .second-section {
        font-size: 24px;
    }

    .contact-container {
        gap: 15px;
        text-align: center;
    }

    .contact-input {
        width: 250px;
    }

    .contact-left textarea {
        height: 100px;
    }

    .contact-left button {
        padding: 10px 20px;
        font-size: 14px;
    }

    .photo-strip img { width: 80px; height: 80px; }
    .photo-strip img.active { width: 130px; height: 130px; }

    .container img {
        max-width: 80%;
    }

    footer {
        padding: 15px 0;
    }

    .social-icons a img {
        width: 15px;
        height: 15px;
    }
}

@media (max-width: 480px) {
    .skills-img {
        margin-left: 0;
    }

    .header-name, .title-name {
        font-size: 24px;
    }

    #first-p {
        font-size: 18px;
    }

    .header-wrapper {
        padding: 5px;
    }

    .first-section {
        font-size: 14px;
    }

    .second-section {
        font-size: 14px;
    }

    .contact-container {
        gap: 10px;
        text-align: center;
    }

    .contact-input {
        width: 200px;
    }

    .contact-left textarea {
        height: 80px;
    }

    .contact-left button {
        padding: 8px 16px;
        font-size: 12px;
    }

    .photo-strip img { width: 60px; height: 60px; }
    .photo-strip img.active { width: 100px; height: 100px; }

    .container img {
        max-width: 90%;
    }

    footer {
        padding: 10px 0;
    }

    .social-icons {
        gap: 10px;
    }

    .social-icons a img {
        width: 15px;
        height: 15px;
    }
}
