/* ========================================
   CSS Variables & Reset
======================================== */
:root {
    --main-green: #00ff41;
    --dark-bg: #0d0d0d;
    --card-bg: #1a1a1a;
    --text-gray: #b0b0b0;
    --text-white: #ffffff;
    --border-color: rgba(0, 255, 65, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-white);
    font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ========================================
   Splash Screen
======================================== */
#splash-screen {
    position: fixed;
    inset: 0;
    background: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

#splash-screen.fade-out {
    opacity: 0;
    transform: scale(1.1);
    filter: blur(10px);
    pointer-events: none;
}

#splash-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.splash-content {
    text-align: center;
    z-index: 2;
    position: relative;
}

.hack-text {
    font-size: clamp(100px, 25vw, 250px);
    font-weight: 700;
    color: var(--main-green);
    position: relative;
    text-shadow: 
        0 0 20px var(--main-green),
        0 0 40px var(--main-green),
        0 0 60px var(--main-green);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 
            0 0 20px var(--main-green),
            0 0 40px var(--main-green),
            0 0 60px var(--main-green);
    }
    to {
        text-shadow: 
            0 0 30px var(--main-green),
            0 0 60px var(--main-green),
            0 0 90px var(--main-green),
            0 0 120px var(--main-green);
    }
}

.splash-subtitle {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: var(--main-green);
    margin-top: 1rem;
    letter-spacing: 8px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.click-hint {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-gray);
    animation: pulse 2s infinite;
    letter-spacing: 2px;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* ========================================
   Main Content (Hidden Initially)
======================================== */
#main-content {
    opacity: 0;
    visibility: hidden;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 0.3s;
}

#main-content.visible {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   Network Background Canvas
======================================== */
#network-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#network-canvas.visible {
    opacity: 1;
}

/* ========================================
   Tilt Effect - Global
======================================== */
.tilt-element {
    transition: transform 0.15s ease-out !important;
    transform-style: preserve-3d;
}

/* ========================================
   Hero Section
======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
    background: 
        radial-gradient(ellipse at top, rgba(0, 255, 65, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(0, 255, 65, 0.03) 0%, transparent 50%);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(rgba(0, 255, 65, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Profile Image */
.profile-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.profile-ring {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, var(--main-green), transparent);
    animation: rotate 8s linear infinite;
}

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

.profile-img-container {
    position: relative;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--dark-bg);
    background: var(--card-bg);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.profile-wrapper:hover .profile-img {
    transform: scale(1.1);
}

.status-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--main-green);
    backdrop-filter: blur(4px);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--main-green);
    border-radius: 50%;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 255, 65, 0.4); }
    50% { opacity: 0.8; transform: scale(1.1); box-shadow: 0 0 0 6px rgba(0, 255, 65, 0); }
}

/* Glitch Title */
.glitch-title {
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.text-white { color: var(--text-white); }
.text-green { color: var(--main-green); }

.glitch {
    position: relative;
    display: inline-block;
}

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

.glitch::before {
    color: var(--main-green);
    animation: glitch-1 3s infinite linear alternate-reverse;
}

.glitch::after {
    color: var(--main-green);
    animation: glitch-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-1 {
    0%, 90%, 100% { opacity: 0; transform: translate(0); }
    92% { opacity: 0.5; transform: translate(-2px, 2px); }
    94% { opacity: 0; transform: translate(2px, -2px); }
    96% { opacity: 0.5; transform: translate(-2px, 0); }
    98% { opacity: 0; transform: translate(2px, 2px); }
}

@keyframes glitch-2 {
    0%, 90%, 100% { opacity: 0; transform: translate(0); }
    91% { opacity: 0.5; transform: translate(2px, -2px); }
    93% { opacity: 0; transform: translate(-2px, 2px); }
    95% { opacity: 0.5; transform: translate(2px, 0); }
    97% { opacity: 0; transform: translate(-2px, -2px); }
}

/* Typing Tagline */
.tagline {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--text-gray);
    margin-bottom: 2rem;
    height: 2rem;
}

.cursor {
    color: var(--main-green);
    animation: cursorBlink 1s step-end infinite;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Quick Stats */
.quick-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: var(--main-green);
}

.stat-item .icon {
    width: 18px;
    height: 18px;
    color: var(--main-green);
}

.stat-item span {
    font-size: 0.875rem;
    color: var(--text-gray);
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-icon {
    width: 18px;
    height: 18px;
}

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

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.4);
}

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

