:root {
    --primary-gradient: linear-gradient(135deg, #a8edea 0%, #fed6e3 50%, #ffecd2 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-primary: #1a1a2e;
    --text-secondary: #16213e;
    --shadow: 0 25px 45px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    caret-color: transparent;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0a0a0a;
    color: white;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    border-radius: 10px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    backdrop-filter: blur(20px);
    background: rgba(10, 10, 10, 0.9);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

.nav-link:hover::after { width: 100%; }
.nav-link:hover { color: #a8edea; }

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(ellipse at center, rgba(168,237,234,0.1) 0%, transparent 70%);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120,119,198,0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,119,198,0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120,219,255,0.3) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

.hero-content {
    text-align: center;
    max-width: 1000px;
    padding: 0 5%;
    z-index: 2;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 2rem;
    font-weight: 400;
}

.typing-effect {
    border-right: 3px solid #a8edea;
    animation: blink 1s infinite;
}

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

/* Buttons */
.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.btn {
    padding: 1.2rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

.btn-primary { background: var(--primary-gradient); color: var(--text-primary); }
.btn-primary:hover { transform: translateY(-8px) scale(1.05); box-shadow: 0 35px 60px rgba(168,237,234,0.4); }

.btn-secondary { background: rgba(255,255,255,0.1); color: white; backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.2); }
.btn-secondary:hover { background: rgba(255,255,255,0.2); transform: translateY(-8px); }

/* Glass Cards */
/* .glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
    position: relative;
} */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px); /* reduced from 20px */
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    position: relative;
    will-change: transform;
}
.glass-card:hover { transform: translateY(-12px); box-shadow: 0 40px 80px rgba(0,0,0,0.3); }

/* Layout Sections */
.section { padding: 100px 5%; max-width: 1400px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 5rem; }
.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 100px;
}

.stat-item { text-align: center; }
.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}

/* Grids */
.about-grid, .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 2.5rem; }

.profile-image {
    aspect-ratio: 1;
    border-radius: 24px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-image i { font-size: 8rem; color: var(--text-primary); }

.project-media {
    height: 200px;
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.tag { background: rgba(255,255,255,0.1); padding: 0.4rem 1rem; border-radius: 20px; font-size: 0.85rem; margin-right: 0.5rem; }

/* Form Elements */
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-input {
    padding: 1rem;
    border-radius: 10px;
    border: none;
    background: rgba(255,255,255,0.05);
    color: white;
    font-family: inherit;
}

.contact-item {
    display: flex; align-items: center; gap: 1.5rem; padding: 1.5rem;
    background: rgba(255,255,255,0.05); border-radius: 20px; margin-bottom: 1rem;
}
.contact-icon { 
    width: 60px; height: 60px; 
    background: var(--primary-gradient); 
    border-radius: 15px; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 1.5rem; color: var(--text-primary); 
}

.footer { text-align: center; padding: 4rem 0; opacity: 0.5; }


.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    border-radius: 15px;

    transition: transform 0.6s ease;   
    will-change: transform;            
}

.project-card:hover .project-img {
    transform: scale(1.08);  
}
@media (max-width: 768px) {
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
        .nav-links {
        display: flex; /* IMPORTANT */
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(10,10,10,0.98);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 2rem;
        padding-top: 2rem;
        transition: 0.3s;
    }

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

/* ============================= */
/* 🔥 MOBILE RESPONSIVENESS FIX */
/* ============================= */

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
}

/* ---------- TABLET ---------- */
@media (max-width: 992px) {
    .about-grid, 
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .section {
        padding: 80px 4%;
    }
}

/* ---------- MOBILE ---------- */
@media (max-width: 768px) {

    /* NAVBAR */
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(10,10,10,0.98);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 2rem;
        padding-top: 2rem;
        transition: 0.3s;
    }

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

    /* HERO */
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    /* BUTTONS */
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    /* SECTIONS */
    .section {
        
        padding: 60px 5%;
    }

    .section-header {
        margin-bottom: 3rem;
    }

    /* GRID FIX */
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    /* PROFILE IMAGE */
    .profile-image {
        height: 250px;
    }

    /* TEXT */
    .stat-number {
        font-size: 2.5rem;
    }

    /* CONTACT */
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
            transition: all 0.3s ease;
    cursor: pointer;
    }
    /* CONTACT HOVER EFFECT */


