
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #ff6b6b;
    --primary-dark: #e63946;
    --secondary: #4ecdc4;
    --accent: #ffe66d;
    --dark: #1a1a2e;
    --light: #f8f9ff;
    --text: #2d3436;
    --muted: #636e72;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    line-height: 1.7;
    letter-spacing: 0.2px;
    color: var(--text);
    background: linear-gradient(135deg, var(--light) 0%, #ffffff 100%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 80px;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


header {
    background: linear-gradient(135deg, var(--dark) 0%, #2d2d44 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    padding: 1.2rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-left: 2.5rem;
}

nav ul li a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(.25,.46,.45,.94);
    padding: 0.6rem 1rem;
    position: relative;
    border-radius: 8px;
}

nav ul li a:hover {
    color: var(--accent);
    background: rgba(255, 230, 109, 0.1);
    transform: translateY(-2px);
}

nav ul li a.active {
    color: var(--dark);
    background: var(--accent);
    box-shadow: 0 10px 30px rgba(255, 230, 109, 0.2);
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background: var(--accent);
    transition: width 0.3s cubic-bezier(.25,.46,.45,.94);
    transform: translateX(-50%);
    border-radius: 2px;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 40%;
}

#hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    color: #ffffff;
    padding: 120px 0 80px;
    text-align: center;
}

#hero h2 {
    font-size: 3.8rem;
    margin-bottom: 1.2rem;
    font-weight: 900;
    letter-spacing: -1.5px;
    line-height: 1.15;
    animation: slideUpFade 0.8s ease-out;
}

#hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    font-weight: 400;
    letter-spacing: 0.4px;
    opacity: 0.95;
    animation: slideUpFade 0.8s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    padding: 0.9rem 2.2rem;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    transition: all 0.35s cubic-bezier(.25,.46,.45,.94);
    box-shadow: 0 8px 30px rgba(230, 57, 70, 0.25);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.1);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 16px 44px rgba(230, 57, 70, 0.35);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    box-shadow: 0 12px 40px rgba(230, 57, 70, 0.2);
}

.btn-primary:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 20px 54px rgba(230, 57, 70, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, #3dbbb0 100%);
    border: none;
    color: #ffffff;
    box-shadow: 0 12px 40px rgba(78, 205, 196, 0.2);
}

.btn-secondary:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 18px 50px rgba(78, 205, 196, 0.3);
}

.btn-small {
    padding: 0.6rem 1.4rem;
    font-size: 0.9rem;
    margin-top: 1rem;
    background: linear-gradient(135deg, var(--secondary) 0%, #3dbbb0 100%);
    box-shadow: 0 8px 24px rgba(78, 205, 196, 0.15);
    color: #ffffff;
}
.btn-small:hover { 
    box-shadow: 0 14px 38px rgba(78, 205, 196, 0.25); 
    transform: translateY(-4px); 
}

.btn-social {
    background: linear-gradient(135deg, var(--accent) 0%, #ffd700 100%);
    border: none;
    color: var(--dark);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin: 0 0.5rem;
    box-shadow: 0 8px 24px rgba(255, 230, 109, 0.2);
    font-weight: 600;
}

.btn-social:hover { 
    transform: translateY(-4px) scale(1.05); 
    box-shadow: 0 14px 38px rgba(255, 230, 109, 0.3); 
}


main {
    padding: 80px 0;
}

section {
    margin-bottom: 100px;
    scroll-margin-top: 100px;
}

section h2 {
    font-size: 2.8rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--dark);
    font-weight: 900;
    letter-spacing: -0.8px;
    line-height: 1.3;
    animation: slideUpFade 0.8s ease-out;
}

section p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #546b6b;
}


@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes gradientShift {
    0% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(10deg); }
    100% { filter: hue-rotate(0deg); }
}

section { animation: fadeUp 0.8s ease both; }


.about-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.profile-image {
    flex-shrink: 0;
}

.profile-image img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary);
    box-shadow: 0 16px 40px rgba(230, 57, 70, 0.25);
    transition: transform 0.5s cubic-bezier(.25,.46,.45,.94), box-shadow 0.3s ease;
}
@keyframes float {
    0% { transform: translateY(0) scale(1) rotate(0deg); }
    50% { transform: translateY(-12px) scale(1.02) rotate(5deg); }
    100% { transform: translateY(0) scale(1) rotate(0deg); }
}
@keyframes slow-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes continuous-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 16px 40px rgba(230, 57, 70, 0.25); }
    50% { box-shadow: 0 16px 60px rgba(230, 57, 70, 0.4); }
}
.profile-pic {
    animation: float 4s ease-in-out infinite, pulse-glow 3s ease-in-out infinite, continuous-rotate 8s linear infinite;
    will-change: transform;
}

