/* --- 1. CONFIGURACIÓN Y VARIABLES --- */
:root {
    /* Colores */
    --bg-dark: #0a0a0a;
    --bg-card: #141414;
    --bg-card-hover: #1a1a1a;

    --text-white: #ffffff;
    --text-gray: #a1a1aa;
    --text-dark: #000000;

    /* El Color Beige solicitado */
    --beige: #e6d8c3;
    --beige-dark: #bfaf94;
    --beige-translucent: rgba(227, 213, 202, 0.1);

    /* Estilos */
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;

    --font-main: "Outfit", sans-serif;
    --font-mono: "Space Mono", monospace;

    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- 2. GLOBAL RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-gray);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-white);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- 3. UTILIDADES --- */
.text-beige {
    color: var(--beige);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-white);
}

.btn-outline:hover {
    background: var(--text-white);
    color: var(--bg-dark);
    border-color: var(--text-white);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.85rem;
}

/* --- 4. HEADER --- */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
    font-family: var(--font-mono);
    letter-spacing: -1px;
}

.logo-dev {
    color: var(--beige);
}

/* --- 5. HERO SECTION --- */
.section-blog {
    padding: 70px 0;
}

.blog-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 160px;
    padding-bottom: 40px;
}

.hero-bg-grid,
.hero-glow {
    display: none;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--beige);
    margin-bottom: 24px;
    font-family: var(--font-mono);
}

.pulse {
    width: 8px;
    height: 8px;
    background-color: var(--beige);
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(230, 216, 195, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(230, 216, 195, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(230, 216, 195, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(230, 216, 195, 0);
    }
}

/* --- 6. BLOG FILTER --- */
.filter-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 60px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-gray);
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--beige);
    color: var(--bg-dark);
    border-color: var(--beige);
    font-weight: 500;
}

/* --- 7. BLOG GRID --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr; /* Una sola columna para estilo lista */
    gap: 30px;
    padding-bottom: 100px;
    max-width: 900px; /* Ancho máximo contenido para lectura cómoda */
    margin: 0 auto;
}

.portfolio-item {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: row; /* Horizontal */
    align-items: stretch;
    height: 280px; /* Altura fija para consistencia */
}

.portfolio-item:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Imagen izquierda pequeña */
.portfolio-thumb {
    position: relative;
    width: 280px; /* Ancho fijo imagen cuadrada */
    min-width: 280px;
    height: 100%;
    aspect-ratio: auto; /* Reset */
    overflow: hidden;
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-item:hover .portfolio-image {
    transform: scale(1.05);
}

.thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .thumb-overlay {
    opacity: 1;
}

.thumb-cat {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    color: var(--beige);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.portfolio-item:hover .btn-circle {
    transform: scale(1);
}

.portfolio-details {
    padding: 30px 40px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.portfolio-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 12px;
}

.meta-dot {
    color: var(--beige);
}

.portfolio-details h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--text-white);
}

.portfolio-details p {
    font-size: 1rem;
    color: var(--text-gray);
    margin-bottom: 25px;
    line-height: 1.6;
    flex: initial;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--beige);
    font-weight: 500;
    font-size: 0.95rem;
    margin-top: auto;
}

.read-more i {
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(5px);
}

/* --- 8. FOOTER --- */
footer {
    background: #000;
    padding: 100px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 40px;
    margin-bottom: 80px;
}

.footer-logo {
    font-size: 1.8rem;
    color: var(--text-white);
    margin-bottom: 15px;
    display: block;
}
.footer-brand p {
    color: var(--text-gray);
    max-width: 300px;
}
.footer-links-group h4,
.footer-newsletter h4 {
    color: var(--text-white);
    margin-bottom: 20px;
    font-size: 1.1rem;
}
.footer-links-group li {
    margin-bottom: 12px;
}
.footer-links-group a {
    color: var(--text-gray);
}
.footer-links-group a:hover {
    color: var(--beige);
}

.newsletter-input {
    display: flex;
    position: relative;
    margin-top: 0; /* Reset generic margin if any */
}
.newsletter-input input {
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #333;
    background: #111;
    color: #fff;
    font-family: var(--font-main);
}
.newsletter-input button {
    position: absolute;
    right: 5px;
    top: 5px;
    background: var(--beige);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem; /* Icon size */
    transition: var(--transition);
}
.newsletter-input button:hover {
    background: var(--text-white);
}

.footer-bottom {
    border-top: 1px solid #222;
    padding-top: 40px;
    display: block; /* Reset flex from previous styles if needed, though main uses block/flex mix */
}

.big-text {
    font-size: clamp(4rem, 15vw, 12rem);
    font-weight: 900;
    color: #111;
    text-align: center;
    line-height: 0.8;
    letter-spacing: -0.05em;
    user-select: none;
    margin-bottom: 0;
    margin-top: 0;
    pointer-events: none;
}
.bottom-bar {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}
.bottom-bar p {
    color: #555;
}
.socials {
    display: flex;
    gap: 20px;
    font-size: 1.5rem;
}
.socials a:hover {
    color: var(--beige);
}

/* --- 9. RESPONSIVE --- */
@media (max-width: 992px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2.5rem;
        margin-bottom: 20px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    /* Stack card verticalmente en móvil */
    .portfolio-item {
        flex-direction: column;
        height: auto;
    }

    .portfolio-thumb {
        width: 100%;
        height: 250px; /* Altura fija imagen movil */
    }

    .portfolio-details {
        padding: 24px;
        align-items: flex-start; /* Reset align */
    }

    .portfolio-details h3 {
        font-size: 1.5rem;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .bottom-bar {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        text-align: center;
    }
}

/* --- 10. ANIMACIONES --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}
.delay-2 {
    animation-delay: 0.2s;
}
.delay-3 {
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
