/* General */


@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');


*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}
html {
    scroll-behavior: smooth;
    /* native scrollbar hidden; the yoyo indicator replaces it */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
html::-webkit-scrollbar {
    display: none;
}
p{
    color: rgb(85, 85, 85);
}
img {
    max-width: 100%;
}

/* CONTOUR LINES BACKGROUND */

#contour-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* YOYO SCROLL INDICATOR */

#yoyo-scrollbar {
    position: fixed;
    top: 0;
    right: 12px;
    width: 38px;
    height: 100vh;
    z-index: 98;
    pointer-events: none;
}

#yoyo-scrollbar .yoyo-string {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 0;
    background: rgb(140, 140, 140);
    border-radius: 1px;
}

#yoyo-scrollbar .yoyo {
    position: absolute;
    top: 0;
    left: 0;
    width: 38px;
    height: 38px;
    will-change: transform;
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.18));
}

/* TRANSITION Comments */

a, .btn{
    transition: all 300ms ease;
}

/* DESKTOP NAV*/

nav, .nav-links {
    display: flex;
}

nav{
    justify-content: space-around;
    align-items: center;
    padding: 0.25rem 1rem;
    gap: 1rem;
}
.nav-links {
    gap: 2rem;
    list-style: none;
    font-size: 1.5rem;
    flex-wrap: wrap;
}
a {
    color: black;
    text-decoration: none;
    text-decoration-color: white;
}

a:hover {
    color: gray;
    text-decoration: underline;
    text-underline-offset: 1rem;
    text-decoration-color: rgb(181, 181, 181);
}

.nav-links a.active {
    text-decoration: underline;
    text-underline-offset: 1rem;
    text-decoration-color: rgb(181, 181, 181);
}

.logo{
    font-size: 2rem;
}
.Mundi-logo {
    display: flex;
    height: clamp(120px, 17vw, 230px);
}

.logo:hover {
    cursor: pointer;
}

/* Hamburger Menu */
#hamburger-nav {
    display: none;
}
.hamburger-menu {
    position: relative;
    display: inline-block;
}
.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 24px;
    width: 30px;
    cursor: pointer;
}

.hamburger-icon span{
    width: 100%;
    height: 2px;
    background-color: black;
    transition: all 0.3s ease-in-out;
}

.menu-links {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    width: max-content;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 10;
}

.menu-links a {
    display: block;
    padding: 0.75rem 2.5rem;
    text-align: center;
    font-size: 1.5rem;
    color: black;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

.menu-links li {
    list-style: none;
}

.menu-links.open{
    max-height: 320px;
    border: rgb(163, 163, 163) 0.05rem solid;
}

.hamburger-icon.open span:first-child {
    transform: rotate(45deg) translate(10px, 5px);
}
.hamburger-icon.open span:nth-child(2) {
    opacity: 0;
}
.hamburger-icon.open span:last-child {
    transform: rotate(-45deg) translate(10px, -5px);
}


/* SECTIONS */
section {
    padding-top: 4vh;
    padding-bottom: 2rem;
    margin: 0 clamp(1rem, 8vw, 10rem);
    box-sizing: border-box;
    min-height: fit-content;
    scroll-margin-top: 2rem;
}

.section-container {
    display:  flex;
}

/* SCROLL REVEAL */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* PROFILE SECTION*/
#profile {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(1rem, 5vw, 5rem);
    min-height: 72vh;
    padding-top: 0;
}

.section__pic-container {
    display: flex;
    width: min(400px, 85vw);
    margin: auto 0;
}

#profile .section__pic-container {
    width: min(470px, 85vw);
}

.section__pic-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.section__text {
    align-self: center;
    text-align: center;
    /* fixed width so the typewriter subtitle doesn't reflow the photo */
    width: 24rem;
    max-width: 90vw;
}

.section__text p {
    font-weight: 600;
}

.section__text__p1 {
    text-align: center;
}
.section__text__p2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    min-height: 2.5rem;
}

/* blinking cursor for the rotating subtitle */
.section__text__p2.typing::after {
    content: '|';
    font-weight: 300;
    margin-left: 2px;
    animation: blink-cursor 1s step-end infinite;
}

