/* =========================================
   1. CORE VARIABLES & RESET
   ========================================= */
:root {
    --bg-core: #030305;
    --primary: #00f3ff;
    /* Cyber Blue */
    --secondary: #7000ff;
    /* Deep Purple */
    --accent: #ff0055;
    /* Warning Red */
    --success: #00ff9d;
    /* Success Green */
    --text-main: #ffffff;
    --text-dim: #8892b0;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(10, 15, 20, 0.6);
    --font-code: 'JetBrains Mono', 'Fira Code', monospace;
    --font-tech: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-core);
    color: var(--text-main);
    font-family: var(--font-tech);
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* =========================================
   2. BACKGROUND & AMBIENT
   ========================================= */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.ambient-light {
    position: fixed;
    top: -20%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(112, 0, 255, 0.15), transparent 70%);
    filter: blur(80px);
    z-index: -1;
    pointer-events: none;
}

/* =========================================
   3. NAVIGATION
   ========================================= */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(3, 3, 5, 0.7);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-code);
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -1px;
}

.logo-icon {
    width: 20px;
    height: 20px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    transform: rotate(45deg);
}

.logo-text span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-item {
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--text-dim);
    position: relative;
    transition: color 0.3s;
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 100%;
}

.nav-status {
    font-family: var(--font-code);
    font-size: 10px;
    color: var(--success);
    border: 1px solid rgba(0, 255, 157, 0.3);
    padding: 5px 10px;
    border-radius: 20px;
    background: rgba(0, 255, 157, 0.05);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.bar {
    width: 25px;
    height: 2px;
    background: var(--text-main);
    transition: 0.3s;
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-core);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-nav-overlay.active {
    transform: translateY(0);
}

.mobile-nav-link {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
}

@media (max-width: 768px) {

    .nav-links,
    .nav-status {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    nav {
        padding: 20px;
    }
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    padding: 120px 10% 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
}

.glitch-title {
    font-size: 80px;
    line-height: 0.9;
    font-weight: 900;
    margin-bottom: 30px;
    position: relative;
    color: var(--text-main);
}

.glitch-title::before,
.glitch-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-core);
}

