/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Matrix Green Color Palette */
    --matrix-green: #00ff00;
    --matrix-dark-green: #008f11;
    --matrix-light-green: #65ff65;
    --matrix-bg: #0d1117;
    --matrix-surface: #161b22;
    --matrix-border: #30363d;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #8b949e;
    --text-accent: var(--matrix-green);
    
    /* Status Colors */
    --status-active: #00ff00;
    --status-completed: #0099ff;
    --status-development: #ff9500;
    --status-planning: #ff0080;
    
    /* Fonts */
    --font-primary: 'JetBrains Mono', monospace;
    --font-secondary: 'Courier Prime', monospace;
}

body {
    font-family: var(--font-primary);
    background: var(--matrix-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* Prevent default hash scrolling */
html {
    scroll-padding-top: 80px;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Matrix Background */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
}

#matrix {
    display: block;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--matrix-border);
    z-index: 1000;
    padding: 1rem 0;
}

/* Prevent body scroll when mobile menu is open */
body.nav-open {
    overflow: hidden;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-secondary);
    font-size: 1.2rem;
    color: var(--matrix-green);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.logo-icon {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--matrix-green);
    text-shadow: 0 0 8px var(--matrix-green), 0 0 12px var(--matrix-green);
    animation: logoGlow 3s ease-in-out infinite;
    will-change: text-shadow;
}

.logo-text {
    font-family: var(--font-secondary);
}

@keyframes logoGlow {
    0% {
        text-shadow: 0 0 8px var(--matrix-green), 0 0 12px var(--matrix-green);
    }
    50% {
        text-shadow: 0 0 15px var(--matrix-green), 0 0 25px var(--matrix-green), 0 0 35px var(--matrix-green);
    }
    100% {
        text-shadow: 0 0 8px var(--matrix-green), 0 0 12px var(--matrix-green);
    }
}

.nav-logo:hover {
    text-shadow: 0 0 10px var(--matrix-green);
}

.nav-logo:hover .logo-icon {
    animation-duration: 0.5s;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

/* Flash animation used when revealing nav items */
.nav-link.nav-flash {
    animation: navFlash 900ms ease-out both;
}

@keyframes navFlash {
    0% {
        color: var(--text-secondary);
        background: transparent;
        box-shadow: none;
        border-color: transparent;
    }
    40% {
        color: var(--matrix-green);
        background: rgba(0, 255, 0, 0.14);
        box-shadow: 0 0 12px rgba(0, 255, 0, 0.35);
        border-color: var(--matrix-green);
    }
    100% {
        color: var(--text-secondary);
        background: transparent;
        box-shadow: none;
        border-color: transparent;
    }
}

.nav-link:hover,
.nav-link.active {
    color: var(--matrix-green);
    border-color: var(--matrix-green);
    background: rgba(0, 255, 0, 0.1);
}

.nav-link::before {
    content: '> ';
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
    opacity: 1;
}

/* Main Layout */
.main {
    margin-top: 80px;
    position: relative;
    transition: height 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-height: calc(var(--vh, 1vh) * 100 - 80px);
    min-height: calc(100dvh - 80px);
}

/* Mobile viewport fixes */
@media (max-width: 768px) {
    .main {
        min-height: calc(var(--vh, 1vh) * 100 - 80px); /* Custom viewport height for mobile */
    }
    
    body {
        min-height: 100vh;
        min-height: calc(var(--vh, 1vh) * 100); /* Custom viewport height for mobile */
        overflow-x: hidden;
    }
    
    html {
        height: 100%;
        overflow-x: hidden;
    }
}

/* Enable burger menu slightly earlier (≤800px) without changing other breakpoints */
@media (max-width: 800px) {
    .nav-container {
        padding: 0 1rem;
        position: relative;
    }
    .nav-toggle {
        display: flex !important;
    }
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(13, 17, 23, 0.98);
        backdrop-filter: blur(10px);
        border: 1px solid var(--matrix-border);
        border-top: none;
        flex-direction: column;
        gap: 0;
        transform: translateY(-100%) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.3s ease;
        z-index: 999;
    }
    .nav-menu-active {
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    .nav-menu li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--matrix-border);
    }
    .nav-menu li:last-child { border-bottom: none; }
    .nav-link {
        display: block;
        width: 100%;
        padding: 1rem;
        border: none;
        border-radius: 0;
    }
}

