:root {
    --bg-color: #050505;
    --primary-color: #00ff41; /* Classic Matrix Green */
    --primary-glow: rgba(0, 255, 65, 0.5);
    --secondary-color: #008f11;
    --text-color: #e0e0e0;
    --text-dim: #888888;
    --card-bg: rgba(20, 20, 20, 0.7);
    --border-color: rgba(0, 255, 65, 0.2);
    --font-main: 'Rajdhani', sans-serif;
    --font-heading: 'Orbitron', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none !important; /* Custom cursor everywhere */
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
}

body.loading {
    overflow: hidden;
}

/* Custom Cursor */
.cursor {
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 10px var(--primary-color);
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.1s ease-out;
    background: rgba(0, 255, 65, 0.05);
}

/* Page Transition */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    z-index: 5000;
    transform: translateY(100%);
    pointer-events: none;
}

/* Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
}

/* Scanlines Effect */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
    z-index: 1000;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 2000;
    transition: all 0.4s ease;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    padding: 10px 0;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.glitch {
    position: relative;
}

.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch:hover::before {
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch:hover::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
    animation: glitch-anim2 1s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); }
    20% { clip: rect(62px, 9999px, 42px, 0); }
    40% { clip: rect(16px, 9999px, 78px, 0); }
    60% { clip: rect(89px, 9999px, 13px, 0); }
    80% { clip: rect(54px, 9999px, 35px, 0); }
    100% { clip: rect(27px, 9999px, 91px, 0); }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    position: relative;
    font-family: var(--font-heading);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Sections */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0;
    position: relative;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
}

/* Hero Section */
.hero-content {
    max-width: 700px;
}

.hero-subtitle {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 0.9rem;
    letter-spacing: 5px;
    margin-bottom: 20px;
    opacity: 0.8;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 5rem);
    line-height: 1.1;
    margin-bottom: 30px;
}

.hero-title .line {
    display: block;
}

.hero-title .accent {
    color: var(--primary-color);
    text-shadow: 0 0 20px var(--primary-glow);
}

.hero-desc {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-bottom: 40px;
    max-width: 600px;
}

.highlight {
    color: var(--primary-color);
    font-weight: 700;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

/* Buttons */
.btn {
    padding: 15px 35px;
    font-family: var(--font-heading);
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 2px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: #000;
}

.btn-primary:hover {
    box-shadow: 0 0 30px var(--primary-glow);
    transform: translateY(-5px);
}

.btn-outline {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 0 20px var(--primary-glow);
    transform: translateY(-5px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: var(--text-dim);
}

.mouse {
    width: 20px;
    height: 35px;
    border: 2px solid var(--text-dim);
    border-radius: 10px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    left: 50%;
    transform: translateX(-50%);
    top: 7px;
    border-radius: 50%;
    animation: scroll-anim 2s infinite;
}

@keyframes scroll-anim {
    0% { opacity: 1; top: 7px; }
    100% { opacity: 0; top: 20px; }
}

/* Section Header */
.section-header {
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary-color);
    letter-spacing: 5px;
}

.title-underline {
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin-top: 10px;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 80px;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
    width: 100%;
}

.image-border {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary-color);
    z-index: 1;
}

.profile-img {
    width: 100%;
    position: relative;
    z-index: 2;
    filter: grayscale(1) contrast(1.2);
    transition: all 0.5s ease;
}

.about-image-wrapper:hover .profile-img {
    filter: grayscale(0) contrast(1);
}

.about-text-wrapper .name-tag {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 20px;
}

.about-text-wrapper .bio {
    font-size: 1.1rem;
    color: var(--text-dim);
    margin-bottom: 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.stat-item {
    text-align: center;
    border-left: 1px solid var(--border-color);
    padding: 10px;
}

.stat-num {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-heading);
}

.stat-label {
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--text-dim);
}

.skills-tag {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skills-tag span {
    padding: 5px 15px;
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    height: 400px;
    perspective: 1000px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.project-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
}

.card-front {
    background-image: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

.card-back {
    transform: rotateY(180deg);
    background: var(--primary-color);
    color: #000;
    justify-content: center;
    text-align: center;
}

.card-back p {
    margin-bottom: 20px;
    font-weight: 600;
}

.btn-sm {
    padding: 10px 20px;
    border: 2px solid #000;
    text-decoration: none;
    color: #000;
    font-weight: 700;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn-sm:hover {
    background: #000;
    color: var(--primary-color);
}

.project-category {
    font-size: 0.7rem;
    color: var(--primary-color);
    letter-spacing: 3px;
    margin-bottom: 5px;
    display: block;
}

.project-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
}

/* Contact Section */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-box {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item .label {
    display: block;
    font-size: 0.8rem;
    color: var(--primary-color);
    letter-spacing: 3px;
    margin-bottom: 5px;
}

.contact-item .value {
    font-size: 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.contact-item .value:hover {
    color: var(--primary-color);
}

/* Terminal */
.terminal-container {
    background: #0a0a0a;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.terminal-header {
    background: #1a1a1a;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dots {
    display: flex;
    gap: 5px;
}

.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-title {
    font-size: 0.7rem;
    color: var(--text-dim);
    font-family: monospace;
}

.terminal-body {
    padding: 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.prompt {
    color: #fff;
    margin-right: 10px;
}

.cursor-blink {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--text-dim);
}

/* Responsive */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Mobile menu needed but keeping it simple for now */
    }
    .hero-title {
        font-size: 3rem;
    }
}
