body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: #070b17;
    color: #edf3ff;
}

* {
    box-sizing: border-box;
}

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

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

.container {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: rgba(12, 16, 28, 0.7);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 76px;
}

.logo {
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #e7ecff;
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin: 0;
    padding: 0;
}

.nav-link,
.mobile-link,
.social-link,
.link-icon,
.action-link,
.sidebar-link {
    color: #d8def5;
    transition: color 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.social-link:hover,
.link-icon:hover,
.action-link:hover,
.sidebar-link:hover {
    color: #8bd0ff;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.language-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    padding: 0.2rem;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 30px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #c7d0eb;
}

.lang-btn.active {
    background: linear-gradient(135deg, #80d0ff, #7a7dff);
    color: #08111d;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 0.6rem;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #edf3ff;
    margin: 5px 0;
}

.mobile-menu {
    display: none;
    background: rgba(14, 19, 31, 0.98);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 1rem;
}

.mobile-menu li + li {
    margin-top: 0.75rem;
}

.hero {
    padding: 5rem 0 3rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    align-items: center;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.05;
    margin: 0 0 1rem;
}

.gradient-text {
    background: linear-gradient(135deg, #9ae6ff, #7cd9ff 35%, #9b8bff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    color: #cbd7f7;
}

.hero-description {
    max-width: 620px;
    color: rgba(237,243,255,0.8);
    font-size: 1.04rem;
    line-height: 1.8;
}

.hero-cta,
.projects-cta,
.skills-cta,
.error-actions,
.hero-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.hero-cta {
    margin-top: 2rem;
}

.hero-socials {
    margin-top: 1.4rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.5rem;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    font-weight: 700;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #8fd8ff, #8c8dff);
    color: #07111c;
    box-shadow: 0 10px 30px rgba(120, 180, 255, 0.35);
}

.btn-secondary,
.btn-outline {
    background: rgba(255,255,255,0.02);
    color: #edf3ff;
}

.code-block {
    background: rgba(11, 15, 28, 0.9);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.02);
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.code-dot:nth-child(1) { background: #ff5f57; }
.code-dot:nth-child(2) { background: #febc2e; }
.code-dot:nth-child(3) { background: #28c840; }

.code-content {
    margin: 0;
    padding: 1.5rem 1.2rem;
    color: #dfeafc;
    font-size: 0.85rem;
    line-height: 1.7;
    overflow: auto;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin: 0 0 0.5rem;
}

.section-subtitle,
.lead {
    color: rgba(237,243,255,0.7);
    margin: 0 0 2rem;
}

.featured-projects,
.quick-skills,
.projects-section,
.skills-content,
.about-content,
.contact-content,
.error-page,
.related-projects,
.project-detail-content,
.specialties-section,
.cta-section,
.collaboration-section {
    padding: 4rem 0;
}

.projects-grid,
.skills-grid,
.tech-grid,
.stack-grid,
.specialties-grid,
.collaboration-features,
.question-grid,
.faq-grid,
.methodology-steps {
    display: grid;
    gap: 1.25rem;
}

.projects-grid,
.skills-grid,
.collaboration-features,
.faq-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.project-card,
.skill-card,
.specialty-card,
.feature-card,
.faq-item,
.philosophy-card,
.sidebar-card,
.contact-info-card,
form {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 1.25rem;
    box-shadow: 0 12px 35px rgba(0,0,0,0.12);
}

.project-header,
.project-footer,
.project-meta,
.footer-content,
.footer-bottom,
.contact-grid,
.about-grid,
.detail-grid,
.skill-section,
.project-detail-header,
.stack-category,
.section-header {
    display: flex;
}

.project-header,
.project-footer,
.project-meta,
.footer-content,
.contact-grid,
.about-grid,
.detail-grid,
.project-detail-header {
    justify-content: space-between;
}

.project-header,
.project-footer,
.project-meta,
.footer-bottom,
.contact-grid,
.about-grid,
.detail-grid,
.project-detail-header {
    align-items: center;
}

.project-status,
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.09);
}

.project-status.en-desarrollo,
.status-badge.en-desarrollo {
    background: rgba(255, 191, 87, 0.12);
    color: #ffca72;
}

.project-status.completado,
.status-badge.completado {
    background: rgba(80, 210, 130, 0.12);
    color: #8df0b2;
}

.project-title {
    margin: 1rem 0 0.7rem;
    font-size: 1.45rem;
}

.project-description,
.project-full-description,
.bio-text,
.contact-info-card p,
.faq-item p,
.feature-card p,
.speciality-item p,
.skill-card p,
.philosophy-card p {
    color: rgba(237,243,255,0.75);
    line-height: 1.75;
}

.project-tech,
.skills-list,
.tech-list,
.tech-list-compact,
.stack-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.tech-tag,
.skill-item,
.tech-badge,
.stack-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.8rem;
    border-radius: 10px;
    font-size: 0.78rem;
    background: rgba(141, 179, 255, 0.08);
    border: 1px solid rgba(141,179,255,0.15);
    color: #dfeafc;
}

.projects-cta,
.skills-cta,
.collaboration-cta {
    margin-top: 2rem;
    justify-content: center;
}

.skills-overview,
.stack-grid,
.specialties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.skill-category,
.stack-category {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 1.2rem;
}

.cta-content {
    text-align: center;
    padding: 2rem 1rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
}

.contact-form,
.contact-info-section {
    width: 100%;
}

.contact-grid,
.about-grid,
.detail-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2rem;
    align-items: start;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.form-group label {
    color: #e2ebff;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    color: white;
    padding: 0.9rem 1rem;
    font: inherit;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(237,243,255,0.45);
}

.form-message {
    margin-top: 1rem;
    font-weight: 600;
}

.form-message.success {
    color: #8df0b2;
}

.form-message.error {
    color: #ff8d8d;
}

.error-code {
    font-size: clamp(4rem, 12vw, 9rem);
    font-weight: 800;
    color: #8fd8ff;
    line-height: 1;
}

.error-content {
    text-align: center;
    padding: 3rem 1rem;
}

@media (max-width: 820px) {
    .nav-menu {
        display: none;
    }

    .nav-toggle {
        display: inline-block;
    }

    .hero-content,
    .contact-grid,
    .about-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 520px) {
    .hero {
        padding-top: 3.5rem;
    }

    .btn {
        width: 100%;
    }

    .hero-cta,
    .hero-socials,
    .projects-cta,
    .skills-cta,
    .error-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
