*{
    padding: 0;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    box-sizing: border-box;
}

body{
    width: 100%;
    min-height: 100vh;
    background-color: black;
    overflow-x: hidden;
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 9999; /* SUPER IMPORTANT */
}

.nav-container{
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo{
    color: white;
    position: absolute;
    top: 18px;
    left: 15px;
    font-size: 2rem;
    font-weight: bold;
}

.logo span{
    color: #b711e0;
    text-shadow: 0 0 10px #b711e0;
}

.hamburg,
.cancel{
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
    color: white;
    display: none;
    font-size: clamp(2.5rem, 0.5rem + 5vw, 3rem);

}

.nav-container .links a{
    font-size: 1.2rem;
    color: white;
    margin: 0 20px;
    text-decoration: none;
    transition: 0.3s linear;
}

.nav-container .links a:hover{
    color: #b711e0;
    border-bottom: 2px solid #b711e0;
}

.dropdown{
    position: fixed;
    top: 70px;
    right: 15px;          /* 👈 anchor to right */
    width: 220px;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 0 20px #b711e0;

    transform: scale(0);
    transform-origin: top right;   /* 👈 animate from corner */

    transition: 0.25s ease;
    z-index: 1500;
}

.dropdown .links a{
    display: flex;
    color: white;
    text-decoration: none;
    padding: 15px 0;
    justify-content: center;
    align-items: center;
}

.dropdown .links a{
    display: block;
    padding: 12px 15px;
    text-align: right;
}

.dropdown .links a:hover{
    background-color: #b711e0;
}

section {
    position: relative;
    z-index: 1;
}

.main-container{
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-wrap:wrap;
}

.main-container .content{
    color: white;
    width: 40%;
    min-height: 100px;
    box-shadow: 0 0 120px 50px black;
}

.content h1{
    font-size: clamp(1rem, 1rem + 5vw, 1.8rem);
}

.content h1 span{
    font-weight: 700;
    text-shadow: 0 0 10px #b711e0;
    color: #b711e0;
}

.content .typewriter{
    font-size: clamp(1rem, 1rem + 5vw, 2.5rem);
    font-weight: 700;
    margin: 10px 0;
}

.typewriter span{
    color: #b711e0;
    text-shadow: 0 0  10px #b711e0;
}

.content p{
    font-size: clamp(0.8rem, 0.5rem + 3vw, 1.1rem);
    margin: 20px 0;
}

.social-links i{
    color: #b711e0;
    margin: 0 15px;
    font-size: 1.8rem;
    transition: 0.3s linear;
}

.social-links i:hover{
    filter: drop-shadow(0 0 10px #b711a0);
    scale: 1.3;
}

.content button{
    width: 50%;
    height: 6vh;
    margin: 30px;
    background-color: #b711e0;
    color: white;
    border: none;
    outline: none;
    font-size: 120%;
    font-weight: 700;
    border-radius: 5px;
    transition: 0.2s linear;
}
background-layer {
    z-index: -1;
    pointer-events: none;
}

.content button:hover{
    scale: 1.1;
    border: 2px solid #b711e0;
    background-color: transparent;
    font-weight: 700;
    box-shadow: 0 0 40px 5px #b711e0;
}

.main-container .image {
    width: clamp(220px, 40vw, 450px);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #b711e0;
    box-shadow: 0 0 30px #b711e0;
    margin: 20px auto;
}

.main-container .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


@media (max-width:884px) {
    .main-container {
        display: flex;
        flex-direction: column-reverse;
    }

    .nav-container .links{
        display: none;
    }

    .hamburg,.cancel{
        display: block;
    }

    .main-container .content{
        width: 80%;
    }

    .main-container .image{
        width: 60%;
        height: 70%;
    }

    .content button{
        margin: 15px 25%;
    }
}


@media (max-width:440px) {
    .main-container .image{
        width: 70%;
        height: 60%;
    }

    .main-container .content{
        width: 80%;
    }
    
}

.cv-btn{
    display: inline-block;
    width: 50%;
    height: 6vh;
    line-height: 6vh;
    text-align: center;
    margin: 30px;
    background-color: #b711e0;
    color: white;
    text-decoration: none;
    font-size: 120%;
    font-weight: 700;
    border-radius: 5px;
    transition: 0.2s linear;
}

.cv-btn:hover{
    scale: 1.1;
    border: 2px solid #b711e0;
    background-color: transparent;
    box-shadow: 0 0 40px 5px #b711e0;
}


.cv-options{
    position: relative;
}

.cv-options button{
    width: 50%;
    height: 6vh;
    margin: 30px;
    background-color: #b711e0;
    color: white;
    border: none;
    font-size: 120%;
    font-weight: 700;
    border-radius: 5px;
    cursor: pointer;
}

.cv-popup{
    position: absolute;
    top: 70px;
    left: 30px;
    background: rgba(0,0,0,0.95);
    border-radius: 10px;
    padding: 15px;
    display: none;
    box-shadow: 0 0 20px #b711e0;
}

.cv-popup a{
    display: block;
    color: white;
    text-decoration: none;
    margin: 10px 0;
    transition: 0.2s;
}

.cv-popup a:hover{
    color: #b711e0;
}

.cv-modal{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.cv-box{
    width: 90%;
    max-width: 900px;
    height: 85vh;
    background: black;
    border-radius: 12px;
    box-shadow: 0 0 40px #b711e0;
    position: relative;
    padding: 15px;
    display: flex;
    flex-direction: column;

}
.cv-box iframe{
    width: 100%;
    height: 100%;
    flex-grow: 1;
    border: none;
-webkit-overflow-scrolling: touch; 
    overflow-y: scroll;
}

.download-btn{
    display: block;
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    background: #b711e0;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

.close-btn{
    position: absolute;
    top: 10px;
    right: 15px;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width:600px){

    .main-container{
        gap: 30px;
    }

    .content button{
        margin: 20px auto;
        display: block;
    }

    .cv-box{
        height: 90vh;
        padding: 10px;
    }

    .download-btn{
        padding: 12px;
        font-size: 0.9rem;
    }

}


.intro-screen{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #050505, black);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    z-index: 9999;
    perspective: 1200px;
}

/* GRID LINES */
.tech-bg{
    position: absolute;
    width: 200%;
    height: 200%;
    background-image: linear-gradient(#b711e030 1px, transparent 1px),
                      linear-gradient(90deg, #b711e030 1px, transparent 1px);
    background-size: 60px 60px;
    transform: rotateX(70deg) translateY(100px);
    animation: gridMove 8s linear infinite;
    filter: drop-shadow(0 0 10px #b711e0);
}

@keyframes gridMove{
    from{
        transform: rotateX(70deg) translateY(100px) translateZ(0);
    }
    to{
        transform: rotateX(70deg) translateY(100px) translateZ(200px);
    }
}

.intro-content{
    text-align: center;
    z-index: 2;
    transform: translateZ(100px);
}

.intro-title{
    font-size: clamp(1rem, 3vw, 2rem);
    color: #b711e0;
    letter-spacing: 4px;
    text-shadow: 0 0 20px #b711e0;
    animation: pulse 2s infinite;
}

.intro-name{
    font-size: clamp(2rem, 6vw, 4rem);
    color: white;
    text-shadow: 0 0 30px #b711e0;
    margin: 15px 0;
}

.intro-sub{
    color: #aaa;
    letter-spacing: 2px;
}

@keyframes pulse{
    0%,100%{opacity:0.7}
    50%{opacity:1}
}

.intro-screen::before,
.intro-screen::after{
    content:"";
    position:absolute;
    width:400px;
    height:400px;
    background: radial-gradient(circle, #b711e050, transparent 70%);
    border-radius:50%;
    animation: floatGlow 6s infinite alternate ease-in-out;
}

.intro-screen::after{
    top:20%;
    left:10%;
}

.intro-screen::before{
    bottom:20%;
    right:10%;
}


.glow-bg {
    position: fixed;
    z-index: -1;
    pointer-events: none; /* prevents blocking taps */
}
@keyframes floatGlow{
    from{ transform: translateY(-20px); }
    to{ transform: translateY(20px); }
}

.main-site {
    opacity: 0;
    transform: scale(0.9) rotateX(-10deg);

    transition: all 1.4s ease;
}

.main-show {
    opacity: 1 !important;
    transform: scale(1) rotateX(0deg);
    filter: blur(0px);
}

.intro-hide {
    animation: portalExit 1.4s ease forwards;
}

@keyframes portalExit {
    0% {
        opacity: 1;
        transform: scale(1) rotateY(0deg);
    }
    100% {
        opacity: 0;
        transform: scale(0.6) rotateY(90deg);
    }
}

/* STARFIELD BACKGROUND */
.tech-waves {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: radial-gradient(circle at 30% 30%, rgba(183,17,224,0.15), transparent 40%),
                radial-gradient(circle at 70% 70%, rgba(183,17,224,0.1), transparent 40%);
    animation: waveMove 12s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes waveMove {
    from {
        transform: translateY(-30px) scale(1);
    }
    to {
        transform: translateY(30px) scale(1.1);
    }
}
.scan-lines {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent,
        transparent 3px,
        rgba(183,17,224,0.08) 4px
    );
    animation: scanMove 6s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes scanMove {
    from { transform: translateY(0); }
    to   { transform: translateY(20px); }
}
.light-sweep {
    position: fixed;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(183,17,224,0.15),
        transparent
    );
    animation: sweep 8s infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes sweep {
    from { left: -50%; }
    to   { left: 120%; }
}

.meteor-field {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.meteor {
    position: absolute;
    width: 2px;
    height: 80px;
    background: linear-gradient(-45deg, #b711e0, transparent);
    opacity: 0;
    filter: drop-shadow(0 0 6px #b711e0);
    animation: meteorFall linear infinite;
}

/* Random positions & speeds */

.meteor:nth-child(1) { top: 10%; left: 80%; animation-duration: 3s; animation-delay: 0s; }
.meteor:nth-child(2) { top: 30%; left: 20%; animation-duration: 4s; animation-delay: 1s; }
.meteor:nth-child(3) { top: 50%; left: 70%; animation-duration: 3.5s; animation-delay: 2s; }
.meteor:nth-child(4) { top: 70%; left: 40%; animation-duration: 4.5s; animation-delay: 1.5s; }
.meteor:nth-child(5) { top: 20%; left: 60%; animation-duration: 3s; animation-delay: 3s; }
.meteor:nth-child(6) { top: 80%; left: 10%; animation-duration: 5s; animation-delay: 2.5s; }
.meteor:nth-child(7) { top: 60%; left: 90%; animation-duration: 3.2s; animation-delay: 0.8s; }

@keyframes meteorFall {
    0% {
        transform: translate(0, 0) rotate(45deg);
        opacity: 1;
    }
    100% {
        transform: translate(-600px, 600px) rotate(45deg);
        opacity: 0;
    }
}

.content-pages{
    position: relative;
    min-height: 100vh;
    padding-top: 100px;
}

.page {
    width: 100%;
    min-height: calc(100vh - 120px);
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(40px);
    transition: 0.4s ease;
    .page {
    position: relative;
    z-index: 1;
}
}

.page.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.page-card {
    max-width: 900px;
    width: 90%;
    padding: 50px;
    border-radius: 20px;

    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);

    border: 1px solid rgba(255,255,255,0.15);

    box-shadow:
        0 0 40px rgba(0,255,255,0.15),
        inset 0 0 20px rgba(0,255,255,0.08);

    color: white;
    text-align: center;

    animation: floatCard 6s ease-in-out infinite;
}

.page-card h2 {
    font-size: 40px;
    margin-bottom: 20px;
    color: #00ffff;
    text-shadow: 0 0 15px rgba(0,255,255,0.7);
}

.page-card p {
    font-size: 18px;
    line-height: 1.7;
    color: #ddd;
}

.skill-list {
    list-style: none;
    padding: 0;
}

.skill-list li {
    padding: 10px;
    margin: 10px 0;
    background: rgba(0,255,255,0.08);
    border-radius: 10px;
}

@keyframes floatCard {
    0%,100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-radius: 10px;
    background: rgba(0,255,255,0.08);
    border: 1px solid rgba(0,255,255,0.2);
}

.timeline-item span {
    font-weight: bold;
    color: #00ffff;
    min-width: 60px;
}

.timeline-item p {
    margin: 0;
    color: #ddd;
}

.intro-wrapper {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 40px;
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

.intro-card {
    flex: 2;
}

.bio-card {
    flex: 1;
}

.page-card {
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0,255,255,0.2);
    box-shadow: 0 0 30px rgba(0,255,255,0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media(max-width: 900px) {
    .intro-wrapper {
        flex-direction: column;
    }
}

.projects-grid {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.project-card {
    width: 250px;
    padding: 25px;
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(0,255,255,0.2);
    cursor: pointer;
    transition: 0.4s;
    text-align: center;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 0 20px cyan;
}


.project-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: rgba(0,0,0,0.6);

    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.project-box {
    margin: 40px auto;
    background: #0a0a0a;
    border: 1px solid var(--accent);
    width: 100%;
    max-width: 800px;
    border-radius: 20px;
    position: relative;
    padding: 30px;
}

.project-box a {
    display: inline-block;
    margin-top: 20px;
    color: cyan;
}

.section-title{
    text-align:center;
    font-size:40px;
    margin-bottom:50px;
    background: linear-gradient(90deg, #00f7ff, #ff00ff);
    color: transparent;
}

.project-grid{
    display:flex;
    justify-content:center;
    gap:40px;
    flex-wrap:wrap;
}

.project-card{
    width:260px;
    padding:30px;
    border-radius:20px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border:1px solid rgba(0,255,255,0.3);
    text-align:center;
    cursor:pointer;
    transition:0.4s;
    color: white;
}

.project-card h3{
    font-size:20px;
    margin-bottom:10px;
}

.project-card p{
    opacity:0.7;
    margin-bottom:20px;
}

.project-card:hover{
    transform: translateY(-10px) scale(1.05);
    box-shadow:0 0 25px rgba(0,255,255,0.5);
}

.view-btn{
    font-size:14px;
    padding:8px 15px;
    border:1px solid #00f7ff;
    border-radius:20px;
    display:inline-block;
    transition:0.3s;
}

.project-card:hover .view-btn{
    background:#00f7ff;
    color:black;
}

.research-style {
    width: 650px;
    max-width: 90%;
    background: rgba(20,20,40,0.95);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(15px);
    box-shadow: 0 0 40px rgba(0,255,255,0.15);
    color: white;
    animation: popupZoom 0.4s ease;
}

.paper-title {
    font-size: 24px;
    color: cyan;
    margin-bottom: 10px;
}

.paper-authors {
    margin-bottom: 15px;
    opacity: 0.9;
}

.paper-info p {
    margin: 5px 0;
    font-size: 14px;
    opacity: 0.8;
}

.paper-links {
    margin: 15px 0;
}

.paper-links a {
    display: inline-block;
    margin: 5px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid cyan;
    color: cyan;
    text-decoration: none;
    transition: 0.3s;
}

.paper-links a:hover {
    background: cyan;
    color: black;
}

.paper-abstract {
    margin-top: 20px;
}

.paper-abstract h3 {
    color: cyan;
    margin-bottom: 8px;
}

.paper-abstract p {
    line-height: 1.6;
    font-size: 14px;
    opacity: 0.9;
}

@keyframes popupZoom {
    from {
        transform: scale(0.6);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}


.pdf-viewer {
    position: relative;
    width: 100%;
    height: 80vh;
    margin-top: 15px;
    border-radius: 12px;
    overflow: hidden;
}

.pdf-viewer iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.close-pdf {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 22px;
    cursor: pointer;
    color: white;
    background: rgba(0,0,0,0.6);
    padding: 5px 10px;
    border-radius: 50%;
    transition: 0.3s;
}

.close-pdf:hover {
    background: red;
}


.project-box {
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.project-scroll {
    overflow-y: auto;
    padding-right: 10px;
}
.project-scroll {
    overflow-y: auto;
    padding-right: 10px;
}

.projects-container {
    display: grid;
    grid-template-columns: 1fr;   /* 🔥 only ONE column */
    gap: 25px;
    justify-items: center;
}

@media (max-width: 900px) {
    .projects-container {
        grid-template-columns: 1fr;
    }
}

.projects-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
}


.project-modal {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: rgba(0,0,0,0.6);
    z-index: 999;
    overflow-y: auto;

    display: flex;
    justify-content: center;
    align-items: center;

    background: rgba(0,0,0,0.6);
    z-index: 9999;

    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.project-modal.active {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {

    .pdf-viewer {
        height: 60vh;
    }

}

@media (max-width: 768px) {

    .project-box {
        width: 100%;
        max-width: 100%;
        margin: auto;
    }

}

/* Optimized Dropdown Gadget */
.dropdown {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Full screen height */
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9998; /* Just below the nav icons */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
    /* Animation Logic */
    transform: translateY(-100%); /* Start completely off-screen */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Add this class via JavaScript when clicking hamburg */
.dropdown.open {
    transform: translateY(0);
}

.hamburg, .cancel {
    display: none;
    cursor: pointer;
    color: white;
    z-index: 10000; /* Highest priority */
}

.links button{
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

/* ================= MOBILE RESPONSIVE ================= */
@media (max-width: 768px){

    /* MAIN HERO */
    .main-container{
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .main-container .content{
        width: 100%;
    }

    .main-container .image{
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 20px;
    }

    .main-container .image img{
        width: 70%;
        max-width: 250px;
        height: auto;
    }

    /* INTRO CARDS */
    .intro-wrapper{
        flex-direction: column;
        gap: 20px;
        padding: 15px;
    }

    .page-card{
        width: 100% !important;
    }

    /* PROJECT GRID */
    .project-grid{
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* PROJECT MODAL */
    .project-box{
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* PDF VIEW */
    .pdf-viewer iframe{
        height: 300px;
    }

    /* NAVBAR LOGO */
    .logo{
        font-size: 18px;
    }

    /* TEXT SCALE */
    h1{
        font-size: 24px;
    }

    h2{
        font-size: 20px;
    }

    p{
        font-size: 14px;
    }

    /* SOCIAL ICONS */
    .social-links{
        justify-content: center;
        flex-wrap: wrap;
    }

}

@media (max-width:768px){
    .main-site {
        transform: none !important;
        filter: none !important;
    }
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

section{
    min-height: 100vh;
}

/* Ensure backgrounds never block clicks */
.tech-waves,
.scan-lines,
.light-sweep,
.meteor-field,
.glow-bg {
    position: fixed;
    inset: 0;
    pointer-events: none; /* CRITICAL: allows clicks to pass through to buttons */
    z-index: -1;
}

@media (max-width:768px){

    .main-container .image{
        width: 65%;
        max-width: 220px;
        aspect-ratio: 1/1;
        height: auto;
    }

    .main-container .image img{
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

}

.project-modal {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.image {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    overflow: hidden;
}

    
.hamburg{
    z-index: 2001;
}

.dropdown {
    transition: transform 0.4s ease;
}

.dropdown.open {
    transform: translateY(0);
}

.dropdown.active{
    transform: scale(1);
}

/* Mobile Menu Styles */
/* Optimized Compact Dropdown */
.dropdown {
    position: fixed;
    top: 70px;         /* Positioned below the navbar */
    right: 20px;       /* Spaced from the right edge */
    width: 200px;      /* Fixed small width */
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(183, 17, 224, 0.5); /* Purple border to match your theme */
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(183, 17, 224, 0.2);
    z-index: 10001;
    padding: 10px 0;

    /* Animation: Scale and Fade from top-right */
    display: none;     /* Hidden by default */
    transform: scale(0.9);
    opacity: 0;
    transform-origin: top right;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Active state for the small menu */
.dropdown.active {
    display: block;
    transform: scale(1);
    opacity: 1;
}

.dropdown .links {
    display: flex;
    flex-direction: column;
}

.dropdown .links button {
    background: none;
    border: none;
    color: white;
    padding: 12px 20px;
    text-align: left;
    font-size: 1rem;
    width: 100%;
    cursor: pointer;
    transition: 0.2s;
}

.dropdown .links button:hover {
    background: rgba(183, 17, 224, 0.2);
    color: #b711e0;
}

/* Show the hamburger icon on phones */
/* COMPACT MOBILE MENU UI */
/* 1. Reset visibility for icons */
.hamburg, .cancel {
    display: none;
    cursor: pointer;
    color: white;
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2rem;
    z-index: 10001; /* Above the dropdown */
}

/* 2. Compact Dropdown UI */
.dropdown {
    position: fixed;
    top: 70px;         /* Just below nav height */
    right: 20px;       /* Floating away from edge */
    width: 200px;      /* Small size */
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(183, 17, 224, 0.5);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    padding: 10px 0;
    
    /* Animation: Small pop-in from top-right */
    display: none;     
    opacity: 0;
    transform: scale(0.8) translateY(-20px);
    transform-origin: top right;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Active state triggered by JS */
.dropdown.active {
    display: block;
    opacity: 1;
    transform: scale(1) translateY(0);
}

.dropdown .links {
    display: flex;
    flex-direction: column;
}

.dropdown .links a {
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    font-size: 1rem;
    text-align: left;
    transition: 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown .links a:last-child {
    border-bottom: none;
}

.dropdown .links a:hover {
    background: rgba(183, 17, 224, 0.2);
    color: #b711e0;
    padding-left: 25px; /* Subtle slide effect */
}

/* 3. Mobile Logic (Max-width 884px) */
@media (max-width: 884px) {
    .nav-container .links {
        display: none; /* Hide desktop links */
    }

    .hamburg {
        display: block; /* Show hamburger */
    }

    /* Fix image sizing for phones */
    .main-container .image {
        width: 250px;
        height: 250px;
        margin: 0 auto;
    }
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px; /* Give it a fixed height */
    z-index: 9999;
    background: rgba(0, 0, 0, 0.8); /* Optional: semi-transparent background */
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px; /* Keeps content from stretching too wide */
    margin: 0 auto;    /* Centers the container */
    height: 100%;
    display: flex;
    justify-content: center; /* Centers the desktop links */
    align-items: center;
    position: relative;
}

/* Fix Dropdown to stay centered on small screens */


@media (max-width: 884px) {
    .dropdown {
        display: none; 
        position: fixed;
        top: 70px;         
        left: 50%;         
        transform: translateX(-50%) translateY(-20px); 
        
        /* THE FIX: Fits exactly to the text width */
        width: max-content; 
        min-width: 180px;   /* Ensures a good touch target */
        padding: 10px 10px; /* Space between text and border */
        
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(15px);
        border: 1px solid #b711e0;
        border-radius: 15px;
        box-shadow: 0 0 25px rgba(183, 17, 224, 0.3);
        z-index: 10000;
        opacity: 0;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .dropdown.active {
        display: block;
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    .dropdown .links {
        display: flex;
        flex-direction: column;
        align-items: center; 
    }

    .dropdown .links a {
        color: white;
        text-decoration: none;
        font-size: 1.1rem;
        padding: 12px 25px; /* Side padding creates the width */
        width: 100%;
        text-align: center;
        white-space: nowrap; /* CRITICAL: Prevents text from wrapping */
        transition: 0.2s;
    }

    .dropdown .links a:hover {
        background: rgba(183, 17, 224, 0.2);
        color: #b711e0;
        border-radius: 10px;
    }
}

.page-card {
    width: 90%;
    max-width: 900px;
    padding: 30px 20px; /* Reduced padding for mobile */
    margin: 20px auto;
    overflow-wrap: break-word; /* Prevents long words from breaking layout */
}

.page-card h2 {
    /* Fluid font size: Minimum 24px, scales with screen, Maximum 40px */
    font-size: clamp(1.5rem, 5vw, 2.5rem); 
    text-align: center;
}

.page-card p {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    line-height: 1.6;
}

@media (max-width: 884px) {
    .intro-wrapper {
        flex-direction: column;
        align-items: center; /* Center cards on mobile */
        width: 95%;
        gap: 20px;
    }

    .intro-card, .bio-card {
        width: 100%; /* Ensure they take full width of the container */
        flex: none;  /* Remove the flex: 2 and flex: 1 on mobile */
    }
}

.skill-list li {
    padding: 12px;
    margin: 10px 0;
    font-size: 0.95rem;
    word-break: break-word; /* Forces long text to wrap to the next line */
    background: rgba(183, 17, 224, 0.1); /* Matches your purple theme */
    border-radius: 8px;
    border: 1px solid rgba(183, 17, 224, 0.2);
    text-align: left;
}

body {
    overflow-x: hidden; /* Stops the screen from shaking left to right */
    width: 100%;
}

.achievements-grid {
    display: grid;
    /* This tells the browser: make columns at least 300px wide. 
       If two can fit, show two. If not, show one. */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Ensure the cards inside don't have forced widths that break the grid */
.achievements-grid .page-card {
    width: 100%;
    margin: 0; /* Let the grid gap handle spacing */
    height: 100%; /* Makes both cards the same height */
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .achievements-grid {
        grid-template-columns: 1fr; /* Force 1 column on phones */
        width: 100%;
        padding: 10px;
    }
    
    .page-card h2 {
        font-size: 1.5rem;
    }
}

/* Container for the projects */
.projects-grid {
    display: grid !important;
    /* This creates as many columns as fit, at least 300px wide each */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 90%;
    max-width: 1100px;
    margin: 40px auto;
    justify-content: center;
}

/* Individual project cards */
.project-card {
    width: 100%; /* Take full width of the grid cell */
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: 0.4s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Hover effects */
.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.5);
    border-color: #00f7ff;
}

/* Responsive adjustment for small phones */
@media (max-width: 500px) {
    .projects-grid {
        grid-template-columns: 1fr; /* Force exactly 1 column */
        gap: 20px;
        width: 95%;
    }
    
    .project-card {
        padding: 20px;
    }
}

.project-card h3 {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    margin-bottom: 10px;
    color: #00f7ff;
}

.project-card p {
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.8;
    /* Prevents long descriptions from overflowing */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* The container for the PDF inside the project modal */
.pdf-viewer {
    width: 100%;
    height: 70vh; /* Uses 70% of the phone screen height */
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: #000;
}

/* Ensure the iframe fills the container but stays within screen bounds */
.pdf-viewer iframe {
    width: 100% !important;
    height: 100% !important;
    border: none;
}

/* Make the Project Modal Box more responsive */
.project-box {
    width: 95% !important; /* Full width on mobile */
    max-width: 800px;
    max-height: 90vh; /* Prevents box from being taller than the screen */
    overflow-y: auto; /* Adds a scrollbar if the text is too long */
    padding: 20px;
}

@media (max-width: 600px) {
    .paper-title {
        font-size: 1.2rem !important; /* Shrink big titles on phones */
    }
    
    .project-box {
        padding: 15px;
        margin-top: 40px; /* Space for the close button */
    }
}

/* Ensure the intro screen covers the full viewport without scrolling */
.intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    overflow: hidden; /* Prevents scrollbars during intro */
    background: black;
}

.intro-content {
    text-align: center;
    width: 90%; /* Prevents text from hitting screen edges */
    padding: 20px;
}

.intro-title {
    color: white;
    /* Smart scaling: Min 1.5rem, Scales with width, Max 3rem */
    font-size: clamp(1.5rem, 8vw, 3rem); 
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-bottom: 10px;
}

.intro-name {
    color: #b711e0;
    font-size: clamp(1.2rem, 6vw, 2.5rem);
    text-shadow: 0 0 15px #b711e0;
    margin-bottom: 20px;
    word-wrap: break-word; /* Important for long names on narrow phones */
}

.intro-sub {
    color: #555;
    font-size: 1rem;
    letter-spacing: 2px;
}

.typewriter-text {
    color: #b711e0;
    font-weight: bold;
    border-right: 3px solid #b711e0; /* The blinking cursor */
    padding-right: 5px;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    50% { border-color: transparent; }
}

@media (max-width: 884px) {
    .typewriter-text {
        font-size: 1.2rem;
        white-space: normal; /* Allows wrapping on small phones */
    }
}

/* 1. Simplify the Intro Screen to remove the "Blur Lag" */
.intro-screen {
    position: fixed;
    inset: 0;
    background: #000000; /* Use solid black, no transparency */
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    backdrop-filter: none !important; /* REMOVE BLUR HERE */
    -webkit-backdrop-filter: none !important;
    
    /* Force Hardware Acceleration for sharpness */
    transform: translateZ(0);
    will-change: opacity;
}

/* 2. Fix the Main Site sharpness */
.main-site {
    display: none; /* JS will change this to 'block' */
    opacity: 0;
    width: 100%;
    transform: translateZ(0); /* Keeps text sharp during fade-in */
    backface-visibility: hidden;
}

/* 3. Reduce Blur Intensity on heavy elements */
.nav-container, .dropdown, .cv-box {
    /* Reducing blur from 15px/10px to 5px makes it much easier for laptops to render */
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
}

