/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #003366;
    background: linear-gradient(to bottom, #f0f8ff, #e6f2ff);
    min-height: 100vh;
}

/* Header styles */
header {
    background-color: rgba(230, 242, 255, 0.8);
    background-image: url('https://MarBenitez.github.io/static/img/background.svg');
    background-repeat: repeat;
    background-size: 300px;
    background-attachment: fixed;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    color: #003366;
}

.profile-img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 300;
}

.download-resume {
    display: inline-block;
    background-color: #0052cc;
    color: #fff;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}

.download-resume:hover {
    background-color: #003d99;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Navigation styles */
nav {
    background-color: rgba(51, 102, 204, 0.9);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(5px);
}

nav ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

nav ul li a:hover, nav ul li a.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: #e6f2ff;
}

/* Section styles */
section {
    padding: 3rem 2rem;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

section h3 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 600;
}

/* About section */
#about p {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
}

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

.skills-category {
    background-color: rgba(230, 242, 255, 0.7);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.skills-category h4 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #0052cc;
}

.skill-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-button {
    background-color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #003366;
    cursor: pointer;
    transition: all 0.3s ease;
}

.skill-button:hover {
    background-color: #0052cc;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Projects section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: rgba(230, 242, 255, 0.7);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

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

.project-card h4 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.project-card p {
    font-size: 1rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.project-card a {
    display: inline-block;
    background-color: #0052cc;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    align-self: flex-start;
    margin-top: auto;
}

.project-card a:hover {
    background-color: #003d99;
}

/* Contact section */
.contact-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.contact-icons a {
    color: #003366;
    font-size: 3rem;
    transition: all 0.3s ease;
}

.contact-icons a:hover {
    color: #0052cc;
    transform: translateY(-5px);
}

/* Footer styles */
footer {
    background-color: rgba(51, 102, 204, 0.9);
    color: #fff;
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
}

/* Smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}

/* Active navigation link style */
nav ul li a.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: #e6f2ff;
}

/* Animation styles */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Skill button animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-skill {
    animation: scaleIn 0.3s ease-out forwards;
}

/* Project card animation */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-project {
    animation: slideInRight 0.5s ease-out forwards;
}

/* Responsive styles */
@media (max-width: 768px) {
    header {
        height: auto;
        padding: 4rem 1rem;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 0.5rem 0;
    }

    section {
        padding: 2rem 1rem;
    }

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

    .contact-icons {
        flex-direction: column;
        align-items: center;
    }
}
