:root {
    --bg-color: #050505;
    --card-bg: rgba(10, 10, 10, 0.85);
    /* Slightly transparent for canvas to show */
    --accent: #22c55e;
    /* MATRIX GREEN */
    --text-main: #e2e8f0;
    --text-muted: #7688a5;
    /* Default: #64748b */
    --font-head: 'Rajdhani', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
}

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

/* SYSTEM BOOT PRELOADER */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 9999;
    display: flex;
    justify-content: flex-start;
    /* Align text to top-left like a terminal */
    align-items: flex-end;
    /* Or bottom-left */
    padding: 40px;
    font-family: 'JetBrains Mono', monospace;
}

.terminal-loader {
    color: var(--accent);
    /* Matrix Green */
    font-size: 1.2rem;
    line-height: 1.6;
    text-transform: uppercase;
    width: 100%;
    max-width: 600px;
}

/* Blinking Cursor */
.cursor-blink {
    display: inline-block;
    animation: blink 0.8s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-code);
    /* Code font everywhere for hacker vibe */
    overflow-x: hidden;
}

/* Background Canvas */
#network-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.6;
    pointer-events: none;
    /* JS handles interaction */
}

/* Typography & Layout */
section {
    padding: 100px 10%;
    max-width: 1400px;
    margin: 0 auto;
}

h1 {
    font-family: var(--font-head);
    font-size: 5rem;
    line-height: 1;
    text-transform: uppercase;
    font-weight: 700;
}

h2 {
    font-family: var(--font-head);
    font-size: 3rem;
    margin-bottom: 40px;
    border-left: 4px solid var(--accent);
    padding-left: 20px;
    text-transform: uppercase;
}

.blink {
    animation: blinker 1s linear infinite;
    color: var(--accent);
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* Nav */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(34, 197, 94, 0.2);
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
    letter-spacing: 2px;
}

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

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

.nav-links a:hover {
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent);
}

.terminal-btn {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 8px 15px;
    font-family: var(--font-code);
    cursor: pointer;
    transition: 0.3s;
}

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

.nav-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.hamburger {
    display: none;
    /* Hidden on Desktop */
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 8px 12px;
    font-size: 1.2rem;
    cursor: pointer;
}

.mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    z-index: 99;
    transition: 0.3s;
}

.mobile-menu a {
    color: var(--text-main);
    font-size: 1.5rem;
    text-decoration: none;
    font-family: var(--font-head);
}

.mobile-menu.hidden {
    display: none;
}

/* HERO */
.hero {
    padding-top: 200px;
    min-height: 90vh;
}

.status {
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 5px 15px;
    display: inline-block;
    margin-bottom: 20px;
    font-size: 0.8rem;
    background: rgba(34, 197, 94, 0.1);
}

/* FREELANCE BANNER */
.freelance-box {
    background: rgba(34, 197, 94, 0.1);
    /* Green tint */
    border: 1px solid var(--accent);
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.1);
}

.btn-glow {
    background: var(--accent);
    color: #000;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 25px;
    margin-top: 20px;
    display: inline-block;
    border-radius: 4px;
    box-shadow: 0 0 15px var(--accent);
    transition: 0.3s;
}

.btn-glow:hover {
    background: #fff;
    box-shadow: 0 0 25px #fff;
    transform: scale(1.05);
}

/* Skills - GLOWING CHIPS */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid #222;
    padding: 25px;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.skill-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.15);
    transform: translateY(-5px);
}

.tag {
    display: inline-block;
    margin: 5px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    border-radius: 4px;
}

.skill-card:hover .tag {
    color: var(--accent);
    background: rgba(34, 197, 94, 0.1);
}

/* EXPERIENCE - Timeline */
.timeline-item {
    border-left: 2px solid #333;
    padding-left: 30px;
    margin-bottom: 50px;
    position: relative;
    transition: 0.3s;
}

.timeline-item:hover {
    border-left-color: var(--accent);
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 0;
    width: 10px;
    height: 10px;
    background: #000;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    transition: 0.3s;
}

