/* ============================================
   HACKLAB ACADEMY - BRUTALIST TERMINAL AESTHETIC
   ============================================ */

:root {
    /* Brutalist Terminal Palette */
    --bg-primary: #0a0a0a;
    --bg-secondary: #141414;
    --bg-tertiary: #1a1a1a;
    --bg-card: #111111;
    
    --text-primary: #e0e0e0;
    --text-secondary: #888888;
    --text-muted: #555555;
    
    --accent-green: #00ff41;
    --accent-green-dim: #00cc33;
    --accent-amber: #ffb000;
    --accent-red: #ff3333;
    --accent-cyan: #00d4ff;
    --accent-purple: #b829dd;
    
    --border-color: #2a2a2a;
    --border-highlight: #333333;
    
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    
    --shadow-glow: 0 0 20px rgba(0, 255, 65, 0.15);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

/* Noise Texture Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Selection */
::selection {
    background: var(--accent-green);
    color: var(--bg-primary);
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   NAVIGATION
   ============================================ */

.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.05em;
}

.brand-icon {
    color: var(--accent-green);
    font-size: 1.5rem;
}

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

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-green);
    transition: width 0.2s ease;
}

.nav-link:hover {
    color: var(--accent-green);
}

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

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6rem 4rem 4rem;
    gap: 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(135deg, transparent 0%, rgba(0, 255, 65, 0.03) 50%, transparent 100%),
        radial-gradient(ellipse at 20% 80%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--accent-green);
    color: var(--bg-primary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.glitch {
    display: block;
    position: relative;
}

.glitch.highlight {
    color: var(--accent-green);
    text-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 2px solid;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-green);
    color: var(--bg-primary);
    border-color: var(--accent-green);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent-green);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

/* Hero Visual - Code Window */
.hero-visual {
    flex: 1;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.code-window {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.window-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

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

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.window-title {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.window-content {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.8;
}

.code-line {
    margin-bottom: 0.25rem;
}

.prompt {
    color: var(--accent-green);
    margin-right: 0.5rem;
}

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

.output {
    color: var(--text-secondary);
    padding-left: 1.5rem;
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 1.2em;
    background: var(--accent-green);
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
}

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

/* ============================================
   SECTIONS COMMON
   ============================================ */

section {
    padding: 6rem 4rem;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   CURRICULUM SECTION
   ============================================ */

.curriculum {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.module-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2rem;
    position: relative;
    transition: all 0.3s ease;
}

.module-card:hover {
    border-color: var(--accent-green);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.module-number {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.module-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.module-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.module-desc {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.module-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.topic {
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.module-btn {
    width: 100%;
    padding: 0.875rem;
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.module-btn:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
    background: rgba(0, 255, 65, 0.05);
}

/* ============================================
   TERMINAL SECTION
   ============================================ */

.terminal-section {
    background: var(--bg-primary);
    position: relative;
}

.terminal-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.terminal-tabs {
    display: flex;
    gap: 0.5rem;
}

.tab {
    padding: 0.5rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab.active {
    color: var(--accent-green);
    border-bottom-color: var(--accent-green);
}

.terminal-controls {
    display: flex;
    gap: 0.5rem;
}

.term-btn {
    width: 28px;
    height: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.term-btn:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.terminal-body {
    padding: 1.5rem;
    min-height: 400px;
    max-height: 500px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
}

.terminal-output {
    margin-bottom: 1rem;
}

.welcome-banner {
    color: var(--accent-green);
    white-space: pre;
    font-size: 0.75rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.output-line {
    margin-bottom: 0.5rem;
}

.output-line.success { color: var(--accent-green); }
.output-line.error { color: var(--accent-red); }
.output-line.info { color: var(--accent-cyan); }
.output-line.warning { color: var(--accent-amber); }

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-prompt {
    color: var(--accent-green);
    white-space: nowrap;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    caret-color: var(--accent-green);
}

/* Lesson Panel */
.lesson-panel {
    position: fixed;
    right: -400px;
    top: 80px;
    width: 380px;
    height: calc(100vh - 100px);
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    transition: right 0.3s ease;
    z-index: 90;
    display: flex;
    flex-direction: column;
}

.lesson-panel.active {
    right: 0;
}

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

.lesson-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.lesson-close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.lesson-close:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.lesson-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.lesson-content h4 {
    color: var(--accent-green);
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lesson-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.lesson-content code {
    background: var(--bg-tertiary);
    padding: 0.125rem 0.375rem;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--accent-amber);
}

.lesson-content pre {
    background: var(--bg-tertiary);
    padding: 1rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    border-left: 3px solid var(--accent-green);
}

.lesson-content pre code {
    background: transparent;
    padding: 0;
}

.lesson-progress {
    height: 4px;
    background: var(--bg-tertiary);
}

.progress-bar {
    height: 100%;
    background: var(--accent-green);
    width: 0%;
    transition: width 0.3s ease;
}

/* ============================================
   CHALLENGES SECTION
   ============================================ */

.challenges {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.challenge-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.challenge-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
}

.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.difficulty {
    padding: 0.25rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.difficulty.easy {
    background: rgba(0, 255, 65, 0.1);
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
}

.difficulty.medium {
    background: rgba(255, 176, 0, 0.1);
    color: var(--accent-amber);
    border: 1px solid var(--accent-amber);
}

.difficulty.hard {
    background: rgba(255, 51, 51, 0.1);
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
}

.points {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--accent-cyan);
    font-weight: 600;
}

.challenge-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.challenge-desc {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.challenge-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category {
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.challenge-btn {
    padding: 0.5rem 1.5rem;
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.challenge-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.05);
}

/* ============================================
   RESOURCES SECTION
   ============================================ */

.resources {
    background: var(--bg-primary);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.resource-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
}

.resource-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.command-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.command-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-left: 3px solid var(--accent-green);
}

.command-item:hover {
    background: var(--bg-card);
}

.cmd {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--accent-green);
    font-weight: 500;
}

.cmd-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 4rem;
    text-align: center;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-text {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--accent-green);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 968px) {
    .hero {
        flex-direction: column;
        padding: 6rem 2rem 4rem;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-visual {
        max-width: 100%;
    }
    
    section {
        padding: 4rem 2rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .lesson-panel {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .modules-grid,
    .challenges-grid,
    .resources-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

.module-card,
.challenge-card,
.resource-card {
    animation: fadeIn 0.6s ease forwards;
}

.module-card:nth-child(1) { animation-delay: 0.1s; }
.module-card:nth-child(2) { animation-delay: 0.2s; }
.module-card:nth-child(3) { animation-delay: 0.3s; }
.module-card:nth-child(4) { animation-delay: 0.4s; }

/* Typing effect for terminal */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* Glitch effect */
.glitch:hover {
    animation: glitch 0.3s ease;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}