@keyframes blink-cursor {
    50% { opacity: 0; }
}

.title {
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
}

#socials-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
    gap: 1rem;
}

#socials-container .icon {
    transition: transform 0.25s ease;
}

#socials-container .icon:hover {
    transform: translateY(-4px) scale(1.1);
}

/* ICONS */

.icon {
    cursor: pointer;
    height: 2rem;
}


/* BUTTONS */

.btn-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.btn {
    font-family: inherit;
    font-weight: 600;
    transition: all 300ms ease;
    padding: 1rem;
    width: 8rem;
    border-radius: 2rem;
}

 .btn-color-1,
 .btn-color-2 {
    border: rgb(53, 53, 53) 0.1rem solid;
 }

 .btn-color-1:hover,
 .btn-color-2:hover {
    cursor: pointer;
 }

 .btn-color-1,
 .btn-color-2:hover {
    background: rgb(53, 53, 53);
    color: white;
 }

 .btn-color-1:hover {
    background: rgb(0, 0, 0);
 }
 .btn-color-2 {
    background: none;
 }

 .btn-color-2:hover {
    border: rgb(255, 255, 255) 0.1rem solid;
 }

/* ABOUT SECTION*/

#about {
    position: relative;
}

.about-containers {
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.about-details-container {
    justify-content: center;
    flex-direction: column;
    flex: 1;
    min-width: min(320px, 100%);
}
.about-containers,
.about-details-container {
    display: flex;
}

#about .text-container {
    text-align: justify;
}

.about-pic {
    border-radius: 2rem;
    width: 100%;
    height: auto;
}

.arrow {
    position: absolute;
    right: -5rem;
    bottom: 2.5rem;
}

.details-container {
    padding: 1.5rem;
    flex: 1;
    background: white;
    border-radius: 2rem;
    border: rgb(53, 53, 53) 0.1rem solid;
    border-color: rgb(163, 163, 163);
    text-align: left;
    max-width: fit-content;
}

.section-container {
    gap: 4rem;
    align-items: center;
    flex-wrap: wrap;
}

#about .section__pic-container {
    width: min(450px, 85vw);
    margin: 0 auto;
}

/* EXPERIENCE */

#experience {
    position: relative;
}

.experience-sub-title {
    color: rgb(85, 85, 85);
    font-weight: 600;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.experience-sub-sub-title {
    color: rgb(70, 70, 70);
    font-weight: 60;
    font-size: 1rem;
}

.experience-main-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
    margin: 2rem 0;
}

.experience-left-side {
    flex: 1;
    max-width: 60%;
}

.experience-containers-stack {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.experience-right-side {
    flex: 1;
    max-width: 40%;
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: center;
}

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

.experience-photo {
    width: min(250px, 80vw);
    aspect-ratio: 1;
    height: auto;
    object-fit: cover;
    border-radius: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.experience-photo:hover {
    transform: scale(1.05);
}

.experience-details-container {
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
    align-items: flex-start;
}

.article-container {
    display: flex;
    text-align: left;
    flex-wrap: wrap;
    flex-direction: row;
    gap: 1.5rem;
    justify-content: flex-start;
    align-items: flex-start;
}

/* Skill marquees: one continuous line of text scrolling through the box */
.marquee-box {
    max-width: 100%;
    width: 100%;
}

.marquee {
    overflow: hidden;
    width: 100%;
    /* fade the line out at both edges of the box */
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    align-items: baseline;
    width: max-content;
    animation: marquee-scroll 28s linear infinite;
}

.marquee-reverse .marquee-track {
    animation-direction: reverse;
}

.marquee:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-item {
    white-space: nowrap;
    font-weight: 600;
    font-size: 1.15rem;
    color: black;
}

.marquee-item em {
    font-style: italic;
    font-weight: 400;
    color: rgb(120, 120, 120);
    margin-left: 0.4rem;
}

/* slim diamond between entries */
.marquee-item::after {
    content: '\2726';
    margin: 0 1.6rem;
    color: rgb(190, 190, 190);
    font-size: 0.75em;
}

@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .marquee-track {
        animation: none;
    }
}

/* PROJECTS SECTIONS*/

#projects {
    position: relative;
}

