:root {
    --primary-color: #6366f1; /* Modern Indigo */
    --secondary-color: #1e293b; /* Slate Dark */
    --accent-color: #ec4899; /* Pink Accent */
    --background-color: #0f172a; /* Dark Background */
    --card-bg-color: rgba(30, 41, 59, 0.8); /* Semi-transparent Cards */
    --text-color: #e2e8f0; /* Light Text */
    --light-text-color: #ffffff;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-light: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 25px rgba(0, 0, 0, 0.2);
    --shadow-heavy: 0 20px 40px rgba(0, 0, 0, 0.3);
    --border-radius: 16px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, 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% 80%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundShift 10s ease-in-out infinite alternate;
}

@keyframes backgroundShift {
    0% { transform: translateX(-10px) translateY(-10px); }
    100% { transform: translateX(10px) translateY(10px); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

/* Glassmorphism utility class */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
}

/* Animation utility classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-smooth);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: var(--transition-smooth);
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: var(--transition-smooth);
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: var(--transition-bounce);
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3 {
    font-weight: 600;
}

/* Navigation */
nav {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition-smooth);
}

nav.scrolled {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: var(--shadow-medium);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: relative;
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    position: relative;
}

.mobile-menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: var(--transition-smooth);
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -7px);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.nav-links li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: var(--transition-smooth);
    z-index: -1;
}

.nav-links li a:hover::before {
    left: 0;
}

.nav-links li a:hover {
    color: var(--light-text-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--background-color) 0%, rgba(30, 41, 59, 0.9) 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" style="stop-color:%236366f1;stop-opacity:0.1"/><stop offset="100%" style="stop-color:%236366f1;stop-opacity:0"/></radialGradient></defs><circle cx="50%" cy="50%" r="50%" fill="url(%23a)"/></svg>');
    animation: heroFloat 6s ease-in-out infinite alternate;
    z-index: -1;
}

@keyframes heroFloat {
    0% { transform: translateY(-20px) scale(1.02); }
    100% { transform: translateY(20px) scale(0.98); }
}

.hero .container {
    z-index: 2;
    position: relative;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 3s ease-in-out infinite alternate;
    line-height: 1.2;
}

@keyframes titleGlow {
    0% { filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.5)); }
    100% { filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.8)); }
}

.hero .subtitle {
    font-size: 1.4rem;
    font-weight: 300;
    margin-bottom: 3rem;
    color: var(--text-color);
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    background: var(--gradient-primary);
    color: var(--light-text-color);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    border: none;
    cursor: pointer;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-accent);
    transition: var(--transition-smooth);
    z-index: -1;
}

.btn:hover::before {
    left: 0;
}

.btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-heavy);
}

.btn:active {
    transform: translateY(-1px) scale(1.02);
}

/* Sections */
section {
    padding: 6rem 0;
    position: relative;
}

section h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 4rem;
    color: var(--text-color);
    font-weight: 700;
    position: relative;
    display: inline-block;
    width: 100%;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* About Section */
.about {
    background: rgba(30, 41, 59, 0.03);
    backdrop-filter: blur(10px);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.profile-pic {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 4px solid transparent;
    background: var(--gradient-primary);
    padding: 4px;
    object-fit: cover;
    transition: var(--transition-bounce);
    box-shadow: var(--shadow-medium);
    position: relative;
}

.profile-pic:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-heavy);
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    opacity: 0.9;
}

/* Skills Section */
.skills {
    background: rgba(15, 23, 42, 0.05);
    position: relative;
    overflow: hidden;
}

.skills::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    animation: skillsBackground 15s linear infinite;
    z-index: -1;
}

@keyframes skillsBackground {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-item {
    background: var(--card-bg-color);
    backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.1;
    transition: var(--transition-smooth);
    z-index: -1;
}

.skill-item:hover::before {
    left: 0;
}

.skill-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-heavy);
    border-color: rgba(99, 102, 241, 0.3);
}

.skill-item h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.skill-item p {
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.6;
}

