/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Colors */
    --bg-dark: #0a0b10;
    --bg-surface: #14161f;
    --text-main: #e0e6ed;
    --text-muted: #94a3b8;
    --accent-primary: #00ff9d;
    /* Neon Green */
    --accent-secondary: #00f3ff;
    /* Neon Cyan */
    --accent-success: #8B0000;
    /* Bordeaux Red */
    --border-color: #2d3748;

    /* Fonts - READABLE, NO PIXELS */
    --font-heading: 'Courier Prime', 'Courier New', monospace;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;
}

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

html {
    scroll-behavior: smooth;
}

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

/* Subtle Scanline Texture (No Distortion) */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.15) 0px,
            rgba(0, 0, 0, 0.15) 1px,
            transparent 1px,
            transparent 2px);
    pointer-events: none;
    z-index: 9999;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* =========================================
   2. TYPOGRAPHY & UTILITIES
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    color: var(--text-main);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-primary);
    margin-top: 10px;
    box-shadow: 0 0 10px var(--accent-primary);
    /* GLOW */
}

/* Glitch Effect Utility */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 var(--accent-secondary);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 var(--accent-primary);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(24px, 9999px, 90px, 0);
    }

    20% {
        clip: rect(85px, 9999px, 140px, 0);
    }

    40% {
        clip: rect(10px, 9999px, 50px, 0);
    }

    60% {
        clip: rect(70px, 9999px, 110px, 0);
    }

    80% {
        clip: rect(30px, 9999px, 60px, 0);
    }

    100% {
        clip: rect(55px, 9999px, 120px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(10px, 9999px, 80px, 0);
    }

    20% {
        clip: rect(75px, 9999px, 20px, 0);
    }

    40% {
        clip: rect(35px, 9999px, 100px, 0);
    }

    60% {
        clip: rect(90px, 9999px, 45px, 0);
    }

    80% {
        clip: rect(20px, 9999px, 65px, 0);
    }

    100% {
        clip: rect(60px, 9999px, 90px, 0);
    }
}

/* =========================================
   3. COMPONENTS
   ========================================= */
/* Clean Arcade Button */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-family: var(--font-heading);
    font-size: 1rem;
    text-transform: uppercase;
    background: transparent;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.btn:hover {
    background: var(--accent-primary);
    color: var(--bg-dark);
    box-shadow: 0 0 20px var(--accent-primary);
}

/* =========================================
   4. LAYOUT SECTIONS
   ========================================= */
/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(10, 11, 16, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    align-items: center;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    text-shadow: 0 0 5px var(--accent-primary);
}

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

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: bold;
}

.nav-links .nav-num {
    color: var(--accent-secondary);
    margin-right: 5px;
}

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

/* Menu Toggle - Hidden on Desktop */
.menu-toggle {
    display: none;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: var(--header-height);
}

.hero h2 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    /* Cleaner */
    font-weight: 800;
}

.hero p {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* About (Terminal) */
.about {
    padding: 100px 0;
}

.terminal-window {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.terminal-header {
    background: #1e222e;
    padding: 10px 15px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Round again */
.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.terminal-body {
    padding: 30px;
    font-family: var(--font-heading);
}

.prompt {
    color: var(--accent-success);
}

.command {
    color: var(--accent-secondary);
}

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

.output-line {
    display: block;
    margin-bottom: 0.3rem;
}

/* Experience (Timeline) */
.experience {
    padding: 100px 0;
    background: var(--bg-surface);
}

.timeline-item::after {
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}

.timeline-item .content {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.timeline-item .content:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.15);
    transform: translateY(-5px);
}

.timeline-date {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--accent-secondary);
}

/* Projects */
.projects {
    padding: 100px 0;
}

.project-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.1);
    transform: translateY(-5px);
}

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

.tech-tag {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--accent-primary);
    background: rgba(0, 243, 255, 0.05);
    /* Very subtle fill */
    border: 1px solid rgba(0, 243, 255, 0.3);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Contact */
.contact {
    padding: 100px 0;
    text-align: center;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    padding: 30px 0;
    color: var(--text-muted);
}

/* =========================================
   RESPONSIVE - MOBILE FIRST
   ========================================= */

/* Tablet */
@media (max-width: 992px) {
    .container {
        padding: 0 30px;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {

    /* Header & Navigation */
    header {
        height: 60px;
    }

    header .container {
        position: relative;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(10, 11, 16, 0.98);
        flex-direction: column;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
    }

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

    .nav-links a {
        padding: 1rem 2rem;
        text-align: center;
    }

    /* Menu Hamburger */
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
    }

    .menu-toggle span {
        display: block;
        width: 25px;
        height: 2px;
        background: var(--accent-primary);
        margin: 5px 0;
        transition: all 0.3s ease;
    }

    /* Hero */
    .hero {
        padding: 100px 20px 60px;
        text-align: center;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero h2 {
        font-size: 1rem;
    }

    .hero p {
        font-size: 0.9rem;
        margin-bottom: 2rem;
    }

    .hero-content {
        padding: 0 10px;
    }

    /* About Section */
    .about {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .terminal-body {
        padding: 15px;
        font-size: 0.85rem;
    }

    .command-line {
        flex-wrap: wrap;
    }

    .prompt {
        font-size: 0.8rem;
    }

    /* Experience Timeline */
    .experience {
        padding: 60px 0;
    }

    .timeline {
        padding-left: 0;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 0;
        margin-bottom: 30px;
    }

    .timeline-item.left,
    .timeline-item.right {
        left: 0;
        text-align: left;
    }

    .timeline-item::after {
        left: 12px;
    }

    .timeline-item .content {
        padding: 15px;
    }

    .timeline-item .content h3 {
        font-size: 1rem;
    }

    .timeline-item .content p {
        font-size: 0.85rem;
    }

    .timeline-date {
        font-size: 0.8rem;
    }

    /* Projects */
    .projects {
        padding: 60px 0;
    }

    .projects-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .project-card {
        width: 100%;
    }

    .project-content {
        padding: 20px;
    }

    .project-title {
        font-size: 1.1rem;
    }

    .project-desc {
        font-size: 0.9rem;
    }

    .tech-stack {
        flex-wrap: wrap;
        gap: 8px;
    }

    .tech-tag {
        font-size: 0.7rem;
        padding: 3px 6px;
    }

    /* Contact */
    .contact {
        padding: 60px 0;
    }

    .contact-text {
        font-size: 0.95rem;
        padding: 0 10px;
    }

    .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }

    /* Footer */
    footer {
        padding: 20px 0;
        font-size: 0.8rem;
    }

    /* Glitch effect - simplified for mobile */
    .glitch::before,
    .glitch::after {
        display: none;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero h2 {
        font-size: 0.9rem;
    }

    .logo {
        font-size: 1rem;
    }

    .terminal-body {
        padding: 12px;
        font-size: 0.75rem;
    }

    .output-line {
        font-size: 0.75rem;
    }

    .project-content {
        padding: 15px;
    }

    .timeline-item .content {
        padding: 12px;
    }
}