/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

:root {
    --primary-color: #4056F4;
    --secondary-color: #2ee59d;
    --dark-color: #151823;
    --light-color: #f4f4f4;
    --gray-color: #6c757d;
    --text-color: #333;
    --background-color: #fff;
}

html {
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

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

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.section-description {
    max-width: 700px;
    margin: 1.5rem auto 0;
    color: var(--gray-color);
    font-size: 1.1rem;
}

.underline {
    width: 5rem;
    height: 0.25rem;
    background-color: var(--primary-color);
    margin: 0 auto;
    position: relative;
}

.underline::before,
.underline::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 0.25rem;
    background-color: var(--secondary-color);
    top: 0;
}

.underline::before {
    left: -1.5rem;
}

.underline::after {
    right: -1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    outline: none;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background-color: #3045d0;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.secondary-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

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

section {
    padding: 5rem 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

section.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Add delay to stagger animations */
#home.loaded {
    transition-delay: 0.1s;
}

#about.loaded {
    transition-delay: 0.2s;
}

#skills.loaded {
    transition-delay: 0.3s;
}

#projects.loaded {
    transition-delay: 0.4s;
}

#contact.loaded {
    transition-delay: 0.5s;
}

.placeholder-img {
    background-color: #e0e0e0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

/* Header and Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 10%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1050;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

header.scrolled {
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 1rem 10%;
}

.logo a {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo a span {
    color: var(--secondary-color);
}

nav ul {
    display: flex;
    gap: 2rem;
}

nav ul li a {
    font-weight: 500;
    transition: all 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-color);
}

.menu-btn,
.close-btn {
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: var(--primary-color);
}

.close-btn:hover {
    color: var(--secondary-color);
}

/* Hero Section */
.hero {
    padding-top: 120px;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding-left: 10%;
    padding-right: 10%;
    padding-bottom: 3rem;
    position: relative;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content h1 span {
    color: var(--primary-color);
}

.hero-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 500px;
}

.btn-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.img-container {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* About Section */
.about {
    background-color: var(--light-color);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    padding: 0 10%;
}

.about-image,
.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.about-text p {
    margin-bottom: 1.5rem;
}

.personal-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-item span {
    font-weight: 600;
    color: var(--primary-color);
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 0 10%;
    max-width: 1200px;
    margin: 0 auto;
}

.skill-card {
    background-color: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.skill-card i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.skill-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background-color: var(--light-color);
    border-radius: 6px;
    margin-bottom: 0.8rem;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 6px;
    position: relative;
    animation: progressAnimation 2s ease-in-out;
}

@keyframes progressAnimation {
    0% {
        width: 0;
    }
}

.skill-card span {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.skill-card p {
    margin-top: 1rem;
    color: var(--gray-color);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Projects Section */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    padding: 0 10%;
    justify-content: center;
}

.project-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-img {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.project-img img {
    transition: transform 0.3s ease;
}

.project-card:hover .project-img img {
    transform: scale(1.05);
}

.project-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

.project-info p {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

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

.project-tags span {
    background-color: var(--light-color);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.project-tags span:hover {
    background-color: var(--primary-color);
    color: white;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

/* Contact Section */
.contact {
    background-color: var(--light-color);
}

.contact-container {
    display: flex;
    gap: 4rem;
    padding: 0 10%;
}

.contact-info,
.contact-form {
    flex: 1;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.contact-info p {
    margin-bottom: 2rem;
}

.contact-info .info-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-info .info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.contact-info .social-icons {
    margin-top: 2rem;
}

.contact-form form {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Footer */
footer {
    position: relative;
    overflow: hidden;
    padding-top: 150px;
    background-color: var(--dark-color);
    color: white;
}

.wave-container {
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
    height: 150px;
    overflow: hidden;
    filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.2));
}

.wave {
    position: absolute;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/wave.svg');
    background-size: 1000px 100px;
}

.wave1 {
    animation: animate 30s linear infinite;
    z-index: 1000;
    opacity: 1;
    animation-delay: 0s;
    bottom: 0;
}

.wave2 {
    animation: animate2 15s linear infinite;
    z-index: 999;
    opacity: 0.5;
    animation-delay: -5s;
    bottom: 10px;
    background-size: 800px 80px;
}

.wave3 {
    animation: animate 30s linear infinite;
    z-index: 998;
    opacity: 0.2;
    animation-delay: -2s;
    bottom: 15px;
    background-size: 700px 70px;
}

@keyframes animate {
    0% {
        background-position-x: 0;
    }

    100% {
        background-position-x: 1000px;
    }
}

@keyframes animate2 {
    0% {
        background-position-x: 0;
    }

    100% {
        background-position-x: -1000px;
    }
}

.footer-content {
    padding: 2rem 10%;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-about,
.footer-links,
.footer-contact,
.footer-newsletter {
    padding: 1rem;
}

.footer-logo a {
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.footer-logo a span {
    color: var(--secondary-color);
}

.footer-about p {
    margin: 1.5rem 0;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}

.footer-about .social-icons {
    margin-top: 1.5rem;
}

.footer-about .social-icons a {
    margin-right: 0.8rem;
    background-color: rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.footer-about .social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

.footer-links h3,
.footer-contact h3,
.footer-newsletter h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-links h3::after,
.footer-contact h3::after,
.footer-newsletter h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-links ul li {
    margin-bottom: 1rem;
}

.footer-links ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links ul li a:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

.footer-contact .contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-contact .contact-item i {
    margin-right: 1rem;
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.footer-contact .contact-item p {
    color: rgba(255, 255, 255, 0.8);
}

.footer-newsletter p {
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-form input {
    padding: 0.8rem;
    border-radius: 5px;
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    outline: none;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-form button {
    width: fit-content;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom .copyright p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 1100px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 8rem;
        min-height: auto;
    }

    .hero-content {
        order: 2;
    }

    .hero-image {
        order: 1;
        margin-bottom: 2rem;
    }

    .btn-container,
    .social-icons {
        justify-content: center;
    }

    .hero-content p {
        margin: 0 auto 2rem;
    }

    .about-content {
        flex-direction: column;
    }

    .contact-container {
        flex-direction: column;
    }

    .skills-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 900px) {
    .projects-container {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

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

    .skills-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 0;
    }

    header {
        padding: 1rem 5%;
    }

    header.scrolled {
        padding: 0.8rem 5%;
    }

    .hero {
        padding-top: 80px;
        min-height: auto;
        padding-bottom: 2rem;
    }

    .hero-content {
        order: 2;
        margin-top: 10px;
    }

    .hero-image {
        order: 1;
        margin-top: 20px;
        margin-bottom: 2rem;
    }

    .btn-container,
    .social-icons {
        justify-content: center;
    }

    .hero-content p {
        margin: 0 auto 2rem;
    }

    .about-content {
        flex-direction: column;
    }

    .contact-container {
        flex-direction: column;
    }

    .menu-btn {
        display: block;
    }

    .close-btn {
        display: block;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background-color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.5s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1060;
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        text-align: center;
        padding-top: 2rem;
    }

    section {
        padding: 3rem 5%;
    }

    .about-content,
    .skills-container,
    .projects-container,
    .contact-container {
        padding: 0;
    }

    .footer-content {
        padding: 2rem 5%;
    }

    .input-row {
        grid-template-columns: 1fr;
    }

    .personal-info {
        grid-template-columns: 1fr;
    }

    .img-container {
        width: 300px;
        height: 300px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 500px) {
    .hero {
        padding-top: 70px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .btn-container {
        flex-direction: column;
    }

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

    .img-container {
        width: 250px;
        height: 250px;
    }

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

@media (max-width: 600px) {
    .skills-container {
        grid-template-columns: 1fr;
        max-width: 350px;
        margin: 0 auto;
    }
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(64, 86, 244, 0.05) 20%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(46, 229, 157, 0.05) 20%, transparent 50%);
}

.preloader.hide {
    opacity: 0;
    visibility: hidden;
}

.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.circles {
    display: flex;
    margin-bottom: 15px;
}

.circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin: 0 8px;
    display: inline-block;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.circle1,
.circle2,
.circle3 {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.circle1 {
    animation: bounce 1.5s ease-in-out infinite;
}

.circle2 {
    animation: bounce 1.5s ease-in-out 0.2s infinite;
}

.circle3 {
    animation: bounce 1.5s ease-in-out 0.4s infinite;
}

.loader span {
    margin-top: 10px;
    font-weight: 500;
    color: var(--primary-color);
    font-size: 1.2rem;
    letter-spacing: 1px;
    animation: pulse 1.5s ease-in-out infinite;
    position: relative;
}

.loader span::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--secondary-color), transparent);
    bottom: -8px;
    left: 0;
    animation: expandWidth 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes expandWidth {

    0%,
    100% {
        width: 0;
        opacity: 0;
    }

    50% {
        width: 100%;
        opacity: 1;
    }
}