:root {
    --bg-base: #060913;
    --bg-surface: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8; /* Cyan Developer */
    --accent-glow: rgba(56, 189, 248, 0.4);
    --danger: #ef4444; /* Bug Red */
    --border: rgba(56, 189, 248, 0.2);
    --border-light: rgba(255, 255, 255, 0.08);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; cursor: none; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .logo, .eyebrow { font-weight: 800; }

/* --- Interactive Canvas (Minigame) --- */
canvas#interactive-canvas {
    position: fixed; top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -1; pointer-events: none;
    background: radial-gradient(circle at 50% 50%, #0c1222 0%, #060913 100%);
}

#game-ui {
    position: fixed; top: 25px; left: 25px; z-index: 1000;
    background: rgba(15, 23, 42, 0.7); backdrop-filter: blur(10px);
    padding: 12px 20px; border-radius: 8px; border: 1px solid var(--border-light);
    display: flex; flex-direction: column; gap: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.score-container { display: flex; align-items: center; gap: 10px; }
.score-text { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 1.1rem; }
#score { color: var(--accent); }
.hint { font-size: 0.75rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }

/* --- Custom Cursor --- */
.cursor-dot, .cursor-ring {
    position: fixed; top: 0; left: 0; pointer-events: none; z-index: 999999; will-change: transform;
}
.cursor-dot {
    width: 6px; height: 6px; background-color: var(--accent);
    border-radius: 50%; transform: translate(-50%, -50%); transition: opacity 0.2s;
}
.cursor-ring {
    width: 36px; height: 36px; border: 1px solid rgba(56, 189, 248, 0.5);
    border-radius: 50%; transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s, border-color 0.3s;
}
body.cursor-hover .cursor-ring {
    width: 60px; height: 60px; background-color: rgba(56, 189, 248, 0.05);
    border-color: var(--accent); backdrop-filter: blur(2px);
}
body.cursor-hover .cursor-dot { opacity: 0; }

@media (hover: none) and (pointer: coarse) {
    .cursor-dot, .cursor-ring { display: none !important; }
    * { cursor: auto !important; }
}

/* --- Navigare --- */
nav {
    position: fixed; top: 0; width: 100%; padding: 25px 5%; z-index: 1000; transition: var(--transition);
}
nav.scrolled {
    background: rgba(6, 9, 19, 0.9); backdrop-filter: blur(15px);
    padding: 15px 5%; border-bottom: 1px solid var(--border-light);
}
.nav-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; }
.logo { font-size: 1.8rem; color: var(--text-main); text-decoration: none; letter-spacing: 2px; position: relative; z-index: 1001;}

/* Glitch pe Logo */
.glitch-text { position: relative; display: inline-block; }
.glitch-text::before, .glitch-text::after {
    content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0;
}
.glitch-text:hover::before {
    left: 2px; text-shadow: -1px 0 red; opacity: 1; animation: glitch-anim 0.3s infinite linear alternate-reverse;
}
.glitch-text:hover::after {
    left: -2px; text-shadow: -1px 0 blue; opacity: 1; animation: glitch-anim 0.2s infinite linear alternate-reverse;
}
@keyframes glitch-anim { 0% { clip: rect(10px, 9999px, 31px, 0); } 100% { clip: rect(54px, 9999px, 43px, 0); } }

.nav-links { display: flex; gap: 40px; }
.nav-links a {
    color: var(--text-muted); text-decoration: none; font-size: 0.9rem;
    text-transform: uppercase; letter-spacing: 1px; font-weight: 600;
    transition: color 0.3s; position: relative; padding-bottom: 5px;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-main); }
.nav-links a::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
    background: var(--accent); transition: width 0.4s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.shop-link { color: var(--accent) !important; }

.hamburger { display: none; flex-direction: column; gap: 6px; cursor: pointer; z-index: 1001; }
.hamburger span { width: 30px; height: 2px; background: var(--text-main); transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1); }

/* --- Layout --- */
.page-content { position: relative; z-index: 10; }
.section { padding: 120px 5%; min-height: 100vh; display: flex; align-items: center; }
.section-container { max-width: 1200px; margin: 0 auto; width: 100%; }
.text-center { text-align: center; }

/* Animatii Scroll */
.reveal { opacity: 0; transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.slide-up { transform: translateY(40px); }
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }
.delay-4 { transition-delay: 0.6s; }

