:root {
    --bg-color: #0d1117;
    --neon-green: #00ff41;
    --neon-blue: #007acc;
    --text-main: #c9d1d9;
    --glass-bg: rgba(22, 27, 34, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background: radial-gradient(circle at top, #1f2937 0%, #0d1117 100%);
}

.scanlines {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%),
                linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
    z-index: 10;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    gap: 15px;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    gap: 50px;
}

.container {
    padding: 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 100%;
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.container:nth-child(1) { animation-delay: 0.1s; }
.container:nth-child(2) { animation-delay: 0.2s; }
.container:nth-child(3) { animation-delay: 0.3s; }
.container:nth-child(4) { animation-delay: 0.4s; }

.container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 255, 65, 0.15);
    border-color: rgba(0, 255, 65, 0.3);
}

.single-col {
    width: 85%;
    max-width: 1200px;
    margin: 0 auto;
}

.dual-col {
    display: flex;
    gap: 50px;
    width: 85%;
    max-width: 1200px;
    margin: 0 auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    width: 85%;
    max-width: 1200px;
    margin: 0 auto;
}

.dual-col .container {
    flex: 1;
}

h1 {
    font-size: 3rem;
    color: #ffffff;
    margin-bottom: 15px;
    letter-spacing: -1px;
    margin-top: 0;
}

h2 {
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 25px;
    margin-top: 0;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.highlight {
    color: var(--neon-green);
    text-shadow: 0 0 15px rgba(0, 255, 65, 0.4);
}

p {
    font-size: 1.15rem;
    color: #8b949e;
    line-height: 1.7;
    margin-bottom: 20px;
}

ul {
    padding-left: 20px;
    margin-bottom: 30px;
}

li {
    font-size: 1.1rem;
    color: #8b949e;
    line-height: 1.7;
    margin-bottom: 15px;
    position: relative;
    list-style: none;
}

li::before {
    content: "▹";
    color: var(--neon-green);
    position: absolute;
    left: -20px;
    top: 0;
}

.btn-back, .btn-proyects {
    display: inline-block;
    background: transparent;
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
    padding: 10px 20px;
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: 'Fira Code', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
}

.btn-back:hover, .btn-proyects:hover {
    background: var(--neon-green);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
    transform: translateY(-2px);
}

.btn-more-info {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 1px solid #58a6ff;
    color: #58a6ff;
    padding: 10px 20px;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: 'Fira Code', monospace;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.btn-more-info .btn-text {
    text-align: start;
}
.btn-more-info:hover {
    background: #58a6ff;
    color: #000;
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.5);
    transform: translateY(-2px);
}
.btn-proyects {
    float: right;
}

.desarrollado {
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
}

.neon-text-green {
    color: var(--neon-green);
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
    transition: text-shadow 0.3s ease;
}

.desarrollado:hover .neon-text-green {
    text-shadow: 0 0 15px rgba(0, 255, 65, 1);
}

footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid var(--glass-border);
    margin-top: 40px;
    background: rgba(13, 17, 23, 0.5);
}

span.small {
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #8b949e;
}

/* Modal y Markdown Styles */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    position: relative;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-color);
    padding: 40px;
    margin: 0;
    transform: none;
    animation: none;
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2.5rem;
    color: var(--neon-green);
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.modal-close:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.readme-lang-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.lang-tab {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

.lang-tab.active, .lang-tab:hover {
    border-color: var(--neon-green);
    color: var(--neon-green);
    background: rgba(0, 255, 65, 0.1);
}

.markdown-body {
    text-align: left;
    font-size: 1.1rem;
    color: #c9d1d9;
    line-height: 1.7;
}

.markdown-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 20px 0;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
    color: #fff;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 8px;
    margin-top: 30px;
    margin-bottom: 15px;
}

.markdown-body h1 { font-size: 2.2rem; }
.markdown-body h2 { font-size: 1.8rem; }
.markdown-body h3 { font-size: 1.5rem; border: none; }

.markdown-body a {
    color: var(--neon-blue);
    text-decoration: none;
}
.markdown-body a:hover {
    text-decoration: underline;
}

.markdown-body pre {
    background: #0d1117;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid var(--glass-border);
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
}

.markdown-body code {
    font-family: 'Fira Code', monospace;
    background: rgba(255,255,255,0.1);
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.9em;
}

.markdown-body pre code {
    background: transparent;
    padding: 0;
}

.markdown-body blockquote {
    border-left: 4px solid var(--neon-green);
    margin: 0;
    padding-left: 15px;
    color: #8b949e;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsiveness */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 20px;
    }
    nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    h1 {
        font-size: 2.2rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    .single-col, .dual-col, .projects-grid {
        width: 100%;
    }
    .dual-col {
        flex-direction: column;
        gap: 30px;
    }
    .container {
        padding: 30px 20px;
    }
}

@keyframes dots {
    0%, 20% { content: ""; }
    40% { content: "."; }
    60% { content: ".."; }
    80%, 100% { content: "..."; }
}

.loading-dots::after {
    content: "";
    animation: dots 1.5s infinite steps(1);
    display: inline-block;
    width: 24px;
    text-align: left;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.filter-chip {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-family: 'Fira Code', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-chip:hover {
    border-color: var(--neon-green);
    color: var(--neon-green);
    background: rgba(0, 255, 65, 0.05);
}

.filter-chip.active {
    border-color: var(--neon-green);
    color: #000;
    background: var(--neon-green);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}