html {
    scroll-behavior: smooth;
}

body {
    background-color:rgba(0, 0, 0, 0.8);
    background-image: url('img/background.jpg');
    color: white;
    font-family: Arial, sans-serif;
    font-family: 'Poppins';
    margin: 0;
    padding: 0;
    transition: background-color 0.5s ease;
    background-attachment: fixed;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: -10px;
    width: 110%;
    height: 110%;
    background-image: url('img/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(8px);
    z-index: -1;
}

.container {
    width: 90%;
    max-width: 1000px;
    margin: auto;
    padding-top: 50px;
}


/* navbar */
.logo {
    font-size: 24px;
    font-weight: bold;
    color: greenyellow;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    backdrop-filter: blur(10px);
    background-color:rgba(18, 18, 18, 0.8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24%;
    box-sizing: border-box;
    z-index: 1000;
}

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

.nav-links li {
    display: inline;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-size: 16px;
    transition: color 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: greenyellow;
}

.nav-links a.active {
    border-bottom: 3px solid yellowgreen;
    color: yellowgreen;
}

/* hamburger styles */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 1100;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 4px;
    margin: 5px 0;
    background: yellowgreen;
    border-radius: 2px;
    transition: 0.3s;
}

/* main body */
.intro-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 200px;
}

.intro {
    text-align: left;
    max-width: 50%;
}

.intro h1 {
    font-size: 32px;
    color: greenyellow;
    font-weight: bold;
    
}

.intro h2 {
    font-size: 32px;
    font-weight: bold;
}

.intro h3 {
    color: greenyellow;
    font-size: 38px;
}

.description {
    font-size: 18px;
}

.motto {
    font-size: 1.2rem;
    font-weight: bold;
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    display: inline-block;
}

#typing {
    border-right: 3px solid;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 50% { border-color: white; }
    51%, 100% { border-color: transparent; }
}

/* user links*/
.btn {
    color: white;
    background-color: rgba(18, 18, 18, 0.6);
    border: 2px solid greenyellow;
    border-radius: 20px;
    margin: 20px 0;
    margin-right: 20px;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 22px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.btn:hover {
    border: 2px solid yellowgreen; 
}

/* social media */
.social-icons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: inline-block;
}

.social-icons img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: white;
    padding: 10px;
    transition: 0.2s;
}

.social-icons img:hover {
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
    transition: 0.4s;
}

.profile-image {
    width: 380px;
    height: 380px;
    border-radius: 50%;
    border: 5px solid white;
    object-fit: cover;
    transition: 0.2s;
}

.profile-image:hover {
    border-radius: 10%;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
    transition: 0.2s;
}


/* container */
/* education section */
.education-section {
    background-color: white;
    position: relative;
    max-width: 100%;
    margin-top: 50px auto;
    padding: 100px 200px;
    margin-top: 300px;
    align-items: center;
}

.education-section h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 100px;
    color: black;
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.timeline-date {
    flex: 1;
    padding: 10px;
    font-weight: bold;
    text-align: right;
    color: black;
    margin-right: 100px;
}

.timeline-content {
    flex: 3;
    background: white;
    color: black;
    padding: 15px;
    border-radius: 10px;
    position: relative;
}

.clickable {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.2s ease;
    padding: 10px 30px;
    border-radius: 10px;
    background: white;
    margin-right: 150px;
    cursor: pointer;
}
.clickable:hover {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 25%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: black;
}

.timeline-item::after {
    content: "";
    position: absolute;
    left: calc(25% - 10px);
    top: 50%;
    width: 20px;
    height: 20px;
    background: black;
    border-radius: 50%;
    transform: translateY(-50%);
}


/* certificate section */
.certificates-section {
    background-color: white;
    position: relative;
    max-width: 100%;
    padding: 100px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.certificates-section h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 60px;
    color: black;
}

.certificate-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    padding: 15px 0;
}

.certificate-item {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.certificate-item img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

.certificate-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
}

/* certificate popover */
.certificate-popover-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.certificate-popover-content {
    position: relative;
    background: transparent;
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.certificate-popover-content img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 0 20px #222;
}

.certificate-popover-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    font-weight: bold;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    padding: 0 15px;
    z-index: 10001;
}

.certificate-popover-close:hover {
    background: rgba(0,0,0,0.8);
}

.certificate-popover-prev,
.certificate-popover-next {
    position: absolute;
    top: 50%;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.certificate-popover-prev {
    left: 10px;
}

.certificate-popover-next {
    right: 10px;
}

.certificate-popover-prev:hover,
.certificate-popover-next:hover {
    background: rgba(0,0,0,0.8);
}


/* skills section */
.skills-section {
    background-color: white;
    position: relative;
    max-width: 100%;
    padding: 100px 200px;
    margin: auto;
}

.skills-section h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 100px;
    color: black;
}

.skills-icons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    text-align: center;
    margin-bottom: 30px;
}

.skills-icons img {
    max-width: 100%;
}

.skills-lists {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 150px;
}

.skill-category h3 {
    margin-bottom: 8px;
    font-size: 18px;
    color: black;
}

