:root {
    /* Colors */
    --bg-color: #050505;
    --surface-color: rgba(20, 20, 20, 0.7);
    --accent-primary: #00f2ff; /* Cyber Cyan */
    --accent-secondary: #7000ff; /* Electric Purple */
    --text-main: #e0e0e0;
    --text-dim: #888888;
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Effects */
    --glow-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
    --glass-blur: blur(12px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none !important; /* Hide default cursor */
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

body.loading {
    overflow: hidden;
}

/* Typography */
h1, h2, h3, .logo, .terminal-text, a {
    font-family: 'Fira Code', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Custom Cursor */
#cursor {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.1s ease;
}

#cursor-blur {
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent-primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease, width 0.3s, height 0.3s;
    background: rgba(0, 242, 255, 0.05);
}

/* Scanlines Effect */
.scanlines {
    position: fixed;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 50%,
        rgba(0, 0, 0, 0.1) 50%
    );
    background-size: 100% 4px;
    z-index: 9998;
    pointer-events: none;
    opacity: 0.3;
}

/* Loader Upgrade */
#loader {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.loader-content {
    width: 300px;
}

.terminal-text {
    font-size: 0.8rem;
    color: var(--accent-primary);
    margin-bottom: 10px;
    text-align: center;
}

.progress-bar-container {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

#progress-bar {
    width: 0%;
    height: 100%;
    background: var(--accent-primary);
    box-shadow: var(--glow-shadow);
}

/* Background & Overlays */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.glass-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.8) 100%);
    z-index: -1;
    pointer-events: none;
}

/* Navigation */
#topbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.logo span {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    gap: 30px;
}

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

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-primary);
    box-shadow: var(--glow-shadow);
}

.system-stats {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    color: var(--accent-secondary);
    display: flex;
    gap: 20px;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 10%;
    gap: 50px;
}

.hero-content {
    flex: 1;
}

.tagline {
    color: var(--accent-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 10px;
}

h1.glitch {
    font-size: 5rem;
    font-weight: 900;
    color: var(--text-main);
    position: relative;
    margin-bottom: 20px;
}

.typewriter {
    font-size: 1.5rem;
    color: var(--accent-primary);
    min-height: 1.5em;
    display: block;
    margin-bottom: 30px;
}

.cta-group {
    display: flex;
    gap: 20px;
}

button {
    padding: 15px 30px;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.btn-primary {
    background: var(--accent-primary);
    color: #000;
}

.btn-primary:hover {
    box-shadow: var(--glow-shadow);
    box-shadow: 0 0 30px var(--accent-primary);
    transform: translateY(-3px) scale(1.05);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
}

.btn-secondary:hover {
    background: rgba(0, 242, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.2);
}

/* Floating Animation */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Terminal Widget */
.terminal-widget {
    flex: 1;
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    border-radius: 8px;
    height: 400px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.terminal-header {
    background: rgba(255,255,255,0.05);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dots {
    display: flex;
    gap: 8px;
}

.dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dots span:nth-child(1) { background: #ff5f56; }
.dots span:nth-child(2) { background: #ffbd2e; }
.dots span:nth-child(3) { background: #27c93f; }

.terminal-header .title {
    font-size: 0.7rem;
    color: var(--text-dim);
}

.terminal-body {
    padding: 20px;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: #00ff41; /* Classic Matrix Green */
    overflow-y: auto;
}

.line {
    margin-bottom: 5px;
    opacity: 0.8;
}

/* Projects Section */
.projects, .contact {
    padding: 100px 10%;
    min-height: 100vh;
}

.section-title {
    font-size: 2rem;
    color: var(--accent-primary);
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 4px;
    background: var(--accent-primary);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    position: relative;
    height: 350px;
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-primary);
    box-shadow: var(--glow-shadow);
}

.card-ui, .card-code {
    position: absolute;
    inset: 0;
    padding: 30px;
    transition: all 0.6s ease;
}

.card-code {
    background: #000;
    opacity: 0;
    transform: scale(1.1);
    display: flex;
    align-items: center;
    font-size: 0.8rem;
}

.project-card:hover .card-ui {
    opacity: 0;
    transform: scale(0.9);
}

.project-card:hover .card-code {
    opacity: 1;
    transform: scale(1);
}

.project-tag {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    color: var(--accent-primary);
    margin-bottom: 15px;
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.project-card p {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.launch-btn {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    border-radius: 4px;
    transition: all 0.3s;
    background: rgba(0, 242, 255, 0.05);
}

.project-card:hover .launch-btn {
    background: var(--accent-primary);
    color: #000;
    box-shadow: 0 0 15px var(--accent-primary);
}

.card-code pre {
    width: 100%;
    color: #00ff41;
    white-space: pre-wrap;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    background: var(--surface-color);
    padding: 50px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
}

.contact-info h3 {
    font-size: 2rem;
    color: var(--accent-primary);
    margin-top: 10px;
}

form#contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

form#contact-form input, form#contact-form textarea {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    padding: 15px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    border-radius: 8px;
}

form#contact-form input:focus, form#contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Footer Simulation */
footer {
    text-align: center;
    padding: 50px;
    font-size: 0.7rem;
    color: var(--text-dim);
    font-family: 'Fira Code', monospace;
}

/* Responsive */
@media (max-width: 968px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
}
