@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-color: #0b111e;
    --second-bg-color: #111a2e;
    --text-color: #f1f5f9;
    --main-color: #00d2ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

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

html {
    font-size: 62.5%;
    overflow-x: hidden;
}

section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: rgba(11, 17, 30, 0.85);
    backdrop-filter: blur(14px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 800;
    cursor: default;
    transition: .3s;
}

.logo:hover {
    color: var(--main-color);
}

.navbar a {
    font-size: 1.7rem;
    color: var(--text-color);
    margin-left: 4rem;
    font-weight: 600;
    transition: .3s;
}

.navbar a:hover, .navbar a.active {
    color: var(--main-color);
}

#menu-icon {
    font-size: 3.6rem;
    color: var(--text-color);
    display: none;
    cursor: pointer;
}

.heading {
    text-align: center;
    font-size: 4.5rem;
    margin-bottom: 5rem;
}

.heading span {
    color: var(--main-color);
}

.btn {
    display: inline-block;
    padding: 1.2rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 1.5rem var(--main-color);
    font-size: 1.6rem;
    color: var(--bg-color);
    letter-spacing: .1rem;
    font-weight: 700;
    transition: .4s ease;
}

.btn:hover {
    box-shadow: none;
    background: var(--text-color);
    color: var(--bg-color);
}

.inicio {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-texto {
    flex: 1;
}

.hero-texto h3 {
    font-size: 3.2rem;
    font-weight: 700;
}

.hero-texto h1 {
    font-size: 5.6rem;
    font-weight: 800;
    line-height: 1.3;
}

.hero-texto p {
    font-size: 1.6rem;
    margin: 2rem 0 4rem;
    max-width: 500px;
    color: #94a3b8;
}

.social-media {
    margin-bottom: 3rem;
}

.social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: .2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--main-color);
    margin-right: 1.5rem;
    transition: .5s ease;
}

.social-media a:hover {
    background: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 0 1rem var(--main-color);
}

.hero-img {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hero-img img {
    width: 25vw;
    border-radius: 50%;
    box-shadow: 0 0 3rem var(--main-color);
    animation: flotar 4s ease-in-out infinite;
    object-fit: cover;
    aspect-ratio: 1/1;
}

@keyframes flotar {
    0% { transform: translateY(0); }
    50% { transform: translateY(-30px); }
    100% { transform: translateY(0); }
}

.sobre-mi {
    background: var(--second-bg-color);
}

.sobre-mi-content {
    display: flex;
    align-items: center;
    gap: 5rem;
}

.sobre-mi-text {
    flex: 1;
}

.sobre-mi-text h3 {
    font-size: 2.6rem;
    padding-bottom: 1rem;
}

.sobre-mi-text p {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    color: #94a3b8;
}

.skills-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.skill-box {
    background: var(--bg-color);
    padding: 2.5rem;
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 1.8rem;
    font-weight: 600;
    transition: .4s ease;
    border: 1px solid transparent;
}

.skill-box i {
    font-size: 3.5rem;
    color: var(--main-color);
}

.skill-box:hover {
    transform: translateY(-8px);
    border-color: var(--main-color);
    box-shadow: 0 0 2rem rgba(0, 210, 255, 0.2);
}

.experiencia {
    background: var(--bg-color);
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--main-color);
    top: 0;
    bottom: 0;
    left: 20px;
    margin-left: -2px;
    border-radius: 5px;
}

.timeline-item {
    padding: 2rem 2rem 2rem 50px;
    position: relative;
    width: 100%;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    left: 10px;
    top: 25px;
    background: var(--bg-color);
    border: 4px solid var(--main-color);
    border-radius: 50%;
    z-index: 1;
}

.timeline-content {
    padding: 3rem;
    background: var(--second-bg-color);
    border-radius: 1.5rem;
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.1);
    border-left: 2px solid var(--main-color);
}

.timeline-content h3 {
    font-size: 2.2rem;
}

.timeline-content p {
    margin-top: 1rem;
    font-size: 1.5rem;
    color: #cbd5e1;
}

.proyectos {
    background: var(--second-bg-color);
}

.portfolio-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
}

.portfolio-box {
    position: relative;
    border-radius: 2rem;
    overflow: hidden;
    display: flex;
    background: var(--bg-color);
    border: 1px solid rgba(255,255,255,.05);
}

.portfolio-box img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: .6s ease;
}

/* Cuando no tienes imagen: fondo decorativo con icono */
.portfolio-cover {
    width: 100%;
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0b111e 0%, #0d2137 50%, #0b3d5a 100%);
    transition: .6s ease;
    flex-shrink: 0;
}

.portfolio-cover i {
    font-size: 9rem;
    color: var(--main-color);
    opacity: 0.6;
    filter: drop-shadow(0 0 20px var(--main-color));
    transition: .6s ease;
}

.portfolio-box:hover .portfolio-cover i {
    opacity: 1;
    transform: scale(1.15);
    filter: drop-shadow(0 0 35px var(--main-color));
}

.portfolio-box:hover img {
    transform: scale(1.1);
}

.portfolio-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,.1), var(--main-color));
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 0 4rem;
    transform: translateY(100%);
    transition: .6s ease;
}

.portfolio-box:hover .portfolio-layer {
    transform: translateY(0);
}

.portfolio-layer h4 {
    font-size: 3rem;
    color: #fff;
}

.portfolio-layer p {
    font-size: 1.6rem;
    margin: 1rem 0;
    color: #fff;
}

.portfolio-layer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 5rem;
    height: 5rem;
    background: #fff;
    border-radius: 50%;
}

.portfolio-layer a i {
    font-size: 2rem;
    color: var(--second-bg-color);
}
