/* =========================================
   Base & Reset - RAW Aesthetic
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    background-color: #050505;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #e5e5e5;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 40px 0;
}

/* Monospace specific elements */
.bio, .quick-info, .skill-pill, .footer, .toast-notification {
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); border-width: 0;
}

/* =========================================
   Noise & Grain (The RAW feel)
   ========================================= */
.noise {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* =========================================
   Interactive Background Blobs
   ========================================= */
.background-elements {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.grid-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black 30%, transparent 80%);
}

.blob {
    position: absolute;
    filter: blur(90px);
    border-radius: 50%;
    opacity: 0.5;
    will-change: transform;
    /* Removed CSS animation because JS is driving it now */
}

.blob-1 {
    width: 450px; height: 450px;
    background: #5865F2; /* Electric Blue/Purple */
    top: 10%; left: 10%;
}

.blob-2 {
    width: 400px; height: 400px;
    background: #ff2a5f; /* Neon Pink/Red */
    bottom: 10%; right: 10%;
}

.blob-3 {
    width: 300px; height: 300px;
    background: #00ff88; /* Cyber Green */
    top: 50%; left: 50%;
    margin-top: -150px; margin-left: -150px;
}

/* =========================================
   3D Tilt Container & Glass Card
   ========================================= */
.perspective-container {
    perspective: 1200px; /* 3D depth */
    max-width: 540px;
    width: 92%;
    position: relative;
    z-index: 2;
    margin: 0 auto;
}

.glass-card {
    background: rgba(15, 15, 18, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 45px 35px;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out; /* Smooth recovery for JS tilt */
}

/* Staggered Entry Animation */
.fade-in-stagger { animation: fadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.pop-out { opacity: 0; animation: popZ 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(40px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes popZ {
    0% { opacity: 0; transform: translateZ(-50px) translateY(20px); }
    100% { opacity: 1; transform: translateZ(30px) translateY(0); } /* pops out of the 3D card */
}

/* Applies the pop-out depth to children so tilt is noticeable */
.glass-card > * {
    transform: translateZ(30px);
}

/* =========================================
   Profile Section
   ========================================= */
.profile { text-align: center; margin-bottom: 30px; }

.profile-img-container {
    position: relative;
    width: 120px; height: 120px;
    margin: 0 auto 20px;
    transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.pulse-ring {
    position: absolute;
    top: -8px; left: -8px; right: -8px; bottom: -8px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: glitchPulse 3s infinite;
    z-index: -1;
}

@keyframes glitchPulse {
    0% { transform: scale(1); opacity: 1; border-color: rgba(255, 255, 255, 0.5); }
    50% { transform: scale(1.1); opacity: 0.5; border-color: #00ff88; }
    100% { transform: scale(1.3); opacity: 0; }
}

.profile-img {
    width: 100%; height: 100%;
    border-radius: 50%;
    border: 2px solid #333;
    object-fit: cover;
    filter: contrast(1.1) grayscale(0.2);
}

.status-badge {
    position: absolute; bottom: 5px; right: 5px;
    width: 18px; height: 18px;
    background-color: #00ff88;
    border: 3px solid #0f0f12;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.6);
}

.name {
    font-size: clamp(28px, 6vw, 36px);
    font-weight: 700;
    letter-spacing: -1px;
    color: #ffffff;
    margin-bottom: 8px;
}

.bio {
    color: #00ff88;
    font-size: 13px;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

/* Quick Info */
.quick-info {
    display: flex; justify-content: center; gap: 15px;
    margin-bottom: 10px; font-size: 12px; color: #888;
}

.info-item {
    display: flex; align-items: center; gap: 6px;
    background: rgba(255, 255, 255, 0.02);
    padding: 6px 12px; border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.info-item svg { width: 14px; height: 14px; }

/* =========================================
   Skills (Raw text)
   ========================================= */
.skills-section { margin-bottom: 35px; }

.skills-container {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}

.skill-pill {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; letter-spacing: 1px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
    transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.skill-pill img { filter: grayscale(1) brightness(0.8); transition: filter 0.3s; }
.skill-pill:hover img { filter: grayscale(0) brightness(1.2); }

/* =========================================
   Links Section (Magnetic & Raw)
   ========================================= */
.links {
    display: flex; flex-direction: column; gap: 14px;
}

.link {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px 20px;
    border-radius: 0; /* Sharp edges for raw look */
    display: flex; align-items: center;
    text-decoration: none;
    color: #fff;
    font-family: 'Space Mono', monospace;
    font-size: 14px; letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: background 0.3s, border-color 0.3s; /* No transform transition to avoid fighting JS */
}

/* Cyberpunk scanline effect on hover */
.link::before {
    content: '';
    position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: skewX(-20deg);
    transition: 0s;
}

.link:hover::before {
    left: 200%;
    transition: 0.6s ease-in-out;
}

.link span { flex-grow: 1; font-weight: 700; }

.link .arrow {
    width: 18px; height: 18px; opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.icon {
    width: 40px; height: 40px;
    background: rgba(255, 255, 255, 0.03);
    display: flex; align-items: center; justify-content: center;
    margin-right: 18px;
    border-radius: 4px;
    transition: background 0.3s;
}

.icon svg { width: 20px; height: 20px; fill: currentColor; }

.link:hover {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.link:hover .arrow { opacity: 1; transform: translateX(0); }

/* Brand Colors with strong neon vibe */
.link.instagram:hover { border-color: #E1306C; color: #E1306C; }
.link.instagram:hover .icon { background: rgba(225, 48, 108, 0.1); color: #E1306C; }

.link.facebook:hover { border-color: #1877F2; color: #1877F2; }
.link.facebook:hover .icon { background: rgba(24, 119, 242, 0.1); color: #1877F2; }

.link.github:hover { border-color: #fff; color: #fff; }
.link.github:hover .icon { background: rgba(255, 255, 255, 0.1); color: #fff; }

.link.discord:hover { border-color: #5865F2; color: #5865F2; }
.link.discord:hover .icon { background: rgba(88, 101, 242, 0.1); color: #5865F2; }

.link.email:hover { border-color: #EA4335; color: #EA4335; }
.link.email:hover .icon { background: rgba(234, 67, 53, 0.1); color: #EA4335; }

/* =========================================
   Footer & Toast
   ========================================= */
.footer {
    margin-top: 40px; text-align: center;
    font-size: 11px; color: #555;
    letter-spacing: 2px;
}

.toast-notification {
    position: fixed; bottom: 30px; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #00ff88; color: #000;
    padding: 12px 20px; font-weight: 700;
    font-size: 12px; letter-spacing: 1px;
    z-index: 1000; opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
    display: flex; align-items: center;
}

.toast-notification.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =========================================
   Media Queries
   ========================================= */
@media (max-width: 480px) {
    .glass-card { padding: 35px 25px; border-radius: 0; border-left: none; border-right: none; }
    .name { font-size: 26px; }
    .link { padding: 14px; font-size: 13px; }
    .icon { width: 36px; height: 36px; margin-right: 12px; }
    .about-text { font-size: 14px; }
}