.profile-pic:hover {
    animation: float 6s ease-in-out infinite, slow-rotate 2s linear infinite, pulse-glow 3s ease-in-out infinite;
    transform-origin: 50% 50%;
    box-shadow: 0 18px 46px rgba(230, 57, 70, 0.35);
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text h2 {
    text-align: left;
    margin-bottom: 1.2rem;
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: -0.6px;
    color: var(--dark);
    animation: slideUpFade 0.8s ease-out;
}

.about-text h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-top: 2rem;
    margin-bottom: 1.2rem;
    color: var(--dark);
    letter-spacing: -0.3px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}



.project-card {
    background: linear-gradient(135deg, #ffffff 0%, #f5f8ff 100%);
    padding: 2.2rem;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(26, 26, 46, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.1);
    transition: all 0.4s cubic-bezier(.25,.46,.45,.94);
    backdrop-filter: blur(10px);
}

.project-card:hover {
    transform: translateY(-14px) scale(1.02) rotateX(5deg);
    box-shadow: 0 30px 60px rgba(230, 57, 70, 0.15);
    border-color: var(--primary);
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--dark);
    font-weight: 800;
    letter-spacing: -0.3px;
}

footer {
    background: linear-gradient(135deg, var(--dark) 0%, #2d2d44 100%);
    border-top: 1px solid rgba(255, 107, 107, 0.15);
    padding: 2.5rem 0;
    margin-top: 60px;
    color: #ffffff;
}
footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.social-links {
    display: flex;
    justify-content: center;
}


.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    border: none;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    opacity: 1;  
    visibility: visible;  
    transition: all 0.35s cubic-bezier(.25,.46,.45,.94);
    box-shadow: 0 12px 40px rgba(230, 57, 70, 0.25);
    z-index: 1001;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.back-to-top-btn:hover { 
    transform: translateY(-8px) scale(1.1); 
    box-shadow: 0 20px 54px rgba(230, 57, 70, 0.35); 
    animation: none;
}

.back-to-top-btn.show { opacity: 1; visibility: visible; }


.back-button-container {
    margin-bottom: 2rem;
    text-align: left;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}


.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.skill-item {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(230, 57, 70, 0.15);
    transition: all 0.35s cubic-bezier(.25,.46,.45,.94);
    cursor: default;
}

.skill-item:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: 0 16px 40px rgba(230, 57, 70, 0.25);
} 

.projects-showcase {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.project-detail-card {
    background: linear-gradient(135deg, #ffffff 0%, #f5f8ff 100%);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(26, 26, 46, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.1);
    transition: all 0.4s cubic-bezier(.25,.46,.45,.94);
    backdrop-filter: blur(8px);
    margin-bottom: 2rem;
    animation: slideUpFade 0.8s ease-out;
}

.project-detail-card:hover {
    transform: translateY(-12px) scale(1.01);
    box-shadow: 0 28px 58px rgba(230, 57, 70, 0.12);
    border-color: var(--primary);
}

.project-detail-card h3 {
    color: var(--dark);
    margin-bottom: 0.8rem;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.project-tech {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.project-detail-card p {
    color: #030101;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}


.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-info h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.contact-info p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.contact-details {
    display: grid;
    gap: 1.5rem;
}

.contact-item h4 {
    color: #7dd3fc;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.contact-item p {
    color: #333;
    margin: 0;
    font-weight: 500;
}

.contact-form {
    background: linear-gradient(135deg, #ffffff 0%, #f5f8ff 100%);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(26, 26, 46, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.1);
    backdrop-filter: blur(8px);
}


.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #06b6d4;
}


@media (max-width: 768px) {
    header {
        padding: 1rem 0;
    }

    header .container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    nav ul {
        margin-top: 0.5rem;
        justify-content: center;
    }

    nav ul li {
        margin: 0 1.2rem;
    }

    nav ul li a {
        font-size: 0.9rem;
        padding: 0.4rem 0;
    }

    #hero h2 {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .profile-image img {
        width: 150px;
        height: 150px;
    }

    .about-text h2 {
        text-align: center;
    }

    .back-to-top-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.8rem;
    }

    .skill-item {
        padding: 0.6rem;
        font-size: 0.9rem;
    }

    .projects-showcase {
        gap: 1.5rem;
    }

    .project-detail-card {
        padding: 1.5rem;
    }

    .project-links {
        gap: 0.8rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    footer .container {
        flex-direction: column;
        gap: 1rem;
    }
}