/* Fonts loaded from HTML with preconnect for better performance */

:root {
    --text-color: #333;
    --background-color: #eeeff3;
    --section-background: #ffffff;
    --border-color: #eee;
    --header-background: rgba(255, 255, 255, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    overflow-x: hidden;
    width: 100%;
}

a {
    color: #007aff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1,
h2,
h3 {
    font-family: "Funnel Display", sans-serif;
    font-weight: 600;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 3rem;
    margin-bottom: 4.5rem;
    text-align: center;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.nav-container {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: #00000080;
    backdrop-filter: blur(10px);
    border-radius: 30px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), inset 2px 2px 10px #ffffff40;
    padding: 0.5rem 0.7rem;
}

.cv-download-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 1rem 1rem;
    background-color: #00000080;
    backdrop-filter: blur(10px);
    border-radius: 30px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), inset 2px 2px 10px #ffffff40;
    transition: background-color 0.4s ease;
    margin-left: 1rem;
    text-decoration: none;
}

.cv-download-button:hover {
    background-color: rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

.cv-download-button .material-icons {
    font-size: 20px;
    color: #E3E3E3;
}

.cv-download-button .cv-text {
    color: #E3E3E3;
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-links a {
    display: block;
    min-width: 120px;
    padding: 0.5rem 1rem;
    text-align: center;
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    background-color: transparent;
    transition: background-color 0.4s ease, transform 0.4s ease;
    position: relative;
    overflow: hidden;
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.nav-links a:hover::before {
    left: 100%;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

#titlebox {
    text-align: center;
    width: 90%;
    max-width: 800px;
    background-color: rgba(0, 0, 0, 0.25);
    border-radius: 30px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    padding: 1rem;
}

#titletext {
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.middle-name {
    font-size: 0.55em;
    font-weight: 100;
    letter-spacing: 0.02em;
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    background-image: url('../img/banner.jpg');
    background-size: cover;
    background-position: center;
    padding: 4rem 2rem;
    gap: 0;
}

.profile-photo {
    width: 200px;
    height: 200px;
    object-fit: cover;
    object-position: top;
}

main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 2rem;
    background-color: var(--background-color);
}

#about h2 {
    color: var(--text-color);
}

#about p {
    color: var(--text-color);
}

/* Carousel Vertical Container */
.carousel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.carousel-card {
    width: 100%;
    max-width: 1200px;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 3rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.4s ease, opacity 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    opacity: 0.6;
    transform: scale(0.95);
}

.carousel-card.active {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.carousel-card h3 {
    color: var(--text-color);
    font-size: 2rem;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: margin-bottom 0.4s ease;
}

.carousel-card.active h3 {
    margin-bottom: 1rem;
}

.carousel-card p {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-bottom: 0;
    color: #333;
    font-size: 1.1rem;
    line-height: 1.8;
    transition: max-height 0.5s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.4s ease;
}

.carousel-card.active p {
    max-height: 600px;
    opacity: 1;
}

/* Carousel Section & Wrapper */
.carousel-section {
    position: relative;
}

.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: flex-start;
}

/* Carousel Dots Navigation - Vertical Smooth */
.carousel-dots {
    position: relative;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-left: 2rem;
    padding: 1rem;
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    align-self: flex-start;
    will-change: transform;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.carousel-dot .dot-icon {
    font-size: 0;
    opacity: 0;
    color: #fff;
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.carousel-dot:hover .dot-icon {
    font-size: 18px;
    opacity: 1;
}

.carousel-dot.active {
    background-color: #1184d7;
}

.carousel-dot.active .dot-icon {
    font-size: 18px;
    opacity: 1;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

#about a {
    color: #007aff;
    font-weight: bold;
    text-decoration: none;
}

#about a:hover {
    text-decoration: underline;
}

.section-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.15), transparent);
    margin: 4rem auto;
    max-width: 600px;
}

section {
    margin-bottom: 4.5rem;
}

.project {
    display: flex;
    align-items: center;
    gap: 4rem;
    animation: fadeIn 1s ease-out;
    margin-bottom: 10rem;
    opacity: 0.5;
    transform: scale(0.95);
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.project.active {
    opacity: 1;
    transform: scale(1);
}

.project.reverse {
    flex-direction: row-reverse;
}

.project-description {
    flex: 1;
    overflow: hidden;
    padding-right: 2rem;
}

.project.reverse .project-description {
    padding-left: 2rem;
    padding-right: 0;
}

.project-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    padding-top: 0;
    border-top: 1px solid transparent;
    transform-origin: top;
    transition:
        max-height 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
        opacity 0.5s cubic-bezier(0.25, 0.1, 0.25, 1),
        margin-top 0.5s cubic-bezier(0.25, 0.1, 0.25, 1),
        padding-top 0.5s cubic-bezier(0.25, 0.1, 0.25, 1),
        border-color 0.4s ease;
}

