/* Importamos fuentes limpias y brutalistas */
@import url('https://fonts.googleapis.com/css2?family=Syncopate:wght@700&family=Inter:wght@400;600&display=swap');

:root {
    --bg-color: #070707;
    --text-color: #ffffff;
    --accent-color: #8c35ff; /* Morado OSRS */
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    height: 100vh;
    overflow: hidden; 
}

/* =========================================
   ESTILOS GENERALES Y HEADER
   ========================================= */
.header {
    position: absolute;
    top: 40px;
    right: 50px;
    z-index: 100;
}

.name-3d {
    font-family: 'Syncopate', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
    cursor: default;
    display: inline-block;
    
    transform: perspective(500px) rotateX(15deg) rotateY(-15deg);
    text-shadow: 
        1px 1px 0 #333,
        2px 2px 0 #333,
        3px 3px 0 #222,
        4px 4px 0 #111,
        5px 5px 0 var(--accent-color),
        6px 6px 15px rgba(0,0,0,0.8);
    transition: all 0.4s ease;
}

.name-3d:hover {
    transform: perspective(500px) rotateX(0deg) rotateY(0deg);
    text-shadow: 0 0 15px var(--accent-color);
}

/* =========================================
   PÁGINA PRINCIPAL (INDEX)
   ========================================= */
.container {
    display: flex;
    height: 100vh;
    align-items: center;
    padding: 0 5%;
    position: relative;
}

.hero-text {
    flex: 1;
    z-index: 10;
    padding-left: 2%;
}

.hardcore-title {
    font-family: 'Syncopate', sans-serif;
    font-size: clamp(3rem, 6vw, 6.5rem);
    line-height: 1;
    letter-spacing: -2px;
    margin-bottom: 20px;
    
    background: linear-gradient(180deg, #ffffff 0%, #7a7a7a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
}

.subtitle {
    font-size: 1.1rem;
    color: #a3a3a3;
    letter-spacing: 1px;
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 40px;
    border-left: 4px solid var(--accent-color);
    padding-left: 20px;
}

.buttons {
    display: flex;
    gap: 20px;
}

.btn-primary, .btn-secondary {
    padding: 15px 35px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--text-color);
    color: var(--bg-color);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255,255,255,0.1);
}

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

.btn-secondary:hover {
    border-color: var(--text-color);
}

/* 3D Model */
.hero-3d {
    flex: 1.2;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

model-viewer {
    width: 100%;
    height: 80%;
    background-color: transparent;
    --poster-color: transparent;
    outline: none; 
}

/* Ticker animado */
.ticker-wrap {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: var(--accent-color);
    padding: 15px 0;
    overflow: hidden;
    z-index: 20;
}

.ticker {
    display: flex;
    white-space: nowrap;
    animation: tickerAnim 20s linear infinite;
    font-family: 'Syncopate', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
}

.ticker span {
    padding: 0 2rem;
}

@keyframes tickerAnim {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}


/* =========================================
   PÁGINA DE PROYECTOS (PROJECTS.HTML)
   ========================================= */

body.scrollable-body {
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 50px;
}

.projects-wrapper {
    padding: 120px 5% 50px;
    max-width: 1400px;
    margin: 0 auto;
}

.projects-header {
    margin-bottom: 60px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 40px;
}

.project-card {
    background-color: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(140, 53, 255, 0.1);
    transform: translateY(-5px);
}

.project-image {
    width: 100%;
    height: 250px;
    background-color: #111;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* <--- ESTO HACE QUE ENCAJE COMPLETA SIN CORTARSE */
    opacity: 0.7;
    transition: opacity 0.3s ease;
    padding: 10px; /* Le da un espacio a los lados para que respire y no pegue del borde */
}

.project-card:hover .project-image img {
    opacity: 1;
}

.tech-tags {
    position: absolute;
    bottom: 15px;
    left: 15px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tech-tags span {
    background-color: var(--accent-color);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-info {
    padding: 25px;
}

.project-info h2 {
    font-family: 'Syncopate', sans-serif;
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.project-info p {
    color: #a3a3a3;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Responsivo para móviles */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .hardcore-title {
        font-size: 3rem;
    }
    .header {
        position: relative;
        top: 20px;
        right: 0;
        text-align: center;
        margin-bottom: 20px;
    }
}