:root {
    --bg-page: #0b1220;
    --bg-alt: #101a2e;
    --bg-card: #12203a;
    --bg-badge: #16233d;
    --accent: #3b82f6;
    --accent-soft: rgba(59, 130, 246, 0.35);
    --text-main: #e8edf7;
    --text-muted: #a7b3c9;
    --border-soft: rgba(148, 163, 196, 0.15);
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
}

a {
    text-decoration: none;
}

/* ---------- Navbar ---------- */
.navbar {
    background-color: rgba(10, 16, 30, 0.92);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--border-soft);
    padding-top: .75rem;
    padding-bottom: .75rem;
}

.navbar .nav-link {
    color: var(--text-muted);
    font-weight: 500;
    margin: 0 .5rem;
    padding-bottom: .35rem;
    border-bottom: 2px solid transparent;
    transition: color .2s ease, border-color .2s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--text-main);
    border-bottom-color: var(--accent);
}

.language-selector .btn.nav-link {
    display: flex;
    align-items: center;
    gap: .4rem;
    background: none;
    border: none;
}

.current-flag,
.flag-icon {
    width: 20px;
    height: auto;
    border-radius: 2px;
}

.dropdown-menu {
    background-color: var(--bg-card);
    border: 1px solid var(--border-soft);
}

.dropdown-item {
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--bg-badge);
    color: var(--text-main);
}

/* ---------- Hero ---------- */
.hero {
    padding: 4rem 1rem 3.5rem;
    background: radial-gradient(circle at top, #16233f 0%, var(--bg-page) 65%);
}

.hero-avatar {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bg-card);
    box-shadow: 0 0 0 4px var(--accent-soft);
    margin-bottom: 1.5rem;
}

.hero-name {
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: .25rem;
    letter-spacing: .02em;
}

.hero-title {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: .75rem;
}

.hero-lead {
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

.hero-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.hero-icon-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: border-color .2s ease, transform .2s ease;
}

.hero-icon-link:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.hero-icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: grayscale(100%) brightness(1.6);
}

/* ---------- Sections ---------- */
.section {
    padding: 4rem 0;
}

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

.section-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2rem;
}

/* ---------- Sobre mí ---------- */
.about-intro,
.about-footer {
    color: var(--text-muted);
    max-width: 900px;
    line-height: 1.7;
}

.about-subhead {
    color: var(--text-main);
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: .75rem;
}

.about-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
    max-width: 900px;
}

.about-list li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: .75rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.about-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
    font-weight: 700;
}

.about-meta {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-soft);
    color: var(--text-muted);
}

.about-meta strong {
    color: var(--text-main);
}

/* ---------- Timeline ---------- */
.timeline {
    position: relative;
    max-width: 900px;
    padding-left: 2rem;
    border-left: 2px solid var(--border-soft);
}

.timeline-item {
    position: relative;
    padding-bottom: .5rem;
}

.timeline-marker {
    position: absolute;
    left: -2.44rem;
    top: .35rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.timeline-date {
    color: var(--accent);
    font-weight: 600;
    letter-spacing: .04em;
    font-size: .85rem;
    margin-bottom: .35rem;
}

.timeline-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: .1rem;
}

.timeline-company {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: .75rem;
}

.timeline-list {
    padding-left: 1.2rem;
    margin-top: 0.75rem;
    color: var(--text-muted);
}

.timeline-list li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.timeline-list strong {
    color: var(--text-main);
}

/* ---------- Proyectos ---------- */
.project-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    padding: 1.5rem 1.25rem 1.25rem;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 0 24px var(--accent-soft);
}

.project-badge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--bg-badge);
    border: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0 auto 1rem;
}

.project-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.project-card .card-title {
    color: var(--text-main);
    font-weight: 700;
    text-align: center;
}

.project-card .card-text {
    color: var(--text-muted);
    text-align: center;
    font-size: .92rem;
}

.tech-row {
    justify-content: center;
    border-top: 1px solid var(--border-soft);
    padding-top: .85rem;
}

.link-row {
    justify-content: center;
}

.tech-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

/* ---------- Contacto ---------- */
.contact-section {
    background: radial-gradient(circle at bottom, #16233f 0%, var(--bg-page) 70%);
}

.contact-pill {
    display: inline-block;
    padding: .6rem 1.5rem;
    border-radius: 999px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-soft);
    color: var(--text-main);
    font-weight: 600;
}

.contact-pill:hover {
    border-color: var(--accent);
}

/* ---------- Footer ---------- */
.site-footer {
    background-color: var(--bg-alt);
    border-top: 1px solid var(--border-soft);
    color: var(--text-muted);
    margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-marker {
        left: -1.94rem;
    }
}