/* --- Hero --- */
.hero { display: flex; align-items: center; justify-content: flex-start; max-width: 1200px; margin: 0 auto; padding-top: 50px; }
.hero-content { max-width: 800px; }
.terminal-badge {
    display: inline-flex; align-items: center; gap: 10px; color: var(--accent);
    font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; margin-bottom: 25px;
    padding: 6px 16px; border: 1px solid var(--border); border-radius: 50px; background: rgba(56, 189, 248, 0.05);
}
.status-dot { width: 8px; height: 8px; background: #22c55e; border-radius: 50%; box-shadow: 0 0 10px #22c55e; animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }

.hero h1 { font-size: clamp(3.5rem, 7vw, 6rem); line-height: 1.1; margin-bottom: 10px; letter-spacing: -2px; }
.hero h1 .accent { color: var(--accent); }
.role-text { font-family: 'JetBrains Mono', monospace; font-size: clamp(1.5rem, 3vw, 2.2rem); color: var(--text-muted); font-weight: 400; margin-bottom: 30px; height: 40px; }
.typing-text { color: var(--accent); border-right: 2px solid var(--accent); animation: blink 0.8s step-end infinite; }
.hero p { font-size: 1.15rem; color: var(--text-muted); max-width: 600px; margin-bottom: 40px; font-weight: 400; }
.cta-group { display: flex; gap: 20px; }

/* Buttons */
.btn {
    display: inline-flex; justify-content: center; align-items: center;
    padding: 16px 35px; font-size: 0.95rem; text-transform: uppercase;
    letter-spacing: 1px; font-weight: 700; text-decoration: none;
    border-radius: 8px; transition: var(--transition); border: 1px solid transparent; font-family: 'Outfit', sans-serif;
}
.btn-primary { background: var(--text-main); color: #000; }
.btn-primary:hover { background: var(--accent); box-shadow: 0 10px 25px rgba(56, 189, 248, 0.2); }
.btn-secondary { background: rgba(255, 255, 255, 0.03); border-color: var(--border-light); color: var(--text-main); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); background: rgba(56, 189, 248, 0.05); }

/* --- Despre Noi --- */
.split-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 80px; align-items: center; }
.section-title { font-size: 3.5rem; margin-bottom: 25px; line-height: 1.1; letter-spacing: -1px; }
.section-title span { color: var(--accent); }
.about-text .lead { font-size: 1.2rem; color: var(--text-main); margin-bottom: 20px; font-weight: 500; }
.about-text p { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 20px; font-weight: 400;}

