/* --- CSS RESET & GLOBAL STYLES --- */
:root {
    --primary-color: #673ab7;
    --secondary-color: #ff9800;
    --dark-color: #1a1a2e;
    --light-color: #f4f4f9;
    --text-color: #333;
    --text-light: #6c757d;
    --card-bg: #ffffff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
}

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

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.7;
}

/* --- PRELOADER --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- UTILITY CLASSES --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--dark-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(45deg, #673ab7, #8e44ad);
    color: #fff;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(103, 58, 183, 0.3);
    transform: translateY(0);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(103, 58, 183, 0.5), 0 8px 25px rgba(142, 68, 173, 0.3);
    background: linear-gradient(45deg, #8e44ad, #673ab7);
    color: #fff;
}

/* --- HEADER & NAVIGATION --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

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

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: color 0.3s ease;
}

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

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.8rem;
    color: var(--primary-color);
}

/* --- HOME SECTION --- */
#home {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(240, 240, 250, 0.05) 100%);
    color: #000;
    position: relative;
    overflow: hidden;
    padding-top: 100px; /* Increased padding to prevent navbar overlap */
    perspective: 1000px;
    --mouse-x: 0px;
    --mouse-y: 0px;
}

#home::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://files.cdn-files-a.com/uploads/10047654/2000_67658c2cc69b2.jpg') no-repeat center center/cover;
    opacity: 0.9;
    z-index: 1;
    transform: translateZ(0) translate(var(--mouse-x, 0), var(--mouse-y, 0));
    transition: transform 0.1s ease-out;
}

#home::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0.3) 100%);
    z-index: 2;
    backdrop-filter: blur(3px);
}

/* Floating animation elements */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.floating-shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.floating-shape:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-shape:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.floating-shape:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
}

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

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 1000px;
    padding: 2rem;
    transform: translateZ(0);
    will-change: transform;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 25px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: contentFloat 6s ease-in-out infinite;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #673ab7;
    text-shadow: 0 3px 6px rgba(255, 255, 255, 0.9);
    animation: gradientShift 3s ease-in-out infinite;
    position: relative;
    background: rgba(255, 255, 255, 0.15);
    padding: 1.5rem 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-content h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 4px;
    background: linear-gradient(45deg, #673ab7, #8e44ad);
    animation: expandWidth 2s ease-out 1s forwards;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes expandWidth {
    to { width: 200px; }
}

.hero-content p {
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    font-weight: 500;
    margin-bottom: 2.5rem;
    opacity: 1;
    line-height: 1.6;
    color: #1a1a1a;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
    animation: fadeInUp 1s ease-out 0.5s both;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 0.95;
        transform: translateY(0);
    }
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 1s both;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(103, 58, 183, 0.1);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #673ab7;
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 1.5s both;
}