.btn-outline:hover {
    border-color: var(--main-green);
    background: rgba(0, 255, 65, 0.05);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-gray);
    font-size: 0.75rem;
    animation: bounce 2s ease-in-out infinite;
}

.scroll-indicator svg {
    width: 20px;
    height: 20px;
    color: var(--main-green);
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* ========================================
   Container & Sections
======================================== */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 2;
}

.section {
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.section:nth-child(1) { animation-delay: 0.1s; }
.section:nth-child(2) { animation-delay: 0.2s; }
.section:nth-child(3) { animation-delay: 0.3s; }
.section:nth-child(4) { animation-delay: 0.4s; }
.section:nth-child(5) { animation-delay: 0.5s; }
.section:nth-child(6) { animation-delay: 0.6s; }
.section:nth-child(7) { animation-delay: 0.7s; }

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

.card {
    background: rgba(10, 10, 10, 0.8);
    padding: 2rem;
    border-radius: 16px;
    border-left: 4px solid var(--main-green);
    backdrop-filter: blur(8px);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.section-icon {
    padding: 8px;
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.section-icon svg {
    width: 24px;
    height: 24px;
    color: var(--main-green);
}

.section h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.green {
    color: var(--main-green);
}

.highlight {
    color: var(--main-green);
    font-weight: 600;
}

/* About Section */
.about-text {
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.security-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.badge {
    padding: 8px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--main-green);
    transition: all 0.3s ease;
}

.badge:hover {
    border-color: var(--main-green);
    transform: translateY(-2px);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.skill-tag {
    background: var(--card-bg);
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--main-green);
    transition: all 0.3s ease;
    cursor: default;
}

.skill-tag:hover {
    border-color: var(--main-green);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 255, 65, 0.15);
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.tool-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    cursor: pointer;
}

.tool-item:hover {
    border-color: var(--main-green);
}

.tool-item svg {
    width: 20px;
    height: 20px;
    color: var(--main-green);
    flex-shrink: 0;
}

.tool-item span {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Code Window */
.code-window {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.1);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #111;
    border-bottom: 1px solid var(--border-color);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.file-name {
    margin-left: 12px;
    font-size: 0.8rem;
    color: #888;
}

pre {
    padding: 1.5rem;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
}

code {
    color: #f8f8f2;
    font-family: inherit;
}

.code-comment { color: #6a9955; }
.code-string { color: #ce9178; }

code.terminal {
    color: var(--main-green);
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    background: rgba(10, 10, 10, 0.8);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--main-green), transparent);
    animation: scan 3s linear infinite;
}

@keyframes scan {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(300px); opacity: 0; }
}

.stat-box {
    text-align: center;
    padding: 1rem;
}

.stat-box svg {
    width: 32px;
    height: 32px;
    color: var(--main-green);
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-gray);
}

/* Contact Section */
.contact-section {
    text-align: center;
    padding: 3rem 2rem;
}

.contact-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.contact-text {
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--main-green);
    transition: all 0.3s ease;
}

.social-link:hover {
    border-color: var(--main-green);
    box-shadow: 0 8px 20px rgba(0, 255, 65, 0.2);
}

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

.social-link svg {
    width: 24px;
    height: 24px;
}

/* ========================================
   Footer
======================================== */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    background: var(--dark-bg);
    position: relative;
    z-index: 2;
}

footer p {
    color: var(--text-gray);
    font-size: 0.875rem;
}

.footer-code {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #555;
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 768px) {
    .hero {
        padding: 1.5rem;
    }

    .profile-img-container {
        width: 120px;
        height: 120px;
    }

    .quick-stats {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .card {
        padding: 1.5rem;
    }

    .skills-grid,
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-section {
        grid-template-columns: 1fr;
    }

    pre {
        padding: 1rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .glitch-title {
        font-size: 1.5rem;
    }

    .skills-grid,
    .tools-grid {
        grid-template-columns: 1fr;
    }
}
