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

/* ==========================
   Reset & Text Selection
========================== */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

::selection{
    background: #8b5cf6;
    color: white;
}

/* ==========================
   Body & Premium Background
========================== */
body{
    font-family: 'Poppins', sans-serif;
    background: radial-gradient(circle at top left, #24164f 0%, #080b18 45%), #080b18;
    color: #ffffff;
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #080b18;
}
::-webkit-scrollbar-thumb {
    background: #8b5cf6;
    border-radius: 10px;
}

/* ==========================
   Background Blur Glows
========================== */
.bg-blur{
    position: fixed;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: .35;
    z-index: -1;
    pointer-events: none;
}

.blur1{
    background: #7b2cff;
    top: -120px;
    left: -120px;
}

.blur2{
    background: #2a9dff;
    bottom: -120px;
    right: -120px;
}

/* ==========================
   Navbar & Logo Hover
========================== */
.navbar{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 9%;
    background: rgba(15, 15, 25, .65);
    backdrop-filter: blur(12px);
    z-index: 999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo h2{
    color: #ffffff;
    font-size: 26px;
    font-weight: 700;
    transition: .3s;
    cursor: pointer;
}

.logo h2:hover{
    color: #8b5cf6;
}
/* ==========================
   Logo Image
========================== */

.logo{
    display: flex;
    align-items: center;
    gap:10px;
    text-decoration:none;
}

.logo img{
    width: 55px;
    height: 55px;
    object-fit: contain;
    border-radius: 50%;
    display: block;
    transition: .3s ease;
}

.logo img:hover{
    transform: scale(1.08);
    filter: drop-shadow(0 0 10px #8b5cf6);
}

.logo-text{
    color:#ffffff;
    font-size:20px;
    font-weight:700;
    letter-spacing:0.5px;
    transition:.3s;
}

.logo:hover .logo-text{
    color:#8b5cf6;
}

.nav-links{
    display: flex;
    list-style: none;
    gap: 35px;
}

.nav-links a{
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #94a3b8;
    font-size: 16px;
    transition: .35s;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a i{
    font-size: 14px;
}

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

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2.5px;
    background: #8b5cf6;
    border-radius: 2px;
}

/* ==========================
   Hero Section & Title Size
========================== */
.hero{
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 140px 9% 80px;
    gap: 80px;
}

.hero-left{
    flex: 1;
    max-width:620px;
}

.hero-left h3{
    color: #ffffff;
    font-size: 32px;
    font-weight: 600;
}

.hero-left h1{
    font-size: 64px;
    font-weight: 800;
    margin-bottom:18px;
    line-height: 1.1;
    color:#ffffff;
}

.hero-left h1 span{
    color: #8b5cf6;
}

.hero-left h2{
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 25px;
}

.hero-left p{
    margin-bottom: 35px;
    line-height: 1.8;
    color: #94a3b8;
    max-width: 580px;
    font-size: 17px;
}

/* ==========================
   Hero Buttons Font & Hover
========================== */
.hero-buttons{
    margin-top: 35px;
    display: flex;
    gap: 15px;
}

.btn-primary{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    background: #8b5cf6;
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    transition: .35s;
}

.btn-primary:hover{
   background: #7c3aed;
   transform:translateY(-4px);
   box-shadow:
      0 0 25px rgba(139, 92, 246, 0.6),
      0 0 40px rgba(139,92,246,.35);
}

.btn-secondary{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    transition: .35s;
}

.btn-secondary:hover{
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    transform:translateY(-4px);
    box-shadow:
        0 0 20px rgba(139,92,246,.25);
}

/* Social Icons */
.social-icons {
    margin-top: 35px;
    display: flex;
    gap: 25px;
}

.social-icons a {
    color: #64748b;
    font-size: 22px;
    transition: 0.3s;
    text-decoration: none;
}

.social-icons a:hover {
    color: #ffffff;
    transform: translateY(-3px);
}

/* ==========================
   Profile Image, Glow & Float
========================== */
.hero-right{
    flex: 1;
    display: flex;
    justify-content: center;
}

.profile-card{
    width: 400px;
    height: 460px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius:20px;
    animation: float 4s ease-in-out infinite;
    box-shadow:
        0 25px 60px rgba(0,0,0,.45),
        0 0 35px rgba(139,92,246,.25);
}

.profile-card::before{
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, #8b5cf655, transparent);
    filter: blur(60px);
    z-index: -1;
}

.profile-card img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* ==========================
   Sections Layout & Gap
========================== */
section{
    padding: 110px 9%;
}

section h2{
    font-size: 30px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.line{
    width: 45px;
    height: 3px;
    background: #8b5cf6;
    margin: 0 auto 35px;
    border-radius: 10px;
}

/* ==========================
   About Section
========================== */
.about p{
    max-width: 800px;
    margin: auto;
    text-align: center;
    line-height: 1.8;
    color: #94a3b8;
    font-size: 16px;
}

/* ==========================
   Education & Glass Effect
========================== */
.education-container{
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.edu-card{
    backdrop-filter: blur(15px);
    background: rgba(17, 20, 34, .75);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: .35s;
}

.edu-card:hover{
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-3px);
}

.edu-card h3{
    color: #8b5cf6;
    font-size: 20px;
    margin-bottom: 5px;
}

.edu-card h3 i{
    color: #8b5cf6;
    margin-right: 10px;
    font-size: 22px;
}

.edu-card h4{
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}
.edu-card p{
    color: #94a3b8;
    font-size: 14.5px;
}

.edu-card span{
    display: block;
    margin-top: 10px;
    color: #64748b;
    font-size: 13px;
}

/* ==========================
   Projects & Glass Effect
========================== */
.project-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.project-card{
    backdrop-filter: blur(15px);
    background: rgba(17, 20, 34, .75);
    padding: 35px 25px;
    border-radius: 12px;
    text-align: left;
    transition: .35s;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.project-card:hover{
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
}

.project-card i{
    font-size: 32px;
    color: #8b5cf6;
    margin-bottom: 15px;
    transition: .4s;
}

.project-card:hover i{
    transform: scale(1.2);
}

.project-card h3{
    font-size: 18px;
    margin-bottom: 10px;
}

.project-card p{
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
}

/* ==========================
   Certifications Section (3D)
========================== */
.certifications-grid-3d{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    max-width: 1200px;
    margin: 40px auto 0;
    perspective: 1000px;
}

.cert-card-3d{
    flex: 0 0 calc((100% - 48px) / 3);
    max-width: 350px;
    min-width: 260px;
    min-height: 270px;
    perspective: 1000px;
}

/* 1 Card: 1 centered */
.certifications-grid-3d:has(> .cert-card-3d:only-child) .cert-card-3d,
.cert-card-3d:first-child:nth-last-child(1){
    flex: 0 0 380px;
    max-width: 440px;
}

/* 2 Cards: 2 centered */
.certifications-grid-3d:has(> .cert-card-3d:nth-child(2):last-child) .cert-card-3d,
.cert-card-3d:first-child:nth-last-child(2),
.cert-card-3d:first-child:nth-last-child(2) ~ .cert-card-3d{
    flex: 0 0 calc((100% - 24px) / 2);
    max-width: 480px;
}

/* 3 Cards: 3 centered */
.certifications-grid-3d:has(> .cert-card-3d:nth-child(3):last-child) .cert-card-3d,
.cert-card-3d:first-child:nth-last-child(3),
.cert-card-3d:first-child:nth-last-child(3) ~ .cert-card-3d{
    flex: 0 0 calc((100% - 48px) / 3);
    max-width: 350px;
}

/* 4 Cards: 3 + 1 (3 on first row, 1 centered below) */
.certifications-grid-3d:has(> .cert-card-3d:nth-child(4):last-child) .cert-card-3d,
.cert-card-3d:first-child:nth-last-child(4),
.cert-card-3d:first-child:nth-last-child(4) ~ .cert-card-3d{
    flex: 0 0 calc((100% - 48px) / 3);
    max-width: 350px;
}

/* 5 Cards: 3 + 2 (3 on first row, 2 centered below) */
.certifications-grid-3d:has(> .cert-card-3d:nth-child(5):last-child) .cert-card-3d,
.cert-card-3d:first-child:nth-last-child(5),
.cert-card-3d:first-child:nth-last-child(5) ~ .cert-card-3d{
    flex: 0 0 calc((100% - 48px) / 3);
    max-width: 350px;
}

/* 6 Cards: 4 + 2 (4 on first row, 2 centered below) */
.certifications-grid-3d:has(> .cert-card-3d:nth-child(6):last-child) .cert-card-3d,
.cert-card-3d:first-child:nth-last-child(6),
.cert-card-3d:first-child:nth-last-child(6) ~ .cert-card-3d{
    flex: 0 0 calc((100% - 72px) / 4);
    max-width: 280px;
}

/* 7 Cards: 4 + 3 (4 on first row, 3 centered below) */
.certifications-grid-3d:has(> .cert-card-3d:nth-child(7):last-child) .cert-card-3d,
.cert-card-3d:first-child:nth-last-child(7),
.cert-card-3d:first-child:nth-last-child(7) ~ .cert-card-3d{
    flex: 0 0 calc((100% - 72px) / 4);
    max-width: 280px;
}

/* 8 Cards: 4 + 4 (4 on first row, 4 on second row) */
.certifications-grid-3d:has(> .cert-card-3d:nth-child(8):last-child) .cert-card-3d,
.cert-card-3d:first-child:nth-last-child(8),
.cert-card-3d:first-child:nth-last-child(8) ~ .cert-card-3d{
    flex: 0 0 calc((100% - 72px) / 4);
    max-width: 280px;
}

.cert-card-3d-inner{
    position:relative;
    width:100%;
    height:100%;
    box-sizing:border-box;

    background:rgba(17,20,34,.75);
    backdrop-filter:blur(15px);

    border:1px solid rgba(255,255,255,.08);
    border-radius:16px;

    padding:35px 25px;
    text-align:center;

    transform-style:preserve-3d;

    transition:
        transform .5s cubic-bezier(.23,1,.32,1),
        box-shadow .5s ease,
        border-color .5s ease;

    box-shadow:0 15px 35px rgba(0,0,0,.4);

    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:10px;
}

.cert-card-3d:hover .cert-card-3d-inner{
    transform:rotateX(12deg) rotateY(-12deg) translateZ(20px);
    border-color:#8b5cf6;
    box-shadow:
        -15px 20px 35px rgba(139,92,246,.25),
        0 0 20px rgba(139,92,246,.35);
}

.cert-card-3d-inner i{
    font-size:38px;
    color:#8b5cf6;
    transform:translateZ(40px);
    transition:transform .4s ease,color .4s ease;
    margin-bottom:5px;
}

.cert-card-3d:hover .cert-card-3d-inner i{
    color:#ffffff;
    transform:translateZ(55px) scale(1.1);
}

.cert-card-3d-inner h3{
    color:#ffffff;
    font-size:18px;
    font-weight:600;
    margin:0;
    line-height:1.4;
    transform:translateZ(30px);
}

.cert-card-3d-inner p{
    color:#a78bfa;
    font-size:14px;
    line-height:1.4;
    margin:0;
    transform:translateZ(25px);
}

.cert-card-3d-inner .btn-primary{
    margin-top:10px;
    padding:10px 22px;
    font-size:14px;
    transform:translateZ(35px);
    transition:transform .35s ease,background .35s ease,box-shadow .35s ease;
}

.cert-card-3d:hover .cert-card-3d-inner .btn-primary{
    transform:translateZ(45px);
}

/* ==========================
   Skills Section
========================== */


.skills-grid-3d{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:24px;
    max-width:1000px;
    margin:40px auto 0;
    perspective:1000px;
}

.card-3d{
    flex:0 0 calc((100% - 48px) / 3);
    max-width:300px;
    min-width:260px;
    height:220px;
    perspective:1000px;
}

.card-3d-inner{
    position:relative;
    width:100%;
    height:100%;
    box-sizing:border-box;

    background:rgba(17,20,34,.75);
    backdrop-filter:blur(15px);

    border:1px solid rgba(255,255,255,.08);
    border-radius:16px;

    padding:30px 20px;
    text-align:center;

    transform-style:preserve-3d;

    transition:
        transform .5s cubic-bezier(.23,1,.32,1),
        box-shadow .5s ease,
        border-color .5s ease;

    box-shadow:0 15px 35px rgba(0,0,0,.4);

    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
}

.card-3d:hover .card-3d-inner{
    transform:rotateX(12deg) rotateY(-12deg) translateZ(20px);
    border-color:#8b5cf6;
    box-shadow:
        -15px 20px 35px rgba(139,92,246,.25),
        0 0 20px rgba(139,92,246,.35);
}

.card-3d-inner i{
    font-size:42px;
    color:#8b5cf6;
    margin-bottom:15px;
    transform:translateZ(40px);
    transition:transform .4s ease,color .4s ease;
}

.card-3d:hover .card-3d-inner i{
    color:#ffffff;
    transform:translateZ(55px) scale(1.1);
}

.card-3d-inner h3{
    color:#ffffff;
    font-size:18px;
    font-weight:600;
    margin:0 0 8px;
    transform:translateZ(30px);
}

.card-3d-inner p{
    color:#a78bfa;
    font-size:13px;
    line-height:1.4;
    margin:0;
    transform:translateZ(20px);
}


/* ==========================
   Contact & Hover Animation
========================== */
.contact-text{
    text-align:center;
    max-width:650px;
    margin:0 auto 40px;
}
.contact-title{
    font-size:22px;
    font-weight:600;
    color:#ffffff;
    margin-bottom:12px;
}
.contact-text p:last-child{
    color:#94a3b8;
    font-size:16px;
    line-height:1.8;
}
.contact-box{
    display: flex;
    justify-content: center;
    align-items:center;
    gap: 20px;
    flex-wrap: wrap;
}
.contact-box a{
    display: inline-flex;
    align-items: center;
    justify-content:center;
    gap: 10px;

    min-width:180px;
    padding:14px 24px;
   
    background: #111422;
    color:#ffffff;
    text-decoration: none;

    border:1px solid rgba(255,255,255,.08);
    border-radius:8px;
    
    font-size:15px;
    font-weight: 600;
   
    transition:all .35s ease;
}

.contact-box a:hover{
    border-color: #8b5cf6;
    background: transparent;
    transform: translateY(-5px);
}

.contact-box a i {
    color: #8b5cf6;
}

/* ==========================
   Footer Section
========================== */
.footer{
    text-align:center;
    padding:30px 20px;
    border-top:1px solid rgba(255,255,255,.08);
}

.footer p{
    margin:8px 0;
    font-size:14px;
    color:#94a3b8;
}

.footer strong{
    color:#8b5cf6;
    font-weight:600;
}
/* ==========================
   Fade-in Animation (Observer)
========================== */
.hidden {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* ==========================
   Responsive UI Adaptability
========================== */
   .menu-toggle{
    display:none;
    font-size:28px;
    color:#ffffff;
    cursor:pointer;
    z-index:1001;
}

@media (max-width: 992px) {
    .navbar{
        padding:15px 20px;
    }

    .menu-toggle{
        display:block;
    }

    .nav-links{
        position:fixed;
        top:0;
        right:-280%;
        width:280px;
        height:100vh;
        background:rgba(15,15,25,.98);
        backdrop-filter:blur(15px);
       
        display:flex;
        flex-direction:column;
        justify-content:center;
        align-items:center;
        gap:30px;
        transition:.4s ease;
        z-index:1000;
    }

    .nav-links.active{
        right:0;
    }

    .hero {
        flex-direction: column-reverse;
        text-align: center;
        gap: 50px;
        padding: 120px 20px 60px;
    }

    .hero-left h1 {
        font-size: 48px;
    }

    .hero-left h2 {
        font-size: 18px;
    }

    .hero-left p {
        max-width: 100%;
        margin: 20px auto;
    }

    .hero-buttons,
    .social-icons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .profile-card {
        width: 300px;
        height: 350px;
    }
}

/* ==========================
   Mobile Responsive Layout
========================== */

@media (max-width: 768px) {
    .hero{
        flex-direction: column-reverse;
        text-align: center;
        padding:90px 20px 40px;
        gap:35px;
    }

    .profile-card{
        width:240px;
        height:290px;
    }

    .hero-left h1 {
        font-size: 36px;
       line-height:1.1;
    }

    .hero-left h2 {
        font-size: 15px;
        margin-top:15px;
    }
    .hero-left p{
        font-size:15px;
        line-height:1.8;
        margin:15px auto 25px;
        max-width:100%;
    }
   
    .hero-buttons{
        flex-direction:column;
        gap:15px;
    }
   
    .social-icons{
       justify-content:center;
       gap:20px;
       margin-top:25px;
    }

   .logo img{
        width:45px;
        height:45px;
    }

    .logo-text{
        font-size:16px;
    }
   
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .contact-box {
        flex-direction: column;
        align-items: center;
    }
    .contact-box a{
       width:100%;
       max-width:280px;
       justify-content:center;
    }

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

    .certifications-grid-3d{
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 20px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 30px auto 0 !important;
    }

    .cert-card-3d{
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        min-height: auto !important;
        height: auto !important;
    }

    .cert-card-3d-inner{
        width: 100% !important;
        height: auto !important;
        padding: 28px 20px !important;
        box-sizing: border-box !important;
    }

    .cert-card-3d-inner i{
        font-size: 34px !important;
        margin-bottom: 8px !important;
    }

    .cert-card-3d-inner h3{
        font-size: 17px !important;
        line-height: 1.4 !important;
        margin: 0 0 6px 0 !important;
        word-break: break-word !important;
    }

    .cert-card-3d-inner p{
        font-size: 13.5px !important;
        line-height: 1.5 !important;
        margin: 0 0 12px 0 !important;
    }

    .cert-card-3d-inner .btn-primary{
        width: 100% !important;
        max-width: 260px !important;
        justify-content: center !important;
        padding: 12px 18px !important;
        font-size: 14px !important;
        box-sizing: border-box !important;
    }

    .skills-grid-3d{
        gap:16px;
    }

    .card-3d{
        flex:0 0 100%;
        max-width:100%;
        min-width:0;
        height:180px;
    }

    .education-container {
        gap: 15px;
    }

    section{
        padding:70px 20px;
    }

    section h2{
       font-size:28px;
    }
    .line{
        margin:0 auto 25px;
    }

    .footer{
        padding:25px 15px;
    }

    .footer p{
        font-size:13px;
        line-height:1.7;
    }

}

@media (max-width:480px){

    .logo img{
        width:40px;
        height:40px;
    }

    .logo-text{
        font-size:15px;
    }

    .profile-card{
        width:210px;
        height:255px;
    }

    .hero-left h1{
        font-size:32px;
    }

    .hero-left h2{
        font-size:14px;
    }

    .hero-left p{
        font-size:14px;
    }

     .hero-buttons{
         gap:12px;
    }

    .btn-primary,
    .btn-secondary{
        padding:12px 16px;
        font-size:14px;
    }

    .contact-box a{
        max-width:100%;
    } 

    .certifications-grid-3d{
        gap: 16px !important;
        margin-top: 25px !important;
    }

    .cert-card-3d-inner{
        padding: 24px 16px !important;
    }

    .cert-card-3d-inner i{
        font-size: 30px !important;
    }

    .cert-card-3d-inner h3{
        font-size: 16px !important;
    }

    .cert-card-3d-inner p{
        font-size: 13px !important;
    }

    .cert-card-3d-inner .btn-primary{
        max-width: 100% !important;
        padding: 11px 16px !important;
        font-size: 13.5px !important;
    }

}
