/* ═══════════════════════════════════════════════
   RAÚL HEREDIA — CYBERPUNK PORTFOLIO v2
   Paleta: Terminal Nocturna + Matrix Green
   ═══════════════════════════════════════════════ */

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

:root {
    --bg-deep: #0a0e17;
    --bg-surface: #0f1724;
    --bg-elevated: #162032;
    --glass-bg: rgba(16, 24, 40, 0.55);
    --glass-border: rgba(0, 240, 255, 0.08);
    --glass-border-hover: rgba(0, 240, 255, 0.25);

    --accent-cyan: #00f0ff;
    --accent-violet: #8b5cf6;
    --accent-green: #00ff41;
    --accent-gradient: linear-gradient(135deg, #00f0ff 0%, #8b5cf6 100%);
    --accent-glow: 0 0 20px rgba(0, 240, 255, 0.3);
    --violet-glow: 0 0 20px rgba(139, 92, 246, 0.3);
    --green-glow: 0 0 15px rgba(0, 255, 65, 0.4);

    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-code: #00f0ff;

    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    font-size: 16px;
}

body {
    overflow-x: hidden;
    position: relative;
    cursor: url('assets/img/cursor-green.svg') 4 14, auto;
}

a, button, .btn-primary, .btn-secondary, .btn-nav-sm, .nav-links a, .social-icons a, .tech-tags span {
    cursor: url('assets/img/cursor-green.svg') 4 14, pointer;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
    background: var(--accent-green);
    border-radius: 3px;
    box-shadow: 0 0 6px var(--accent-green);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-cyan); }

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

/* ── Glassmorphism ── */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-green), transparent);
    opacity: 0.4;
    animation: shimmer-line 4s ease-in-out infinite;
}

.glass-card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), var(--accent-glow);
    transform: translateY(-4px);
}

/* ── Typography ── */
h1, h2, h3, h4 {
    color: #ffffff;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.mono { font-family: var(--font-mono); }

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

/* ── Scan Lines ── */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 65, 0.012) 2px,
        rgba(0, 255, 65, 0.012) 4px
    );
}

/* ═══════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════ */
#navbar {
    position: fixed;
    top: 0; width: 100%;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 14, 23, 0.88);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

#navbar.scrolled {
    border-bottom-color: rgba(0, 255, 65, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(0, 255, 65, 0.1);
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--accent-cyan);
    animation: text-flicker 3s infinite;
}

.logo .dot {
    color: var(--accent-green);
    animation: blink-cursor 0.8s step-end infinite;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    transition: var(--transition);
}

.nav-links a::before {
    content: '>';
    color: var(--accent-green);
    opacity: 0;
    margin-right: 4px;
    transition: var(--transition);
    display: inline-block;
    transform: translateX(-8px);
}

.nav-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-cyan);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ── Buttons ── */
.btn-primary, .btn-secondary, .btn-nav-sm {
    display: inline-block;
    padding: 0.75rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #0a0e17;
    border: none;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.6s;
}

.btn-primary:hover::after {
    transform: rotate(45deg) translateX(100%);
}

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.4), 0 0 60px rgba(139, 92, 246, 0.2);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
}

.btn-secondary:hover {
    background: rgba(0, 255, 65, 0.08);
    box-shadow: var(--green-glow);
    transform: translateY(-2px);
}

.btn-nav-sm {
    background: rgba(0, 255, 65, 0.06);
    border: 1px solid rgba(0, 255, 65, 0.2);
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    color: var(--accent-green);
}

.btn-nav-sm:hover {
    background: rgba(0, 255, 65, 0.12);
    border-color: var(--accent-green);
    box-shadow: var(--green-glow);
}

/* ── Layout ── */
.section {
    padding: 7rem 5% 4rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-green);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
    display: block;
    animation: text-flicker 5s infinite;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.section-title.glitch-active {
    animation: glitch 0.3s ease both;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════ */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
    max-width: 620px;
    animation: fade-slide-up 1s ease-out;
}

.hero-terminal-label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-green);
    margin-bottom: 1rem;
    opacity: 0.8;
    animation: typing-line 2s steps(40) 0.3s both;
    overflow: hidden;
    white-space: nowrap;
}

.hero-terminal-label .path {
    color: var(--accent-violet);
}

.title {
    font-size: 3.8rem;
    line-height: 1.08;
    margin-bottom: 1.5rem;
    font-weight: 800;
    animation: fade-slide-up 1s ease-out 0.3s both;
}

.tagline {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
    min-height: 1.6em;
}

/* ── Typing cursor (underscore) ── */
.tagline .cursor {
    display: inline-block;
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1em;
    text-shadow: 0 0 8px var(--accent-cyan), 0 0 16px rgba(0, 240, 255, 0.3);
    animation: blink-cursor 0.7s step-end infinite;
    vertical-align: baseline;
    margin-left: 1px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    animation: fade-slide-up 1s ease-out 0.6s both;
}