.timeline-item:hover::before {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.timeline-item p {
    background: rgba(15, 15, 15, 0.85);
    /* Dark, semi-transparent background */
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 20px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    /* Blurs the moving dots behind the text */
    transition: all 0.3s ease;
}

.timeline-item:hover p {
    border-color: rgba(34, 197, 94, 0.3);
    box-shadow: 0 10px 40px -10px rgba(34, 197, 94, 0.1);
}

/* Education - TABS */
.tabs-container {
    display: flex;
    gap: 40px;
    margin-top: 20px;
    min-height: 250px;
}

/* Left Side: The List of Schools */
.tab-list {
    display: flex;
    flex-direction: column;
    min-width: 200px;
    border-left: 2px solid #333;
}

.tab-btn {
    background: transparent;
    border: none;
    text-align: left;
    padding: 15px 20px;
    color: var(--text-muted);
    font-family: var(--font-code);
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    border-left: 3px solid transparent;
    margin-left: -2px;
    /* Pull back to overlap the container border */
}

.tab-btn:hover {
    background: rgba(34, 197, 94, 0.05);
    color: var(--accent);
}

/* The Active Tab State */
.tab-btn.active {
    color: var(--accent);
    border-left: 3px solid var(--accent);
    background: rgba(34, 197, 94, 0.1);
}

/* Right Side: The Content Panel */
.tab-content {
    flex-grow: 1;
    position: relative;
}

.tab-panel {
    display: none;
    /* Hidden by default */
    max-width: 700px;
    /* Limits the background width */
    width: 100%;
    background: rgba(15, 15, 15, 0.85);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.tab-panel.active:hover {
    border-color: rgba(34, 197, 94, 0.5);
    box-shadow: 0 10px 40px -10px rgba(34, 197, 94, 0.5);
}

.tab-panel p {
    color: var(--text-muted) !important;
}

.degree-title {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 5px;
}

.degree-meta {
    font-family: var(--font-code);
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: block;
}

/* Mobile Responsive for Tabs */
@media (max-width: 768px) {
    .tabs-container {
        flex-direction: column;
    }

    .tab-list {
        flex-direction: row;
        overflow-x: auto;
        border-left: none;
        border-bottom: 2px solid #333;
    }

    .tab-btn {
        margin-left: 0;
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
    }

    .tab-btn.active {
        border-left: none;
        border-bottom: 3px solid var(--accent);
    }
}

/* Projects */
.projects-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.project-card {
    background: var(--card-bg);
    border-left: 3px solid #333;
    padding: 30px;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
}

.project-card:hover {
    border-left-color: var(--accent);
    background: rgba(20, 20, 20, 1);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-title {
    font-size: 1.5rem;
    color: var(--text-main);
    font-family: var(--font-head);
}

.project-arrow {
    transition: 0.3s;
    color: var(--accent);
}

.project-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    margin-top: 0;
    opacity: 0;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Expanded State */
.project-card.active .project-details {
    max-height: 300px;
    margin-top: 20px;
    opacity: 1;
}

.project-card.active .project-arrow {
    transform: rotate(180deg);
}

.project-card.active {
    border-left: 3px solid var(--accent);
    box-shadow: -10px 0 20px -10px rgba(34, 197, 94, 0.2);
}

/* Contact Form */
.glass-form {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(15, 15, 15, 0.85);
    /* Dark Glass */
    padding: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    /* Blurs the background dots */
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5);
}

.form-group {
    margin-bottom: 20px;
}

/* Input Fields */
.glass-form input,
.glass-form textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    /* Slightly lighter inner glass */
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    /* White text for visibility */
    font-family: var(--font-code);
    font-size: 1rem;
    transition: 0.3s;
}

/* When you click on an input */
.glass-form input:focus,
.glass-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    /* Green Border */
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.1);
    /* Subtle Green Glow */
}

/* Placeholder Text Color */
.glass-form ::placeholder {
    color: #64748b;
}

/* Mobile Fix */
@media (max-width: 768px) {
    .glass-form {
        padding: 20px;
        width: 100%;
    }
}

/* SOCIAL CONNECT SECTION */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.social-btn {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
    transform: translateY(-5px);
}

/* TERMINAL MODAL */
.hidden {
    display: none !important;
}

#terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.terminal-window {
    width: 600px;
    height: 400px;
    background: #0a0a0a;
    border: 1px solid var(--accent);
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.2);
    display: flex;
    flex-direction: column;
    font-family: 'Courier New', monospace;
}

.terminal-header {
    background: #111;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #333;
    color: #aaa;
    font-size: 0.9rem;
}

.terminal-body {
    padding: 20px;
    color: var(--accent);
    flex-grow: 1;
    overflow-y: auto;
}

.terminal-input-area {
    padding: 10px 20px;
    display: flex;
    border-top: 1px solid #333;
    color: var(--text-main);
}

#cmd-input {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    width: 100%;
    outline: none;
    margin-left: 10px;
}

#close-terminal {
    background: transparent;
    border: none;
    color: var(--accent);
    cursor: pointer;
}

/* Mobile Response */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

    section {
        padding: 80px 20px;
    }

    h1 {
        font-size: 3rem;
    }

    .timeline-item {
        margin-left: 10px;
        padding-left: 20px;
    }

    .timeline-item::before {
        left: -16px;
    }

    .terminal-window {
        width: 95%;
        height: 50vh;
    }
}



/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}