/* --- Variables de Color y Tipografía --- */
:root {
    --color-background: #ebe3d5;
    --color-text: #373023;
    --color-accent: #e09b16;
    --color-card-bg: #ffffff;
    --color-border: #504530;
    --font-logo: "Michroma", sans-serif;
    --font-hero: "Michroma", sans-serif;
    --font-title: "Michroma", sans-serif;
    --font-main: "Public Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-background: #17140f;
        --color-text: #ebe3d5;
        --color-card-bg: #373023;
        --color-border: #504530;
    }
}

/* --- Reseteo y Estilos Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    transition:
        background-color 0.3s,
        color 0.3s;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.8;
}

img {
    max-width: 100%;
    height: auto;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
}

/* --- Cabecera --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--color-border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px 10px;
    text-decoration: none;
    color: var(--color-text);
}

.logo img {
    width: 40px;
    height: 40px;
}

.logo h1 {
    font-family: var(--font-logo);
    font-size: 1.5rem;
    font-weight: 400;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

header nav a {
    font-weight: 700;
    font-size: 1rem;
}

/* --- Sección Hero --- */
.hero {
    text-align: center;
    padding: 80px 20px;
}

.hero h2 {
    font-family: var(--font-hero);
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

.btn-primary {
    display: inline-block;
    background-color: var(--color-accent);
    color: #17140f;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(224, 155, 22, 0.3);
    color: #17140f;
}

/* --- Sección de Proyectos --- */
.proyectos-section {
    padding: 60px 20px;
}

.proyectos-section h3 {
    font-family: var(--font-title);
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.project-card {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    color: var(--color-text);
    transition:
        transform 0.3s,
        box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.project-card h4 {
    font-family: var(--font-title);
    color: var(--color-accent);
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.project-card p {
    font-size: 1rem;
    margin-bottom: 15px;
}

.project-card span {
    font-weight: 700;
    color: var(--color-accent);
}

/* --- Pie de Página --- */
footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 40px;
    border-top: 1px solid var(--color-border);
    font-size: 0.9rem;
}

/* --- Responsividad --- */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 20px;
    }

    .hero h2 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }
}