.hero-content .btn {
    font-size: 1rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(45deg, #673ab7, #8e44ad);
    border: none;
    box-shadow: 0 6px 20px rgba(103, 58, 183, 0.3);
    transform: translateY(0);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.hero-content .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.hero-content .btn:hover::before {
    left: 100%;
}

.hero-content .btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(103, 58, 183, 0.5), 0 8px 25px rgba(142, 68, 173, 0.3);
    background: linear-gradient(45deg, #8e44ad, #673ab7);
}

/* Apply same styling to all project buttons and contact form button */
.card .btn,
.contact-form button {
    font-size: 1rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(45deg, #673ab7, #8e44ad);
    border: none;
    box-shadow: 0 6px 20px rgba(103, 58, 183, 0.3);
    transform: translateY(0);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    display: inline-block;
    cursor: pointer;
}

.card .btn::before,
.contact-form button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.card .btn:hover::before,
.contact-form button:hover::before {
    left: 100%;
}

.card .btn:hover,
.contact-form button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(103, 58, 183, 0.5), 0 8px 25px rgba(142, 68, 173, 0.3);
    background: linear-gradient(45deg, #8e44ad, #673ab7);
    color: #fff;
}

/* Enhanced button animations for all buttons */
.card .btn,
.contact-form button {
    animation: pulse 2s infinite;
}

.hero-content .btn-secondary {
    background: transparent;
    border: 2px solid rgba(103, 58, 183, 0.3);
    color: #673ab7;
}

.hero-content .btn-secondary:hover {
    background: rgba(103, 58, 183, 0.1);
    border-color: rgba(103, 58, 183, 0.5);
}

/* Trust indicators */
.trust-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2rem;
    align-items: center;
    z-index: 3;
    animation: fadeInUp 1s ease-out 2s both;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.7;
    color: #333;
}

.trust-item i {
    color: #673ab7;
    font-size: 1.2rem;
}

/* Parallax and content movement effects */
@keyframes contentFloat {
    0%, 100% {
        transform: translateY(0px) translateZ(0);
    }
    50% {
        transform: translateY(-10px) translateZ(0);
    }
}

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

.hero-content {
    animation: contentFloat 6s ease-in-out infinite;
}

.hero-content h1 {
    animation: floatUpDown 4s ease-in-out infinite 0.5s;
}

.hero-content p {
    animation: floatUpDown 4s ease-in-out infinite 1s;
}

.hero-stats {
    animation: floatUpDown 4s ease-in-out infinite 1.5s;
}

.hero-buttons {
    animation: floatUpDown 4s ease-in-out infinite 2s;
}

.trust-indicators {
    animation: floatUpDown 4s ease-in-out infinite 2.5s;
}

/* Floating shapes animation */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.floating-shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.floating-shape:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    background: linear-gradient(45deg, rgba(103, 58, 183, 0.1), rgba(142, 68, 173, 0.1));
}

.floating-shape:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
    background: linear-gradient(45deg, rgba(103, 58, 183, 0.08), rgba(142, 68, 173, 0.08));
}

.floating-shape:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
    background: linear-gradient(45deg, rgba(103, 58, 183, 0.12), rgba(142, 68, 173, 0.12));
}

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

/* Additional floating elements */
.hero-content::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, rgba(103, 58, 183, 0.1), rgba(142, 68, 173, 0.1));
    border-radius: 50%;
    animation: float 4s ease-in-out infinite 1s;
    z-index: -1;
}

.hero-content::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, rgba(103, 58, 183, 0.08), rgba(142, 68, 173, 0.08));
    border-radius: 50%;
    animation: float 5s ease-in-out infinite 2s;
    z-index: -1;
}

/* Enhanced button animations */
.hero-content .btn {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 8px 25px rgba(103, 58, 183, 0.3);
    }
    50% {
        box-shadow: 0 8px 25px rgba(103, 58, 183, 0.5);
    }
    100% {
        box-shadow: 0 8px 25px rgba(103, 58, 183, 0.3);
    }
}

/* --- BACKGROUND IMAGE SECTION (About Section) --- */
.bg-image-section {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(240, 240, 250, 0.05) 100%);
    color: #000;
    overflow: hidden;
    padding: 6rem 0;
    perspective: 1000px;
    --mouse-x: 0px;
    --mouse-y: 0px;
}

.bg-image-section::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/bg.jpeg') no-repeat center center/cover;
    opacity: 1;
    z-index: 1;
    transform: translateZ(0) translate(var(--mouse-x, 0), var(--mouse-y, 0));
    transition: transform 0.1s ease-out;
}

.bg-image-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0.3) 100%);
    z-index: 2;
    backdrop-filter: blur(8px);
}

/* Floating animation elements for about section */
.bg-image-section .floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.bg-image-section .floating-shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.bg-image-section .floating-shape:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    background: linear-gradient(45deg, rgba(103, 58, 183, 0.1), rgba(142, 68, 173, 0.1));
}

.bg-image-section .floating-shape:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
    background: linear-gradient(45deg, rgba(103, 58, 183, 0.08), rgba(142, 68, 173, 0.08));
}

.bg-image-section .floating-shape:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
    background: linear-gradient(45deg, rgba(103, 58, 183, 0.12), rgba(142, 68, 173, 0.12));
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1;
}

.bg-content {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
}

/* About content styling within background section */
.bg-image-section .about-container {
    display: flex;
    align-items: center;
    gap: 4rem;
    /* background: #ffffff; */
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 3rem;
    /* box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1); */
    position: relative;
    z-index: 3;
}

.bg-image-section .about-image {
    flex: 1;
    max-width: 380px;
}