/* Projects Section */
.projects {
    background: rgba(30, 41, 59, 0.03);
    position: relative;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: var(--card-bg-color);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition-smooth);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    transform: translateY(-15px) rotateY(5deg) rotateX(5deg);
    box-shadow: var(--shadow-heavy);
    border-color: rgba(99, 102, 241, 0.3);
}

.project-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.project-card p {
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-tags {
    margin: 1.5rem 0;
    flex-grow: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tags span {
    display: inline-block;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: var(--transition-smooth);
}

.project-tags span:hover {
    background: var(--primary-color);
    color: var(--light-text-color);
    transform: scale(1.05);
}

.project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.project-link:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

/* Contact Section */
.contact {
    text-align: center;
    background: var(--gradient-primary);
    color: var(--light-text-color);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    z-index: 0;
}

.contact .container {
    position: relative;
    z-index: 1;
}

.contact h2 {
    color: var(--light-text-color);
    font-size: 3.5rem;
    margin-bottom: 2rem;
}

.contact p {
    max-width: 600px;
    margin: 0 auto 3rem auto;
    font-size: 1.2rem;
    opacity: 0.9;
    line-height: 1.7;
}

.contact .btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--light-text-color);
    font-size: 1.2rem;
    padding: 1.2rem 3rem;
    margin-bottom: 3rem;
}

.contact .btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px) scale(1.05);
}

.social-links {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-links a {
    color: var(--light-text-color);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    transition: var(--transition-bounce);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.05);
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-medium);
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 0;
    background: var(--secondary-color);
    color: rgba(226, 232, 240, 0.7);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p {
    font-size: 1rem;
    font-weight: 400;
}

/* Responsive Design */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero {
        height: 80vh;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero .subtitle {
        font-size: 1.2rem;
    }
    
    nav .container {
        padding: 1rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: left 0.3s ease;
        z-index: 1000;
        gap: 1rem;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li a {
        font-size: 1.4rem;
        padding: 1.5rem 2rem;
        display: block;
        text-align: center;
        border-radius: 10px;
        width: 200px;
    }
    
    .about-content {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }
    
    .profile-pic {
        width: 160px;
        height: 160px;
    }
    
    section {
        padding: 4rem 0;
    }
    
    section h2 {
        font-size: 2.5rem;
        margin-bottom: 3rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .skill-item {
        padding: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .project-card {
        padding: 2rem;
    }
    
    .social-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .social-links a {
        width: 200px;
        text-align: center;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero {
        height: 70vh;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    nav .container {
        padding: 1rem;
    }
    
    .nav-logo {
        font-size: 1.5rem;
    }
    
    .nav-links li a {
        font-size: 1.2rem;
        padding: 1rem 1.5rem;
        width: 180px;
    }
    
    .profile-pic {
        width: 140px;
        height: 140px;
    }
    
    section {
        padding: 3rem 0;
    }
    
    section h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .skill-item {
        padding: 2rem 1.5rem;
    }
    
    .skill-item h3 {
        font-size: 1.3rem;
    }
    
    .project-card {
        padding: 2rem 1.5rem;
    }
    
    .project-card h3 {
        font-size: 1.4rem;
    }
    
    .project-tags span {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
    
    .social-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .social-links a {
        width: 160px;
        font-size: 1rem;
        padding: 0.8rem 1.2rem;
    }
    
    .contact h2 {
        font-size: 2.5rem;
    }
    
    .contact p {
        font-size: 1.1rem;
    }
    
    footer {
        padding: 2rem 0;
    }
}

/* Very small screens */
@media (max-width: 320px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero .subtitle {
        font-size: 1rem;
    }
    
    .nav-logo {
        font-size: 1.3rem;
    }
    
    .nav-links li a {
        font-size: 1rem;
        width: 150px;
        padding: 0.8rem 1rem;
    }
    
    section h2 {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .skill-item {
        padding: 1.5rem 1rem;
    }
    
    .project-card {
        padding: 1.5rem 1rem;
    }
    
    .social-links a {
        width: 140px;
        font-size: 0.9rem;
        padding: 0.7rem 1rem;
    }
}