#projects .about-containers {
    align-items: stretch;
}

#projects .details-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: min(280px, 100%);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#projects .details-container:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

#projects .btn-container {
    margin-top: auto;
}

.color-container {
    border-color: rgb(163, 163, 163);
    background: rgb(250, 250, 250);
}

.project-img {
    border-radius: 2rem;
    width: 90%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
}

.project-title {
    margin: 1rem;
    color: black;
}

.project-btn {
    color: black;
    border-color: rgb(163, 163, 163);
}

/* BOARD OF DIRECTORS (CARD FAN) */

#board {
    padding: 4rem 0 2rem;
    overflow: hidden;
}

.fan-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 460px;
    margin-top: 2rem;
}

.fan-card {
    width: 220px;
    height: 340px;
    border-radius: 1.5rem;
    background: rgb(250, 250, 250);
    border: rgb(163, 163, 163) 0.1rem solid;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    box-shadow: -12px 0 24px rgba(0, 0, 0, 0.12);
    margin-left: -120px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
}

.fan-card:first-child { margin-left: 0; }

/* Symmetrical 8-card arc */
.fan-card:nth-child(1) { transform: rotate(-14deg) translateY(40px); z-index: 1; }
.fan-card:nth-child(2) { transform: rotate(-10deg) translateY(22px); z-index: 2; }
.fan-card:nth-child(3) { transform: rotate(-6deg) translateY(10px); z-index: 3; }
.fan-card:nth-child(4) { transform: rotate(-2deg) translateY(2px); z-index: 4; }
.fan-card:nth-child(5) { transform: rotate(2deg) translateY(2px); z-index: 5; }
.fan-card:nth-child(6) { transform: rotate(6deg) translateY(10px); z-index: 6; }
.fan-card:nth-child(7) { transform: rotate(10deg) translateY(22px); z-index: 7; }
.fan-card:nth-child(8) { transform: rotate(14deg) translateY(40px); z-index: 8; }

.fan-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.75;
    filter: grayscale(85%);
    transition: opacity 0.4s ease, filter 0.4s ease;
}

.fan-card:hover, .fan-card:focus, .fan-card:active {
    transform: translateY(-50px) rotate(0deg) scale(1.08) !important;
    z-index: 20 !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.fan-card:hover img, .fan-card:focus img, .fan-card:active img {
    opacity: 1;
    filter: grayscale(0%);
}

.fan-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 1rem 1.25rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.55) 55%, transparent 100%);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

.fan-card:hover .fan-info, .fan-card:focus .fan-info, .fan-card:active .fan-info {
    transform: translateY(0);
}

.fan-info h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.fan-info p {
    margin: 0 0 0.2rem;
    font-size: 0.7rem;
    color: rgb(210, 210, 210);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

/* CONTACTS */

/* FOOTER / CONTACT */

footer {
    margin: 0 1rem;
    padding: 3rem 0 2rem;
    text-align: center;
    scroll-margin-top: 2rem;
}

footer p {
    text-align: center;
}

.footer-title {
    font-size: 2rem;
    font-weight: 600;
}

.contact-email-link {
    display: flex;
    justify-content: center;
    margin: 1.25rem auto;
    width: fit-content;
}

.contact-email-link img {
    height: 3.5rem;
    transition: transform 0.3s ease;
}

.contact-email-link:hover img {
    transform: scale(1.15);
}

.footer-copy {
    margin-top: 2rem;
    font-size: 0.85rem;
    color: rgb(140, 140, 140);
}

/* Scroll to Top Button */
#scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    background-color: rgb(255, 255, 255);
    color: rgb(0, 0, 0);
    border: rgb(163, 163, 163) 0.05rem solid;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
}

#scroll-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    transform: rotate(180deg);
}

#scroll-to-top:hover {
    background-color: rgb(226, 222, 222);
    transform: scale(1.1);
}