/* Code Bento Box */
.code-box {
    background: #0d1117; border: 1px solid var(--border-light); border-radius: 12px;
    overflow: hidden; box-shadow: 0 25px 50px rgba(0,0,0,0.4); transition: transform 0.3s;
}
.code-box:hover { transform: translateY(-10px); border-color: var(--accent); box-shadow: 0 30px 60px rgba(56, 189, 248, 0.1); }
.terminal-header { background: #161b22; padding: 12px 20px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #30363d; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }
.terminal-header .title { margin-left: 10px; color: #8b949e; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; }
.code-content { padding: 30px; font-family: 'JetBrains Mono', monospace; font-size: 0.95rem; line-height: 1.7; color: #c9d1d9; }
.code-content .line { display: block; }
.code-content .indent { padding-left: 20px; }
.code-content .comment { color: #8b949e; display: block; margin-bottom: 15px; }
.code-content .keyword { color: #ff7b72; }
.code-content .variable { color: #79c0ff; }
.code-content .string { color: #a5d6ff; }
.code-content .number { color: #79c0ff; }
.code-content .boolean { color: #79c0ff; }

/* --- Expertiza Bento Grid --- */
.section-subtitle { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 50px; }
.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; grid-auto-rows: minmax(220px, auto); }
.bento-card {
    background: var(--bg-surface); border: 1px solid var(--border-light);
    border-radius: 16px; padding: 40px 30px; transition: var(--transition);
}
.bento-card:hover { border-color: var(--accent); transform: translateY(-5px); }
.large-card { grid-column: span 2; }
.dark-card { background: rgba(0,0,0,0.4); }
.card-icon { font-size: 2.5rem; margin-bottom: 20px; }
.bento-card h3 { font-size: 1.5rem; margin-bottom: 15px; }
.bento-card p { color: var(--text-muted); line-height: 1.7; font-size: 0.95rem; }
.progress-bar { width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 10px; margin-top: 25px; overflow: hidden; }
.fill { height: 100%; background: var(--accent); }

/* --- Contact Form --- */
.contact-box {
    background: var(--bg-surface); border: 1px solid var(--border-light);
    padding: 80px; border-radius: 20px; max-width: 800px; margin: 0 auto; text-align: center;
}
.contact-box h2 { font-size: 3rem; margin-bottom: 15px; letter-spacing: -1px; }
.contact-box p { color: var(--text-muted); margin-bottom: 50px; font-weight: 400; font-size: 1.1rem; }
.dev-form { text-align: left; }
.input-group { position: relative; margin-bottom: 40px; }
.input-group input, .input-group textarea {
    width: 100%; padding: 15px 0; background: transparent; border: none;
    color: var(--text-main); font-family: 'JetBrains Mono', monospace; font-size: 1.05rem; outline: none; resize: none;
}
.input-group label {
    position: absolute; top: 15px; left: 0; color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace; transition: var(--transition); pointer-events: none;
}
.input-group input:focus ~ label, .input-group input:valid ~ label,
.input-group textarea:focus ~ label, .input-group textarea:valid ~ label {
    top: -20px; font-size: 0.8rem; color: var(--accent); text-transform: uppercase;
}
.input-group .line { position: absolute; bottom: 0; left: 0; width: 100%; height: 1px; background: var(--border-light); }
.input-group .line::after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 0; height: 2px; background: var(--accent); transition: width 0.4s ease;
}
.input-group input:focus ~ .line::after, .input-group textarea:focus ~ .line::after { width: 100%; }
.form-btn { width: 100%; margin-top: 10px; }

/* --- Popup --- */
.custom-popup {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(6, 9, 19, 0.9); backdrop-filter: blur(10px);
    display: flex; justify-content: center; align-items: center;
    z-index: 999990; opacity: 0; visibility: hidden; transition: var(--transition);
}
.custom-popup.active { opacity: 1; visibility: visible; }
.popup-content {
    background: var(--bg-surface); border: 1px solid var(--border-light);
    padding: 50px; border-radius: 12px; text-align: center;
    transform: scale(0.95); transition: var(--transition); max-width: 450px;
}
.custom-popup.active .popup-content { transform: scale(1); }
.popup-icon {
    width: 60px; height: 60px; border: 2px solid var(--accent); color: var(--accent);
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 1.5rem; margin: 0 auto 20px;
}
.popup-content h2 { font-size: 1.8rem; margin-bottom: 10px; }
.popup-content p { color: var(--text-muted); margin-bottom: 30px; }

footer { text-align: center; padding: 40px; border-top: 1px solid var(--border-light); color: var(--text-muted); font-size: 0.9rem; font-family: 'JetBrains Mono', monospace;}

/* --- Mobile Responsiveness --- */
@media (max-width: 1024px) {
    .split-layout { grid-template-columns: 1fr; gap: 50px; }
    .bento-grid { grid-template-columns: 1fr 1fr; }
    .large-card { grid-column: span 2; }
    .contact-box { padding: 40px 20px; }
}

@media (max-width: 768px) {
    /* Navbar & Meniu Mobil */
    nav { padding: 15px 5%; }
    .hamburger { display: flex; }
    .nav-links {
        position: fixed; top: 0; right: -100%; width: 100%; height: 100vh;
        background: rgba(6, 9, 19, 0.98); backdrop-filter: blur(20px);
        flex-direction: column; justify-content: center; align-items: center;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1); gap: 30px;
    }
    .nav-links.active { right: 0; }
    .nav-links a { font-size: 1.2rem; }
    
    .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* Ascundem Game UI pe mobil sa nu incurce */
    #game-ui { display: none; }

    /* Layout Elemente */
    .hero h1 { font-size: 2.8rem; }
    .role-text { font-size: 1.5rem; }
    .cta-group { flex-direction: column; width: 100%; }
    .btn { width: 100%; }
    .section { padding: 80px 5%; }
    .bento-grid { grid-template-columns: 1fr; }
    .large-card { grid-column: span 1; }
}