/* =====================
   VARIABLES
===================== */
:root {
    --bg-main: #e9e5dc;
    --bg-card: #ffffff;
    --accent: #6b8f71;
    --accent-strong: #4f6f5a;
    --text-main: #26332f;
}

/* =====================
   RESET
===================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, sans-serif;
}

body {
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
}

/* =====================
   LAYOUT GENERAL
===================== */
section,
header {
    max-width: 960px;
    margin: auto;
    padding: 3.5rem 2rem;
}

/* =====================
   NAV
===================== */
.main-nav {
    position: sticky;
    top: 0;
    background: rgba(233, 229, 220, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.main-nav .logo {
    font-weight: 600;
    font-size: 0.95rem;
}

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

.main-nav a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.85rem;
    position: relative;
}

.main-nav a::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.2s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

/* =====================
   HERO
===================== */
.hero-kicker {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-strong);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.1;
    max-width: 700px;
    margin-bottom: 0.8rem;
}

.hero p {
    max-width: 700px;
    font-size: 1rem;
    margin-bottom: 1.2rem;
}

.highlight {
    opacity: 0.85;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* =====================
   BOTONES
===================== */
.btn {
    display: inline-block;
    background: var(--text-main);
    color: #fff;
    padding: 0.6rem 1.5rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn:hover {
    background: var(--accent-strong);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--text-main);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--text-main);
    color: #fff;
}

/* =====================
   ABOUT
===================== */
.about {
    max-width: 960px;
    margin: auto;
    padding: 0 2rem 3rem;
}

.about h2 {
    margin-bottom: 1rem;
}

.about p {
    max-width: 760px;
    margin-bottom: 1rem;
}

/* =====================
   PROYECTOS
===================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.project-card img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 1rem;
    aspect-ratio: 16 / 10;
    object-fit: contain;
    background: #f3f1eb;
    padding: 0.4rem;
}

.project-card h3 {
    font-size: 1.2rem;
    margin: 0.4rem 0 0.6rem;
}

.project-card p {
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}

/* =====================
   TAGS
===================== */
.project-tag {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.project-tag.client {
    background: #dfe7f3;
    color: #3f5c8a;
}

.project-tag.practice {
    background: #ede9e1;
    color: #6b5e4a;
}

.project-tag.react {
    background: #e0f2ee;
    color: #2f6f64;
}

/* =====================
   TECNOLOGÍAS
===================== */
.tech {
    display: block;
    font-size: 0.8rem;
    opacity: 0.7;
    margin-bottom: 0.8rem;
}

/* =====================
   LINKS WEB / REPO
===================== */
.project-links {
    display: flex;
    gap: 1rem;
}

.project-links a {
    font-size: 0.8rem;
    color: var(--text-main);
    text-decoration: none;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.project-links a:hover {
    opacity: 1;
}

/* =====================
   SERVICIOS
===================== */
.services ul {
    list-style: none;
    margin-top: 1rem;
}

.services li {
    margin-bottom: 0.5rem;
}

/* =====================
   CONTACTO
===================== */
.contact p {
    margin: 1rem 0 1.5rem;
    max-width: 600px;
}

/* =====================
   FOOTER
===================== */
.site-footer {
    background: var(--accent-strong);
    color: #fff;
    padding: 3.5rem 2rem;
    text-align: center;
    margin-top: 5rem;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
}

.footer-text {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    opacity: 0.92;
    max-width: 500px;
    margin-inline: auto;
}

.footer-icons {
    display: flex;
    justify-content: center;
    gap: 1.4rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-icons a {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: #fff;
    font-size: 1.1rem;
    transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.footer-icons a:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

.footer-copy {
    font-size: 0.78rem;
    opacity: 0.75;
}

/* =====================
   ANIMACIONES
===================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 600px) {
    .main-nav {
        flex-direction: column;
        gap: 0.8rem;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    section,
    header {
        padding: 3rem 1.5rem;
    }

    .hero-actions,
    .project-links {
        flex-direction: column;
        gap: 0.8rem;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .project-card {
        padding: 1.5rem;
    }

    .project-card img {
        aspect-ratio: auto;
        padding: 0;
        background: transparent;
    }
}