@import url('variables.css');

/* Base styles */

html {
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--color-fondo-seccion);
}

a {
    text-decoration: none;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-enlaces-base);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Header */

.dev-portfolio-header {
    background-color: var(--color-fondo-oscuro);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 40px;
    box-sizing: border-box;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links .nav-item {
    color: var(--color-enlaces-base);
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links .nav-item:hover {
    color: var(--color-enlaces-hover);
}

/* Language switcher */

.lang-form {
    display: flex;
    gap: 8px;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--color-enlaces-base);
    color: var(--color-enlaces-base);
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.lang-btn:hover,
.lang-btn.active {
    border-color: var(--color-enlaces-hover);
    color: var(--color-enlaces-hover);
}

/* Footer */

.portfolio-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 40px 6%;
    background-color: var(--color-fondo-oscuro);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-contact h3 {
    color: var(--color-texto-blanco);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.email-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 6px;
    margin-top: 8px;
    border: 1px solid var(--color-enlaces-base);
}

.footer-email {
    color: var(--color-enlaces-base);
    font-size: 0.95rem;
    font-weight: 500;
}

.footer-socials {
    display: flex;
    gap: 20px;
}

.footer-socials .social-link {
    color: var(--color-enlaces-base);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.footer-socials .social-link:hover {
    color: var(--color-enlaces-hover);
    transform: translateY(-2px);
}

.footer-copy p {
    color: #555555;
}

.email-action-btn {
    background: transparent;
    border: none;
    color: var(--color-enlaces-base);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, color 0.2s ease;
}

.email-action-btn:hover {
    transform: scale(1.15);
    color: var(--color-enlaces-hover);
}

.copy-toast {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--color-enlaces-base);
    margin-top: 5px;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.copy-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .portfolio-footer {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-socials {
        justify-content: center;
    }
}

/* Print */

@media print {
    .dev-portfolio-header,
    .lang-form,
    .email-action-btn,
    .copy-toast {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    a {
        color: black;
        text-decoration: underline;
    }
}
