/* --- MAQUETACIÓN HOME --- */
main {
    margin-top: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 10;
    gap: 5rem;
    padding-bottom: 4rem;
}

/* --- TÍTULOS DE SECCIÓN COMUNES --- */
.section-title {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 2.5rem auto;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: #ffffff;
}

.section-title h2 span {
    color: var(--primary);
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

/* --- SECCIÓN SOBRE MÍ --- */
.about-section {
    text-align: center;
    max-width: 1100px;
    width: 100%;
    padding: 0 1.5rem;
    z-index: 5;
}

.about-header {
    max-width: 650px;
    margin: 0 auto 3rem auto;
}

.about-header .badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 20px;
    margin-bottom: 0.8rem;
}

.about-header h1 {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.about-header h1 span { 
    color: var(--primary); 
}

.about-subtitle { 
    color: var(--text-muted); 
    font-size: 1.1rem; 
    line-height: 1.6;
}

/* GRID DE TARJETAS SOBRE MÍ */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    text-align: left;
}

.about-card {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 1.8rem;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(56, 189, 248, 0.15);
}

.about-card.highlight {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.8) 0%, rgba(30, 58, 138, 0.25) 100%);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: rgba(56, 189, 248, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
}

.about-card h3 {
    font-size: 1.25rem;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.about-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.tech-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-pills span {
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.tech-pills span i {
    color: var(--primary);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.status-indicator .dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    position: relative;
}

.status-indicator .dot.pulse::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: rgba(16, 185, 129, 0.4);
    animation: pulseAnimation 2s infinite;
}

@keyframes pulseAnimation {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.status-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: #10b981;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-contact-card {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.2rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: gap 0.2s ease;
}

.btn-contact-card:hover {
    gap: 0.8rem;
}

/* --- SECCIÓN DE FORMACIÓN / TIMELINE --- */
.education-section {
    max-width: 900px;
    width: 100%;
    padding: 0 1.5rem;
}

.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid rgba(56, 189, 248, 0.2);
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-top: 1rem;
}

.timeline-item {
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: -2.55rem;
    top: 0.2rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 12px var(--primary);
    border: 3px solid #0a0f1d;
}

.timeline-content {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border-radius: 14px;
    padding: 1.5rem 1.8rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(5px);
    border-color: rgba(56, 189, 248, 0.3);
}

.timeline-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(56, 189, 248, 0.15);
    border-radius: 4px;
    margin-bottom: 0.6rem;
}

.timeline-content h3 {
    font-size: 1.3rem;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.timeline-content .institution {
    display: block;
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 0.8rem;
    opacity: 0.9;
}

.timeline-content .institution i {
    margin-right: 0.3rem;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* --- SECCIÓN DE SKILLS --- */
.skills-section {
    max-width: 1100px;
    width: 100%;
    padding: 0 1.5rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 1.8rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.3);
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.skill-icon {
    width: 42px;
    height: 42px;
    background: rgba(56, 189, 248, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
}

.skill-header h3 {
    font-size: 1.3rem;
    color: #ffffff;
    font-weight: 600;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.skill-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 0.88rem;
    color: var(--text-main);
    transition: all 0.25s ease;
}

.skill-chip i {
    color: var(--primary);
    font-size: 1rem;
}

.skill-chip:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    color: #ffffff;
    transform: translateY(-2px);
}

/* --- CONTENEDOR DE LA RUEDA / PORTFOLIO --- */
.portfolio-container {
    width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.wheel-area {
    position: relative;
    width: 100vw;
    height: 460px; 
    overflow: hidden; 
    display: flex;
    justify-content: center;
}

.wheel {
    position: absolute;
    width: 0;
    height: 0;
    top: 960px; 
}

/* Tarjeta Limpia */
.project-card {
    position: absolute;
    width: 320px;  
    height: 220px; 
    text-decoration: none;
    color: inherit;
    left: -160px; 
    top: -110px;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.65s cubic-bezier(0.25, 1, 0.5, 1), filter 0.5s, opacity 0.5s, visibility 0.5s;
}

.project-card:not(.active) {
    filter: brightness(0.25) blur(1px);
    pointer-events: none; 
}

/* IMÁGENES APILADAS */
.image-stack {
    position: relative;
    width: 100%;
    height: 100%;
}

.img-main {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    position: relative;
    z-index: 3;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    overflow: hidden; 
}

.project-overlay-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 1.2rem 1rem 1.2rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    z-index: 4;
}

.project-overlay-info h3 { font-size: 1.3rem; color: #ffffff; font-weight: 600; }
.tags { display: flex; gap: 0.4rem; margin-top: 0.4rem; flex-wrap: wrap; }
.tags span { font-size: 0.7rem; background: rgba(56, 189, 248, 0.2); color: var(--primary); padding: 0.15rem 0.5rem; border-radius: 4px; font-weight: 600; }

.img-back1, .img-back2 {
    position: absolute;
    top: 6px;
    right: -14px;
    width: 95%;
    height: 95%;
    background: #111827;
    border-radius: 12px;
    z-index: 2;
    transform: rotate(5deg);
    opacity: 0.65;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.03);
}

.img-back2 {
    right: -28px;
    top: 14px;
    z-index: 1;
    transform: rotate(10deg);
    opacity: 0.3;
    background: #1f2937;
}

/* CONTROLES */
.controls { display: flex; gap: 1.5rem; margin-top: 1.5rem; z-index: 10; }
.control-btn {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-main);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}
.control-btn:hover { background: var(--primary); color: #030408; box-shadow: 0 0 15px rgba(56, 189, 248, 0.4); }

/* --- SECCIÓN DE CONTACTO --- */
.contact-section {
    max-width: 800px;
    width: 100%;
    padding: 0 1.5rem;
}

.contact-wrapper {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 2.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 640px) {
    .form-group-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.btn-submit {
    align-self: flex-start;
    padding: 0.9rem 2rem;
    background: var(--primary);
    color: #030408;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

/* FOOTER */
footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    margin-top: 3rem;
}

html {
    scroll-behavior: smooth;
}