/* ═══════════════════════════════════════════
   IRON TURING — Futuristic AI Portfolio
   ═══════════════════════════════════════════ */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #05080f;
    color: #e8edf5;
    font-family: 'Rajdhani', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ═══════════════════════════════════════════
   SOCIAL BAR
   ═══════════════════════════════════════════ */
.social-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    background: rgba(5, 8, 15, 0.85);
    border-bottom: 1px solid #1a2238;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.social-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.social-link span {
    display: inline;
}

/* YouTube - Rojo corporativo */
.social-link--youtube {
    color: #FF0000;
    border-color: rgba(255, 0, 0, 0.2);
    background: rgba(255, 0, 0, 0.05);
}
.social-link--youtube:hover {
    background: rgba(255, 0, 0, 0.15);
    border-color: rgba(255, 0, 0, 0.5);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.15);
}

/* X (Twitter) - Blanco */
.social-link--x {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
}
.social-link--x:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

/* Telegram - Azul corporativo */
.social-link--telegram {
    color: #26A5E4;
    border-color: rgba(38, 165, 228, 0.2);
    background: rgba(38, 165, 228, 0.05);
}
.social-link--telegram:hover {
    background: rgba(38, 165, 228, 0.15);
    border-color: rgba(38, 165, 228, 0.5);
    box-shadow: 0 0 20px rgba(38, 165, 228, 0.15);
}

/* Email - Cyan del tema */
.social-link--email {
    color: #00f0ff;
    border-color: rgba(0, 240, 255, 0.2);
    background: rgba(0, 240, 255, 0.05);
}
.social-link--email:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: rgba(0, 240, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
}

/* ── Noise Overlay ── */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* ── Grid Background ── */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 70%);
}

/* ── Particle Canvas ── */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* ── Scanline ── */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.08) 2px,
        rgba(0, 0, 0, 0.08) 4px
    );
}

