:root {
    --primary-color: #6c63ff;
    --dark-bg: #121212;
    --darker-bg: #0a0a0a;
    --light-text: #f5f5f5;
    --gray-text: #aaaaaa;
    --card-bg: #1e1e1e;
    --border-color: #2d2d2d;
    --trasition: all .3s ease;
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-color: var(--primary-color) var(--dark-bg);
}

body {
    font-family: 'Segeo UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

#navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    position: relative;
    padding: .5rem 0;
    transition: var(--trasition);
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--trasition);
}

.nav-links a:hover {
    color: var(--primary-color)
}

.nav-links a:hover:after {
    width: 100%;
}

section {
    padding: 6rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: .8rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--trasition);
    border: none;
}

.btn:hover {
    background-color: #5651d8;
    transform: translateX(-3px);
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.3);
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4rem;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: .5rem;
    font-weight: 700;
}

.hero-text h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero-text p {
    margin-bottom: 1.5rem;
    color: var(--gray-text);
    font-size: 1.1rem;
    max-width: 600px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--card-bg);
    color: var(--light-text);
    transition: var(--trasition);
    font-size: 1.2rem;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

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

.hero-image img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--primary-color);
    box-shadow: 0 0 25px rgba(108, 99, 255, .5);
    transition: var(--trasition);
}

.hero-imageimg:hover {
    transform: scale(1.03);
    box-shadow: 0 0 30px rgba(108, 99, 255, .5);
}

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

}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    width: 2px;
    height: 100%;
    background-color: var(--border-color);
}

.timeline-item::before {
    content: '';
    top: 5px;
    left: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--primary-color);
    z-index: 1;
}

.timeline-content {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 3px solid var(--primary-color);
}

.date {
    display: inline-block;
    padding: .3rem .8rem;
    background-color: rgba(108, 99, 255, 0.2);
    color: var(--primary-color);
    border-radius: 5px;
    font-size: .9rem;
    margin-bottom: 1rem;
}

.timeline-content h3 {
    margin-bottom: .5rem;
    font-size: 1.3rem;
}

.timeline-content h4 {
    color: var(--gray-text);
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 500;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .8rem;
}

.skills li {
    font-size: .8rem;
    padding: .3rem .8rem;
    background-color: var(--darker-bg);
    border-radius: 20px;
}

.projects-container {
    display: inline-flex;
    justify-content: center; /* horizontal */
    align-items: center;     /* vertical */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    transition: var(--trasition);
    height: 100%;
    display: inline-flex
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(108, 99, 255, .5);
}

.project-img {
    overflow: hidden;
    
}

.project-img img {
    transition: var(--trasition);
    width: 100%;
}
.project-card[data-project="concesionaria"] img {
    height: 390px;
    object-fit: cover;
}
.project-card:hover .project-img img {
    transform: scale(0.8);
}

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

.project-info p {
    color: var(--gray-text);
    margin-bottom: 1rem;
    font-size: .95rem;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}

.project-tech span {
    font-size: .8rem;
    padding: .2rem .6rem;
    background-color: var(--darker-bg);
    border-radius: 20px;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-links a {
    font-size: .9rem;
    color: var(--gray-text);
    transition: var(--trasition);
}

.project-links a:hover {
    color: var(--primary-color);
}

footer {
    background-color: var(--darker-bg);
    border-top: 1px solid var(--border-color);
    padding: 2rem 5%;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 430px) {
    header {
        position: static;
    }
    #navbar {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }
    .hero-content, .nav-links {
        flex-direction: column;
    }
}

.gallery-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.gallery-modal img {
    max-width: 80%;
    max-height: 80%;
    border-radius: 10px;
}

.hidden {
    display: none;
}

.gallery-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

.gallery-btn {
    background: none;
    border: none;
    font-size: 50px;
    color: white;
    cursor: pointer;
    padding: 20px;
}

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

.contact input,
.contact textarea {
    padding: .8rem;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--light-text);
}

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

#form-status {
    min-height: 24px;
    transition: all .3s ease;
    font-weight: 500;
}

.form-status {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.form-status.success {
    background-color: #d1fae5; /* verde suave */
    color: #065f46;
    border: 1px solid #34d399;
    opacity: 1;
}

.form-status.error {
    background-color: #fee2e2;
    color: #7f1d1d;
    border: 1px solid #f87171;
    opacity: 1;
}

.technologies {
    padding: 80px 10%;
    text-align: center;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.tech-item {
    background: #111;
    border-radius: 12px;
    padding: 20px 10px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: default;
}

.tech-item img {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
}

.tech-item span {
    display: block;
    font-size: 0.9rem;
    color: #ddd;
}

/* ✨ Hover sutil */
.tech-item:hover {
    transform: scale(1.07);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.tech-item {
    background: #111;
    border-radius: 12px;
    padding: 25px 10px;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tech-item i {
    font-size: 2.2rem;
    color: #fff;
    margin-bottom: 10px;
    display: block;
}

.tech-item span {
    font-size: 0.9rem;
    color: #ddd;
}

.tech-item:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.tech-item:hover i {
    color: #4caf50;
}

/* --- Tech Groups (proyecto complejo deportivo) --- */

.project-tech-groups {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    margin-bottom: 1rem;
}

.tech-group {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    flex-wrap: wrap;
}

.tech-group-label {
    font-size: .7rem;
    font-weight: 600;
    color: var(--primary-color);
    background-color: rgba(108, 99, 255, 0.1);
    border: 1px solid rgba(108, 99, 255, 0.25);
    padding: .15rem .5rem;
    border-radius: 4px;
    white-space: nowrap;
    margin-top: .15rem;
    letter-spacing: .03em;
    text-transform: uppercase;
}

/* --- Features list --- */

.project-features {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: 1rem;
}

.project-features span {
    font-size: .8rem;
    color: var(--gray-text);
    display: flex;
    align-items: center;
    gap: .3rem;
}

.project-features i {
    color: var(--primary-color);
    font-size: .85rem;
}


.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.tech-item {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 25px 10px;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tech-item i {
    font-size: 2.4rem;
    color: var(--gray-text);
    margin-bottom: 10px;
    display: block;
    transition: color 0.25s ease;
}

.tech-item span {
    font-size: 0.9rem;
    color: var(--gray-text);
}

.tech-item:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* 🎯 Colores por tecnología */
.tech-java:hover i {
    color: #f89820;
}

.tech-spring:hover i {
    color: #6db33f;
}

.tech-maven:hover i {
    color: #c71a36;
}

.tech-docker:hover i {
    color: #2496ed;
}

.tech-mysql:hover i {
    color: #00758f;
}

.tech-html:hover i {
    color: #e34f26;
}

.tech-css:hover i {
    color: #1572b6;
}

.tech-hibernate:hover i {
    color: #bcae79;
}