
/* Variables de Color (Branding) */
:root {
  --color-primario: #7BF547;     /* Verde acido */
  /* RGB del color primario para usar en rgba() (evita repetir el valor hexadecimal) */
  --color-primario-rgb: 90,255,21;
  /* RGB del color secundario (verde claro) */
  --color-secundario-rgb: 224, 244, 215;
  --color-fondo: #142a3e;        /* Azul oscuro */
  --color-secundario: #e0f4d7;   /* Verde claro */
  --color-texto: #eff0f1;        /* Plateado */
  --color-texto-secundario: #B0C4DE; /* Un gris/azul claro */

  --max-width: 1100px;
  --radius: 12px;
}

/* Modern Responsive Theme */
body {
    background-color: var(--color-fondo);
    color: var(--color-texto);
    font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Header Styles */
header {
    background-color: var(--color-primario);
    padding: 1rem 5%;
    margin-bottom: 2rem;
}

header h1 {
    color: var(--color-fondo);
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
}

/* Header link (site brand) - keep visually plain and never underlined */
.site-brand {
    display: block;
    color: inherit;
    text-decoration: none;
}
.site-brand h1 {
    text-decoration: none;
}
.site-brand:hover,
.site-brand:focus {
    text-decoration: none;
}
.site-brand:focus {
    outline: 3px solid rgba(var(--color-primario-rgb), 0.25);
    outline-offset: 4px;
}

/* Content Sections */
.content, .about, .projects {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 5%;
}

h2 {
    color: var(--color-primario);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

#intro-text {
    font-size: 1.2rem;
    line-height: 1.8;
    opacity: 0.9;
    max-width: 800px;
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.project-card {
    display: block;
    background-color: rgba(var(--color-secundario-rgb), 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

/* Only show pointer cursor for cards that have a data-href (clickable) */
.project-card[data-href] {
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card h3 {
    color: var(--color-primario);
    margin-top: 0;
    margin-bottom: 1rem;
    text-decoration: none;
}

.project-card p {
    margin: 0;
    opacity: 0.9;
    text-decoration: none;
}

/* Ensure any anchors inside a card (if present) don't look like default links */
.project-card a {
    color: inherit;
    text-decoration: none;
}

/* Back button for error pages */
.back-btn {
    display: inline-block;
    background: var(--color-primario);
    color: var(--color-fondo);
    padding: 0.6rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}
.back-btn:hover {
    opacity: 0.95;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 5%;
    margin-top: 3rem;
    border-top: 1px solid var(--color-fondo);
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .project-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1rem 1rem;
    }

    .content, .about, .projects {
        padding: 1.5rem 1rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    #intro-text {
        font-size: 1.1rem;
    }
}