.skill-category ul {
    margin: 0;
    padding-left: 20px;
}

.skill-category li {
    font-size: 16px;
    color: black;
}


/* projects section */
.projects-section {
    background-color: white;
    position: relative;
    max-width: 100%;
    padding: 100px 200px;
    margin: auto;
}

.projects-section h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 100px;
    color: black;
}

.project-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    padding: 15px 0;
}

.project-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
    padding: 40px 20px;
    width: 300px;
    text-align: center;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
}

.project-card:hover {
    box-shadow: 0 0 30px rgba(0,0,0,0.6);
    transform: translateY(-4px) scale(1.03);
}

.project-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: black;
}

.project-card p {
    font-size: 16px;
    margin-bottom: 15px;
    color: black;
}


/* photos section */
.photos-section {
    background-color: white;
    position: relative;
    max-width: 100%;
    padding: 100px 250px;
    margin: auto;
    padding-bottom: 150px;
}

.photos-section h2 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 60px;
    color: black;
}

.photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    padding: 15px 0;
}

.photo-item {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.photo-item img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

.photo-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
}

/* photo popover */
.photos-popover-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photos-popover-content {
    position: relative;
    background: transparent;
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.photos-popover-content img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 0 20px #222;
}

.photos-popover-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    font-weight: bold;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    padding: 0 15px;
    z-index: 10001;
}

.photos-popover-close:hover {
    background: rgba(0,0,0,0.8);
}

.photos-popover-prev,
.photos-popover-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.photos-popover-prev:hover,
.photos-popover-next:hover {
    background: rgba(0,0,0,0.8);
}

.photos-popover-prev {
    left: 10px;
}

.photos-popover-next {
    right: 10px;
}

.photos-popover-prev:hover,
.photos-popover-next:hover {
    background: rgba(0,0,0,0.8);
}


/* footer */
.contact-section {
    background-color: #1e2226;
    color: white;
    text-align: center;
    padding: 20px 0;
    width: 100%;
    height: 18%;
}

.contact-section h2 {
    font-size: 32px;
}

.contact-section p {
    font-size: 16px;
    max-width: 600px;
    margin: auto;
}


/* animate on scroll */
.ani {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.5s ease, transform 0.7s ease;
    will-change: opacity, transform;
}

.ani.visible {
    opacity: 1;
    transform: translateY(0);
}


/* back to top button */
.back-to-top-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: green;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 28px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    z-index: 1200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.back-to-top-btn:hover {
    background: rgb(0, 95, 0);
    box-shadow: 0 6px 20px rgba(0,0,0,0.6);
}

.back-to-top-btn.show {
    opacity: 1;
    pointer-events: auto;
}


/* responsive navbar */
@media (max-width: 900px) {
    /* menu bar */
    .navbar {
        padding: 20px 5%;
    }

    .nav-links {
        position: fixed;
        top: 75px;
        right: 0;
        background: rgba(18, 18, 18, 0.98);
        flex-direction: column;
        gap: 0;
        width: 200px;
        height: calc(100vh - 70px);
        align-items: flex-start;
        padding: 30px 0 0 30px;
        box-shadow: -2px 0 10px rgba(0,0,0,0.2);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 1001;
    }
    
    .nav-links.show {
        transform: translateX(0);
    }

    .nav-links li {
        margin-bottom: 30px;
        font-size: 20px;
    }

    .hamburger {
        display: flex;
    }

    /* containers */
    .container {
        width: 100%;
        max-width: 100%;
        padding-top: 90px;
        margin: 0;
    }

    .intro-container {
        flex-direction: column;
        align-items: center;
        margin-top: 120px;
        padding: 0 10px;
    }

    .social-icons {
        justify-content: center;
        margin-top: 20px;
    }

    .intro {
        text-align: center;
        max-width: 100%;
        padding: 0 10px;
    }

    .profile-image {
        width: 180px;
        height: 180px;
        margin-top: 20px;
    }

    .education-section,
    .skills-section,
    .certificates-section,
    .projects-section,
    .photos-section {
        padding: 40px 20px;
    }

    .education-section h2,
    .skills-section h2,
    .certificates-section h2,
    .projects-section h2,
    .photos-section h2 {
        margin-bottom: 40px;
        font-size: 24px;
    }

    .timeline-date {
        margin-right: 20px;
        font-size: 14px;
        padding: 5px;
    }

    .timeline-content {
        padding: 10px;
        font-size: 15px;
        margin-right: 0;
    }

    .certificate-item {
        flex-direction: column;
        max-width: 100%;
        margin-bottom: 30px;
        align-items: center;
        justify-content: center;
    }

    .certificate-item img {
        width: 90vw;
        max-width: 320px;
        margin: 0 0 10px 0;
    }

    .certificate-item p {
        margin: 0 0 10px 0;
        font-size: 16px;
        text-align: center;
    }

    .project-grid {
        flex-direction: column;
        gap: 30px;
        padding: 0 10px;
    }

    .project-card {
        max-width: 100%;
        margin: 0 auto 30px auto;
        padding: 10px;
    }

    .contact-section {
        padding: 40px 10px;
    }
}