/* ============================================
   JOHSAC GOMEZ CV — Light Premium Theme
   ============================================ */

/* --- CSS Variables --- */
:root {
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255,255,255,0.85);
    --text-primary: #1a1a2e;
    --text-secondary: #555770;
    --accent-blue: #2563eb;
    --accent-purple: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #7c3aed, #2563eb, #00b4d8);
    --glass-border: rgba(0,0,0,0.08);
    --glass-bg: rgba(255,255,255,0.7);
    --shadow-card: 0 2px 16px rgba(0,0,0,0.06);
    --shadow-hover: 0 8px 30px rgba(37,99,235,0.12);
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius: 16px;
    --transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-purple); }
img { max-width: 100%; height: auto; }

/* --- Background Particles --- */
.bg-particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.particle {
    position: absolute; border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,0.06), transparent 70%);
    animation: floatParticle 20s infinite ease-in-out;
}
.particle:nth-child(1) { width: 300px; height: 300px; top: 10%; left: -5%; animation-delay: 0s; }
.particle:nth-child(2) { width: 200px; height: 200px; top: 60%; right: -3%; animation-delay: -5s; background: radial-gradient(circle, rgba(124,58,237,0.05), transparent 70%); }
.particle:nth-child(3) { width: 150px; height: 150px; top: 30%; left: 50%; animation-delay: -10s; }
.particle:nth-child(4) { width: 250px; height: 250px; bottom: 10%; left: 20%; animation-delay: -15s; background: radial-gradient(circle, rgba(124,58,237,0.04), transparent 70%); }
.particle:nth-child(5) { width: 100px; height: 100px; top: 5%; right: 30%; animation-delay: -7s; }
.particle:nth-child(6) { width: 180px; height: 180px; bottom: 30%; right: 20%; animation-delay: -12s; background: radial-gradient(circle, rgba(37,99,235,0.05), transparent 70%); }

@keyframes floatParticle {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(15px, 30px) scale(1.05); }
}

