@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

:root {
    --bg-color: #0f1322;
    --snd-bg-color: #1c233e;
    --text-color: #ededed;
    --main-color: #00eeff; /* Neon Cyan */
    --hover-color: #00c3d1;
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
    scroll-padding-top: 8rem;
}

/* Text Selection Color */
::selection {
    background: var(--main-color);
    color: var(--bg-color);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 1rem;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: var(--main-color);
    border-radius: 5rem;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
}

section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

/* ===========================
   ANIMATION KEYFRAMES 
   =========================== */

/* Slide from Right */
@keyframes slideRight {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slide from Left */
@keyframes slideLeft {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slide from Top */
@keyframes slideTop {
    0% {
        transform: translateY(100px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Slide from Bottom (for Header) */
@keyframes slideBottom {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Zoom In Effect */
@keyframes zoomIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Floating Image Animation */
@keyframes floatImage {
    0% { transform: translateY(0); }
    50% { transform: translateY(-2.4rem); }
    100% { transform: translateY(0); }
}

/* Pulse/Glow Animation for Buttons */
@keyframes pulseGlow {
    0% { box-shadow: 0 0 10px var(--main-color); }
    50% { box-shadow: 0 0 25px var(--main-color), 0 0 50px var(--main-color); }
    100% { box-shadow: 0 0 10px var(--main-color); }
}

/* === HEADER === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: rgba(15, 19, 34, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* Animation */
    animation: slideBottom 1s ease forwards;
}

.logo {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 700;
    cursor: default;
    text-shadow: 0 0 10px var(--main-color);
    opacity: 0;
    animation: slideRight 1s ease forwards;
    animation-delay: 0.3s; /* Delay so header appears first */
}

.navbar a {
    font-size: 1.7rem;
    color: var(--text-color);
    margin-left: 4rem;
    font-weight: 500;
    transition: .3s;
    opacity: 0;
    animation: slideTop .5s ease forwards;
    display: inline-block;
}

/* Staggered animation for menu items */
.navbar a:nth-child(1) { animation-delay: 0.4s; }
.navbar a:nth-child(2) { animation-delay: 0.5s; }
.navbar a:nth-child(3) { animation-delay: 0.6s; }
.navbar a:nth-child(4) { animation-delay: 0.7s; }
.navbar a:nth-child(5) { animation-delay: 0.8s; }

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
    text-shadow: 0 0 10px var(--main-color);
}

#menu-icon {
    font-size: 3.6rem;
    color: var(--text-color);
    display: none;
    cursor: pointer;
}

/* === HOME SECTION === */
.home {
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-content h3 {
    font-size: 3.2rem;
    font-weight: 700;
    opacity: 0;
    animation: slideBottom 1s ease forwards;
    animation-delay: 0.7s;
}

.home-content h3:nth-of-type(2) {
    margin-bottom: 2rem;
    animation-delay: 1.1s; /* Shows up after the first h3 */
}

span {
    color: var(--main-color);
}

.home-content h2 {
    font-size: 5.6rem;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    opacity: 0;
    animation: slideRight 1s ease forwards;
    animation-delay: 1s;
}

.home-content p {
    font-size: 1.6rem;
    opacity: 0;
    animation: slideLeft 1s ease forwards;
    animation-delay: 1s;
}

.home-img img {
    width: 28vw;
    /* Combine Slide effect with Float effect */
    animation: zoomIn 1s ease forwards, floatImage 4s ease-in-out infinite;
    animation-delay: 0s, 1s; /* Zoom in immediately, float starts after 1s */
    filter: drop-shadow(0 0 20px var(--main-color));
    opacity: 0; /* Starts invisible for zoomIn */
    animation-fill-mode: forwards; /* Keeps it visible */
}

.social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: .2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--main-color);
    margin: 3rem 1.5rem 3rem 0;
    transition: .5s ease;
    opacity: 0;
    animation: slideLeft 1s ease forwards;
    animation-delay: calc(.2s * var(--i)); /* Requires style="--i:1" in HTML or just hard delay */
}
/* Fallback manual delays for social icons if --i isn't in HTML */
.social-media a:nth-child(1) { animation-delay: 1.5s; }
.social-media a:nth-child(2) { animation-delay: 1.6s; }
.social-media a:nth-child(3) { animation-delay: 1.7s; }
.social-media a:nth-child(4) { animation-delay: 1.8s; }

.social-media a:hover {
    background: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--main-color);
    transform: translateY(-5px);
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 10px var(--main-color);
    font-size: 1.6rem;
    color: var(--bg-color);
    letter-spacing: .1rem;
    font-weight: 600;
    transition: .5s ease;
    opacity: 0;
    animation: slideTop 1s ease forwards;
    animation-delay: 2s;
}

.btn:hover {
    box-shadow: 0 0 25px var(--main-color);
    background: var(--hover-color);
    transform: scale(1.05);
}

/* === ABOUT SECTION === */
.about {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    background: var(--snd-bg-color);
}

.about-img img {
    width: 25vw;
    border-radius: 50%;
    border: 5px solid var(--main-color);
    box-shadow: 0 0 20px var(--main-color);
    transition: 0.5s ease;
}

.about-img img:hover {
    box-shadow: 0 0 50px var(--main-color), inset 0 0 20px var(--main-color);
    transform: rotate(5deg) scale(1.05);
}

.heading {
    text-align: center;
    font-size: 4.5rem;
}

.about-content h2 {
    text-align: left;
    line-height: 1.2;
}

.about-content p {
    font-size: 1.6rem;
    margin: 2rem 0 3rem;
    line-height: 1.6;
}

/* === SKILLS SECTION === */
.skills {
    background: var(--bg-color);
    padding: 4rem 9%;
    min-height: 100vh;
}

.skills h2 {
    margin-bottom: 3rem;
    font-size: 3rem;
    text-align: center;
}

.skills h2 span {
    color: var(--main-color);
}

.skills-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-bottom: 4rem;
    position: relative;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
    flex-wrap: wrap; 
}