.social-icons {
    display: flex;
    gap: 1.5rem;
    animation: fade-slide-up 1s ease-out 0.9s both;
}

.social-icons a {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
}

.social-icons a::before {
    content: '>';
    color: var(--accent-green);
    font-weight: bold;
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--accent-green);
    text-shadow: var(--green-glow);
}

.social-icons a:hover::before {
    animation: blink-cursor 0.5s step-end infinite;
}

/* Hero Image */
.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    animation: fade-scale-in 1.2s ease-out 0.5s both;
}

.img-container {
    position: relative;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    overflow: visible;
    animation: float 6s ease-in-out infinite;
}

.img-container::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(
        var(--accent-cyan),
        var(--accent-violet),
        var(--accent-green),
        var(--accent-cyan),
        var(--accent-violet),
        var(--accent-green),
        var(--accent-cyan)
    );
    z-index: -1;
    animation: border-spin 3s linear infinite;
    filter: blur(1px);
}

.img-container::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--bg-deep);
    z-index: -1;
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    filter: grayscale(15%) contrast(1.1);
    transition: var(--transition-slow);
}

.img-container:hover img {
    filter: grayscale(0%) contrast(1.05);
    transform: scale(1.03);
}

.glow-effect {
    position: absolute;
    top: 50%; left: 50%;
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(0, 255, 65, 0.1) 0%, rgba(0, 240, 255, 0.08) 40%, transparent 70%);
    transform: translate(-50%, -50%);
    z-index: -2;
    animation: pulse-glow 3s ease-in-out infinite alternate;
}

/* ═══════════════════════════════════════
   ABOUT — TERMINAL WINDOW
   ═══════════════════════════════════════ */
.terminal-window {
    background: rgba(10, 14, 23, 0.92);
    border: 1px solid rgba(0, 255, 65, 0.12);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 255, 65, 0.03);
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 36, 0.95);
    border-bottom: 1px solid rgba(0, 255, 65, 0.08);
}

.terminal-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    transition: var(--transition);
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #28c840; box-shadow: 0 0 6px rgba(40, 200, 64, 0.5); }

.terminal-window:hover .terminal-dot.red { box-shadow: 0 0 8px #ff5f57; }
.terminal-window:hover .terminal-dot.yellow { box-shadow: 0 0 8px #ffbd2e; }
.terminal-window:hover .terminal-dot.green { box-shadow: 0 0 8px #28c840; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 1rem;
}

.terminal-body {
    padding: 2rem;
}

.terminal-body p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.terminal-body .prompt {
    font-family: var(--font-mono);
    color: var(--accent-green);
    font-size: 0.85rem;
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.3);
}

.about-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 2rem;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    justify-content: center;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.2rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.stat-card:hover::after {
    transform: scaleX(1);
}

.stat-card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: var(--accent-glow);
    transform: translateY(-3px);
}

.stat-card .stat-number {
    font-family: var(--font-mono);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent-green);
    display: block;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    display: block;
}

/* ═══════════════════════════════════════
   EXPERIENCE — GIT LOG
   ═══════════════════════════════════════ */
.git-log {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.git-log::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    left: 20px;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-green), var(--accent-cyan), var(--accent-violet), transparent);
    animation: line-grow 2s ease-out;
}

.commit-item {
    position: relative;
    margin-left: 50px;
}

.commit-item .commit-dot {
    position: absolute;
    top: 1.8rem;
    left: -38px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 12px var(--accent-green);
    z-index: 2;
    animation: dot-pulse 2s ease-in-out infinite;
}

.commit-item.finance .commit-dot {
    background: #eab308;
    box-shadow: 0 0 12px #eab308;
}

.commit-hash {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-violet);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.commit-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-green);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.commit-role {
    font-size: 1.25rem;
    margin-bottom: 0.3rem;
    color: #fff;
    font-weight: 700;
}

.commit-company {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 400;
}

.commit-item ul {
    padding-left: 1.2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    list-style: none;
}

.commit-item li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1rem;
}

.commit-item li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: bold;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-tags span {
    font-family: var(--font-mono);
    background: rgba(0, 255, 65, 0.06);
    border: 1px solid rgba(0, 255, 65, 0.18);
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--accent-green);
    transition: var(--transition);
}

.tech-tags span:hover {
    background: rgba(0, 255, 65, 0.14);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.25);
    transform: translateY(-2px);
}

/* ── Project Logo & Live Link ── */
.commit-project-logo {
    margin-bottom: 0.8rem;
}

.project-logo {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.08);
    padding: 4px;
    border: 2px solid rgba(0, 255, 65, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.project-logo:hover {
    border-color: var(--accent-green);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
    transform: scale(1.1) rotate(3deg);
}

.project-live-link {
    display: inline-block;
    margin-top: 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-green);
    border: 1px solid rgba(0, 255, 65, 0.2);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    transition: var(--transition);
    text-shadow: 0 0 4px rgba(0, 255, 65, 0.2);
}

