/* --- Fase 1: Nueva Estética (Neón y Vidrio) --- */

/* --- Variables de Color y Tipografía --- */
:root {
    --primary-color: #00f5ff; /* Neón Cian */
    --primary-hover: #00c4cc;
    --background-dark: #0a0c10;
    --background-card: rgba(20, 25, 35, 0.7);
    --background-glass: rgba(20, 25, 35, 0.5);
    --text-light: #fafbfd;
    --text-dim: #c6c7cc;
    --border-color: rgba(0, 245, 255, 0.2);
    --card-shadow: 0 10px 30px rgba(0, 245, 255, 0.1);
    --font-primary: 'Orbitron', sans-serif; /* Fuente para títulos */
    --font-secondary: 'Poppins', sans-serif;   /* Fuente para cuerpo */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    color: var(--text-dim);
    background: var(--background-dark);
    margin: 0;
    line-height: 1.6;
    background-image: radial-gradient(circle at 10% 20%, rgba(0, 245, 255, 0.1) 0%, transparent 25%),
                      radial-gradient(circle at 80% 90%, rgba(0, 123, 255, 0.1) 0%, transparent 25%);
}

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

h1, h2, h3, h4 {
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--text-light);
}

/* --- Fase 2: Rediseño de Componentes --- */

/* --- Header (Glassmorphism) --- */
.header {
    background-color: var(--background-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease;
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    padding-bottom: 15px;
}
.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    font-size: 1.5rem;
    font-family: var(--font-primary);
    font-weight: 700;
}
.logo {
    height: 40px;
    margin-right: 10px;
}
.nav-menu a {
    text-decoration: none;
    color: var(--text-dim);
    margin-left: 25px;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 5px;
}
.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}
.nav-menu a:hover {
    color: var(--text-light);
}
.nav-menu a:hover::after {
    width: 100%;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(10, 12, 16, 0.8), rgba(0, 123, 255, 0.4));
}
.hero-content {
    position: relative;
    z-index: 1;
}
.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5em;
    text-shadow: 0 2px 10px rgba(0, 245, 255, 0.3);
}
.hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 1.5em;
    color: var(--text-dim);
}
.cta-button {
    background-color: transparent;
    color: var(--primary-color);
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    border: 2px solid var(--primary-color);
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.cta-button:hover {
    background-color: var(--primary-color);
    color: var(--background-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 245, 255, 0.3);
}

/* --- Galería de Proyectos (3D Flip Cards) --- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 50px;
    perspective: 1000px;
}

.card {
    background-color: transparent;
    border: none;
    height: 380px;
    position: relative;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: var(--background-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

.card-face.card-back {
    transform: rotateY(180deg);
    justify-content: space-around;
}

.card h3 {
    margin-top: 0;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.card p {
    color: var(--text-dim);
}

.card-back .tech-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.card-back .tech-list li {
    background-color: rgba(0, 245, 255, 0.1);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 5px;
    margin: 5px 0;
    font-size: 0.9rem;
}
.card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
    border: 1px solid var(--primary-color);
    padding: 10px 20px;
    border-radius: 50px;
    transition: opacity 0.3s ease;
}

/* --- Fase 3: Pulido y Cohesión --- */
.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 60px;
    padding-bottom: 60px;
}
@media (min-width: 992px) {
    .main-layout {
        grid-template-columns: 2fr 1fr;
    }
}

.content-section {
    margin-bottom: 50px;
}
.content-section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}
.content-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 10px auto 0;
    box-shadow: 0 0 10px var(--primary-color);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.sidebar .widget {
    background-color: var(--background-card);
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}
.sidebar h4 {
    font-size: 1.4rem;
    margin-top: 0;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}
.ad-space {
    height: 400px;
    background-color: rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    color: var(--text-dim);
    border: 1px dashed var(--border-color);
}
.sidebar ul {
    list-style: none;
    padding: 0;
}
.sidebar ul a {
    text-decoration: none;
    color: var(--text-dim);
    transition: color 0.3s ease;
}
.sidebar ul a:hover {
    color: var(--primary-color);
}

.content-section.standalone {
    background-color: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 60px 20px;
    text-align: center;
}

.footer {
    background-color: #05060a;
    color: var(--text-dim);
    padding: 50px 0;
    border-top: 1px solid var(--border-color);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-light);
}
.footer-col p, .footer-col a {
    color: var(--text-dim);
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
}
.footer-col a:hover {
    color: var(--primary-color);
}
.social-icons a {
    margin-right: 15px;
    font-size: 1.2rem;
}
.footer-legal {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    text-align: center;
    font-size: 0.9rem;
    color: #6c757d;
}
