:root {
    --bg-color: #0f0f1a;
    --second-bg-color: #1a1a2e;
    --text-color: #ededed;
    --accent-color: #00d2ff;
    --card-bg: #2a2a3e;
    --font-primary: 'Poppins', sans-serif;
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
    font-family: var(--font-primary);
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

/* Barra de navegación */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 8%;
    background: rgba(15, 15, 26, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.navbar .logo {
    font-size: 2rem;
    font-weight: 600;
}

.navbar .nav-links {
    display: flex;
    align-items: center;
    transition: 0.3s;
}

.navbar .nav-links li a {
    color: var(--text-color);
    margin-left: 2rem;
    font-size: 1rem;
    transition: 0.3s;
}

.navbar .nav-links li a:hover {
    color: var(--accent-color);
}

.hamburger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
}

/* Estructura general de secciones */
section {
    padding: 6rem 8%;
    min-height: auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.section-title span {
    color: var(--accent-color);
}

/* Hero */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: radial-gradient(circle at top right, #1f2235, var(--bg-color));
    padding-top: 6rem;
}

.hero-content {
    text-align: center;
}

.hero-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--accent-color);
    color: var(--bg-color);
    border-radius: 3rem;
    font-weight: 600;
    box-shadow: 0 0 10px var(--accent-color);
    transition: 0.3s;
}

.btn:hover {
    opacity: 0.9;
    box-shadow: none;
}

/* Sobre mí */
.about {
    background: var(--second-bg-color);
    text-align: center;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}

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

.skill h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress {
    background: var(--second-bg-color);
    border-radius: 0.5rem;
    overflow: hidden;
    height: 0.5rem;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: var(--accent-color);
    border-radius: 0.5rem;
    transition: width 1s ease-out;
}

/* Timeline de experiencia */
.timeline {
    list-style: none;
    position: relative;
    margin-left: 2rem;
    padding-left: 1rem;
    border-left: 2px solid var(--accent-color);
}

.timeline li {
    margin-bottom: 2rem;
    position: relative;
}

.timeline li::before {
    content: '';
    position: absolute;
    left: -1.3rem;
    top: 0;
    width: 1rem;
    height: 1rem;
    background: var(--accent-color);
    border-radius: 50%;
}

.timeline h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.timeline p {
    font-size: 1rem;
    opacity: 0.85;
}

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

.project-card {
    position: relative;
    background: var(--card-bg);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px var(--accent-color);
}

.project-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.project-info {
    padding: 1rem;
}

.project-info h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.project-info p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.project-link {
    color: var(--accent-color);
    font-size: 1.5rem;
}

/* CV */
.cv-section {
    background: var(--second-bg-color);
    text-align: center;
}

.cv-section p {
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
}

/* Contacto */
.contact form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.input-group input,
.contact textarea {
    flex: 1 1 100%;
    padding: 0.8rem 1rem;
    border-radius: 0.5rem;
    background: var(--second-bg-color);
    color: var(--text-color);
    border: none;
    font-size: 1rem;
}

.input-group input {
    flex: 1 1 calc(50% - 0.5rem);
}

.contact textarea {
    resize: vertical;
    min-height: 120px;
}

footer {
    text-align: center;
    padding: 1.5rem 0;
    background: var(--second-bg-color);
    font-size: 0.9rem;
    color: var(--text-color);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--bg-color);
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        display: none;
    }

    .navbar .nav-links.active {
        display: flex;
    }

    .navbar .nav-links li a {
        margin: 1rem 0;
        font-size: 1.2rem;
    }

    .hamburger {
        display: block;
        color: var(--text-color);
    }

    .hero {
        padding-top: 8rem;
    }
}
