:root {
    --bg-color: #050505;
    --text-color: #cccccc;
    --accent-color: #3794ff;
    --secondary-color: #c586c0;
    --card-bg: #0f0f0f;
    --shadow: 0 4px 6px rgba(0,0,0,0.6);
    --border-color: #303030;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto Mono', 'Courier New', Courier, monospace;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: center;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 700;
    transition: color 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links a:hover {
    color: var(--accent-color);
}

header {
    background: linear-gradient(270deg, #050505, #0f2040, #162e5c, #050505);
    background-size: 400% 400%;
    border-bottom: 1px solid var(--border-color);
    padding: 6rem 2rem 3rem; /* Increased top padding for navbar */
    text-align: center;
    animation: gradientBG 15s ease infinite;
}

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

header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
}

header p {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-top: 0.5rem;
    color: #ffffff;
}

.logo {
    width: 100px;
    height: 100px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 8px rgba(55, 148, 255, 0.4));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05) rotate(3deg);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    margin-bottom: 2rem;
    background: var(--card-bg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: none;
}

h2 {
    color: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-top: 0;
    font-size: 1.3rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
    justify-items: center;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.2s;
}

.skill-item i {
    font-size: 3.5rem;
}

.skill-item span {
    font-size: 0.85rem;
    color: var(--text-color);
    text-align: center;
}

.skill-item:hover {
    transform: translateY(-5px);
}

.tech-stack {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.tech-icon {
    font-size: 1.5rem;
    transition: transform 0.2s;
}

.tech-icon:hover {
    transform: scale(1.2);
}

.devicon-apachekafka-original.colored {
    color: #ffffffda;
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 2rem;
    border-left: 2px solid var(--border-color);
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 0;
    background-color: var(--accent-color);
}

.role-title {
    font-weight: bold;
    font-size: 1.1rem;
    color: #4fc1ff;
}

.role-date {
    color: #858585;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.role-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.2rem;
}

.company-logo {
    height: 20px;
    width: auto;
    object-fit: contain;
    margin-right: 0.5rem;
}

.role-desc {
    margin-top: 0.5rem;
    color: #cccccc;
}

#contact {
    background: transparent;
    border: none;
    padding: 2rem 0 0;
    box-shadow: none;
    margin-bottom: 0;
    text-align: center;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 0;
    flex-wrap: wrap;
}

.contact-links a {
    color: var(--text-color);
    font-size: 2rem;
    text-decoration: none;
    border: none;
    padding: 0;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.contact-links a:hover {
    color: var(--accent-color);
    opacity: 1;
    transform: translateY(-3px);
    background-color: transparent;
}

header .contact-links {
    margin-top: 1.5rem;
    gap: 2rem;
}

header .contact-links a {
    font-size: 1.5rem;
    opacity: 0.9;
}

.cv-download-container {
    text-align: center;
    margin: 2rem 0;
}

.cv-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    padding: 0.8rem 1.5rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
}

.cv-btn:hover {
    background-color: var(--accent-color);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(55, 148, 255, 0.4);
    transform: translateY(-2px);
}

@media print {
    .cv-download-container {
        display: none;
    }
}

.made-in {
    text-align: center;
    margin-top: 4rem;
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.made-in span {
    font-size: 1.2rem;
}

.ferris-wheel-emoji {
    filter: brightness(0) invert(1);
}

footer {
    text-align: center;
    padding: 2rem;
    color: #858585;
    font-size: 0.8rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--card-bg);
}

@media (max-width: 600px) {
    header {
        padding: 180px 1rem 2rem;
    }
    header h1 {
        font-size: 1.8rem;
    }
    .container {
        padding: 1rem;
    }
}

@page {
    margin: 2cm;
}