.bg-image-section .about-image img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.bg-image-section .about-content {
    flex: 1.5;
}

.bg-image-section .about-content h3 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
    font-weight: 700;
}

.bg-image-section .about-content p {
    color: #000000;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.bg-image-section .about-info {
    margin-top: 2rem;
}

.bg-image-section .about-info p {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    color: #000000;
}

.bg-image-section .about-info i {
    color: var(--primary-color);
    font-size: 1.2rem;
    width: 25px;
    text-align: center;
}

/* Additional floating elements for about container */
.bg-image-section .about-container::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, rgba(103, 58, 183, 0.1), rgba(142, 68, 173, 0.1));
    border-radius: 50%;
    animation: float 4s ease-in-out infinite 1s;
    z-index: -1;
}

.bg-image-section .about-container::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, rgba(103, 58, 183, 0.08), rgba(142, 68, 173, 0.08));
    border-radius: 50%;
    animation: float 5s ease-in-out infinite 2s;
    z-index: -1;
}

/* Parallax effect for background image */
@media (min-width: 768px) {
    .bg-image-section {
        background-attachment: fixed;
    }
}

/* Mobile responsiveness for About section with background */
@media (max-width: 992px) {
    .bg-image-section .about-container {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
        padding: 2.5rem;
    }
    
    .bg-image-section .about-image {
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .bg-image-section {
        min-height: 70vh;
        background-attachment: scroll;
        background-position: center center;
        padding: 4rem 0;
    }
    
    .bg-content {
        padding: 1.5rem;
    }
    
    .bg-image-section .about-container {
        gap: 2rem;
        padding: 2rem;
        margin: 0 1rem;
    }
    
    .bg-image-section .about-content h3 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .bg-image-section {
        min-height: 60vh;
        padding: 3rem 0;
    }
    
    .bg-content {
        padding: 1rem;
    }
    
    .bg-image-section .about-container {
        gap: 1.5rem;
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    
    .bg-image-section .about-content h3 {
        font-size: 1.8rem;
    }
    
    .bg-image-section .about-image {
        max-width: 250px;
    }
}

/* Animation for background content */
.bg-content .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.bg-content .reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Floating animation for background section */
.bg-content::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.bg-content::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite 2s;
}

/* Enhanced overlay effects */
.bg-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.bg-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%);
    z-index: 1;
}

/* --- ABOUT SECTION STYLES MOVED TO BACKGROUND SECTION --- */
/* Old about styles are now integrated with bg-image-section */

/* --- PROJECTS & SKILLS SECTION (CARD LAYOUT) --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    text-align: center;
    border: 1px solid rgba(103, 58, 183, 0.1);
    position: relative;
    cursor: pointer;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(45deg, #673ab7, #8e44ad);
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.card:hover {
    transform: translateY(-20px) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(103, 58, 183, 0.25),
        0 10px 20px rgba(103, 58, 183, 0.15),
        0 0 0 1px rgba(103, 58, 183, 0.1);
    border-color: rgba(103, 58, 183, 0.3);
}

.card:active {
    transform: translateY(-15px) scale(1.01);
    box-shadow: 
        0 15px 30px rgba(103, 58, 183, 0.3),
        0 5px 15px rgba(103, 58, 183, 0.2);
}

.card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-icon {
    font-size: 3.5rem;
    color: #673ab7;
    padding: 2rem 0 1rem 0;
    background: linear-gradient(45deg, #673ab7, #8e44ad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.card-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(103, 58, 183, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
    z-index: -1;
}

.card:hover .card-icon {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 5px 15px rgba(103, 58, 183, 0.3));
}

.card:hover .card-icon::after {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(103, 58, 183, 0.15) 0%, transparent 70%);
}

.card:active .card-icon {
    transform: scale(1.1) rotate(2deg);
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-content h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
    font-weight: 700;
    background: linear-gradient(45deg, #673ab7, #8e44ad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.4s ease;
    position: relative;
}

.card-content h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, #673ab7, #8e44ad);
    transition: width 0.4s ease;
}

.card-content p {
    color: var(--text-light);
    flex-grow: 1;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.card-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    text-align: left;
}

.card-content ul li {
    color: var(--text-light);
    margin-bottom: 1rem;
    padding-left: 0;
    line-height: 1.7;
    position: relative;
    padding-left: 1.5rem;
    transition: all 0.3s ease;
}

.card-content ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #673ab7;
    font-weight: bold;
    font-size: 1.2rem;
}

.card-content ul li strong {
    color: var(--dark-color);
    font-weight: 700;
    display: block;
    margin-bottom: 0.3rem;
    transition: color 0.3s ease;
}

.card:hover .card-content h3::after {
    width: 100%;
}

.card:hover .card-content ul li {
    transform: translateX(5px);
}

.card:hover .card-content ul li strong {
    color: #673ab7;
}

.card:hover .card-content ul li::before {
    transform: scale(1.2);
    color: #8e44ad;
}

/* Card pulse animation */
@keyframes cardPulse {
    0% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    }
    50% {
        box-shadow: 0 4px 15px rgba(103, 58, 183, 0.1);
    }
    100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    }
}