.project-live-link:hover {
    background: rgba(0, 255, 65, 0.1);
    border-color: var(--accent-green);
    box-shadow: var(--green-glow);
    transform: translateX(4px);
}

/* ═══════════════════════════════════════
   TECH STACK — SYSTEM MONITOR
   ═══════════════════════════════════════ */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.stack-card { text-align: center; }

.stack-card .stack-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    display: block;
    animation: float 4s ease-in-out infinite;
}

.stack-category {
    font-family: var(--font-mono);
    font-size: 1rem;
    margin-bottom: 1.2rem;
    color: var(--accent-green);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(0, 255, 65, 0.12);
    padding-bottom: 0.6rem;
}

.skill-item { margin-bottom: 1rem; }

.skill-item .skill-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.skill-item .skill-label span {
    font-family: var(--font-mono);
    color: var(--accent-green);
    font-size: 0.75rem;
    text-shadow: 0 0 4px rgba(0, 255, 65, 0.3);
}

.skill-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.skill-bar .skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-green), var(--accent-cyan));
    border-radius: 4px;
    width: 0;
    transition: width 1.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
    position: relative;
}

.skill-bar .skill-progress::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 6px; height: 100%;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-green), 0 0 16px var(--accent-green);
    opacity: 0.8;
}

/* ═══════════════════════════════════════
   FORMATION
   ═══════════════════════════════════════ */
.formation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.formation-card .formation-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.formation-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.formation-card .formation-place {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-green);
    margin-bottom: 0.3rem;
}

.formation-card .formation-status {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ═══════════════════════════════════════
   CONTACT — SSH CONNECTION
   ═══════════════════════════════════════ */
#contact {
    text-align: center;
    padding: 7rem 5% 3rem;
    background: linear-gradient(to bottom, transparent, rgba(10, 14, 23, 0.95));
    border-top: 1px solid rgba(0, 255, 65, 0.05);
    margin-top: 4rem;
    position: relative;
    z-index: 1;
}

.contact-prompt {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.contact-prompt .cmd {
    color: var(--accent-green);
    text-shadow: 0 0 6px rgba(0, 255, 65, 0.3);
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-links a {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.footer-bottom {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 255, 65, 0.06);
}

/* ═══════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════ */
@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-18px); }
}

@keyframes border-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
    0% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.15); }
}

@keyframes glitch {
    0%   { transform: translate(0);      text-shadow: -2px 0 #00ff41, 2px 0 #00f0ff; }
    20%  { transform: translate(-3px, 2px); text-shadow: 2px 0 #8b5cf6, -2px 0 #00ff41; }
    40%  { transform: translate(3px, -2px); text-shadow: -2px 0 #00f0ff, 2px 0 #ff5f57; }
    60%  { transform: translate(-1px, 1px); text-shadow: 2px 0 #00ff41, -2px 0 #8b5cf6; }
    80%  { transform: translate(2px, -1px); text-shadow: -2px 0 #ff5f57, 2px 0 #00f0ff; }
    100% { transform: translate(0);      text-shadow: none; }
}

@keyframes shimmer-line {
    0%   { left: -100%; }
    50%  { left: 100%; }
    100% { left: 100%; }
}

@keyframes fade-slide-up {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-scale-in {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes typing-line {
    from { width: 0; }
    to   { width: 100%; }
}

@keyframes dot-pulse {
    0%, 100% { box-shadow: 0 0 6px currentColor; transform: scale(1); }
    50%      { box-shadow: 0 0 16px currentColor; transform: scale(1.3); }
}

@keyframes line-grow {
    from { transform: scaleY(0); transform-origin: top; }
    to   { transform: scaleY(1); transform-origin: top; }
}

@keyframes text-flicker {
    0%, 95%, 100% { opacity: 1; }
    96% { opacity: 0.6; }
    97% { opacity: 1; }
    98% { opacity: 0.4; }
    99% { opacity: 1; }
}

@keyframes tag-pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.1); box-shadow: 0 0 14px rgba(0, 255, 65, 0.35); }
    100% { transform: scale(1); }
}

/* ── Scroll Reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Variant reveals */
.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.85);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 900px) {
    #hero {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding-top: 8rem;
        gap: 3rem;
    }
    .hero-actions, .social-icons { justify-content: center; }
    .about-grid { grid-template-columns: 1fr; }
    .about-stats {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    .stat-card { min-width: 120px; }
    .img-container { width: 260px; height: 260px; }
    .title { font-size: 2.8rem; }
    .git-log::before { left: 14px; }
    .commit-item { margin-left: 40px; }
    .commit-item .commit-dot { left: -32px; }
    .hero-terminal-label { white-space: normal; }
}

@media (max-width: 600px) {
    .nav-links { display: none; }
    .contact-links { flex-direction: column; align-items: center; }
    .title { font-size: 2.2rem; }
    .hero-terminal-label { font-size: 0.75rem; }
    .terminal-body { padding: 1.2rem; }
    .stack-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 400px) {
    .stack-grid { grid-template-columns: 1fr; }
}