.project-details.visible {
    max-height: 500px;
    opacity: 1;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #b9b9b9;
}

.project-details ul {
    list-style: disc;
    margin: 0.5rem 0 1rem 1.5rem;
    padding: 0;
}

.project-details li {
    margin-bottom: 0.3rem;
    line-height: 1.6;
}

.project-image {
    flex: 1;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

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

.project-date {
    color: rgba(71, 71, 71, 0.502)
}

footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--section-background);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    /*border-top: 1px solid var(--border-color);*/
}

footer ul {
    list-style: none;
    margin-bottom: 1rem;
}

footer ul li {
    display: inline-block;
    margin: 0 0.5rem;
}

footer img {
    width: 128px;
    transition: opacity 0.3s;
}

footer img:hover {
    opacity: 0.7;
}

#contact-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 2rem;
    background-color: var(--section-background);
    padding: 2rem;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.contact-container {
    max-width: 600px;
    margin: 0 auto;
}

#contact-section h2 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
}

#contact-section p {
    font-size: 1.2rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    color: #666;
    text-align: center;
}

.contact-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background-color: #1184d7;
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    font-family: inherit;
    transition: background-color 0.3s ease, transform 0.3s ease, gap 0.3s ease;
}

.contact-button:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

.contact-button .copy-icon {
    font-size: 1.2rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.contact-button .check-icon {
    font-size: 1.2rem;
    display: none;
    color: #4ade80;
}

.contact-button.copied {
    background-color: #22c55e;
}

.contact-button.copied .copy-icon {
    display: none;
}

.contact-button.copied .check-icon {
    display: inline;
    animation: checkPop 0.4s ease;
}

@keyframes checkPop {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

.project-technologies {
    margin-top: 1.5rem;
    display: flex;
    gap: 1.5rem;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
}

.project-technologies img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.highlight {
    background-color: #e0f0ff;
    padding: 0.1em 0.3em;
    border-radius: 4px;
    font-weight: 600;
    color: #005a9c;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 2.5rem;
        margin-bottom: 3rem;
    }

    h3 {
        font-size: 2rem;
    }

    main {
        padding: 2rem 1rem;
    }

    #titlebox {
        width: 100%;
        padding: 0.8rem;
    }

    /* Navbar responsive */
    .nav-container {
        top: 20px;
        width: 95%;
    }

    .nav-links {
        gap: 0.3rem;
        padding: 0.4rem 0.5rem;
    }

    .nav-links a {
        min-width: auto;
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .cv-download-button {
        padding: 0.8rem 0.8rem;
        margin-left: 0.5rem;
        gap: 0.3rem;
    }

    .cv-download-button .material-icons {
        font-size: 18px;
    }

    .cv-download-button .cv-text {
        font-size: 0.85rem;
    }

    /* Projects responsive */
    .project {
        flex-direction: column-reverse;
        gap: 2rem;
        width: 100%;
        margin-bottom: 12rem;
        max-height: none;
        opacity: 1;
        transition: none;
    }

    .project:last-child {
        margin-bottom: 4rem;
    }

    .project.active {
        opacity: 1;
        transform: scale(1);
    }

    .project-details {
        max-height: none;
        opacity: 1;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #b9b9b9;
        transition: none;
    }

    .project.reverse {
        flex-direction: column-reverse;
    }

    .project-description,
    .project-image {
        width: 100%;
        flex: none;
    }

    .project-description {
        padding: 1rem;
    }

    .project.reverse .project-description {
        padding-left: 1rem;
        padding-right: 0;
    }

    .project-image {
        width: 100%;
    }

    .project-image img {
        width: 100%;
        height: auto;
    }

    /* Carousel responsive - tap to expand */
    .carousel-wrapper {
        flex-direction: column;
    }

    .carousel-dots {
        display: none;
    }

    .carousel-card {
        padding: 1.5rem;
        opacity: 1;
        transform: scale(1);
        cursor: pointer;
    }

    .carousel-card h3 {
        font-size: 1.3rem;
        margin-bottom: 0;
        transition: margin-bottom 0.3s ease;
    }

    .carousel-card.active h3 {
        margin-bottom: 1rem;
    }

    .carousel-card p {
        max-height: 0;
        opacity: 0;
        font-size: 0.95rem;
        line-height: 1.6;
        transition: max-height 0.4s ease, opacity 0.3s ease;
    }

    .carousel-card.active p {
        max-height: 800px;
        opacity: 1;
    }

    /* Contact responsive */
    #contact-section {
        padding: 2rem;
        border-radius: 20px;
    }

    #contact-section h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    #contact-section p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .contact-button {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
        gap: 0.5rem;
    }

    .contact-button .email-text {
        font-size: 0.85rem;
    }

    .project-technologies {
        gap: 0.8rem;
        flex-wrap: wrap;
    }

    .project-technologies img {
        height: 32px;
    }

    section {
        margin-bottom: 4rem;
    }
}