.glitch-title::before {
    left: 2px;
    text-shadow: -1px 0 var(--accent);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch-title::after {
    left: -2px;
    text-shadow: -1px 0 var(--primary);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(10px, 9999px, 30px, 0);
    }

    20% {
        clip: rect(80px, 9999px, 100px, 0);
    }

    40% {
        clip: rect(10px, 9999px, 50px, 0);
    }

    60% {
        clip: rect(60px, 9999px, 90px, 0);
    }

    80% {
        clip: rect(20px, 9999px, 60px, 0);
    }

    100% {
        clip: rect(90px, 9999px, 10px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(60px, 9999px, 90px, 0);
    }

    20% {
        clip: rect(10px, 9999px, 50px, 0);
    }

    40% {
        clip: rect(90px, 9999px, 10px, 0);
    }

    60% {
        clip: rect(20px, 9999px, 60px, 0);
    }

    80% {
        clip: rect(80px, 9999px, 100px, 0);
    }

    100% {
        clip: rect(10px, 9999px, 30px, 0);
    }
}

.hero-desc {
    font-size: 18px;
    color: var(--text-dim);
    margin-bottom: 40px;
    max-width: 480px;
}

.hero-desc strong {
    color: var(--text-main);
}

.cta-btn {
    display: inline-block;
    padding: 15px 40px;
    background: var(--primary);
    color: #000;
    font-weight: 700;
    font-family: var(--font-code);
    text-transform: uppercase;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
    transition: all 0.3s;
    position: relative;
}

.cta-btn:hover {
    background: var(--text-main);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* IDE Window */
.ide-wrapper {
    position: relative;
    width: 780px;
    height: 540px;
    perspective: 1000px;
    animation: float-ide 6s ease-in-out infinite;
}

@keyframes float-ide {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.ide-window {
    width: 100%;
    height: 100%;
    background: rgba(15, 20, 30, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.1s, box-shadow 0.3s, border-color 0.3s;
}

.ide-window:hover {
    box-shadow: 0 30px 70px rgba(0, 243, 255, 0.15);
    border-color: rgba(0, 243, 255, 0.3);
}

.ide-header {
    height: 45px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid var(--glass-border);
}

.ide-body {
    flex: 1;
    display: flex;
    position: relative;
    background: linear-gradient(to bottom right, rgba(15, 20, 30, 0.5), rgba(15, 20, 30, 0.8));
}

.code-panel {
    flex: 1;
    padding: 20px;
    font-family: var(--font-code);
    font-size: 13px;
    line-height: 1.6;
    color: #a9b7c6;
}

.visual-panel {
    width: 360px;
    border-left: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    position: relative;
}

/* Code Syntax Highlighting */
.c-k {
    color: #cc7832;
}

/* Keyword */
.c-f {
    color: #ffc66d;
}

/* Function */
.c-s {
    color: #6a8759;
}

/* String */
.c-v {
    color: #9876aa;
}

/* Variable */

@media (max-width: 1000px) {
    .hero-container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding-top: 100px;
    }

    .hero-content {
        margin-bottom: 60px;
    }

    .ide-wrapper {
        width: 90%;
        height: 360px;
    }

    .glitch-title {
        font-size: 48px;
    }
}

@media (max-width: 768px) {
    .hero-container {
        padding-top: 80px;
        gap: 40px;
    }

    .hero-content {
        margin-bottom: 40px;
    }

    .ide-wrapper {
        width: 95%;
        height: 340px;
    }

    .code-panel {
        padding: 12px;
        font-size: 11px;
        line-height: 1.4;
    }

    .visual-panel {
        width: 280px;
    }

    .glitch-title {
        font-size: 36px;
        line-height: 1.2;
    }

    .hero-desc {
        font-size: 16px;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-container {
        padding: 60px 10px 0;
        gap: 30px;
    }

    .hero-content {
        margin-bottom: 30px;
    }

    .ide-wrapper {
        width: 100%;
        height: 300px;
    }

    .code-panel {
        padding: 10px;
        font-size: 10px;
        line-height: 1.3;
    }

    .visual-panel {
        width: 240px;
    }

    .glitch-title {
        font-size: 28px;
    }

    .hero-desc {
        font-size: 14px;
        margin-bottom: 30px;
    }

    .cta-btn {
        padding: 12px 30px;
        font-size: 14px;
    }
}

/* =========================================
   5. SECTIONS & CARDS
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px;
}

/* Fix for sub-pages header blocking */
.page-header {
    padding-top: 180px;
    padding-left: 20px;
    padding-right: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-tag {
    font-family: var(--font-code);
    color: var(--primary);
    font-size: 12px;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 10px;
}

.main-h2 {
    font-size: 42px;
    margin-bottom: 60px;
    font-weight: 700;
}

.main-h2 span {
    color: var(--text-dim);
}

.holo-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 16px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.holo-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2), inset 0 0 20px rgba(0, 243, 255, 0.05);
    transform: translateY(-5px) scale(1.02);
}

.holo-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

/* Grid Utilities */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 768px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 60px 15px;
    }

    .main-h2 {
        font-size: 32px;
        margin-bottom: 40px;
    }

    .holo-card {
        padding: 25px;
    }

    .holo-card h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .section-tag {
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 40px 10px;
    }

    .main-h2 {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .holo-card {
        padding: 20px;
    }

    .holo-card h3 {
        font-size: 16px;
    }

    .section-tag {
        font-size: 11px;
        margin-bottom: 12px;
    }
}

/* =========================================
   6. FOOTER
   ========================================= */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 40px;
    text-align: center;
    color: var(--text-dim);
    font-family: var(--font-code);
    font-size: 12px;
    background: #020203;
}

/* =========================================
   7. UTILITIES
   ========================================= */
.hacker-text {
    font-family: var(--font-code);
    cursor: default;
}

.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 5px;
    height: 5px;
    background-color: var(--primary);
}

.cursor-outline {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(0, 243, 255, 0.5);
}

body.hovering .cursor-outline {
    transform: translate(-50%, -50%) scale(1.5);
    background: rgba(0, 243, 255, 0.1);
    border-color: var(--primary);
}

/* Scroll Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Code Cursor */
.code-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background: var(--primary);
    animation: blink 1s step-end infinite;
    vertical-align: middle;
    margin-left: 5px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}