:root {
    --bg-base: #0d1117;
    --bg-surface: #161b22;
    --border-color: #30363d;
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --accent: #10b981;
    /* Verde industrial/terminal */

    --font-sans: 'Inter', -apple-system, sans-serif;
    --font-mono: 'Fira Code', ui-monospace, 'Courier New', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 90%;
    max-width: 900px;
    margin: 0 auto;
}

/* Header */
.terminal-header {
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
    background-color: var(--bg-surface);
}

.terminal-header h1 {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 2rem;
    font-weight: 600;
}

.terminal-header h2 {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-weight: 400;
}

nav {
    margin-top: 2rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

nav a:hover {
    color: var(--accent);
    border-bottom: 1px solid var(--accent);
}

/* Projects Layout */
main {
    display: grid;
    gap: 2rem;
    padding-bottom: 4rem;
}

.project-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    transition: border-color 0.2s;
}

.project-card:hover {
    border-color: var(--accent);
}

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

.project-header h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.tech-badge {
    display: inline-block;
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--accent);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 0.2rem 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    border-radius: 4px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Tag colors for Ecosystem */
.tag-metalurgia {
    background-color: rgba(0, 90, 181, 0.15);
    color: #4da6ff;
    border-color: rgba(0, 90, 181, 0.3);
}

.tag-materials {
    background-color: rgba(142, 68, 173, 0.15);
    color: #c39bd3;
    border-color: rgba(142, 68, 173, 0.3);
}

.tag-nlp {
    background-color: rgba(230, 126, 34, 0.15);
    color: #f5b041;
    border-color: rgba(230, 126, 34, 0.3);
}

.tag-ds {
    background-color: rgba(40, 167, 69, 0.15);
    color: #28a745;
    border-color: rgba(40, 167, 69, 0.3);
}

/* Category Borders */
.card-materials {
    border-left: 3px solid rgba(0, 90, 181, 0.6);
    transition: all 0.3s ease;
}

.card-materials:hover {
    border-left: 3px solid rgba(0, 90, 181, 1);
    box-shadow: 0 4px 12px rgba(0, 90, 181, 0.15);
}

.card-ai {
    border-left: 3px solid rgba(40, 167, 69, 0.6);
    transition: all 0.3s ease;
}

.card-ai:hover {
    border-left: 3px solid rgba(40, 167, 69, 1);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.15);
}

/* Project Gallery */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.gallery-item {
    margin: 0;
    padding: 0;
    border: 1px solid rgba(16, 185, 129, 0.2);
    background-color: rgba(30, 41, 59, 0.5);
    border-radius: 8px;
    overflow: hidden;
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.gallery-item.full-width {
    grid-column: 1 / -1;
}

.hero-video {
    max-height: 400px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

.gallery-caption {
    padding: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    border-top: 1px solid rgba(16, 185, 129, 0.1);
}

.project-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* Data Viz Placeholders */
.data-viz-placeholder {
    background-color: var(--bg-base);
    border: 1px dashed var(--border-color);
    border-radius: 4px;
    padding: 1rem;
    position: relative;
    height: 250px;
    display: flex;
    flex-direction: column;
}

.viz-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: auto;
}

.skeleton-chart {
    height: 150px;
    width: 100%;
    background: linear-gradient(90deg, #1c2128 25%, #22272e 50%, #1c2128 75%);
    background-size: 400% 100%;
    animation: skeleton-loading 2s infinite ease-in-out;
    border-radius: 2px;
    opacity: 0.5;
}

@keyframes skeleton-loading {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

/* Image Gallery */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.gallery-item {
    background-color: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-item img {
    max-width: 100%;
    height: auto;
    border-radius: 2px;
    margin-bottom: 0.75rem;
    filter: brightness(0.9) contrast(1.1);
    /* Laboratoy feel */
}

.gallery-caption {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent);
    text-align: center;
    width: 100%;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

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

footer a:hover {
    text-decoration: underline;
}

.blink {
    animation: blinker 1s linear infinite;
    color: var(--accent);
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 600px) {
    .terminal-header h1 {
        font-size: 1.5rem;
    }

    .terminal-header h2 {
        font-size: 0.85rem;
    }

    nav ul {
        flex-direction: column;
        gap: 0.75rem;
    }

    .data-viz-placeholder {
        height: 200px;
    }
}