:root {
    --primary: #13eca4;
    --background-light: #f6f8f7;
    --background-dark: #121212;
    --surface-dark: #1e1e1e;
    --text-main-dark: #e0e0e0;
    --text-muted-dark: #a0a0a0;
    --text-primary-light: #111816;
    --text-muted-light: #637588;
    --border-light: #e5e7eb;
    --border-dark: #333;
}

html {
    scroll-behavior: smooth;
}

html body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-dark);
    color: var(--text-main-dark);
    overflow-x: hidden;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

#contact {
    margin-bottom: 10vh;
    /* Esto da un pequeño respiro al final de la web */
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #121212;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Sidebar */
.sidebar {
    width: 288px;
    height: 100vh;
    background-color: var(--surface-dark);
    border-right: 1px solid var(--border-dark);
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-profile {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-dark);
}

.profile-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background-size: cover;
    background-position: center;
    position: relative;
}

.profile-status {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary);
    border: 2px solid var(--surface-dark);
    position: absolute;
    bottom: 0;
    right: 0;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: var(--text-muted-dark);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
}

.nav-link-custom:hover {
    background-color: #2a2a2a;
    color: white;
}

.nav-link-custom.active {
    background-color: rgba(19, 236, 164, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.nav-link-custom .material-symbols-outlined {
    transition: transform 0.2s;
}

.nav-link-custom:hover .material-symbols-outlined {
    transform: scale(1.1);
}

/* Main Content */
.main-content {
    margin-left: 288px;
    min-height: 100vh;
    overflow-y: auto;
}

/* Badge Availability */
.badge-available {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    background-color: rgba(19, 236, 164, 0.1);
    border: 1px solid rgba(19, 236, 164, 0.2);
    width: fit-content;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary);
    position: relative;
}

.pulse-dot::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--primary);
    opacity: 0.75;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.75;
    }

    50% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(to right, var(--primary), #40e0d0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn-primary-custom {
    background-color: var(--primary);
    color: #10221c;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0 15px rgba(19, 236, 164, 0.3);
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary-custom:hover {
    background-color: var(--primary);
    box-shadow: 0 0 25px rgba(19, 236, 164, 0.5);
    transform: translateY(-2px);
}

.btn-secondary-custom {
    background-color: #2a2a2a;
    color: white;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #444;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary-custom:hover {
    background-color: #333;
    color: white;
}

/* Code Terminal */
.code-terminal {
    background-color: #0d1117;
    border: 1px solid #30363d;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
}

.terminal-header {
    background-color: #161b22;
    border-bottom: 1px solid #30363d;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-body {
    padding: 1.25rem;
    color: #d1d5db;
}

/* Stats Cards */
.stat-card {
    background-color: var(--surface-dark);
    border: 1px solid var(--border-dark);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: rgba(19, 236, 164, 0.5);
}

.stat-card:hover .stat-number {
    color: var(--primary);
}

.stat-icon {
    padding: 0.5rem;
    border-radius: 0.5rem;
    display: inline-flex;
}

.stat-number {
    font-size: 1.875rem;
    font-weight: 700;
    color: white;
    transition: color 0.3s;
}

/* Tech Stack Pills */
.tech-pill {
    background-color: var(--surface-dark);
    border: 1px solid var(--border-dark);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s;
    cursor: default;
}

.tech-pill:hover {
    background-color: #2a2a2a;
}

/* Project Cards */
.project-card {
    background-color: var(--surface-dark);
    border: 1px solid var(--border-dark);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    background-color: #252525;
}

.project-img {
    height: 192px;
    overflow: hidden;
    position: relative;
}

.project-img-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s;
}

.project-card:hover .project-img-bg {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

/* Badge de estado del proyecto - Nueva ubicación */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.1rem 0;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* Punto indicador de estado */
.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-finalizado {
    color: var(--primary);
}

.status-finalizado::before {
    background-color: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

.status-desarrollo {
    color: #f59e0b;
}

.status-desarrollo::before {
    background-color: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
}

.status-mantenimiento {
    color: #3b82f6;
}

.status-mantenimiento::before {
    background-color: #3b82f6;
    box-shadow: 0 0 8px #3b82f6;
}

.overlay-btn {
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.overlay-btn:hover {
    background-color: var(--primary);
}

.project-title {
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
    transition: color 0.3s;
}

.project-card:hover .project-title {
    color: var(--primary);
}

.tech-tag {
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #d1d5db;
}

/* Section Title */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.title-bar {
    width: 4px;
    height: 24px;
    background-color: var(--primary);
    border-radius: 50px;
}

/* Footer CTA */
.cta-section {
    text-align: center;
    padding: 2.5rem 0;
    border-top: 1px solid var(--border-dark);
}

.btn-outline-custom {
    padding: 0.75rem 2rem;
    border: 2px solid var(--primary);
    color: var(--primary);
    background-color: transparent;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.3s;
}

.btn-outline-custom:hover {
    background-color: var(--primary);
    color: #10221c;
}

/* Mobile */
@media (max-width: 767.98px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-header {
        display: flex !important;
    }

    .code-terminal {
        display: block !important;
        margin-top: 2rem;
        font-size: 0.7rem;
        overflow-x: auto;
    }

    .terminal-body {
        padding: 1rem;
        white-space: nowrap;
    }

    .code-terminal {
        position: relative;
    }

    .code-terminal::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 20px;
        background: linear-gradient(to right, transparent, rgba(13, 17, 23, 0.8));
        pointer-events: none;
    }
}

@media (min-width: 768px) {
    .mobile-header {
        display: none !important;
    }
}

.mobile-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--surface-dark);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.line-clamp-3 {
    display: -webkit-box;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Ajustes para el menú móvil */
@media (max-width: 767.98px) {
    .sidebar {
        display: flex !important;
        /* Forzamos el flex */
        transform: translateX(-100%);
        /* La escondemos a la izquierda */
        transition: transform 0.3s ease-in-out;
        width: 80%;
        /* Que no tape toda la pantalla */
        box-shadow: 10px 0 15px rgba(0, 0, 0, 0.5);
    }

    .sidebar.active {
        transform: translateX(0);
        /* La mostramos */
    }

    /* Fondo oscuro cuando el menú está abierto */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .sidebar-overlay.active {
        display: block;
    }
}