@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
    --bg: #000000;
    --text: #ffffff;
    --accent: #3498db;
    --accent-glow: #00d2ff;
    --purple: #bb86fc;
    --muted: #aaa;
    --border: rgba(255, 255, 255, 0.08);
    --font-heading: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

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

/* --- CONTENEDOR PRINCIPAL --- */
.project-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* --- HEADER --- */
.project-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 8rem;
    padding: 5rem 3rem;
    border-radius: 20px;
    background-image:
        linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 100%),
        url('assets/lampara encendida.JPG');
    background-size: cover;
    background-position: center right;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.03);
}

.header-image-container {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.model-hints {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: #fff;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.model-hints svg {
    opacity: 0.8;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 10;
}

.header-content .tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 0.3em;
    display: block;
    text-transform: uppercase;
}

.header-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.04em;
    text-shadow: 0 4px 12px rgba(0,0,0,0.8);
}

.header-content .dot {
    color: var(--accent);
}

.header-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    opacity: 0.9;
    max-width: 480px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.header-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-action {
    background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 100%);
    color: #fff;
    border: none;
    padding: 0.9rem 1.8rem;
    border-radius: 12px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.5),
                0 4px 12px rgba(52, 152, 219, 0.2);
    text-decoration: none;
}

.btn-action:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.6),
                0 8px 20px rgba(52, 152, 219, 0.4);
    filter: brightness(1.1);
}

.btn-icon {
    font-size: 1.1rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.btn-action:hover .btn-icon {
    transform: rotate(-10deg) scale(1.2);
}


/* --- LOADER 3D --- */
.loader-overlay {
    position: absolute;
    inset: 0;
    background: #050505;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity 0.6s ease;
    border-radius: 12px;
}

.loader-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.loader-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.2em;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.loader-bar-container {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1px;
    overflow: hidden;
}

.loader-bar-fill {
    height: 100%;
    width: var(--progress, 0%);
    background: var(--accent);
    transition: width 0.3s linear;
    box-shadow: 0 0 10px var(--accent);
}

.loader-percentage {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

/* --- GRID DE CONTENIDO --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    margin-bottom: 4rem;
}

.info-block {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-block h2 {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    color: var(--purple);
    display: flex;
    align-items: center;
    gap: 1.2rem;
    text-transform: uppercase;
    font-weight: 700;
}

.info-block h2::after {
    content: '';
    height: 1px;
    flex-grow: 1;
    background: var(--border);
}

.info-block p {
    font-size: 0.95rem;
    line-height: 1.8;
    opacity: 0.8;
}

.info-block ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.info-block li {
    font-size: 0.9rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-block li span {
    font-family: var(--font-mono);
    color: var(--accent);
    font-weight: 700;
    min-width: 100px;
    font-size: 0.8rem;
}

.info-block.full-width {
    grid-column: span 2;
    margin-top: 2rem;
}

.info-block.conclusion {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid var(--border);
    padding: 3.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.info-block.conclusion h2 { color: var(--accent); }

/* --- GALERÍA --- */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.media-item {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    cursor: zoom-in;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s ease,
                background 0.4s ease;
}

.media-item:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.06);
}

.media-content {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    background: #111;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.media-item:hover .media-content {
    transform: scale(1.02);
}

.media-caption {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--muted);
    letter-spacing: 0.1em;
}

/* --- FOOTER --- */
.project-footer {
    margin-top: 8rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff88;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 10px #00ff88; }
    50% { box-shadow: 0 0 20px #00ff88, 0 0 40px rgba(0, 255, 136, 0.3); }
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .project-header {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 3rem 2rem;
    }

    .header-image-container {
        height: 300px;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .info-block.full-width {
        grid-column: span 1;
    }

    .header-content h1 {
        font-size: 3rem;
    }
}

@media (max-width: 600px) {
    .project-container {
        padding: 2rem 1rem;
    }

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

    .info-block.conclusion {
        padding: 2rem;
    }
}