/* --- Navigation --- */
.nav-bar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(255,255,255,0.9); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: box-shadow var(--transition);
}
.nav-bar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.06); }
.nav-content {
    max-width: 1100px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.nav-logo {
    font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700;
    color: var(--text-primary);
}
.logo-dot { color: var(--accent-blue); }
.nav-links { display: flex; gap: 24px; }
.nav-links a {
    font-size: 0.85rem; font-weight: 500; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.5px; transition: color var(--transition);
}
.nav-links a:hover { color: var(--accent-blue); }

.nav-right { display: flex; align-items: center; gap: 10px; }

.btn-lang {
    display: flex; align-items: center; gap: 8px;
    background: #f0f4ff; color: var(--accent-blue);
    border: 1.5px solid rgba(37,99,235,0.2); padding: 8px 16px; border-radius: 8px;
    font-family: var(--font-body); font-size: 0.85rem; font-weight: 600;
    cursor: pointer; transition: all var(--transition);
}
.btn-lang:hover { background: #dce8ff; border-color: var(--accent-blue); box-shadow: 0 2px 12px rgba(37,99,235,0.12); }
.btn-lang .lang-flag { font-size: 1.1rem; line-height: 1; }
.btn-lang .lang-label { font-size: 0.8rem; letter-spacing: 0.3px; }

.btn-download {
    display: flex; align-items: center; gap: 8px;
    background: var(--accent-gradient); color: #fff;
    border: none; padding: 8px 18px; border-radius: 8px;
    font-family: var(--font-body); font-size: 0.85rem; font-weight: 600;
    cursor: pointer; transition: transform var(--transition), box-shadow var(--transition);
}
.btn-download:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

/* --- Main Content --- */
.main-content { position: relative; z-index: 1; }

/* --- Hero Section --- */
.hero-section {
    display: flex; align-items: center; justify-content: center;
    padding: 100px 24px 48px;
    background: linear-gradient(180deg, #ffffff 0%, var(--bg-primary) 100%);
}
.hero-container {
    max-width: 900px; margin: 0 auto; display: flex; align-items: center; gap: 48px;
}
.hero-photo-wrapper { flex-shrink: 0; }
.photo-ring {
    width: 180px; height: 180px; border-radius: 50%; padding: 4px;
    background: var(--accent-gradient);
    box-shadow: 0 4px 30px rgba(37,99,235,0.15);
}
.hero-photo {
    width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
    border: 3px solid #fff;
}
.hero-text { flex: 1; }
.hero-name { font-size: 2.8rem; font-weight: 800; line-height: 1.1; margin-bottom: 12px; color: var(--text-primary); }
.gradient-text {
    background: var(--accent-gradient); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-title {
    font-size: 1.05rem; color: var(--text-secondary);
    margin-bottom: 16px; line-height: 1.6;
}
.hero-contact {
    display: flex; flex-wrap: wrap; gap: 16px; color: var(--text-secondary);
    font-size: 0.9rem; margin-bottom: 20px;
}
.hero-contact i { color: var(--accent-blue); margin-right: 4px; }
.hero-contact a { color: var(--text-secondary); }
.hero-contact a:hover { color: var(--accent-blue); }
.hero-links { display: flex; gap: 12px; }
.social-link {
    width: 44px; height: 44px; border-radius: 12px;
    background: #fff; border: 1px solid var(--glass-border);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; color: var(--text-secondary);
    transition: all var(--transition);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.social-link:hover {
    color: var(--accent-blue); border-color: var(--accent-blue);
    box-shadow: var(--shadow-hover); transform: translateY(-3px);
}

/* --- Sections --- */
.section { padding: 40px 24px; }
.section-inner { max-width: 900px; margin: 0 auto; }
.section-title {
    font-size: 1.6rem; font-weight: 700; margin-bottom: 28px;
    display: flex; align-items: center; gap: 12px; color: var(--text-primary);
}
.section-icon {
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--accent-gradient); display: flex; align-items: center;
    justify-content: center; font-size: 1rem; flex-shrink: 0; color: #fff;
}

/* --- Glass Card --- */
.glass-card {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: var(--radius); padding: 24px;
    backdrop-filter: blur(10px); transition: all var(--transition);
    box-shadow: var(--shadow-card);
}
.glass-card:hover {
    border-color: rgba(37,99,235,0.15); box-shadow: var(--shadow-hover);
}

/* --- About --- */
.about-text { color: var(--text-secondary); font-size: 1rem; margin-bottom: 12px; }
.about-text:last-child { margin-bottom: 0; }
.about-text strong { color: var(--text-primary); font-weight: 600; }
.highlight { color: var(--accent-blue); font-weight: 600; }

/* --- Awards --- */
.award-card { display: flex; align-items: flex-start; gap: 20px; }
.award-badge { font-size: 2.5rem; line-height: 1; }
.award-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; color: var(--text-primary); }
.award-name a { color: var(--text-primary); }
.award-name a:hover { color: var(--accent-blue); }
.award-org { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent-blue); margin-bottom: 8px; }
.award-desc { color: var(--text-secondary); font-size: 0.9rem; }

/* --- Timeline --- */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
    content: ''; position: absolute; left: 7px; top: 0; bottom: 0;
    width: 2px; background: linear-gradient(to bottom, var(--accent-blue), var(--accent-purple), #e0e0e0);
}
.timeline-item { position: relative; margin-bottom: 24px; }
.timeline-dot {
    position: absolute; left: -29px; top: 28px; width: 14px; height: 14px;
    border-radius: 50%; background: var(--accent-blue);
    border: 3px solid var(--bg-primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.timeline-card { position: relative; }
.timeline-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 8px; flex-wrap: wrap; }
.timeline-header h3 { font-size: 1.05rem; font-weight: 700; flex: 1; color: var(--text-primary); }
.timeline-date {
    font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-blue);
    white-space: nowrap; background: rgba(37,99,235,0.06); padding: 4px 10px;
    border-radius: 6px;
}
.timeline-location { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 8px; }
.timeline-location i { color: var(--accent-purple); margin-right: 4px; }
.timeline-card > p:last-of-type { color: var(--text-secondary); font-size: 0.9rem; }
.edu-focus { color: var(--accent-blue); font-weight: 500; }
.timeline-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag {
    font-size: 0.75rem; font-family: var(--font-mono); padding: 3px 10px;
    border-radius: 20px; background: rgba(37,99,235,0.06);
    border: 1px solid rgba(37,99,235,0.12); color: var(--accent-blue);
}

/* --- Publications --- */
.pub-card { margin-bottom: 16px; position: relative; overflow: hidden; }
.pub-card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--accent-gradient);
}
.pub-venue {
    font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600;
    color: var(--accent-blue); text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 6px;
}
.pub-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.pub-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 8px; }
.pub-meta i { margin-right: 4px; }
.pub-award { color: #d97706; font-weight: 600; }
.pub-links a {
    font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent-blue);
    display: inline-flex; align-items: center; gap: 4px; margin-right: 16px;
}
.pub-links a:hover { color: var(--accent-purple); }