/* Prevent horizontal scroll from ASCII name on small widths */
@media (max-width: 800px) {
    .ascii-name { overflow-x: hidden; }
    pre.ascii-name { display: none !important; }
    .terminal-body { overflow-x: hidden; }
}

/* When whoami is shown, ensure only one variant is visible at a time */
.ascii-name-full, .ascii-name-tablet, .ascii-name-mobile { display: none; }
.terminal-output-show.ascii-name-full,
.terminal-output-show.ascii-name-tablet,
.terminal-output-show.ascii-name-mobile { display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Section Management */
.section {
    width: 100%;
    height: auto;
    min-height: calc(var(--vh, 1vh) * 100 - 80px);
    min-height: calc(100dvh - 80px);
    padding-top: 40px;
    z-index: 1;
    overflow-y: visible;
    transform-origin: center top;
    scroll-margin-top: 90px; /* Offset for fixed navbar when jumping to anchors */
}

.section.in-view {
    z-index: 10 !important;
    animation: sectionSlideIn 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes sectionSlideIn {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.92);
    }
    50% {
        opacity: 0.8;
        transform: translateY(8px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Content animations for active sections */
.section.in-view .page-header {
    animation: headerSlideIn 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

/* Ensure headers are hidden by default when in sections */
.section .page-header {
    opacity: 0;
}

/* Ensure content is hidden by default when in sections */
.section .skill-category,
.section .project,
.section .timeline-item {
    opacity: 0;
}

/* Minimal skill item styling */
.skill-item {
    color: var(--text-secondary);
    padding: 0.4rem 0;
    margin: 0.3rem 0;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    position: relative;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(139, 148, 158, 0.1);
}

.skill-item::before {
    content: '▸';
    color: var(--matrix-green);
    margin-right: 0.8rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

.skill-item:hover {
    color: var(--text-primary);
    transform: translateX(5px);
}

.skill-item:hover::before {
    opacity: 1;
    transform: translateX(3px);
}

/* Make content visible for active sections through animation */
.section.in-view .skills-grid .skill-category,
.section.in-view .projects-grid .project,
.section.in-view .timeline-container .timeline-item {
    animation: staggerIn 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    opacity: 0;
}

.section.in-view .skills-grid .skill-category:nth-child(1),
.section.in-view .projects-grid .project:nth-child(1),
.section.in-view .timeline-container .timeline-item:nth-child(1) {
    animation-delay: 0.4s;
}

.section.in-view .skills-grid .skill-category:nth-child(2),
.section.in-view .projects-grid .project:nth-child(2),
.section.in-view .timeline-container .timeline-item:nth-child(2) {
    animation-delay: 0.5s;
}

.section.in-view .skills-grid .skill-category:nth-child(3),
.section.in-view .projects-grid .project:nth-child(3),
.section.in-view .timeline-container .timeline-item:nth-child(3) {
    animation-delay: 0.6s;
}

.section.in-view .skills-grid .skill-category:nth-child(4),
.section.in-view .projects-grid .project:nth-child(4),
.section.in-view .timeline-container .timeline-item:nth-child(4) {
    animation-delay: 0.7s;
}

.section.in-view .skills-grid .skill-category:nth-child(5),
.section.in-view .projects-grid .project:nth-child(5),
.section.in-view .timeline-container .timeline-item:nth-child(5) {
    animation-delay: 0.8s;
}

.section.in-view .skills-grid .skill-category:nth-child(6),
.section.in-view .projects-grid .project:nth-child(6),
.section.in-view .timeline-container .timeline-item:nth-child(6) {
    animation-delay: 0.9s;
}

/* Ensure 7th skill category also staggers (prevents immediate show) */
.section.in-view .skills-grid .skill-category:nth-child(7) {
    animation-delay: 1s;
}



@keyframes headerSlideIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}



@keyframes staggerIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Home Section Terminal (within page-header) */
.page-header .terminal {
    margin: 2rem auto 0;
    max-width: 100%;
    text-align: left;
}

.terminal {
    background: var(--matrix-surface);
    border: 1px solid var(--matrix-border);
    border-radius: 8px;
    width: 100%;
    max-width: 100%;
    font-family: var(--font-secondary);
    box-shadow: 0 8px 32px rgba(0, 255, 0, 0.1);
    transform-origin: center center;
}

.terminal-hidden {
    opacity: 0;
    transform: scale(0.2);
}

.terminal-open {
    animation: terminalOpen 450ms cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
/* Hide terminal body content until shown to avoid prefill flash */
.terminal-hidden .terminal-body { visibility: hidden; }
.terminal-open .terminal-body { visibility: visible; }

/* Terminal output visibility control */
.terminal-body .ascii-name,
.terminal-body .ls-output,
.terminal-body .status,
.terminal-body .network-config,
.terminal-body .title,
.terminal-body .description,
.setup-progress { display: none; }

/* Keep command lines visible container-wise but hide the typed text initially */
.terminal-body .command-line { display: none; }

.terminal-output-show { display: block !important; animation: outputFade 300ms ease-out; }
@keyframes outputFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* Setup progress bar styling */
.setup-progress { margin-top: 0.5rem; }
.setup-bar { width: 100%; height: 8px; background: rgba(0,255,0,0.15); border: 1px solid var(--matrix-green); border-radius: 4px; overflow: hidden; }
.setup-fill { width: 0%; height: 100%; background: linear-gradient(90deg, var(--matrix-dark-green), var(--matrix-green)); transition: width 0.25s ease; }
.setup-label { margin-top: 0.4rem; font-size: 0.85rem; color: var(--text-secondary); }

@keyframes terminalOpen {
    0% { opacity: 0; transform: scale(0.2); }
    60% { opacity: 1; transform: scale(1.04); }
    100% { opacity: 1; transform: scale(1); }
}

.terminal-header {
    background: var(--matrix-bg);
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--matrix-border);
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 48px;
}

.terminal-title {
    color: var(--matrix-green);
    font-size: 0.9rem;
}

.terminal-controls {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
}

.terminal-btn {
    color: var(--matrix-green);
    background: transparent;
    border: none;
    border-radius: 4px;
    padding: 0.25rem;
    font-family: var(--font-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.terminal-btn:hover {
    background: transparent;
}

.terminal-btn svg { width: 22px; height: 22px; display: block; }

/* Smooth pulse animation for the Skip icon */
#intro-skip svg {
    transform-origin: center;
    animation: iconPulse 1.4s ease-in-out infinite;
}

@keyframes iconPulse {
    0% {
        transform: scale(1);
        opacity: 0.9;
        filter: drop-shadow(0 0 0 rgba(0,255,0,0));
    }
    50% {
        transform: scale(1.12);
        opacity: 1;
        filter: drop-shadow(0 0 6px rgba(0,255,0,0.35));
    }
    100% {
        transform: scale(1);
        opacity: 0.9;
        filter: drop-shadow(0 0 0 rgba(0,255,0,0));
    }
}

.terminal-body {
    padding: 2rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1.8;
}

.command-line {
    margin: 1rem 0;
    display: flex;
    align-items: center;
}

.prompt {
    color: var(--matrix-green);
    margin-right: 0.5rem;
    font-weight: 700;
}

.command {
    color: var(--text-primary);
}

.cursor {
    color: var(--matrix-green);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.output {
    margin: 0.5rem 0 1.5rem 2rem;
    color: var(--text-secondary);
}

.ls-output {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.4;
}

.ls-line {
    white-space: pre;
    color: var(--text-secondary);
}
.ls-line-desktop, .ls-line-mobile > div { display: flex; align-items: center; gap: 14px; }

.ls-skill { display: inline-flex; align-items: center; gap: 6px; margin-right: 14px; }
.ls-skill svg { width: 16px; height: 16px; display: inline-block; filter: hue-rotate(80deg) saturate(2) brightness(1); }
.ls-skill.ls-js svg text { fill: #001; }
.ls-skill span { color: var(--text-primary); }

.ls-line:first-child {
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

/* Responsive ls-line for core skills */
.ls-line-mobile {
    display: none;
}

.ls-line-desktop {
    display: block;
}

@media (max-width: 640px) {
    .ls-line-desktop {
        display: none;
    }
    
    .ls-line-mobile {
        display: block;
    }
    
    .ls-line-mobile div {
        white-space: pre;
        color: var(--text-primary);
        line-height: 1.2;
    }

    /* Compact terminal layout for small screens */
    .command-line {
        margin: 0.5rem 0;
    }
    
    .output {
        margin: 0.25rem 0 0.75rem 1rem;
    }
    
    .ls-output {
        font-size: 0.8rem;
        line-height: 1.2;
    }
}

.network-config {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
}

.network-line {
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.network-icon {
    color: var(--text-secondary);
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.network-line:hover {
    color: var(--matrix-green);
    transition: color 0.2s ease;
}

.network-line:hover .network-icon {
    color: var(--matrix-green);
}

.network-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.network-link:hover {
    color: var(--matrix-green);
    text-shadow: 0 0 5px var(--matrix-green);
    border-bottom: 1px solid var(--matrix-green);
    text-decoration: none;
}

/* removed skills-network tweaks to restore original ls layout */

.network-link:focus {
    outline: 1px solid var(--matrix-green);
    outline-offset: 2px;
}

.name {
    font-size: 2.5rem;
    color: var(--matrix-green);
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.title {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 1rem;
    font-style: italic;
}

.status {
    color: var(--matrix-light-green);
    font-style: italic;
}

.ascii-name {
    color: var(--matrix-green);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.2;
    text-shadow: 0 0 10px var(--matrix-green);
    margin: 0.5rem 0;
    overflow-x: auto;
}

/* Larger ASCII name on big screens */
@media (min-width: 1200px) {
    .ascii-name {
        font-size: 1.2rem;
        line-height: 1.25;
    }
}

@media (min-width: 1400px) {
    .ascii-name {
        font-size: 1.35rem;
        line-height: 1.28;
        text-shadow: 0 0 14px var(--matrix-green);
    }
}

@media (min-width: 1600px) {
    .ascii-name {
        font-size: 1.5rem;
        line-height: 1.3;
        text-shadow: 0 0 16px var(--matrix-green);
    }
}

/* Desktop - show full ASCII */
.ascii-name-full {
    display: block;
}

.ascii-name-tablet {
    display: none;
}

.ascii-name-mobile {
    display: none;
}

.simple-name {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--matrix-green);
    text-shadow: 0 0 15px var(--matrix-green);
    letter-spacing: 2px;
    text-align: left;
}

/* Page Headers */
.page-header {
    text-align: center;
    margin-bottom: 4rem;
}

/* Intro launcher overlay */
.intro-launcher {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.intro-launcher-btn {
    color: var(--matrix-green);
    border: 1px solid var(--matrix-green);
    border-radius: 8px;
    background: rgba(0,255,0,0.06);
    padding: 1.2rem 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    pointer-events: none; /* automated, not user clickable */
    transition: transform 0.2s ease;
}
.intro-launcher-btn:focus {
    outline: 1px solid var(--matrix-green);
    outline-offset: 2px;
}

.intro-mouse {
    width: 18px;
    height: 24px;
    border: 2px solid var(--matrix-green);
    border-radius: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-380%, 280%);
    opacity: 0;
    animation: mousePath 1.9s ease-out 0.4s forwards;
}

@keyframes mousePath {
    0% { opacity: 0; transform: translate(-380%, 280%) scale(1); }
    15% { opacity: 0.9; }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    90% { transform: translate(-50%, -50%) scale(0.95); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.intro-launcher-btn.is-clicking {
    animation: clickPop 0.4s ease;
}
@keyframes clickPop {
    0% { transform: scale(1); }
    50% { transform: scale(0.92); }
    100% { transform: scale(1); }
}

/* Hidden sections until intro completes */
.hidden-section { display: none; }

.nav-extra { display: none; }

.page-title {
    font-size: 3rem;
    color: var(--matrix-green);
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-family: var(--font-secondary);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--matrix-surface);
    border: 1px solid var(--matrix-border);
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.skill-category:hover {
    border-color: var(--matrix-green);
    box-shadow: 0 8px 32px rgba(0, 255, 0, 0.1);
    transform: translateY(-5px);
}

.category-title {
    color: var(--matrix-green);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--matrix-border);
    font-weight: 500;
}



.skill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(48, 54, 61, 0.5);
}

.skill:last-child {
    border-bottom: none;
}

.skill-name {
    color: var(--text-primary);
    font-weight: 500;
    flex: 1;
}

.skill-level {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 120px;
}

.level-bar {
    width: 80px;
    height: 4px;
    background: var(--matrix-border);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.level-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--matrix-dark-green), var(--matrix-green));
    width: var(--level, 0%);
    transition: width 1.5s ease 0.3s;
    border-radius: 2px;
}

.level-text {
    font-size: 0.8rem;
    color: var(--matrix-green);
    font-weight: 500;
    min-width: 35px;
}

/* Timeline Section */
.timeline-container {
    position: relative;
    margin-top: 2rem;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--matrix-green);
    opacity: 0.3;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 60px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--matrix-green);
    box-shadow: 0 0 10px var(--matrix-green);
    animation: pulse 2s infinite;
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--matrix-green);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-content {
    background: var(--matrix-surface);
    border: 1px solid var(--matrix-border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    border-color: var(--matrix-green);
    box-shadow: 0 8px 32px rgba(0, 255, 0, 0.1);
    transform: translateY(-2px);
}

.timeline-company {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.timeline-role {
    color: var(--matrix-green);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.timeline-description {
    margin-bottom: 1rem;
}

.timeline-bullet {
    color: var(--text-secondary);
    padding: 0.4rem 0;
    margin: 0.3rem 0;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    position: relative;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(139, 148, 158, 0.1);
}

.timeline-bullet::before {
    content: '▸';
    color: var(--matrix-green);
    margin-right: 0.8rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

.timeline-bullet:hover {
    color: var(--text-primary);
    transform: translateX(5px);
}

.timeline-bullet:hover::before {
    opacity: 1;
    transform: translateX(3px);
}

.timeline-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 255, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 0, 0);
    }
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.project {
    background: var(--matrix-surface);
    border: 1px solid var(--matrix-border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.project:hover {
    border-color: var(--matrix-green);
    transform: translateY(-5px);
    box-shadow: 0 8px 32px rgba(0, 255, 0, 0.1);
}

.project-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--matrix-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-title {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0;
}

.project-status {
    font-size: 0.7rem;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-status.active {
    background: rgba(0, 255, 0, 0.1);
    color: var(--status-active);
    border: 1px solid var(--status-active);
}

.project-status.completed {
    background: rgba(0, 153, 255, 0.1);
    color: var(--status-completed);
    border: 1px solid var(--status-completed);
}

.project-status.in-progress {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid #ffc107;
}

.project-status.development {
    background: rgba(255, 149, 0, 0.1);
    color: var(--status-development);
    border: 1px solid var(--status-development);
}

.project-status.planning {
    background: rgba(255, 0, 128, 0.1);
    color: var(--status-planning);
    border: 1px solid var(--status-planning);
}

.project-body {
    padding: 1.5rem;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-tag {
    background: rgba(0, 255, 0, 0.1);
    color: var(--matrix-green);
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.75rem;
    border: 1px solid rgba(0, 255, 0, 0.3);
    font-weight: 500;
}

.project-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--matrix-border);
    display: flex;
    gap: 1rem;
}

.project-link {
    color: var(--matrix-green);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--matrix-green);
    border-radius: 4px;
    transition: all 0.3s ease;
    text-align: center;
    flex: 1;
}

.project-link:hover {
    background: rgba(0, 255, 0, 0.1);
    text-shadow: 0 0 5px var(--matrix-green);
}

/* Section background emphasis with smooth transitions (no dividing lines) */
#skills,
#projects {
    transition: background-color 0.6s ease;
}

#skills {
    background-color: rgba(13, 17, 23, 0.45);
}

#skills.in-view {
    background-color: rgba(13, 17, 23, 0.70);
}

#projects {
    background-color: rgba(13, 17, 23, 0.55);
}

#projects.in-view {
    background-color: rgba(13, 17, 23, 0.80);
}

/* Extra spacing before footer under projects */
#projects .container {
    padding-bottom: 2.5rem;
}

@media (max-width: 768px) {
    #projects .container {
        padding-bottom: 4rem;
    }
}

/* Footer */
.footer {
    border-top: 1px solid var(--matrix-border);
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(6px);
}

.footer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-link {
    color: var(--matrix-green);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.footer-link:hover {
    text-shadow: 0 0 5px var(--matrix-green);
    border-bottom: 1px solid var(--matrix-green);
}

.footer-sep {
    color: var(--text-secondary);
}

@media (max-width: 600px) {
    .footer-container {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.nav-toggle-bar {
    width: 25px;
    height: 3px;
    background: var(--matrix-green);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.nav-toggle-active .nav-toggle-bar:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
}

.nav-toggle-active .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle-active .nav-toggle-bar:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -6px);
}

/* Large Tablet - show compact ASCII */
@media (max-width: 1024px) and (min-width: 901px) {
    .ascii-name-full {
        display: none;
    }
    
    .ascii-name-tablet {
        display: block;
        font-size: 0.8rem;
        line-height: 1.1;
    }
    
    .ascii-name-mobile {
        display: none;
    }
}

/* Medium screens - show simple text to avoid breaking */
@media (max-width: 900px) and (min-width: 769px) {
    .ascii-name-full {
        display: none;
    }
    
    .ascii-name-tablet {
        display: none;
    }
    
    .ascii-name-mobile {
        display: block;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
        position: relative;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(13, 17, 23, 0.98);
        backdrop-filter: blur(10px);
        border: 1px solid var(--matrix-border);
        border-top: none;
        flex-direction: column;
        gap: 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }
    
    .nav-menu-active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--matrix-border);
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-link {
        display: block;
        width: 100%;
        padding: 1rem;
        border: none;
        border-radius: 0;
    }
    
    .main {
        margin-top: 80px;
    }
    
    /* Mobile - show simple text name */
    .ascii-name-full {
        display: none;
    }
    
    .ascii-name-tablet {
        display: none;
    }
    
    .ascii-name-mobile {
        display: block;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .name {
        font-size: 2rem;
    }
    
    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .terminal {
        font-size: 0.85rem;
    }
    
    .skill-level {
        min-width: 100px;
    }
    
    .level-bar {
        width: 60px;
    }
    
    .project-footer {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.5rem;
    }
    
    .nav-logo {
        font-size: 1rem;
    }
    
    .terminal-body {
        padding: 1.5rem 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .name {
        font-size: 1.5rem;
    }
    
    .skill-category,
    .project {
        padding: 1.5rem;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    /* Adjust simple name for very small screens */
    .simple-name {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }
    
    .title {
        font-size: 1rem;
    }
    
    .description {
        font-size: 0.8rem;
    }
}

/* Smooth animations for page transitions */
.main {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom scrollbar - Webkit browsers (Desktop Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--matrix-green);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--matrix-light-green);
}

/* Modern CSS scrollbar styling - for newer browsers including mobile */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--matrix-green) var(--matrix-bg);
}

/* Mobile-specific scrollbar styling */
@media (max-width: 768px) {
    body::-webkit-scrollbar {
        width: 6px;
        height: 6px;
        -webkit-appearance: none;
    }
    
    body::-webkit-scrollbar-track {
        background: var(--matrix-bg);
        border-radius: 3px;
    }
    
    body::-webkit-scrollbar-thumb {
        background: var(--matrix-green);
        border-radius: 3px;
        border: 1px solid var(--matrix-bg);
    }
}

/* Selection styling */
::selection {
    background: rgba(0, 255, 0, 0.2);
    color: var(--text-primary);
}