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

/* VARIABLES */
:root {
    --primary: #00ff41; /* Matrix green */
    --secondary: #ff0040; /* Ghost red */
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --text: #e0e0e0;
    --text-dim: #888;
    --accent: #0099ff;
}

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

body {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-darker);
    color: var(--text);
    overflow-x: hidden;
}

/* LOADING SCREEN */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.terminal-loader {
    font-size: 1.5rem;
}

.cursor {
    display: inline-block;
    width: 3px;
    height: 1.5rem;
    background: var(--primary);
    animation: blink 1s infinite;
}

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

/* 3D CANVAS */
#ghost-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* NAVIGATION */
.nav-overlay {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
}

.nav-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
}

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

.nav-menu a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    position: relative;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

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

/* CONTENT OVERLAY */
.content-overlay {
    position: relative;
    z-index: 10;
    pointer-events: none;
}

.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 10%;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
    pointer-events: all;
}

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

.section-content {
    max-width: 1200px;
    width: 100%;
}

/* HERO SECTION */
.hero-section {
    text-align: center;
}

.glitch {
    font-size: 4rem;
    font-weight: 700;
    position: relative;
    color: var(--text);
    letter-spacing: 0.1em;
}

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

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: var(--secondary);
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: var(--primary);
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(20% 0 30% 0); transform: translate(-2px, 2px); }
    40% { clip-path: inset(50% 0 20% 0); transform: translate(2px, -2px); }
}

@keyframes glitch-2 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    60% { clip-path: inset(70% 0 10% 0); transform: translate(2px, 2px); }
    80% { clip-path: inset(10% 0 60% 0); transform: translate(-2px, -2px); }
}

.subhead {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin: 1rem 0;
}

.status-bar {
    margin-top: 2rem;
    padding: 1rem;
    border: 1px solid var(--primary);
    display: inline-block;
}

.status-online {
    color: var(--primary);
    margin-right: 2rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.arrow-down {
    width: 30px;
    height: 30px;
    border-right: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
    transform: rotate(45deg);
    margin: 1rem auto;
    animation: bounce 2s infinite;
}

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

/* SECTION TITLES */
.section-title {
    font-size: 3rem;
    margin-bottom: 3rem;
    color: var(--primary);
    position: relative;
}

.section-title::before {
    content: '> ';
}

/* PROFILE SECTION */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.profile-card {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--primary);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary), transparent);
    z-index: -1;
}

.profile-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

/* TECH STACK */
.tech-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.tech-category h3 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

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

.tag {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--primary);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.tag:hover {
    background: var(--primary);
    color: var(--bg-dark);
    transform: scale(1.05);
}

/* PROJECTS */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-item {
    background: rgba(0, 0, 0, 0.3);
    border-left: 4px solid var(--secondary);
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-item:hover {
    transform: translateX(20px);
    box-shadow: -10px 0 20px rgba(255, 0, 64, 0.3);
}

.project-item h3 {
    color: var(--secondary);
    font-size: 1.5rem;
}

.project-tech {
    margin-top: 1rem;
    color: var(--primary);
    font-size: 0.9rem;
}

/* CONTACT TERMINAL */
.terminal-window {
    border: 2px solid var(--primary);
    max-width: 600px;
    margin: 0 auto;
}

.terminal-header {
    background: var(--primary);
    color: var(--bg-dark);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
}

.terminal-title {
    font-weight: 700;
}

.terminal-body {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.7);
}

.terminal-line {
    margin: 0.5rem 0;
    display: flex;
}

.prompt {
    color: var(--primary);
    margin-right: 0.5rem;
}

.terminal-line .output a {
    color: var(--accent);
    text-decoration: none;
}

.terminal-line .output a:hover {
    text-decoration: underline;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .glitch {
        font-size: 2.5rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .section {
        padding: 3rem 5%;
    }
}