/* --- Projects --- */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.project-card {
    text-decoration: none; color: var(--text-primary); display: flex; flex-direction: column;
    position: relative; overflow: hidden; cursor: pointer;
}
.project-card:hover { transform: translateY(-4px); color: var(--text-primary); box-shadow: var(--shadow-hover); }
.project-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.project-icon { font-size: 1.3rem; color: var(--text-secondary); }
.project-badge {
    font-size: 0.7rem; font-weight: 600; padding: 3px 8px; border-radius: 6px;
    background: rgba(217,119,6,0.1); color: #d97706;
}
.badge-research { background: rgba(37,99,235,0.08); color: var(--accent-blue); }
.badge-ai { background: rgba(124,58,237,0.08); color: #7c3aed; }
.badge-fintech { background: rgba(16,185,129,0.08); color: #059669; }
.project-name { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.project-desc { font-size: 0.85rem; color: var(--text-secondary); flex: 1; margin-bottom: 12px; }
.project-tech { display: flex; flex-wrap: wrap; gap: 6px; }
.project-tech span {
    font-family: var(--font-mono); font-size: 0.7rem; padding: 2px 8px;
    border-radius: 4px; background: var(--bg-primary);
    color: var(--text-secondary);
}

/* --- Skills --- */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.skill-cat-title {
    font-size: 1rem; font-weight: 700; margin-bottom: 14px;
    display: flex; align-items: center; gap: 8px; color: var(--text-primary);
}
.skill-cat-title i { color: var(--accent-blue); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag {
    font-size: 0.8rem; font-weight: 500; padding: 6px 14px; border-radius: 20px;
    background: rgba(37,99,235,0.05); border: 1px solid rgba(37,99,235,0.1);
    color: var(--text-primary); transition: all var(--transition);
}
.skill-tag:hover {
    background: rgba(37,99,235,0.1); border-color: var(--accent-blue);
    box-shadow: 0 0 12px rgba(37,99,235,0.08);
}

/* --- Languages --- */
.languages-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lang-card { text-align: center; padding: 28px 20px; }
.lang-flag { font-size: 2.5rem; display: block; margin-bottom: 8px; }
.lang-name { font-size: 1rem; font-weight: 700; margin-bottom: 12px; color: var(--text-primary); }
.lang-level { height: 4px; background: rgba(0,0,0,0.05); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.lang-bar { height: 100%; width: var(--level); background: var(--accent-gradient); border-radius: 4px; transition: width 1.5s ease; }
.lang-label { font-size: 0.8rem; color: var(--text-secondary); font-weight: 500; }

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--glass-border); padding: 32px 24px;
    text-align: center; position: relative; z-index: 1;
    background: #fff;
}
.footer-content p { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 12px; }
.footer-links { display: flex; justify-content: center; gap: 16px; }
.footer-links a {
    color: var(--text-secondary); font-size: 1.1rem; transition: color var(--transition);
}
.footer-links a:hover { color: var(--accent-blue); }

/* --- Reveal Animation --- */
.reveal {
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-container { flex-direction: column; text-align: center; gap: 24px; }
    .hero-name { font-size: 2rem; }
    .hero-contact { justify-content: center; }
    .hero-links { justify-content: center; }
    .projects-grid { grid-template-columns: 1fr; }
    .skills-grid { grid-template-columns: 1fr; }
    .languages-grid { grid-template-columns: repeat(3, 1fr); }
    .timeline-header { flex-direction: column; }
    .award-card { flex-direction: column; align-items: center; text-align: center; }
}
@media (max-width: 480px) {
    .hero-name { font-size: 1.6rem; }
    .photo-ring { width: 140px; height: 140px; }
    .languages-grid { grid-template-columns: 1fr; }
    .btn-download span { display: none; }
    .btn-lang span { display: none; }
}