/* RESET BÁSICO */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* VARIABLES */
:root {
    --bg-main: #0f0f0f;
    --bg-card: #1a1a1a;
    --text-main: #f5f5f5;
    --text-secondary: #bdbdbd;
    --accent: #e53935;

    --radius: 12px;
    --max-width: 1100px;
}

/* BASE */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
    border-radius: var(--radius);
}

a {
    color: var(--accent);
    text-decoration: none;
}

ul {
    list-style: none;
}

/* centrar nav links */

/* HEADER / NAV */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    background-color: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(6px);

    padding-top: 3rem;
    padding-bottom: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);

}

.nav {
    max-width: var(--max-width);
    margin: 0 auto;        /*  centra el nav en la página */
}

.nav-links {
    display: flex;
    justify-content: center; /*  centra los links */
    gap: 2rem;
}
.nav-links a {
    display: flex;
    flex-direction: column; /*  icono arriba, texto debajo */
    align-items: center;
    gap: 0.3rem;

    color: var(--text-secondary);
    font-size: 0.75rem;
    /* hover */
        transition: color 0.2s ease, transform 0.2s ease;


}

.nav-links i {
    font-size: 1.3rem;
}
.nav-icon {
    width: 22px;
    height: 22px;
    filter: brightness(0) saturate(100%) invert(75%);
    transition: filter 0.2s ease, transform 0.2s ease;
}



/* HERO */
/* HERO */
.hero {
    padding-top: 4rem;
    padding-bottom: 6rem;
    min-height: 85vh;
    background: linear-gradient(180deg, #151515, #0f0f0f);
}

.hero-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column; /*  móvil: en columna */
    align-items: center;
    gap: 2.5rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem
}

.hero h2 {
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--accent);
    margin-bottom: 1rem;
}

.hero p {
    color: var(--text-secondary);
    margin-bottom: 0.1rem;
    font-size: 1.15rem;
    line-height: 1.75;
}

.hero p:last-of-type {
    margin-bottom: 0;
}
.hero-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}


.hero-actions a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;

    padding: 0.6rem 1.2rem;
    border-radius: 999px;

    background-color: #262626;
    color: #fff;
    font-weight: 500;

    border: 1px solid var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);

    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hero-actions img {
    width: 25px;
    height: 25px;
    object-fit: contain;
    display: block;
    opacity: 0.9;
}
.hero-actions a:hover img {
    opacity: 1;
}




/* SECCIONES */
section {
    padding: 3rem 1.5rem;
}

section h3 {
    font-size: 1.6rem;
    margin-bottom: 2rem;
}