.tab-btn {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-color);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
    padding: 0 1rem;
}

.tab-btn::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -12px;
    width: 0;
    height: 2px;
    background: var(--main-color);
    transition: 0.3s;
}

.tab-btn:hover::after, .tab-btn.active::after {
    width: 100%;
}

.tab-btn:hover, .tab-btn.active {
    color: var(--main-color);
    text-shadow: 0 0 10px var(--main-color);
}

.skills-content {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2.5rem;
    /* Animation for Tab Switching */
    animation: slideTop 0.5s ease-in-out;
}

.skills-content.active {
    display: grid;
}

.skill-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem 2rem;
    border-radius: 1.5rem;
    text-align: center;
    transition: 0.4s ease;
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Shine effect on hover */
.skill-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: 0.5s;
}

.skill-box:hover::before {
    left: 100%;
}

.skill-box:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--main-color);
    transform: translateY(-10px);
    box-shadow: 0 0 20px rgba(0, 238, 255, 0.3);
}

.skill-box i {
    font-size: 4rem;
    color: var(--main-color);
    transition: 0.3s;
}

.skill-box:hover i {
    transform: scale(1.2) rotate(360deg); /* Icon Spins on hover */
    text-shadow: 0 0 20px var(--main-color);
}

.skill-box h3 {
    font-size: 1.8rem;
    font-weight: 500;
    color: #fff;
}

/* === CERTIFICATIONS SECTION === */
.certifications {
    background: var(--snd-bg-color);
}

.cert-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.cert-box {
    position: relative;
    border-radius: 2rem;
    box-shadow: 0 0 1rem rgba(0,0,0,0.5);
    overflow: hidden;
    height: 250px;
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: .5s ease;
}

.cert-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .5s ease;
}

.cert-box:hover img {
    transform: scale(1.1);
    filter: blur(2px);
}

.cert-box:hover {
    box-shadow: 0 0 20px var(--main-color);
    border-color: var(--main-color);
    transform: scale(1.02);
}

.cert-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.1), var(--main-color));
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 0 4rem;
    transform: translateY(100%);
    transition: .5s ease;
    backdrop-filter: blur(5px);
}

