:root {
    --bg-color: #050505;
    --text-color: #e0e0e0;
    --primary-color: #00f3ff;
    /* Cyan */
    --secondary-color: #bc13fe;
    /* Neon Purple */
    --accent-color: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --nav-height: 70px;
}

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

html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

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

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

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, #050505 90%);
    pointer-events: none;
    z-index: -1;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

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

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 600;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    position: relative;
}

.hero-content h1 {
    font-size: 5rem;
    margin-bottom: 20px;
    position: relative;
    text-shadow: 0 0 10px var(--neon-cyan);
    min-height: 1.2em;
    /* Prevent layout shift */
    text-transform: none;
    /* Allow JS to control casing */
}

.cursor {
    display: inline-block;
    margin-left: 5px;
    animation: blink 1s infinite;
    color: var(--neon-purple);
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}



.hero-content .subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
    font-family: var(--font-mono);
}

.cta-button {
    display: inline-block;
    padding: 12px 30px;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-family: var(--font-mono);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-button:hover {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    padding-top: 10px;
}

.scroll-indicator span {
    width: 4px;
    height: 8px;
    background: var(--text-color);
    border-radius: 2px;
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(15px);
        opacity: 0;
    }
}

/* --- Featured Project Styles --- */
.project-card.featured-project {
    border: 1px solid var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 184, 217, 0.2);
    transform: translateY(-2px);
}

.project-card.featured-project:hover {
    box-shadow: 0 0 30px rgba(0, 184, 217, 0.4);
    transform: translateY(-8px);
}

.project-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-cyan));
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* --- Project Modal --- */
/* Projects Section */
#projects {
    padding: 100px 5%;
    min-height: 100vh;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--primary-color);
}

.section-header .line {
    flex-grow: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 20px;
    cursor: pointer;
    font-family: var(--font-mono);
    transition: all 0.3s ease;
    border-radius: 20px;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(0, 243, 255, 0.05);
}

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

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--primary-color);
}

.card-image {
    width: 100%;
    height: 180px;
    background-color: #1a1a1a;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(5, 5, 5, 0.8) 100%);
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-category {
    font-size: 0.75rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    font-family: var(--font-mono);
    margin-bottom: 8px;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.card-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 20px;
    flex-grow: 1;
}

.card-link {
    align-self: flex-start;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-link:hover {
    text-decoration: underline;
}

.card-link.disabled {
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    pointer-events: none;
    text-decoration: none;
}

/* About Section - System Status */
#about {
    padding: 120px 5%;
    position: relative;
    display: flex;
    justify-content: center;
}

.about-content {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 40px;
    background: rgba(5, 5, 5, 0.6);
    border: 1px solid rgba(0, 243, 255, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    text-align: left;
    /* Reset to left for terminal feel */
}

/* HUD Corners */
.hud-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.hud-corner.top-left {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.hud-corner.top-right {
    top: -2px;
    right: -2px;
    border-left: none;
    border-bottom: none;
}

.hud-corner.bottom-left {
    bottom: -2px;
    left: -2px;
    border-right: none;
    border-top: none;
}

.hud-corner.bottom-right {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

.about-content:hover .hud-corner {
    width: 30px;
    height: 30px;
    box-shadow: 0 0 10px var(--primary-color);
}

.about-content h2 {
    color: var(--text-color);
    margin-bottom: 30px;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-content h2 .highlight {
    color: var(--secondary-color);
}

.system-text {
    font-family: var(--font-mono);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 50px;
    line-height: 1.8;
}

.system-text p {
    margin-bottom: 5px;
}

.status-ok {
    color: #00ff00;
    font-weight: bold;
    text-shadow: 0 0 5px #00ff00;
}

/* Tech Grid */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.tech-category h3 {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-family: var(--font-mono);
    opacity: 0.8;
}

.tech-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tech-items span {
    background: rgba(0, 243, 255, 0.05);
    border-left: 2px solid var(--primary-color);
    padding: 10px 15px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tech-items span:hover {
    background: rgba(0, 243, 255, 0.15);
    padding-left: 20px;
    text-shadow: 0 0 8px var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
}

/* Footer */
footer {
    padding: 40px 5%;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.heart {
    color: var(--secondary-color);
}

.socials {
    margin-top: 15px;
}

.socials a {
    margin: 0 10px;
    color: var(--text-color);
}

.socials a:hover {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Mobile menu logic to be added if needed, or simple hide */
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: #050505;
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

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

    .menu-toggle {
        display: flex;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

/* Logic Lab Specific Styles */
.mode-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 2px;
    margin-right: 10px;
}

.mode-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 5px 15px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.mode-btn.active {
    background: var(--primary-color);
    color: #000;
    font-weight: bold;
}

.mode-btn:hover:not(.active) {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}