@media print {
    :root {
        --bg-color: #ffffff;
        --text-color: #000000;
        --accent-color: #000000;
        --secondary-color: #333333;
        --card-bg: #ffffff;
        --shadow: none;
        --border-color: #cccccc;
    }

    body {
        font-size: 11pt;
    }

    .navbar, #contact, footer, .made-in {
        display: none !important;
    }

    header {
        padding: 0 0 2rem 0;
        background: none;
        border-bottom: 2px solid #000;
        animation: none;
        text-align: left;
        margin-bottom: 2rem;
    }

    header::after {
        content: "Barranquilla, Colombia 🇨🇴";
        display: block;
        font-size: 10pt;
        color: #555;
        margin-top: 0.5rem;
    }

    header .logo {
        display: none;
    }

    header h1 {
        font-size: 24pt;
        color: #000;
        margin-bottom: 0.5rem;
    }

    header p {
        color: #333;
        margin: 0;
        font-size: 12pt;
    }
    
    header .contact-links {
        margin-top: 1rem;
        justify-content: flex-start;
        gap: 1.5rem;
    }

    header .contact-links a {
        text-decoration: none;
        color: #000;
        font-size: 10pt;
        display: inline-flex;
        align-items: center;
    }



    header .contact-links a i {
        color: #000 !important; /* Ensure icons are black */
        font-size: 1.2rem; /* Make icons slightly larger */
        margin-right: 0.3rem;
    }

    header .contact-links a::after {
        content: attr(data-print-label) !important; /* Use a data attribute for cleaner labels */
        font-size: 0.9rem; /* Smaller font for the text label */
        color: #555; /* Slightly muted color for the text label */
        margin-left: 0.3rem;
    }
    
    /* Clean up specific href displays if needed, but raw href is generally safe for CVs */

    .container {
        padding: 0;
        max-width: 100%;
        margin: 0;
    }

    section {
        margin-bottom: 2rem;
        padding: 0;
        border: none;
        page-break-inside: avoid;
        box-shadow: none;
    }

    h2 {
        font-size: 16pt;
        border-bottom: 1px solid #000;
        padding-bottom: 0.5rem;
        margin-bottom: 1rem;
        color: #000;
    }

    .skills-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 0.8rem;
        grid-template-columns: none;
    }

    .skill-item {
        border: 1px solid #ccc;
        padding: 0.4rem 0.8rem;
        border-radius: 4px;
        flex-direction: row;
        gap: 0.5rem;
        margin: 0;
    }
    
    .skill-item i {
        font-size: 1.2rem;
        color: #000 !important; /* Force black icons */
    }
    
    .skill-item span {
        color: #000;
    }

    .timeline-item {
        padding-left: 1.5rem;
        margin-bottom: 1.5rem;
        border-left: 2px solid #ccc;
        page-break-inside: avoid;
    }
    
    .timeline-item::before {
        background-color: #000;
    }

    .role-title {
        color: #000;
    }
    
    .role-desc {
        color: #333;
    }
    
    .company-logo {
        filter: grayscale(100%);
    }

    .tech-stack {
        margin-top: 0.5rem;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .tech-stack .tech-icon {
        filter: none;
        color: #000 !important;
        font-family: 'Roboto Mono', monospace !important;
        font-size: 0.75rem !important;
        font-weight: 400 !important;
        width: auto !important;
        height: auto !important;
        line-height: 1.2 !important;
        border: 1px solid #999;
        padding: 2px 6px;
        border-radius: 3px;
        display: inline-block;
        text-decoration: none;
        font-style: normal !important;
        background-color: #fff;
        vertical-align: middle !important;
        text-transform: none !important;
        letter-spacing: normal !important;
    }

    .tech-stack .tech-icon::before {
        content: attr(title) !important;
        font-family: 'Roboto Mono', monospace !important;
        font-weight: inherit !important;
        font-style: inherit !important;
        font-size: inherit !important;
    }
    
    .screen-only {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
    
    .print-only ul {
        padding-left: 1.2rem;
        margin-top: 0.5rem;
    }
    
    .print-only li {
        margin-bottom: 0.3rem;
        color: #333;
    }
}

.print-only {
    display: none;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .faq-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.faq-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border-color: var(--accent-color);
}

.faq-item h3 {
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 0.8rem;
}

.faq-item p {
    margin: 0;
    font-size: 0.9rem;
    color: #cccccc;
}

/* --- Rolling Animation Styles --- */
.animation-wrapper {
    position: fixed;
    bottom: 20px;
    left: -40px;
    width: 30px;
    height: 30px;
    z-index: 10000;
    pointer-events: none;
    display: none; /* Hidden by default */
}

.animation-wrapper.active {
    display: block;
    animation: 
        rollAcross 12s linear 1 forwards,
        bounce 0.5s ease-out infinite alternate;
}

.animation-wrapper.active .rolling-content {
    width: 100%;
    height: 100%;
    position: relative;
    animation: rotateBall 12s linear 1 forwards;
}

.anim-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3));
}

.animation-wrapper.active .soccer-ball {
    opacity: 1;
    animation: fadeOutBall 12s linear 1 forwards;
}

.animation-wrapper.active .vscode-logo {
    opacity: 0;
    animation: fadeInLogo 12s linear 1 forwards;
}

@keyframes rollAcross {
    0% { left: -40px; }
    100% { left: 100%; }
}

@keyframes rotateBall {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(1440deg); } /* 4 full spins */
}

@keyframes fadeOutBall {
    0%, 45% { opacity: 1; }
    55%, 100% { opacity: 0; }
}

@keyframes fadeInLogo {
    0%, 45% { opacity: 0; }
    55%, 100% { opacity: 1; }
}

@keyframes bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-30px); }
}

@media print {
    .animation-wrapper, #faq { display: none; }
}

.logo {
    cursor: pointer;
}

/* --- 404 Page Styles --- */
body.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.error-page .container {
    text-align: center;
}

.big-text {
    font-size: 3rem;
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 1rem;
}

.emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 2rem;
}

.home-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.home-link:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

@media (max-width: 600px) {
    .big-text {
        font-size: 2rem;
    }
    .emoji {
        font-size: 2rem;
    }
}