* {
    overscroll-behavior: none;
}

html {
    overscroll-behavior: none;
    overscroll-behavior-y: none;
}

body {
    background: linear-gradient(135deg, #0e0e0e 60%, #383b3c 100%) fixed;
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    overscroll-behavior: none;
    overscroll-behavior-y: none;
    margin: 0;
    padding: 0;
}

.container {
    text-align: center;
    padding: 2rem;
    margin: 2rem;
    border-radius: 16px;
    background: rgba(30, 30, 30, 0.85);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    max-width: 90vw;
    width: 65%;
    box-sizing: border-box;
}

.container-top {
    margin-top: 6rem;
}

.help-container {
    margin-bottom: 4.5rem;
}

.second-help-container {
    margin-bottom: 0.5rem;
}

/* Barra de Navegacion */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #181818;
    border-bottom: 1px solid rgba(108, 255, 255, 0.08);
    z-index: 1000;
    padding: 0;
    height: 4.5rem;
    display: flex;
    align-items: center;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #6cf;
    text-decoration: none;
    z-index: 1001;
}

.nav-logo img {
    width: 32px;
    height: 32px;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-item {
    position: relative;
    width: auto;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0;
    transition: color 0.2s;
    position: relative;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    display: block;
    margin: 0 auto;
    width: 0;
    height: 2px;
    background: #6cf;
    border-radius: 1px;
    transition: width 0.3s;
}

.nav-link:hover {
    color: #6cf;
}

.nav-link:hover::after {
    width: 60%;
}

.nav-link.active {
    color: #6cf;
    font-weight: 600;
}

.nav-link.active::after {
    width: 60%;
    height: 2px;
}

/* Botón hamburguesa mejorado */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s;
    z-index: 1001;
    border: none;
    background: transparent;
}