.cert-box:hover .cert-layer {
    transform: translateY(0);
}

.cert-layer h4 {
    font-size: 2.5rem;
    color: #fff;
    text-shadow: 0 0 5px #000;
    transform: translateY(20px);
    transition: .5s;
    opacity: 0;
}

.cert-box:hover h4 {
    transform: translateY(0);
    opacity: 1;
}

.cert-layer p {
    font-size: 1.4rem;
    margin: .3rem 0 1rem;
    color: #fff;
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: .5s;
    transition-delay: 0.1s;
}

.cert-box:hover p {
    transform: translateY(0);
    opacity: 1;
}

.cert-layer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 5rem;
    height: 5rem;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    transform: translateY(20px);
    transition: .5s;
    transition-delay: 0.2s;
}

.cert-box:hover a {
    transform: translateY(0);
    opacity: 1;
}

.cert-layer a i {
    font-size: 2rem;
    color: #333;
}

/* === ACTIVITIES SECTION === */
.activities {
    background: var(--bg-color);
}
.timeline-items {
    max-width: 1000px;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    position: relative;
}
.timeline-items::before {
    content: '';
    position: absolute;
    width: 5px;
    height: 100%;
    background-color: var(--main-color);
    left: calc(50% - 1px);
    box-shadow: 0 0 10px var(--main-color);
}
.timeline-item {
    margin-bottom: 40px;
    width: 100%;
    position: relative;
}
.timeline-item:nth-child(odd) {
    padding-right: calc(50% + 30px);
    text-align: right;
}
.timeline-item:nth-child(even) {
    padding-left: calc(50% + 30px);
}
.timeline-dot {
    height: 20px;
    width: 20px;
    background-color: var(--main-color);
    position: absolute;
    left: calc(50% - 10px);
    border-radius: 50%;
    top: 10px;
    box-shadow: 0 0 15px var(--main-color);
    /* Pulse Animation for Timeline Dots */
    animation: pulseGlow 2s infinite; 
}
.timeline-date {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin: 6px 0 15px;
}
.timeline-content {
    background-color: var(--snd-bg-color);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 2rem;
    cursor: pointer;
    transition: 0.4s ease;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}
.timeline-content:hover {
    transform: scale(1.05);
    border-color: var(--main-color);
    box-shadow: 0 0 30px rgba(0, 238, 255, 0.4);
}
.timeline-content h3 {
    font-size: 20px;
    color: var(--main-color);
    margin: 0 0 10px;
}
.timeline-content p {
    color: #ccc;
    font-size: 16px;
    line-height: 22px;
}

/* === PORTFOLIO SECTION === */
.portfolio {
    background: var(--snd-bg-color);
}

.portfolio h2 {
    margin-bottom: 4rem;
}

.portfolio-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 3rem;
}

.portfolio-box {
    position: relative;
    border-radius: 2rem;
    box-shadow: 0 0 1rem rgba(0,0,0,0.5);
    overflow: hidden;
    height: 350px; 
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.5s ease;
}

.portfolio-box:hover {
    box-shadow: 0 0 25px var(--main-color);
    transform: translateY(-5px);
}

.portfolio-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .5s ease;
}

.portfolio-box:hover img {
    transform: scale(1.1);
}

.portfolio-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.4), var(--snd-bg-color));
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 0 4rem;
    transform: translateY(100%);
    transition: .5s ease;
    backdrop-filter: blur(3px);
}

.portfolio-box:hover .portfolio-layer {
    transform: translateY(0);
}

