/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3498dba3;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --transition: all 0.5s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9f9f9;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
    position: relative;
}

h1, h2, h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
}

p {
    margin-bottom: 15px;
}

.btn {
    display: inline-block;
    padding: 10px 25px;
    background: #0000008b;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: var(--transition);
    z-index: -1;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    background: #2980b9;
    transform: translateY(-3px);
    box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.644);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    font-size: 2.5rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 70px;
    height: 4px;
    background: var(--primary-color);
    margin: 10px auto;
    animation: expandWidth 1.5s ease-out;
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 50%;
    animation: float 15s infinite linear;
}

.floating-element:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 20s;
}

.floating-element:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
    animation-duration: 25s;
}

.floating-element:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 80%;
    left: 20%;
    animation-delay: 4s;
    animation-duration: 18s;
}

/* Navigation Bar */
nav {
    background-color: #2f4255e1;
    color: white;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 5px 10px;
    border-radius: 4px;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after, 
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover, 
.nav-links a.active {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    z-index: 1001;
}

/* Header Section */
header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    text-align: center;
    padding: 160px 0 100px;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

header::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" opacity="0.1"><polygon points="0,1000 1000,0 1000,1000" fill="white"/></svg>');
    background-size: cover;
    animation: slideIn 20s infinite linear;
}

.profile-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 30px;
    animation: fadeIn 1s ease-in-out, pulse 2s infinite;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.529);
    position: relative;
    z-index: 1;
}

.header-content h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    color: white;
    animation: slideInFromTop 1s ease-out;
    text-shadow: 5px 5px 7px rgba(0, 0, 0, 0.599);
}

.header-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    animation: slideInFromBottom 1s ease-out;
    text-shadow: 5px 5px 7px rgba(0, 0, 0, 0.599);
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-text {
    flex: 2;
    animation: fadeInLeft 1s ease-out;
}

.about-img {
    flex: 1;
    text-align: center;
    animation: fadeInRight 1s ease-out;
}

.about-img img {
    width: 100%;
    max-width: 300px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    filter: grayscale(20%);
}

.about-img img:hover {
    transform: scale(1.05);
    filter: grayscale(0%);
}

/* Skills Section */
#skills {
    background-color: #e9f2ff;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.skill {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: var(--transition);
    animation: fadeInUp 1s ease-out;
    position: relative;
    overflow: hidden;
}

.skill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: var(--transition);
}

.skill:hover::before {
    transform: scaleY(1);
}

.skill:hover {
    transform: translateY(-10px);
    box-shadow: 10px 15px 10px rgba(11, 117, 230, 0.253);
}

.skill i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    transition: var(--transition);
}

.skill:hover i {
    transform: scale(1.2);
}

.skill h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Progress Bars for Skills */
.skill-progress {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-top: 15px;
    overflow: hidden;
}

.skill-progress-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    width: 0;
    transition: width 1.5s ease-in-out;
}

/* Projects Section */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.471);
    transition: var(--transition);
    animation: fadeInUp 1s ease-out;
    position: relative;
    margin: 0 auto;
}

.project::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.7));
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

.project:hover::before {
    opacity: 1;
}

.project:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-img {
    width: 100%;
    height: 270px;
    object-fit: cover;
    transition: var(--transition);
}

.project:hover .project-img {
    transform: scale(1.05);
}

.project-content {
    padding: 20px;
    position: relative;
    z-index: 2;
}

.project-content h3 {
    margin-bottom: 10px;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(133, 198, 241, 0.648);
    display: flex;
    flex-direction: column;
    justify-content: center ;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
    z-index: 2;
}

.project:hover .project-overlay {
    opacity: 1;
}

/* Contact Section */
#contact {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 100px ;
}

#contact .section-title {
    color: white;
}

#contact .section-title::after {
    background: white;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.contact-item {
    padding: 20px;
    color: white;
    transition: var(--transition);
    animation: fadeInUp 1s ease-out;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.contact-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: scale(0);
    transition: var(--transition);
}

.contact-item:hover::before {
    transform: scale(1);
}

.contact-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.contact-item i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    transition: var(--transition);
}

.contact-item:hover i {
    transform: scale(1.2);
}

.contact-item h3 {
    margin-bottom: 10px;
    color: white;
}

.social-links {
    margin-top: 30px;
}

.social-links a {
    display: inline-block;
    margin: 0 15px;
    color: white;
    font-size: 1.5rem;
    transition: var(--transition);
    text-decoration: none;
    animation: fadeIn 1s ease-out;
    padding: 10px 20px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.social-links p {
    margin: 10px;
}

.social-links a::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: var(--transition);
}

.social-links a:hover::before {
    left: 100%;
}

.social-links a:hover {
    transform: translateY(-5px);
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.2);
}

/* Footer */
footer {
    background: #1a252f;
    color: white;
    text-align: center;
    padding: 30px 0;
    position: relative;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -10px) rotate(5deg); }
    50% { transform: translate(20px, 10px) rotate(0deg); }
    75% { transform: translate(10px, 15px) rotate(-5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

@keyframes expandWidth {
    from { width: 0; }
    to { width: 70px; }
}

@keyframes slideIn {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--secondary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    animation: bounce 2s infinite;
}

.scroll-to-top.active {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: #2980b9;
    transform: translateY(-5px);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Particle Background */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

/* Responsive Design */
@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
    }
    
    .header-content h1 {
        font-size: 2.5rem;
    }
    
    .header-content p {
        font-size: 1.2rem;
    }
    
    .hamburger {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--secondary-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
        z-index: 1000;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 20px 0;
    }

    .section-title {
        font-size: 2rem;
    }

}