.card {
    animation: cardPulse 3s ease-in-out infinite;
}

.card:hover {
    animation: none;
}

/* --- SKILLS SECTION --- */
#skills {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f4fd 100%);
    position: relative;
}

#skills::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23e0e7ff" opacity="0.3"/><circle cx="75" cy="75" r="1" fill="%23e0e7ff" opacity="0.3"/><circle cx="50" cy="10" r="0.5" fill="%23e0e7ff" opacity="0.2"/><circle cx="10" cy="60" r="0.5" fill="%23e0e7ff" opacity="0.2"/><circle cx="90" cy="40" r="0.5" fill="%23e0e7ff" opacity="0.2"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.5;
    z-index: 1;
}

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

/* --- TECHNOLOGIES SECTION --- */
#technologies {
    background: var(--card-bg);
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
}

.tech-item {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    display: grid;
    place-items: center;
}

.tech-item:hover {
    transform: scale(1.1) rotate(3deg);
}

.tech-item img {
    height: 60px;
    max-width: 150px;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.tech-item:hover img {
    filter: grayscale(0%);
}

/* --- CONTACT SECTION --- */
.contact-wrapper {
    display: flex;
    gap: 3rem;
    background: var(--card-bg);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.contact-form-container, .map-container {
    flex: 1;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    background: var(--light-color);
    transition: all 0.3s ease;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(103, 58, 183, 0.3);
}

.contact-form textarea {
    resize: vertical;
}

.contact-form button {
    width: 100%;
    font-size: 1.1rem;
}

.map-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    min-height: 400px;
}

/* --- FOOTER --- */
.footer {
    background: var(--dark-color);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 2rem 0;
}

/* --- SCROLL-UP BUTTON --- */
.scroll-up {
    position: fixed;
    right: 2rem;
    bottom: -20%;
    background: var(--primary-color);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    z-index: 100;
    transition: bottom 0.4s, transform 0.4s, background-color 0.3s;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.scroll-up:hover {
    background-color: var(--secondary-color);
    transform: translateY(-4px);
}

.scroll-up.show-scroll {
    bottom: 3rem;
}

/* --- ON-SCROLL REVEAL ANIMATION --- */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Add delays for staggered effect */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    .about-container {
        flex-direction: column;
        text-align: center;
    }
    .contact-wrapper {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--light-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.4s ease-in-out;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 3rem;
        text-align: center;
    }

    .nav-link {
        font-size: 1.5rem;
    }

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

    .hamburger {
        display: block;
    }
    
    .hamburger i.fa-times {
        display: none;
    }
    
    .nav-menu.active + .hamburger i.fa-bars {
        display: none;
    }
    
    .nav-menu.active + .hamburger i.fa-times {
        display: block;
    }

    section {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 2.2rem;
    }
    
    .hero-content h1 {
        font-size: clamp(2.2rem, 6vw, 3.2rem);
    }
    
    .hero-content p {
        font-size: clamp(1.1rem, 3vw, 1.4rem);
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 0.8rem 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-content .btn {
        width: 100%;
        max-width: 300px;
    }
    

    
    .card-content h3 {
        font-size: 1.4rem;
    }
    
    .card-content ul li {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    .scroll-up {
        right: 1rem;
    }
    .contact-wrapper {
        padding: 1.5rem;
    }
}