/* ── Main Content ── */
main {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.hero {
    text-align: center;
    padding: 160px 0 60px;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 100px;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    letter-spacing: 3px;
    color: #00f0ff;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease-out both;
    background: rgba(0, 240, 255, 0.04);
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: #00f0ff;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-dot 2s ease-in-out infinite;
    box-shadow: 0 0 8px #00f0ff;
}

/* ── Glitch Title ── */
.glitch {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1.1;
    color: #e8edf5;
    position: relative;
    display: inline-block;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    text-shadow: 0 0 40px rgba(0, 240, 255, 0.15);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.glitch::before {
    color: #00f0ff;
    z-index: -1;
    animation: glitch-1 4s infinite linear alternate-reverse;
    clip-path: inset(0 0 80% 0);
    opacity: 0.6;
}

.glitch::after {
    color: #ff2ecb;
    z-index: -2;
    animation: glitch-2 4s infinite linear alternate-reverse;
    clip-path: inset(80% 0 0 0);
    opacity: 0.6;
}

/* TEXTOS CLAROS */
.subtitle {
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 400;
    color: #b8c4d6;
    margin-top: 24px;
    letter-spacing: 1px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.highlight {
    color: #00f0ff;
    font-weight: 600;
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.hero-line {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00f0ff, transparent);
    margin: 28px auto;
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.tagline {
    font-size: 1.1rem;
    color: #9dabbe;
    font-weight: 400;
    letter-spacing: 0.5px;
    animation: fadeInUp 0.8s ease-out 0.6s both;
    min-height: 1.5em;
}

/* ═══════════════════════════════════════════
   CARDS SECTION
   ═══════════════════════════════════════════ */
.cards-section {
    padding: 40px 0 100px;
}

.section-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    letter-spacing: 4px;
    color: #9dabbe;
    animation: fadeInUp 0.8s ease-out 0.7s both;
}

.label-line {
    width: 40px;
    height: 1px;
    background: #2a3550;
    display: inline-block;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* ── Card Base ── */
.card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: #e8edf5;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0;
    transform: translateY(40px);
    display: block;
}

.card.visible {
    animation: cardReveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.card:hover {
    transform: translateY(-6px);
}

/* ── Card Glow ── */
.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
    border-radius: 16px;
    pointer-events: none;
}

.card:hover .card-glow {
    opacity: 1;
}

.card-glow--cyan {
    box-shadow: inset 0 0 60px rgba(0, 240, 255, 0.06), 0 0 40px rgba(0, 240, 255, 0.08);
}

.card-glow--magenta {
    box-shadow: inset 0 0 60px rgba(255, 46, 203, 0.06), 0 0 40px rgba(255, 46, 203, 0.08);
}

.card-glow--green {
    box-shadow: inset 0 0 60px rgba(57, 255, 20, 0.06), 0 0 40px rgba(57, 255, 20, 0.08);
}

/* ── Card Border ── */
.card-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    border: 1px solid #1a2238;
    transition: border-color 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.card[data-index="0"]:hover .card-border { border-color: rgba(0, 240, 255, 0.3); }
.card[data-index="1"]:hover .card-border { border-color: rgba(255, 46, 203, 0.3); }
.card[data-index="2"]:hover .card-border { border-color: rgba(57, 255, 20, 0.3); }

/* ── Card Content ── */
.card-content {
    position: relative;
    z-index: 2;
    padding: 36px 32px 28px;
    background: rgba(10, 15, 26, 0.95);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 24px;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.card[data-index="0"] .card-icon { color: #00f0ff; }
.card[data-index="1"] .card-icon { color: #ff2ecb; }
.card[data-index="2"] .card-icon { color: #39ff14; }

.card:hover .card-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 12px currentColor);
}

.card-icon svg {
    width: 100%;
    height: 100%;
}

/* TAGS más claros */
.card-tag {
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    letter-spacing: 3px;
    color: #9dabbe;
    margin-bottom: 12px;
}

.card h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.card[data-index="0"] h2 { color: #00f0ff; }
.card[data-index="1"] h2 { color: #ff2ecb; }
.card[data-index="2"] h2 { color: #39ff14; }

/* Descripciones más claras */
.card p {
    font-size: 1rem;
    line-height: 1.7;
    color: #b0bdd0;
    flex: 1;
    font-weight: 400;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #1a2238;
}

.card-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    letter-spacing: 3px;
    color: #9dabbe;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot--live {
    background: #39ff14;
    box-shadow: 0 0 8px #39ff14;
    animation: pulse-dot 2s ease-in-out infinite;
}

.card-arrow {
    color: #9dabbe;
    transition: transform 0.3s ease, color 0.3s ease;
    display: flex;
}

.card[data-index="0"]:hover .card-arrow { color: #00f0ff; transform: translateX(4px); }
.card[data-index="1"]:hover .card-arrow { color: #ff2ecb; transform: translateX(4px); }
.card[data-index="2"]:hover .card-arrow { color: #39ff14; transform: translateX(4px); }

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.footer {
    padding: 32px 0;
    border-top: 1px solid #1a2238;
}

.footer-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    letter-spacing: 3px;
    color: #9dabbe;
}

.footer-separator {
    color: #00f0ff;
    font-size: 6px;
}

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes cardReveal {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes glitch-1 {
    0% { clip-path: inset(0 0 85% 0); transform: translate(0); }
    10% { clip-path: inset(15% 0 60% 0); transform: translate(-3px, 1px); }
    20% { clip-path: inset(50% 0 20% 0); transform: translate(2px, -1px); }
    30% { clip-path: inset(10% 0 70% 0); transform: translate(0); }
    40% { clip-path: inset(70% 0 5% 0); transform: translate(-2px, 2px); }
    50% { clip-path: inset(30% 0 40% 0); transform: translate(1px, 0); }
    60% { clip-path: inset(0 0 85% 0); transform: translate(0); }
    70% { clip-path: inset(60% 0 10% 0); transform: translate(3px, -1px); }
    80% { clip-path: inset(20% 0 55% 0); transform: translate(-1px, 1px); }
    90% { clip-path: inset(80% 0 0 0); transform: translate(0); }
    100% { clip-path: inset(5% 0 80% 0); transform: translate(2px, 0); }
}

@keyframes glitch-2 {
    0% { clip-path: inset(80% 0 0 0); transform: translate(0); }
    10% { clip-path: inset(50% 0 20% 0); transform: translate(2px, -1px); }
    20% { clip-path: inset(10% 0 70% 0); transform: translate(-3px, 2px); }
    30% { clip-path: inset(60% 0 15% 0); transform: translate(0); }
    40% { clip-path: inset(20% 0 50% 0); transform: translate(3px, 1px); }
    50% { clip-path: inset(70% 0 5% 0); transform: translate(-1px, 0); }
    60% { clip-path: inset(40% 0 30% 0); transform: translate(0); }
    70% { clip-path: inset(5% 0 75% 0); transform: translate(-2px, -2px); }
    80% { clip-path: inset(55% 0 15% 0); transform: translate(1px, 1px); }
    90% { clip-path: inset(25% 0 45% 0); transform: translate(0); }
    100% { clip-path: inset(75% 0 0 0); transform: translate(-3px, 0); }
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 130px 0 40px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card-content {
        padding: 28px 24px 24px;
    }

    .hero-badge {
        font-size: 10px;
        letter-spacing: 2px;
    }

    .social-bar-inner {
        gap: 6px;
        padding: 8px 16px;
    }

    .social-link {
        padding: 5px 10px;
        font-size: 9px;
    }

    .social-link span {
        display: none;
    }
}

@media (max-width: 480px) {
    main {
        padding: 0 16px;
    }

    .glitch {
        letter-spacing: 0.04em;
    }

    .section-label {
        font-size: 9px;
        letter-spacing: 3px;
    }
}