.nav-toggle:hover {
    background-color: rgba(108, 255, 255, 0.1);
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #6cf;
    transition: all 0.3s ease;
    border-radius: 2px;
    transform-origin: center;
    display: block;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Overlay para cerrar el menú */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

/* Header mejorado */
.header {
    margin-bottom: 3rem;
}

.logo {
    font-size: 5rem;
    font-weight: 700;
    letter-spacing: -1px;
    text-shadow: 0 2px 10px rgba(150, 150, 150, 0.2);
    animation: fadeIn 2s ease-in-out;
    cursor: pointer;
    margin-bottom: 0.5rem;
    transition: transform 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bio {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #ccc;
    line-height: 1.6;
}

.social-link {
    display: inline-flex;
    align-items: center;
    color: #6cf;
    text-decoration: none;
    margin: 0 0.5em;
    transition: color 0.2s;
}

.social-link:hover {
    color: #fff;
}

.social-link .material-icons {
    font-size: 1.2em;
    margin-right: 0.4em;
    vertical-align: middle;
}

/* Sección de proyecto destacado */
.featured-project {
    background: rgba(25, 25, 25, 0.9);
    border-radius: 16px;
    padding: 3rem 2rem;
    margin: 2rem 0;
    border: 1px solid rgba(108, 255, 255, 0.1);
}

/* Hero del proyecto */
.project-hero {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 3rem;
}

.project-hero-content {
    flex: 1;
    text-align: left;
}

.project-hero-visual {
    flex: 0 0 auto;
}

.project-badge {
    background: linear-gradient(135deg, #6cf, #4a9eff);
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #6cf;
    margin: 0 0 0.5rem 0;
    text-shadow: 0 2px 10px rgba(108, 255, 255, 0.3);
}

.project-hero-subtitle {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.project-hero-description {
    font-size: 1.1rem;
    color: #ccc;
    line-height: 1.7;
    max-width: 600px;
}

.hero-icon {
    width: 180px;
    height: 180px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(108, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.hero-icon:hover {
    transform: scale(1.05) rotate(5deg);
}

/* Grid de características */
.project-features {
    margin-bottom: 3rem;
}

.project-features h3 {
    font-size: 2rem;
    color: #6cf;
    margin-bottom: 2rem;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.features-grid a {
    font-style: normal;
    text-decoration: none;
    color: #fff !important;
}

.features-grid a:hover,
.features-grid a:active {
    color: #fff !important;
}

.feature-card {
    background: rgba(30, 30, 30, 0.8);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(108, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 32px rgba(108, 255, 255, 0.15);
    border-color: rgba(108, 255, 255, 0.3);
}

.feature-icon {
    font-size: 4rem !important;
    margin-bottom: 1rem;
    display: block;
}

.feature-card h4 {
    font-size: 1.3rem;
    color: #6cf;
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-card p {
    color: #bbb;
    line-height: 1.6;
    font-size: 1rem;
}

/* Stack tecnológico */
.project-tech {
    margin-bottom: 3rem;
    text-align: center;
}

.project-tech h3 {
    font-size: 2rem;
    color: #6cf;
    margin-bottom: 2rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.tech-item {
    background: linear-gradient(135deg, #333, #444);
    color: #6cf;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(108, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.tech-item:hover {
    background: linear-gradient(135deg, #6cf, #4a9eff);
    color: #000;
    transform: scale(1.05);
}

/* Call to action */
.project-cta {
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.cta-primary {
    background: linear-gradient(135deg, #6cf, #4a9eff);
    color: #000;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 255, 255, 0.4);
    text-decoration: none;
    color: #000;
}

.cta-secondary {
    background: transparent;
    color: #6cf;
    padding: 1rem 2rem;
    border: 2px solid #6cf;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.cta-secondary:hover {
    background: #6cf;
    color: #000;
    transform: translateY(-2px);
    text-decoration: none;
}

/* Proyectos */
.projects {
    margin-top: 2rem;
}

.projects h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #6cf;
}

#project-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.project-card {
    background: #181818;
    border-radius: 10px;
    padding: 1.5rem;
    min-width: 220px;
    max-width: 320px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.project-card:hover {
    transform: translateY(-6px) scale(1.04);
    box-shadow: 0 4px 16px rgba(108, 255, 255, 0.08);
    text-decoration: none;
    color: inherit;
}

.project-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    flex-shrink: 0;
}

.project-info {
    flex: 1;
}

.project-title {
    color: #6cf;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.project-desc {
    color: #bbb;
    font-size: 1rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.project-tech-mini {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.project-tech-mini span {
    background: rgba(108, 255, 255, 0.1);
    color: #6cf;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Sección Sobre Mi */
.about {
    margin-top: 3rem;
    padding: 2rem 0;
    text-align: center;
}

.about h2 {
    font-size: 2rem;
    color: #6cf;
    margin-bottom: 2rem;
}

.about-text {
    font-size: 1.1rem;
    color: #ccc;
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto;
}

/* Toast personalizado */
.custom-toast {
    display: none;
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: #232526;
    color: #6cf;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    font-size: 1.1rem;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
}

.custom-toast.show {
    display: block;
    opacity: 1;
    bottom: 3.5rem;
}

/* Footer mejorado */
.footer {
    background: rgba(15, 15, 15, 0.9);
    margin-top: 4rem;
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(108, 255, 255, 0.1);
    width: 100%;
}

.footer-content p {
    margin: 0.5rem 0;
    color: #666;
}

.footer-content p:first-child {
    font-weight: 600;
    color: #999;
}

/* Responsive Design */
@media (max-width: 1000px) {
    .logo {
        font-size: 3.5rem;
    }

    .container {
        padding: 1.5rem;
        margin: 1rem;
        width: 80%;
    }

    .nav-menu {
        gap: 1.5rem;
    }

    .nav-container {
        padding: 0 1.5rem;
    }

    .logo img {
        width: 8% !important;
        height: 8% !important;
    }

    .bio {
        font-size: 1.1rem;
        line-height: 1.5;
    }

    .projects h2 {
        font-size: 1.8rem;
    }

    #project-list {
        gap: 1rem;
    }

    .project-card {
        min-width: 280px;
        max-width: 100%;
        padding: 1.2rem;
        flex-direction: column;
        text-align: center;
    }

    .project-icon {
        width: 40px;
        height: 40px;
        align-self: center;
    }

    /* Proyecto destacado responsive */
    .featured-project {
        padding: 2rem 1.5rem;
        margin: 1.5rem 0;
    }

    .project-hero {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .project-hero-content {
        text-align: center;
    }

    .project-hero-title {
        font-size: 2.5rem;
    }

    .project-hero-subtitle {
        font-size: 1.2rem;
    }

    .project-hero-description {
        font-size: 1rem;
    }

    .hero-icon {
        width: 150px;
        height: 150px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .project-cta {
        flex-direction: column;
        align-items: center;
    }

    .cta-primary,
    .cta-secondary {
        width: 60%;
        max-width: 200px;
    }

    .tech-stack {
        gap: 0.8rem;
    }

    .tech-item {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .logo {
        font-size: 3.5rem;
    }

    .container {
        padding: 1.5rem;
        margin: 1rem;
        width: 80%;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(18, 18, 18, 0.98);
        backdrop-filter: blur(15px);
        border-left: 1px solid rgba(108, 255, 255, 0.2);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 0;
        padding: 6rem 0 2rem 0;
        transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 1000;
        overflow-y: auto;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
    }

    .nav-menu.active {
        display: flex;
        right: 0;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(108, 255, 255, 0.1);
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-link {
        display: block;
        padding: 1.2rem 2rem;
        width: 100%;
        font-size: 1.1rem;
        border-left: 3px solid transparent;
        transition: all 0.3s ease;
        box-sizing: border-box;
    }

    .nav-link:hover,
    .nav-link.active {
        background: rgba(108, 255, 255, 0.1);
        border-left-color: #6cf;
        color: #6cf;
        transform: translateX(5px);
    }

    .nav-link::after {
        display: none;
    }

    /* Indicador visual para el enlace activo */
    .nav-link.active::before {
        content: '●';
        margin-right: 0.5rem;
        color: #6cf;
    }

    .logo img {
        width: 8% !important;
        height: 8% !important;
    }

    .bio {
        font-size: 1.1rem;
        line-height: 1.5;
    }

    .projects h2 {
        font-size: 1.8rem;
    }

    #project-list {
        gap: 1rem;
    }

    .project-card {
        min-width: 280px;
        max-width: 100%;
        padding: 1.2rem;
        flex-direction: column;
        text-align: center;
    }

    .project-icon {
        width: 40px;
        height: 40px;
        align-self: center;
    }

    /* Proyecto destacado responsive */
    .featured-project {
        padding: 2rem 1.5rem;
        margin: 1.5rem 0;
    }

    .project-hero {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .project-hero-content {
        text-align: center;
    }

    .project-hero-title {
        font-size: 2.5rem;
    }

    .project-hero-subtitle {
        font-size: 1.2rem;
    }

    .project-hero-description {
        font-size: 1rem;
    }

    .hero-icon {
        width: 150px;
        height: 150px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .project-cta {
        flex-direction: column;
        align-items: center;
    }

    .cta-primary,
    .cta-secondary {
        width: 60%;
        max-width: 200px;
    }

    .tech-stack {
        gap: 0.8rem;
    }

    .tech-item {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .nav-logo {
        font-size: 1.3rem;
        gap: 0.3rem;
    }

    .nav-logo img {
        width: 28px;
        height: 28px;
    }

    .nav-menu {
        width: 260px;
        padding: 5rem 0 2rem 0;
    }

    .nav-link {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .logo {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .logo img {
        width: 6% !important;
        height: 6% !important;
        margin-right: 6px !important;
    }

    .container {
        padding: 1rem;
        margin: 0.5rem;
        border-radius: 12px;
        width: 90%;
    }

    .bio {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        line-height: 1.6;
    }

    .projects {
        margin-top: 1.5rem;
    }

    .projects h2 {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }

    #project-list {
        gap: 0.8rem;
        flex-direction: column;
        align-items: center;
    }

    .project-card {
        min-width: 90%;
        max-width: 100%;
        padding: 1rem 1.2rem;
    }

    .project-icon {
        width: 36px;
        height: 36px;
        margin-bottom: 0.8rem;
    }

    .project-title {
        font-size: 1.1rem;
        margin-bottom: 0.4rem;
    }

    .project-desc {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .footer {
        margin-top: 1.5rem;
        padding: 1.5rem 1rem;
    }

    .footer-content p {
        font-size: 0.8rem;
    }

    .custom-toast {
        bottom: 1rem;
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        max-width: 90%;
        text-align: center;
    }

    .custom-toast.show {
        bottom: 2rem;
    }

    /* Proyecto destacado móvil */
    .featured-project {
        padding: 1.5rem 1rem;
    }

    .project-hero-title {
        font-size: 2rem;
    }

    .project-hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-icon {
        width: 150px;
        height: 150px;
    }

    .project-features h3,
    .project-tech h3,
    .about h2 {
        font-size: 1.6rem;
    }

    .feature-card {
        padding: 1.2rem;
    }

    .feature-icon {
        font-size: 2.5rem
    }

    .feature-card h4 {
        font-size: 1.1rem;
    }

    .cta-primary,
    .cta-secondary {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .about-text {
        font-size: 1rem;
    }
}

@media (max-width: 360px) {
    body {
        padding: 0.3rem;
    }

    .nav-container {
        padding: 0 0.7rem;
    }

    .nav-logo {
        font-size: 1.1rem;
        gap: 0.2rem;
    }

    .nav-logo img {
        width: 24px;
        height: 24px;
    }

    .nav-link {
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
    }

    .logo {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }

    .logo img {
        width: 5% !important;
        height: 5% !important;
        margin-right: 4px !important;
    }

    .container {
        padding: 0.8rem;
        margin: 0.3rem;
        border-radius: 10px;
        width: 94%;
    }

    .bio {
        font-size: 0.9rem;
        margin-bottom: 1rem;
        line-height: 1.5;
    }

    .projects {
        margin-top: 1rem;
    }

    .projects h2 {
        font-size: 1.4rem;
        margin-bottom: 0.8rem;
    }

    #project-list {
        gap: 0.6rem;
    }

    .project-card {
        min-width: 94%;
        max-width: 100%;
        padding: 0.8rem 1rem;
    }

    .project-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 0.6rem;
    }

    .project-title {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }

    .project-desc {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .footer {
        margin-top: 1rem;
        padding: 1rem 0.8rem;
    }

    .footer-content p {
        font-size: 0.7rem;
    }

    .custom-toast {
        bottom: 0.8rem;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .custom-toast.show {
        bottom: 1.5rem;
    }

    /* Proyecto destacado móvil */
    .featured-project {
        padding: 1rem 0.8rem;
    }

    .project-hero-title {
        font-size: 1.8rem;
    }

    .project-hero-subtitle {
        font-size: 1rem;
    }

    .hero-icon {
        width: 120px;
        height: 120px;
    }

    .project-features h3,
    .project-tech h3,
    .about h2 {
        font-size: 1.4rem;
    }

    .feature-card {
        padding: 1rem;
    }

    .feature-icon {
        font-size: 2rem;
    }

    .feature-card h4 {
        font-size: 1rem;
    }

    .cta-primary,
    .cta-secondary {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .about-text {
        font-size: 0.9rem;
    }
}

/* Animaciones adicionales para mejor UX */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Mejoras para accesibilidad */
.nav-toggle:focus {
    outline: 2px solid #6cf;
    outline-offset: 2px;
}

.nav-link:focus {
    outline: 2px solid #6cf;
    outline-offset: 2px;
    background: rgba(108, 255, 255, 0.1);
}

/* Prevenir scroll del body cuando el menú está abierto */
body.nav-open {
    overflow: hidden;
}

/* Estilos para cuando el menú está cerrándose */
.nav-menu.closing {
    right: -100%;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}