.portfolio-layer h4 {
    font-size: 2.8rem;
    color: #fff;
    margin-bottom: 1rem;
    text-shadow: 0 0 5px #000;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.5s;
}
.portfolio-box:hover h4 {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-layer p {
    font-size: 1.6rem;
    margin-bottom: 2rem;
    color: #eee;
    font-weight: 500;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.5s;
    transition-delay: 0.1s;
}
.portfolio-box:hover p {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-layer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 5rem;
    height: 5rem;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px var(--main-color);
    opacity: 0;
    transform: translateY(20px);
    transition: 0.5s;
    transition-delay: 0.2s;
}
.portfolio-box:hover a {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-layer a i {
    font-size: 2rem;
    color: #333;
}

.portfolio-btn {
    text-align: center;
    margin-top: 4rem;
}

/* === EDUCATION SECTION === */
.education {
    background: var(--bg-color);
}
.education-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}
.education-box {
    flex: 1 1 30rem;
    background: var(--snd-bg-color);
    padding: 3rem 2rem 4rem;
    border-radius: 2rem;
    text-align: center;
    border: .2rem solid transparent;
    transition: .5s ease;
}
.education-box:hover {
    border-color: var(--main-color);
    transform: translateY(-10px);
    box-shadow: 0 0 20px rgba(0, 238, 255, 0.3);
}
.education-box i {
    font-size: 5rem;
    color: var(--main-color);
    margin-bottom: 1rem;
    transition: 0.5s;
}
/* Icon rotates on hover */
.education-box:hover i {
    transform: rotateY(180deg);
}

.education-box h3 {
    font-size: 2rem;
}
.education p {
    font-size: 1.6rem;
    margin: 1rem 0 3rem;
}

/* === CONTACT SECTION === */
.contact {
    background: var(--snd-bg-color);
}
.contact-container {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}
.contact-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-color);
    padding: 3rem;
    min-width: 250px;
    border: 1px solid var(--main-color);
    border-radius: 1rem;
    transition: 0.3s;
}
.contact-box:hover {
    box-shadow: 0 0 20px var(--main-color);
    transform: scale(1.05);
}
.contact-box i {
    font-size: 3rem;
    color: var(--main-color);
    margin-bottom: 1rem;
    transition: 0.3s;
}
.contact-box:hover i {
    transform: translateY(-5px);
}
.contact-box h3 a {
    font-size: 1.8rem;
    color: var(--text-color);
    transition: 0.3s;
}
.contact-box h3 a:hover {
    color: var(--main-color);
}

/* === FOOTER === */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 9%;
    background: var(--bg-color);
    border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-text p {
    font-size: 1.6rem;
}
.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem;
    background: var(--main-color);
    border-radius: .8rem;
    transition: .5s ease;
    /* Continuous Bounce */
    animation: floatImage 2s ease-in-out infinite; 
}
.footer-iconTop a:hover {
    box-shadow: 0 0 1rem var(--main-color);
    background: var(--hover-color);
}
.footer-iconTop a i {
    font-size: 2.4rem;
    color: var(--bg-color);
}

/* === MEDIA QUERIES === */
@media (max-width: 1200px) {
    html { font-size: 55%; }
}
@media (max-width: 991px) {
    .header { padding: 2rem 3%; }
    section { padding: 10rem 3% 2rem; }
    .portfolio { padding-bottom: 7rem; }
    .footer { padding: 2rem 3%; }
}
@media (max-width: 768px) {
    #menu-icon { display: block; }
    
    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem 3%;
        background: var(--bg-color);
        border-top: .1rem solid rgba(0,0,0,.2);
        box-shadow: 0 .5rem 1rem rgba(0,0,0,.2);
        display: none;
    }
    .navbar.active { display: block; }
    
    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
        transform: translateY(-20px); 
        transition: .4s ease;
    }
    
    .navbar.active a {
        transform: translateY(0); 
    }

    .home { flex-direction: column; }
    .home-content h3 { font-size: 2.6rem; }
    .home-content h2 { font-size: 5rem; }
    .home-img img { width: 70vw; margin-top: 4rem; }
    
    .about { flex-direction: column-reverse; }
    .about-img img { width: 70vw; margin-top: 4rem; }
    
    .timeline-items::before { left: 7px; }
    .timeline-item:nth-child(odd) { padding-right: 0; text-align: left; }
    .timeline-item:nth-child(odd), .timeline-item:nth-child(even) { padding-left: 37px; }
    .timeline-dot { left: 0; }
    
    .portfolio-container {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 450px) {
    html { font-size: 50%; }
}
