/* Montserrat */
@font-face {
  font-display: swap;
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  src: url('Fonts/montserrat-v31-latin-regular.woff2') format('woff2');
}
@font-face {
  font-display: swap;
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  src: url('Fonts/montserrat-v31-latin-500.woff2') format('woff2');
}
@font-face {
  font-display: swap;
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  src: url('Fonts/montserrat-v31-latin-700.woff2') format('woff2');
}
@font-face {
  font-display: swap;
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 800;
  src: url('Fonts/montserrat-v31-latin-800.woff2') format('woff2');
}
@font-face {
  font-display: swap;
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 900;
  src: url('Fonts/montserrat-v31-latin-900.woff2') format('woff2');
}

/* Poppins */
@font-face {
  font-display: swap;
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  src: url('Fonts/poppins-v24-latin-regular.woff2') format('woff2');
}
@font-face {
  font-display: swap;
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  src: url('Fonts/poppins-v24-latin-500.woff2') format('woff2');
}
@font-face {
  font-display: swap;
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  src: url('Fonts/poppins-v24-latin-600.woff2') format('woff2');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

.icon {
    display: inline-block;
    vertical-align: middle;
    transform-origin: center;
}

html{
    height: 100%;
    font-size: 75%;
}

body{
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background:#f1f2e4;
    color: #4B0082;
}

header{
    margin-top: 0;
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 10%;
    background-color: transparent;
    filter: drop-shadow(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo{
    font-size: 2rem;
    font-weight: 800;   
    cursor: pointer;
    transition: 0.5s ease;
    animation: none;
}

#logo-initial{
    font-family: 'Montserrat', sans-serif;
    color: #4B0082;
}

#logo-lastname{
    font-family: 'Montserrat', sans-serif;
    color: #757575;
}

.logo:hover{
    transform: scale(1.1);
}

.menu-toggle{
    display: none;
    font-size: 2rem;
    color: #4B0082;
    cursor: pointer;
    z-index: 200;
}

.menu-toggle.is-open .icon-bars {
    display: none;
}

.menu-toggle.is-open .icon-xmark {
    display: inline-block;
}

.icon-xmark {
    display: none;
}

nav a{
    font-size: 1.2rem;
    font-weight: 500;
    color: #4B0082;
    margin-left: 20px;
    transition: 0.4s ease;
}

nav a:hover,
nav a:active,
nav a.activate{
    color: #5c5c5c;
    border-bottom: 3px solid #4B0082;
}

@media(max-width:995px){
    header{
        padding: 1rem 5%;
    }

    .menu-toggle{
        display: block;
    }

    nav{
        position: absolute;
        display: none;
        top: 100%;
        right: 1rem;
        width: 40%;
        border-left: 3px solid #4B0082;
        border-bottom: 3px solid #4B0082;
        border-bottom-left-radius: 2rem;
        padding: 1rem;
        background-color: #f1f2e4;
        border-top: 3px solid #4B0082;
        border-right: 3px solid #4B0082;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        box-shadow: 0 2px #4B0082;
    }

    nav.show-menu{
        display: flex;
    }

    nav a{
        display: block;
        font-size: 1.5rem;
    }

    nav.activate{
        display: flex;
    }

    nav a:hover,
    nav a:active{
        padding: 1rem;
        border-radius: 0.5rem;
        border-bottom: 0.25rem solid #4B0082;
        
    }


}

nav a.social-icon{
    font-size: 1.5rem;
    color: #4B0082;
    transition: 0.4s ease;
}

section{
    min-height: calc(100vh - 8rem);
    padding: 3rem 10% 2rem;
}

.reveal-item{
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    transition-delay: var(--delay, 0s);
}

.reveal-item.is-visible{
    opacity: 1;
    transform: translateY(0);
}

.home-header-animate{
    opacity: 0;
}

.home-header-animate.is-animating{
    animation: fadeInUp 0.6s ease forwards;
}

.home-header-animate.is-visible{
    opacity: 1;
}

.home{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.home-img{
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-card{
    position: relative;
    width: 300px;
    height: 300px;
    max-width: 100%;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 5px 5px 3px #757575;
    cursor: pointer;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.image-card img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transform: none;
    transition: transform 0.45s ease, filter 0.45s ease;
}

.image-overlay{
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    padding: 1rem;
    border-radius: 50%;
    background: rgba(117, 117, 117, 0.92);
    color: #f1f2e4;
    opacity: 0;
    transform: translateY(10px) scale(0.94);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.image-overlay span{
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08rem;
    text-align: center;
    line-height: 1.2;
}

.image-overlay p{
    margin-top: 20px;
    max-width: 86%;
    font-size: 0.95rem;
    line-height: 1.35;
    text-align: center;
    color: rgba(241, 242, 228, 0.95);
}

.image-card:hover{
    transform: translateY(-4px);
    box-shadow: 8px 8px 8px rgba(117, 117, 117, 0.35);
}

.image-card:hover img{
    transform: scale(1.05);
    filter: brightness(0.88);
}

.image-card:hover .image-overlay{
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: revealFadeUp 0.35s ease;
}

.home-content{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-content h3{
    color: #5c5c5c;
    font-size: 2.5rem;
    font-weight: 200;
}

.home-content h3 span{
    color: #4B0082;
}

.home-content h1{
    font-family: 'Montserrat', sans-serif;
    color: #4B0082;
    font-size: 4.5rem;
    font-weight: 900;
}

.home-content h1 span{
    font-family: 'Montserrat', sans-serif;
    color: #757575;
}

.home-buttons{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.home-content .btn{
    font-family: 'Montserrat', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0;
    padding: 0.75rem 1.5rem;
    background-color: #c8c8c8;
    color: #4B0082;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 1rem;
    transition: 0.4s ease;
    box-shadow: 0 2px 2px rgba(75, 0, 130, 0.3);
}

.home-content .btn:hover{
    background-color: #4B0082;
    color: #c8c8c8;
    transform: scale(1.05);
}

.home-content .btn .icon{
    transition: fill 0.4s ease;
}

.background-page{
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: auto;
}

.page-title{
    font-size: 2.8rem;
    font-family: 'Montserrat', sans-serif;
    color: #4B0082;
    text-align: center;
    margin-bottom: 1.5rem;
}

.intro-section{
    padding-top: 1rem;
}

.intro-grid{
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 2rem;
    align-items: start;
}

.portrait-img{
    width: 100%;
    max-width: 400px;
    aspect-ratio: 4 / 5;
    border-radius: 1rem;
    object-fit: cover;
    object-position: top;
    border: 1px solid #4B0082;
    box-shadow: 0 10px 24px rgba(75, 0, 130, 0.28);
}

.intro-column{
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.intro-label,
.background-card > h2{
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #757575;
}

.intro-label::after,
.background-card > h2::after{
    content: '';
    display: block;
    width: 48px;
    height: 4px;
    margin-top: 0.6rem;
    margin-bottom: 0.75rem;
    background: #4B0082;
    border-radius: 2px;
}

.intro-text p{
    color: #4B0082;
    font-size: 1rem;
    line-height: 1.8;
}

.background-grid{
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (max-width: 700px){
    .intro-grid{
        grid-template-columns: 1fr;
    }
}

.background-page section{
    min-height: auto;
    padding-bottom: 1rem;
}

.background-card{
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.content-card{
    width: 100%;
    height: auto;
    max-width: 100%;
    padding: 2rem;
    background-color: #f1f2e4;
    border-radius: 1rem;
    border: 1px solid #4B0082;
    box-shadow: 0 4px 10px rgba(75, 0, 130, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.content-card h3{
    padding-bottom: 1rem;
}

.content-card:hover{
   box-shadow: 0 6px 18px rgba(75, 0, 130, 0.22);
   transform: translateY(-4px);
}

.projects-section{
    padding-top: 1rem;
    text-align: justify;
}

.projects-section h2{
    text-align: center;
}

.projects-section p{
    text-indent: 2em;
}

.projects-section p span{
    font-style: italic;
    font-weight: 600;
}

.section-header{
    max-width: 760px;
    margin: 0 auto 2rem;
    text-align: center;
    color: #4B0082;
}

.section-header p{
    font-size: 1rem;
    color: #757575;
    line-height: 1.7;
}

.project-group{
    margin-bottom: 2.5rem;
}

.project-group-title{
    font-size: 1.35rem;
    color: #4B0082;
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #4B0082;
    display: inline-block;
}

.project-grid{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.project-card{
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-decoration: none;
    color: inherit;
}

.project-card h3{
    font-size: 1.5rem;
    color: #4B0082;
    text-align: center;
}

.project-card p{
    color: #4B0082;
    line-height: 1.6;
    font-size: 0.97rem;
}

.project-image{
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    min-height: 180px;
    background: #f1f2e4;
}

.project-image img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-detail-section{
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 10% 3rem;
    min-height: auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-detail-section p{
    text-align: justify;
    text-indent: 2rem;
}

section.project-detail-section{
    min-height: auto;
}

.project-intro{
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    align-items: center;
}

.project-intro-copy h2,
.project-about h2,
.project-steps h2,
.project-screenshots h2,
.project-results h2,
.project-repo h2{
    color: #4B0082;
    font-size: 2rem;
    margin-bottom: 0.8rem;
    margin-top: 0;
}

.project-intro-copy p,
.project-about p,
.project-results p,
.project-repo p{
    color: #4B0082;
    line-height: 1.75;
    max-width: 760px;
}

.project-intro-copy span{
    font-style: italic;
    font-weight: 600;
}

.project-intro-image{
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(75, 0, 130, 0.12);
}

.project-intro-image img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-about,
.project-results,
.project-repo{
    background: #f1f2e4;
    border: 1px solid #4B0082;
    border-radius: 1rem;
    padding: 1.75rem;
}

.project-about h3,
.project-steps h2,
.project-screenshots h2{
    margin-top: 1.5rem;
}

.feature-list{
    list-style: disc inside;
    margin-top: 1.2rem;
    color: #4B0082;
    padding-left: 1.2rem;
    column-count: 2;
    column-gap: 2rem;
}

.feature-list li{
    line-height: 1.8;
    break-inside: avoid-column;
    margin-bottom: 0.75rem;
}

.project-cards{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.project-screenshots{
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.screenshot-carousel{
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.carousel-arrow{
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(75, 0, 130, 0.1);
    color: #4B0082;
    border: 1px solid rgba(75, 0, 130, 0.18);
    display: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.carousel-arrow:hover{
    background: rgba(75, 0, 130, 0.18);
    transform: scale(1.05);
}

.screenshot-viewport{
    width: 100%;
    height: 480px;
    display: grid;
    position: relative;
}

.screenshot-card{
    display: none;
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(75, 0, 130, 0.12);
    background: #fff;
    height: 100%;
}

.screenshot-card.active{
    display: block;
}

.screenshot-card img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.screenshot-card:hover img{
    transform: scale(1.02);
}

.fullscreen-btn{
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(75, 0, 130, 0.9);
    color: #f1f2e4;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(241, 242, 228, 0.4);
}

.screenshot-card:hover .fullscreen-btn{
    opacity: 1;
    transform: translateY(0);
}

/* in-page fullscreen overlay */
.img-overlay{
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.img-overlay.visible{
    opacity: 1;
    visibility: visible;
}
.img-overlay img{
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.overlay-close{
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    color: #fff;
    border: none;
    font-size: 2rem;
    cursor: pointer;
}

.overlay-nav{
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(75, 0, 130, 0.5);
    color: #f1f2e4;
    border: 1px solid rgba(241, 242, 228, 0.3);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.overlay-nav:hover{
    background: rgba(75, 0, 130, 0.8);
    transform: scale(1.05);
}

.overlay-prev{
    bottom: 50%;
    left: 2rem;
    transform: translateY(50%);
}

.overlay-next{
    bottom: 50%;
    right: 2rem;
    transform: translateY(50%);
}

.img-overlay.visible ~ .go-back-btn,
.go-back-btn.hidden{
    opacity: 0;
    pointer-events: none;
}

/* Sticky go back button */
.go-back-btn{
    position: fixed;
    /* place below the header to avoid overlap */
    top: 4rem;
    left: 10%;
    transform: translateX(0);
    z-index: 12000;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffffcc;
    color: #4B0082;
    border-radius: 50%;
    font-size: 1.2rem;
    border: 1px solid rgba(75,0,130,0.12);
    box-shadow: 0 6px 18px rgba(75,0,130,0.08);
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.3s ease, transform 0.3s ease;
}

.go-back-btn:hover{
    background: #4B0082;
    color: #f1f2e4;
    transform: translateY(-2px);
}

@media (max-width: 995px){
    .go-back-btn{ left: 5%; top: 3.6rem; width: 2.4rem; height: 2.4rem; }
}

@media (max-width: 600px){
    .go-back-btn{
        top: 3.4rem;
        left: 4%;
        width: 2.2rem;
        height: 2.2rem;
        font-size: 1rem;
    }
}

@media (min-width: 901px){
    .carousel-arrow{
        display: flex;
    }

    .screenshot-viewport{
        height: 480px;
    }
}

@media (max-width: 900px){
    .screenshot-carousel{
        display: block;
    }

    .screenshot-viewport{
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .screenshot-card{
        display: block;
    }

    .carousel-arrow{
        display: none;
    }
}

.project-repo .btn{
    margin-top: 1rem;
}

@media (max-width: 1100px){
    .project-grid{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-detail-section{
        padding: 2rem 5% 3rem;
    }

    .project-intro{
        grid-template-columns: 1fr;
    }

    .project-cards{
        grid-template-columns: 1fr;
    }

    .feature-list{
        column-count: 1;
    }

    .screenshot-grid{
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px){
    .project-grid{
        grid-template-columns: 1fr;
    }

    .project-detail-section{
        padding: 1.5rem 4% 2rem;
    }

    .project-intro{
        gap: 1.5rem;
    }

    .project-intro-image img{
        height: auto;
    }

    .feature-list{
        column-count: 1;
        padding-left: 1rem;
    }
}

@media (max-width: 560px){
    .home-content h1,
    .section-header h2,
    .project-intro-copy h2,
    .project-about h2,
    .project-steps h2,
    .project-screenshots h2,
    .project-results h2,
    .project-repo h2{
        font-size: 1.8rem;
    }

    .home-content h3,
    .project-card h3,
    .project-intro-copy p,
    .project-about p,
    .project-results p,
    .project-repo p{
        font-size: 0.95rem;
    }

    .page-title{
        font-size: 2rem;
    }
}

.card-header{
    display: flex;
    align-items: center;
    gap: 1rem;
}

.education-logo{
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
}

.card-text{
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-text h2{
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #4B0082;
    text-transform: none;
    letter-spacing: normal;
}

.info-row{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.info-year{
    color: #757575;
    font-weight: 700;
    white-space: nowrap;
}

.skills-section{
    padding-top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.skills-grid{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    width: 100%;
}

.skill-group{
    background: #f1f2e4;
    border: 1px solid #4B0082;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 4px 10px rgba(75, 0, 130, 0.12);
}

.skill-group h2{
    color: #4B0082;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.skills-list{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.skill-pill{
    padding: 0.65rem 1rem;
    border-radius: 999px;
    background: #4B0082;
    color: #f1f2e4;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(75, 0, 130, 0.18);
}

.skills-list :hover{
    background: #4B0082;
    color: #f1f2e4;
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(75, 0, 130, 0.25);
}


@media (max-width: 900px){
    .skills-grid{
        grid-template-columns: 1fr;
    }
}

@keyframes fadeInUp{
    0%{
        opacity: 0;
        transform: translateY(20px);
    }
    100%{
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes revealFadeUp{
    0%{
        opacity: 0;
        transform: translateY(8px) scale(0.96);
    }
    100%{
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 600px){
    .info-row{
        flex-direction: column;
        align-items: flex-start;
    }

    .info-year{
        margin-top: 0.2rem;
    }
}