/* Reset y estilos base */
* {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  user-select: none !important;
  touch-action: manipulation !important;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a, img, svg, video, input, textarea {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  outline: none !important;
  background: none !important;
  transition: none !important;
}


/* ===== VARIABLES GLOBALES ===== */
:root {
    /* Colores modo claro */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: rgba(255, 255, 255, 0.95);
    --text-primary: #000000;
    --text-secondary: #4a4a4a;
    --text-muted: #808080;
    --accent: #000000;
    --accent-hover: #000000;
    --border: rgba(0, 0, 0, 0.1);
    --shadow: rgba(0, 0, 0, 0.1);
    --glass: rgba(255, 255, 255, 0.25);
    --particle: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    /* Colores modo oscuro */
    --bg-primary: #000000;
    --bg-secondary: #1a1a1a;
    --bg-card: rgba(26, 26, 26, 0.95);
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #808080;
    --accent: #ffffff;
    --accent-hover: #ffffff;
    --border: rgba(255, 255, 255, 0.1);
    --shadow: rgba(0, 0, 0, 0.5);
    --glass: rgba(26, 26, 26, 0.25);
    --particle: rgba(0, 0, 0, 0.1);
}

/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: all 0.3s ease;
}

/* ===== FONDO ANIMADO ===== */
.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: var(--bg-primary);
}

.particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.main-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    perspective: 1000px;
}

/* ===== TARJETA PREMIUM ===== */
.premium-card {
    width: 100%;
    max-width: 480px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: 
        0 25px 50px -12px var(--shadow),
        0 0 0 1px var(--glass);
    padding: 3rem;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--accent), 
        transparent
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===== EFECTO DE BRILLO ===== */
.shine-effect {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(0, 0, 0, 0.05) 0%,
        transparent 70%
    );
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== HEADER DE TARJETA ===== */
.card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2.5rem;
    position: relative;
}

/* Avatar con efectos */
.avatar-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.avatar-ring {
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    background: var(--accent);
    padding: 3px;
    animation: pulse 2s ease-in-out infinite;
}

.avatar-ring::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--bg-card);
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.avatar-container:hover .avatar {
    transform: scale(1.05);
}

.avatar-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        var(--accent) 0%,
        transparent 70%
    );
    opacity: 0;
    animation: avatarPulse 2s ease-in-out infinite;
}

@keyframes avatarPulse {
    0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.2; transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Títulos */
.title-section {
    text-align: center;
}

.main-title {
    
    justify-content: left;

    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.subtitle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.subtitle-text {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.subtitle-line {
    width: 40px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

/* ===== DESCRIPCIÓN ===== */
.description-section {
    margin-bottom: 2.5rem;
}

.description-text {
    text-align: center;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    font-weight: 300;
}

/* ===== BOTONES PREMIUM ===== */
.buttons-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.premium-btn {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.premium-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        var(--accent) 0%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.premium-btn:hover::before {
    opacity: 0.05;
}

.premium-btn:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 10px 25px -5px var(--shadow);
}

.btn-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.btn-icon:not(.instagram):not(.whatsapp) {
    background: var(--accent);
}

.btn-icon.instagram {
    background: var(--accent);
}

.btn-icon.whatsapp {
    background: var(--accent);
}

.icon-svg {
    width: 24px;
    height: 24px;
    color: var(--bg-primary);
}

.btn-content {
    flex: 1;
}

.btn-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
     margin-left: 0rem;
}

.btn-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.btn-arrow {
    margin-left: 1rem;
    transition: transform 0.3s ease;
}

.premium-btn:hover .btn-arrow {
    transform: translateX(4px);
}

.arrow-svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

/* ===== FOOTER ===== */
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.footer-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.copyright {
    font-weight: 500;
}

.separator {
    color: var(--border);
}

.made-with {
    font-weight: 300;
}

/* Toggle de tema */
.theme-toggle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    border-color: var(--accent);
    transform: scale(1.05);
}

.toggle-icon {
    position: absolute;
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.toggle-icon.sun {
    opacity: 1;
    transform: rotate(0deg);
}

.toggle-icon.moon {
    opacity: 0;
    transform: rotate(180deg);
}

[data-theme="dark"] .toggle-icon.sun {
    opacity: 0;
    transform: rotate(-180deg);
}

[data-theme="dark"] .toggle-icon.moon {
    opacity: 1;
    transform: rotate(0deg);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
}

.modal-content {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--border);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-secondary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--accent);
    color: var(--bg-primary);
}

.modal-close svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}
/* ===== PROYECTOS GRID ===== */
.projects-grid {
    display: grid;
    gap: 1.5rem;
}

.project-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 10px 25px -5px var(--shadow);
}

.project-header {
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

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

.project-tag {
    background: var(--accent);
    color: var(--bg-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-content {
    margin-bottom: 1rem;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.project-link:hover {
    gap: 0.75rem;
}

.project-link .link-arrow {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.project-link:hover .link-arrow {
    transform: translateX(2px);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

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

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -2.5rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg-card);
}

.timeline-content {
    background: var(--bg-secondary);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.timeline-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.timeline-institution {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.timeline-date {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .main-container {
        padding: 1rem;
         display: flex;
    align-items: center;
    justify-content: center;
    }
    
    .premium-card {
        padding: 2rem;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .btn-icon {
        width: 40px;
        height: 40px;
    }
    
    .icon-svg {
        width: 20px;
        height: 20px;
    }
    
    .btn-title {
        font-size: 1rem;
    }
    
    .btn-subtitle {
        font-size: 0.8rem;
    }
    
    .footer-text {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }
    
    .separator {
        display: none;
    }
}

@media (max-width: 480px) {
    .premium-card {
        padding: 1.5rem;
    }
    
    .main-title {
        font-size: 1.75rem;
    }
    
    .avatar {
        width: 100px;
        height: 100px;
    }
    
    .avatar-ring {
        top: -6px;
        left: -6px;
        right: -6px;
        bottom: -6px;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

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