.contact-item:hover {
    transform: translateY(-8px);
    background: rgba(255,255,255,0.1);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

/* ICON ANIMATION */
.contact-item:hover .contact-icon {
    transform: scale(1.2) rotate(5deg);
    transition: 0.3s ease;
}

/* TEXT HOVER */
.contact-item a {
    color: white;
    text-decoration: none;
    transition: 0.3s;
}

.contact-item:hover a {
    color: #a8edea;
}

/* OPTIONAL: underline effect */
.contact-item a:hover {
    text-decoration: underline;
}
}

/* ---------- SMALL MOBILE ---------- */
@media (max-width: 480px) {

    .hero-title {
        font-size: 2rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .btn {
        padding: 1rem;
        font-size: 1rem;
    }

    .glass-card {
        padding: 1.5rem;
    }
}

/* ---------- UNIVERSAL FIX ---------- */
img {
    max-width: 100%;
    height: auto;
}
/* EDUCATION SECTION */
.education-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.education-item {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.education-item h3 {
    margin-bottom: 0.5rem;
}

.edu-location {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.5rem;
}

.edu-year {
    display: inline-block;
    margin-top: 0.8rem;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    background: var(--primary-gradient);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
}

/* HOVER EFFECT */
.education-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}


/* Project section */

.section-subtitle {
    text-align: center;
    opacity: 0.7;
    margin-top: 10px;
}

.project-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.project-content {
    padding: 20px;
}

.project-title {
    margin-bottom: 10px;
}

.project-features {
    margin: 15px 0;
    padding-left: 18px;
}

.project-features li {
    margin-bottom: 6px;
    font-size: 14px;
    opacity: 0.9;
}

.project-tags {
    margin: 15px 0;
}

.project-links {
    margin-top: 10px;
}
.tags, .project-tags {
    display: flex;
    flex-wrap: wrap;   /* ✅ THIS FIXES OVERLAP */
    gap: 8px;          /* spacing between tags */
    margin: 15px 0;
}


/* about section */

/* Layout */
.about-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: center;
}

/* Header */
.section-subtitle {
    text-align: center;
    opacity: 0.7;
    margin-top: 10px;
}

/* Card */
.about-card {
    padding: 35px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

/* Text */
.about-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.about-text {
    font-size: 15px;
    line-height: 1.7;
    opacity: 0.85;
    margin-bottom: 10px;
}

/* Skills */
.skills-section {
    margin-top: 30px;
}

.skill-group {
    margin-bottom: 25px;
}

.skill-group h4 {
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #aaa;
    margin-bottom: 10px;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tags span {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    transition: all 0.3s ease;
}

/* Hover Effect */
.tags span:hover {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    color: #000;
    transform: translateY(-2px);
}

/* Right Side */
.profile-image {
    height: 400px;
    border-radius: 20px;
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 60px;
    color: #111;
}

/* Responsive */
@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 20px;                 
        justify-items: center;     
    }

    .about-card {
        padding: 25px;
        width: 100%;               
        max-width: 95%;            
        margin: 0 auto;            
    }

    .profile-image {
        width: 100%;
        max-width: 95%;
        margin: 0 auto;
        height: 250px;
    }
}
@media (hover: hover) {
    .tags span:hover {
        background: linear-gradient(135deg, #a8edea, #fed6e3);
        color: #000;
        transform: translateY(-2px);
    }
}
@media (hover: hover) {
    .glass-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    }
}

.glass-card,
.project-img,
.tags span,
.contact-item {
    transform: translateZ(0);
    backface-visibility: hidden;
}