/* 
==============================================
   ZANDEV.ID - CORE STYLESHEET
   Theme: Hacker Dark Mode + Glassmorphism
============================================== 
*/

:root {
    /* Color Palette */
    --bg-dark: #050a05;
    --bg-darker: #020502;
    --neon-green: #00ff41;
    --neon-green-glow: rgba(0, 255, 65, 0.4);
    --neon-cyan: #00f0ff;
    --text-main: #e0ffe0;
    --text-muted: #8ca58c;
    
    /* Glassmorphism Tokens */
    --glass-bg: rgba(5, 20, 10, 0.4);
    --glass-border: rgba(0, 255, 65, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(0, 20, 0, 0.37);
    --glass-blur: blur(12px);

    /* Typography */
    --font-mono: 'Fira Code', monospace;
    --font-sans: 'Outfit', sans-serif;
    
    /* Spacing & Layout */
    --max-width: 1200px;
}

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

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

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, rgba(0,255,65,0.05) 0%, rgba(2,5,2,1) 80%);
    z-index: -2;
    pointer-events: none;
}

/* Cyber Grid Background */
.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(rgba(0, 255, 65, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -1;
    pointer-events: none;
    perspective: 1000px;
    transform-origin: bottom;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(30px); }
}

/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-darker);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 80%;
    max-width: 400px;
}

.splash-logo-container {
    position: relative;
    width: 120px;
    height: 120px;
}

.splash-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 15px var(--neon-green-glow));
    animation: pulseLogo 2s infinite alternate;
}

@keyframes pulseLogo {
    0% { filter: drop-shadow(0 0 10px var(--neon-green-glow)) brightness(0.8); }
    100% { filter: drop-shadow(0 0 30px var(--neon-green)) brightness(1.2); }
}

.scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green), 0 0 20px var(--neon-green);
    animation: scanLogo 2s ease-in-out infinite;
}

@keyframes scanLogo {
    0% { top: -10px; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 130px; opacity: 0; }
}

.splash-text {
    width: 100%;
    text-align: center;
    font-family: var(--font-mono);
}

.glitch-small {
    font-size: 0.9rem;
    color: var(--neon-green);
    letter-spacing: 2px;
}

.loading-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(0, 255, 65, 0.1);
    border-radius: 2px;
    margin: 1rem 0;
    overflow: hidden;
    position: relative;
}

.loading-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
    animation: loadBar 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes loadBar {
    0% { width: 0%; }
    40% { width: 30%; }
    70% { width: 80%; }
    100% { width: 100%; }
}

.sys-log {
    font-size: 0.75rem;
    color: var(--text-muted);
    height: 1rem;
}

body.loaded .splash-screen {
    opacity: 0;
    visibility: hidden;
}


/* Typography Utility */
h1, h2, h3 {
    font-family: var(--font-mono);
    font-weight: 600;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

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

.neon-text {
    color: var(--neon-green);
    text-shadow: 0 0 10px var(--neon-green-glow);
}

/* Glass Navigation */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    padding: 1rem 0;
    transition: padding 0.3s ease;
}

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

.nav-logo {
    max-height: 40px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 5px var(--neon-green-glow));
    transition: filter 0.3s ease;
}

.nav-logo:hover {
    filter: drop-shadow(0 0 15px var(--neon-green));
}

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

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
    position: relative;
}

