@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Share+Tech+Mono&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

:root {
    --color-bg: #050505;
    --color-terminal: #000000;
    --color-matrix: #00ff41; /* Classic Matrix Green */
    --color-matrix-dim: #008F11;
    --color-matrix-bright: #ccffcc;
    --color-error: #ff0033;
    --color-accent: #003b00;
    
    --font-mono: 'JetBrains Mono', monospace;
    --font-display: 'Share Tech Mono', monospace;
    
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    
    --border-glow: 0 0 10px rgba(0, 255, 65, 0.5);
    --text-glow: 0 0 5px rgba(0, 255, 65, 0.7);
}

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

body {
    background-color: var(--color-bg);
    color: var(--color-matrix);
    font-family: var(--font-mono);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 16px;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--spacing-sm);
    color: var(--color-matrix-bright);
    text-shadow: var(--text-glow);
}

a {
    color: var(--color-matrix);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

a:hover {
    color: var(--color-matrix-bright);
    border-bottom: 1px solid var(--color-matrix);
    text-shadow: var(--text-glow);
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    position: relative;
    z-index: 10;
}

section {
    padding: var(--spacing-lg) 0;
    border-bottom: 1px solid var(--color-accent);
}

/* --- Header --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(5, 5, 5, 0.95);
    border-bottom: 1px solid var(--color-matrix-dim);
    z-index: 100;
    backdrop-filter: blur(5px);
    padding: var(--spacing-sm) 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    border: 1px solid var(--color-matrix);
    padding: 0.2rem 0.5rem;
    color: var(--color-matrix-bright);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
}

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--color-matrix);
    color: var(--color-matrix);
    padding: 0.5rem;
    cursor: pointer;
}

#lang-toggle {
    background: transparent;
    border: 1px solid var(--color-matrix);
    color: var(--color-matrix);
    padding: 0.2rem 0.5rem;
    cursor: pointer;
    font-family: var(--font-mono);
    margin-left: 1rem;
}

#lang-toggle:hover {
    background: var(--color-matrix);
    color: var(--color-bg);
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(5, 5, 5, 0.98);
        padding: 1rem;
        border-bottom: 1px solid var(--color-matrix);
        text-align: center;
    }

    .nav-menu.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }
}

/* --- Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.glitch-text {
    position: relative;
    font-size: 4rem;
    font-weight: bold;
}

@media (max-width: 768px) {
    .glitch-text {
        font-size: 2.5rem;
    }
}

/* --- Components --- */
.card {
    border: 1px solid var(--color-matrix-dim);
    background: rgba(0, 20, 0, 0.3);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--border-glow);
    border-color: var(--color-matrix);
}

.skill-bar {
    height: 10px;
    background: var(--color-accent);
    margin-top: var(--spacing-xs);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--color-matrix-dim);
}

.skill-fill {
    height: 100%;
    background: var(--color-matrix);
    width: 0;
    transition: width 1s ease-out;
    box-shadow: var(--text-glow);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
}

.social-icon {
    font-size: 1.5rem;
    border: 1px solid var(--color-matrix-dim);
    padding: 0.5rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.social-icon:hover {
    background: var(--color-matrix);
    color: var(--color-bg);
    border-color: var(--color-matrix);
}

/* --- Effects --- */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.15;
    pointer-events: none;
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 0) 50%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.2)
    );
    background-size: 100% 4px;
    z-index: 999;
    pointer-events: none;
    opacity: 0.3;
}

/* Blinking Cursor */
.cursor::after {
    content: '_';
    animation: blink 1s step-end infinite;
}

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

/* Glitch Animation (Simple Hover) */
.glitch-hover:hover {
    animation: glitch-anim 0.3s infinite;
}

@keyframes glitch-anim {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* --- Utilities --- */
.hidden { display: none; }
.text-dim { color: var(--color-matrix-dim); }
.text-sm { font-size: 0.875rem; }
.text-center { text-align: center; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}