/* ============================================
   PORTFOLIO CV - GAEL ADRIÁN DE SANTIAGO URIBE
   Dark Theme Professional Portfolio
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- CSS Variables / Theme --- */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #222240;
    --text-primary: #e8e8f0;
    --text-secondary: #9898b0;
    --text-muted: #6a6a80;
    --accent-primary: #6c63ff;
    --accent-secondary: #00d4aa;
    --accent-gradient: linear-gradient(135deg, #6c63ff, #00d4aa);
    --border-color: #2a2a40;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 30px rgba(108, 99, 255, 0.15);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

@media (min-width: 768px) {
    html { font-size: 16px; }
}

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

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-secondary);
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(108, 99, 255, 0.3); }
    50% { box-shadow: 0 0 40px rgba(108, 99, 255, 0.6); }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Navigation / Header --- */
.navbar-custom {
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 0.8rem 0;
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    animation: fadeIn 0.8s ease;
}

.navbar-custom .navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text-primary) !important;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-custom .navbar-brand:hover {
    opacity: 0.85;
}

.navbar-custom .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    transition: color var(--transition);
    position: relative;
    padding: 0.5rem 1rem;
}

.navbar-custom .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform var(--transition);
}

.navbar-custom .nav-link:hover {
    color: var(--text-primary) !important;
}

.navbar-custom .nav-link:hover::after {
    transform: scaleX(1);
}

.navbar-toggler {
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* --- Main Content --- */
main {
    animation: fadeIn 0.6s ease;
    padding-top: 70px; /* account for fixed navbar */
}

.container-cv {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

/* --- Hero / Header Section --- */
.hero-section {
    text-align: center;
    padding: 5rem 0 3rem;
    animation: fadeInUp 1s ease;
}

.hero-section .hero-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    margin: 0 auto 1.5rem;
    animation: pulseGlow 3s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(108, 99, 255, 0.3);
}

.hero-section h1 {
    font-size: 2.8rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.8rem;
    }
}

.hero-section .hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.hero-section .contact-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem 2rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.hero-section .contact-row span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.hero-section .contact-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.hero-section .contact-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.hero-section .contact-links a:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* --- Section Container --- */
.section-cv {
    margin-bottom: 3.5rem;
    animation: fadeInUp 1s ease;
    animation-fill-mode: both;
}

.section-cv:nth-child(2) { animation-delay: 0.1s; }
.section-cv:nth-child(3) { animation-delay: 0.2s; }
.section-cv:nth-child(4) { animation-delay: 0.3s; }
.section-cv:nth-child(5) { animation-delay: 0.4s; }

.section-cv .section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.section-cv .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.section-cv .section-title .title-icon {
    font-size: 1.3rem;
}

/* --- Profile Section --- */
.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    transition: all var(--transition);
}

.profile-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.profile-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}

/* --- Skills / Tech Stack --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all var(--transition);
    animation: scaleIn 0.5s ease;
    animation-fill-mode: both;
}

.skill-card:nth-child(1) { animation-delay: 0.05s; }
.skill-card:nth-child(2) { animation-delay: 0.1s; }
.skill-card:nth-child(3) { animation-delay: 0.15s; }
.skill-card:nth-child(4) { animation-delay: 0.2s; }

.skill-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.skill-card .skill-icon {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    display: block;
}

.skill-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.skill-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.skill-card .skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.8rem;
}

.skill-card .skill-tag {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 20px;
    background: rgba(108, 99, 255, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(108, 99, 255, 0.2);
    transition: all var(--transition);
}

.skill-card .skill-tag:hover {
    background: rgba(108, 99, 255, 0.2);
}

.skill-card:nth-child(2) .skill-tag {
    background: rgba(0, 212, 170, 0.1);
    color: var(--accent-secondary);
    border-color: rgba(0, 212, 170, 0.2);
}

.skill-card:nth-child(2) .skill-tag:hover {
    background: rgba(0, 212, 170, 0.2);
}

.skill-card:nth-child(3) .skill-tag {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border-color: rgba(255, 193, 7, 0.2);
}

.skill-card:nth-child(3) .skill-tag:hover {
    background: rgba(255, 193, 7, 0.2);
}

/* --- Projects / Experience Section --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.8rem;
    transition: all var(--transition);
    animation: fadeInUp 0.6s ease;
    animation-fill-mode: both;
}

.project-card:nth-child(2) { animation-delay: 0.1s; }
.project-card:nth-child(3) { animation-delay: 0.2s; }

.project-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.project-card .project-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.project-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.project-card .project-tech {
    color: var(--accent-primary);
    font-size: 0.83rem;
    font-weight: 500;
    margin-bottom: 0.8rem;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.project-card .project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.8rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent-primary);
    transition: gap var(--transition);
}

.project-card .project-link:hover {
    gap: 0.7rem;
}

/* --- Education --- */
.education-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.8rem;
    transition: all var(--transition);
}

.education-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.education-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.education-card .edu-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

.education-card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
}

/* --- Footer --- */
.footer-custom {
    background: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-color) !important;
    color: var(--text-muted) !important;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.85rem;
    margin-top: 4rem;
}

.footer-custom a {
    color: var(--accent-primary);
}

.footer-custom a:hover {
    color: var(--accent-secondary);
}

/* --- Utility / Back to Top --- */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    border: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition);
    z-index: 999;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.4);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(108, 99, 255, 0.6);
}

/* --- Divider --- */
.divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 2rem 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0 2rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section .contact-row {
        flex-direction: column;
        align-items: center;
        gap: 0.4rem;
    }

    .hero-section .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .section-cv .section-title {
        font-size: 1.3rem;
    }

    .profile-card {
        padding: 1.3rem;
    }

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

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.6rem;
    }

    .hero-section .hero-avatar {
        width: 100px;
        height: 100px;
        font-size: 2.2rem;
    }

    .profile-card p {
        font-size: 0.95rem;
    }
}

/* ============================================
   BOTÓN DE DESCARGA CV (Hero Action Button)
   ============================================ */
.btn-download {
    display: inline-flex !important;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 2rem !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    background: linear-gradient(135deg, #6c63ff, #5a52e0);
    border: none !important;
    border-radius: 50px !important;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 20px rgba(108, 99, 255, 0.4);
    text-decoration: none !important;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn-download::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.6s ease;
}

.btn-download:hover {
    transform: translateY(-3px) scale(1.03) !important;
    color: #fff !important;
    border-color: transparent !important;
    background: linear-gradient(135deg, #7c75ff, #6c63ff);
    box-shadow: 0 0 30px rgba(108, 99, 255, 0.6),
                0 0 60px rgba(108, 99, 255, 0.3);
}

.btn-download:hover::before {
    left: 100%;
}

.btn-download:active {
    transform: translateY(-1px) scale(0.98) !important;
}

.btn-download i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

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

/* ============================================
   FONDO DINÁMICO DE PARTÍCULAS (Viernes)
   ============================================ */

/* Canvas que contiene las partículas */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* --- Selection --- */
::selection {
    background: rgba(108, 99, 255, 0.4);
    color: #fff;
}