.nav-links a:hover {
    color: var(--neon-green);
    text-shadow: 0 0 8px var(--neon-green-glow);
}

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

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--neon-green);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Layout */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    min-height: 100vh;
    padding-top: 100px; /* Offset for fixed nav */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.greeting {
    font-family: var(--font-mono);
    color: var(--neon-green);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.glitch {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    position: relative;
    color: white;
}

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

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 red;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--neon-cyan);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 83px, 0); }
    20% { clip: rect(61px, 9999px, 14px, 0); }
    40% { clip: rect(12px, 9999px, 41px, 0); }
    60% { clip: rect(72px, 9999px, 15px, 0); }
    80% { clip: rect(4px, 9999px, 98px, 0); }
    100% { clip: rect(89px, 9999px, 35px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    20% { clip: rect(3px, 9999px, 5px, 0); }
    40% { clip: rect(85px, 9999px, 16px, 0); }
    60% { clip: rect(31px, 9999px, 76px, 0); }
    80% { clip: rect(18px, 9999px, 82px, 0); }
    100% { clip: rect(54px, 9999px, 31px, 0); }
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.highlight {
    color: var(--neon-cyan);
    font-weight: 600;
}

.description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

/* Buttons */
.hero-cta {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: rgba(0, 255, 65, 0.1);
    color: var(--neon-green);
    border: 1px solid var(--neon-green);
    box-shadow: 0 0 10px rgba(0,255,65,0.2);
}

.btn-primary:hover {
    background: var(--neon-green);
    color: var(--bg-darker);
    box-shadow: 0 0 20px rgba(0,255,65,0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
}

.btn-secondary:hover {
    background: rgba(0, 240, 255, 0.1);
    box-shadow: 0 0 15px rgba(0,240,255,0.3);
    transform: translateY(-2px);
}

/* Terminal Card (Glassmorphism) */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

.terminal-card {
    height: 350px;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    background: rgba(0,0,0,0.5);
    padding: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }

.terminal-title {
    margin-left: 10px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #888;
}

.terminal-body {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--neon-green);
    flex-grow: 1;
    line-height: 1.8;
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background-color: var(--neon-green);
    animation: blink 1s step-end infinite;
    vertical-align: middle;
}

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

/* Section Shared */
.section-header {
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.text-center {
    text-align: center;
}

/* Portfolio Section */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.portfolio-actions {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.portfolio-item.hidden {
    display: none;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    group: hover;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,255,65,0.15);
    border-color: var(--neon-green);
}

.portfolio-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--glass-border);
    opacity: 0.7;
    transition: opacity 0.4s;
}

.portfolio-item:hover .portfolio-image {
    opacity: 1;
    filter: brightness(1.2);
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-title {
    font-size: 1.25rem;
    color: white;
    margin-bottom: 0.5rem;
    font-family: var(--font-sans);
    font-weight: 600;
}

.portfolio-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.portfolio-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.tag {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    padding: 0.2rem 0.6rem;
    background: rgba(0, 240, 255, 0.1);
    color: var(--neon-cyan);
    border-radius: 20px;
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.portfolio-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--neon-green);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 600;
}

.portfolio-link:hover {
    color: white;
    text-shadow: 0 0 10px var(--neon-green);
}

/* Contact Section */
.contact-card {
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--neon-cyan);
}

.glass-input {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(0,255,65,0.2);
    padding: 1rem;
    border-radius: 6px;
    color: white;
    font-family: var(--font-sans);
    transition: all 0.3s ease;
}

.glass-input:focus {
    outline: none;
    border-color: var(--neon-green);
    box-shadow: 0 0 10px rgba(0,255,65,0.2);
    background: rgba(0,0,0,0.5);
}

.btn-block {
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
}

/* Footer */
.glass-footer {
    margin-top: 5rem;
    padding: 2rem;
    text-align: center;
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.glass-footer p {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.social-links a:hover {
    color: var(--neon-cyan);
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .description {
        margin: 0 auto 2.5rem;
    }
}

@media (max-width: 768px) {
    main {
        padding: 0 1rem;
    }
    
    section {
        padding-top: 80px;
        min-height: auto;
        padding-bottom: 3rem;
    }

    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(2, 5, 2, 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--neon-green);
        padding: 1.5rem 0;
        text-align: center;
        gap: 1.5rem;
    }
    
    .nav-links.active {
        display: flex;
        animation: fadeIn 0.3s ease forwards;
    }

    .mobile-menu-btn {
        display: block;
    }
    
    .glitch {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .section-header h2 {
        font-size: 1.4rem;
        word-break: break-all; /* Ensure long hacker strings break on very narrow screens */
    }
    
    .contact-card {
        padding: 1.5rem;
    }
    
    .terminal-card {
        height: 250px;
        font-size: 0.8rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 400px) {
    .glitch {
        font-size: 1.7rem;
    }
}