/* PROJECTS */
.projects-list {
    display: grid;
    grid-template-columns: 1fr; /*  móvil: 1 por fila */
    gap: 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius);
    /* efecto hover */
    transition: 
        transform 0.25s ease,
        box-shadow 0.25s ease;
}
.project-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
    background-color: #262626  ; 
}
.project-links {
    margin-top: auto;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.project-links a {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.9rem;
    background-color: transparent;
    border: 1px solid var(--accent);
    border-radius: 19px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.project-links a:hover {
    background-color: var(--accent);
    transform: translateY(-2px);
}
.project-links img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: inline-block;
    margin-right: 0.5rem;
    margin-left: -0.2rem;
    vertical-align: middle;
}
.project-card:hover .project-links a {
    opacity: 1;
}

.project-image {
    overflow: hidden;
    border-radius: var(--radius);
}

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



.project-card h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.project-card ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.project-card li {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;

    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;

    background-color: #2c2c2c;
    border: 1px solid transparent;

    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
    white-space: nowrap;
}
.profile-card {
    text-align: center;
    color: #fff;
}
/* formatos por tecnologías*/

.tech-android {
    color: orange;
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 0 5px orange;
    
}

.tech-javascript {
    color: #facc15;
    border-color: rgba(250, 204, 21, 0.4);
    box-shadow: 0 0 5px #facc15 !important;
}

.tech-sql {
    color: #97bedf;
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 0 5px #97bedf !important;
}

/* JAVA / ANDROID */
.tech-java {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 5px #ef4444 !important;
    
}
.tech-css {
    color: #5871d4;
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 5px #5871d4 !important;
}
.tech-html {
    color: #f16529;
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 5px #f16529 !important;
}
.tech-spring {
    color: #6db33f;
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 5px #6db33f !important;
}
.tech-javafx {
    color: #e96d00;
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 5px #e96d00 !important;
}
.tech-bootstrap {
    color: #ab80d1;
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 5px #ab80d1 !important;
}


/* Rectángulo vertical */
.photo-frame {
    max-width: 340px; 
    height: auto;
    background-color: #262626;
    border-radius: 16px;

    display: flex;
    flex-direction: column;   /* foto arriba y texto debajo */
    align-items: center;      
    justify-content: flex-start; /* Empujar todo hacia arriba */

    padding: 50px 20px;       
        gap: 35px;                /* separación entre foto y texto */
}

/* Foto dentro */
.photo-frame img {
    width: 100%;
    max-width: 270px;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
}
.profileh2 {
    font-size: 1.9rem !important;
    font-weight: bold !important;
    line-height: 1.2 !important;
}
.title-subtitle {
    padding: 0 20px 30px 20px;
    text-align: center;
}

.title-subtitle {
    line-height: 1.5;
}
.profile-description {
    margin: 0;
    line-height: 1.4;
}

.profile-social {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.profile-social a {
    display: flex;
    align-items: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.8;
}

.profile-social a:hover {
    transform: translateY(-2px);
    opacity: 1;
}

.profile-social img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 0;
}


/* EXPERIENCE */
.experience {
    position: relative;
    padding-left: 2rem;
}

.timeline {
  position: relative;
  margin-left: 1rem;           /* espacio desde el borde */
  border-left: 2px solid #262626; /* línea vertical */
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-dot {
  position: absolute;
  left: -7px;                 /* justo sobre la línea */
  top: 5px;
  width: 14px;
  height: 14px;
  background-color: var(--accent);
  border-radius: 50%;
  border: 2px solid #262626; 
}
.timeline-content {
  margin-left: 2rem;          /* espacio entre línea y texto */
}
.timeline-content .position {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.timeline-content .company {
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.timeline-content .date {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
}

.timeline-content ul {
  padding-left: 1rem;
  margin: 0;
}

.timeline-content li {
  list-style: disc;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}
.timeline-content h4.position {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    font-weight: 600;
    color: #fff; /* posición en blanco */
}

.timeline-content h4.position .role {
    font-weight: 700;
    color: #fff; /* posición */
}

.timeline-content h4.position .company {
    font-weight: 500;
    color: var(--accent); /* empresa en rojo */
}




/* ABOUT */
.about-content {
    display: flex;
    align-items: flex-start; /* foto arriba, texto alinear al top */
    gap: 3rem;               /* espacio entre foto y texto */
    max-width: var(--max-width);
    margin: 0 auto;
}
.about-photo {
    flex: 0 0 20%; 
}

.about-photo img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px; 
}

/* Texto ocupa el resto */
.about-text {
    flex: 1; /* el resto del espacio */
    max-width: 65%; 
}

.about-text p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* CONTACT */
.contact ul li {
    margin-bottom: 0.5rem;
}
/* CONTACT BUTTONS */
.contact-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    background-color: #262626;
    border: 1px solid var(--accent);
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    border-color: #ff5252;
}

.contact-btn .icon {
    width: 40px;   /* tamaño visible y legible */
    height: 40px;
    display: block;
}

.contact-btn span {
    color: var(--text-main);
    font-size: 1rem;
    white-space: nowrap;
}


/* FOOTER */
footer {
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ---------------- DESKTOP ---------------- */
@media (min-width: 768px) {

    .hero-text h1 {
    font-size: 4.5rem;
    margin-bottom: 0;
    background: linear-gradient(
        90deg,
        #f5f5f5 0%,
        #f5f5f5 45%,
        #ff5252 50%,
        #f5f5f5 55%,
        #f5f5f5 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-position: 0% center;
    transition: background-position 0.8s ease-in-out;
}

.hero-text h1:hover {
    background-position: 100% center;
}
 .hero-text h2 {
        margin-top: -2rem;
    }
    .hero-text p {
        font-size: 1.2rem;
        line-height: 1.8;
        margin-bottom: 0.3rem;
    }
    
    .hero-text p:last-of-type {
        margin-bottom: 0;
    }
    
    .hero-text p + p {
        margin-top: -0.5rem;
    }
    .projects-list {
        grid-template-columns: repeat(2, 1fr);
    }

    section {
        max-width: var(--max-width);
        margin: 0 auto;
    }
 .hero-content {
        flex-direction: row;        /* fila */
        align-items: center;
        justify-content: space-between;
    }

   .hero-text {
        flex: 1;
        text-align: left;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-height: 500px;
    }

    .profile-card {
        flex: 0 0 auto;
    }
    .nav-links a {
        flex-direction: row; /* icono + texto en línea */
        font-size: 1rem;
        gap: 0.5rem;
    }

    .nav-links i {
        display: none; /*  solo texto */
    }
    
}
@media (max-width: 767px) {
    .nav-links span {
        display: none;
    }
    .nav-links {
        gap: 2.5rem;
    }
    .about-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2rem;       /* espacio vertical entre foto y texto */
    }

    .about-photo {
        flex: 0 0 auto;
    }

    .about-photo img {
        width: 160px; 
        height: auto;
    }

    .about-text {
        max-width: 100%;  /* ocupar todo el ancho en móvil */
    }

    .about-text p {
        font-size: 1rem;
        text-align: center;
    }
    .contact-btn {
        padding: 0.6rem 1rem;
    }
    .contact-btn .icon {
        width: 28px;
        height: 28px;
    }
    .contact-btn span {
        font-size: 0.9rem;
    }
}


@media (min-width: 1024px) {

    
}
@media (hover: hover) {
    .project-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    }
    .project-card:hover .project-image img {
        transform: scale(1.05);
    }
    /* borde accent en hover */
    .project-card:hover {
        box-shadow:
            0 10px 30px rgba(0, 0, 0, 0.35),
            0 0 0 1px rgba(229, 57, 53, 0.4);
    }
    .nav-links a:hover {
        color: var(--text-main);
        transform: translateY(-2px);
    }
    .nav-links a:hover .nav-icon {
        filter: brightness(0) saturate(100%) invert(95%);
        transform: scale(1.1);
    }
    .hero-actions a:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
        border-color: #ff5252;
    }
}