/* ==============================================
   CYBERPUNK DESIGN TOKENS
   ============================================== */
:root {
    /* Neon palette */
    --neon-cyan: #00f0ff;
    --neon-pink: #ff2d6b;
    --neon-purple: #b026ff;
    --neon-yellow: #f7f730;
    --neon-green: #39ff14;
    --neon-blue: #4d7cff;

    /* Core palette */
    --bg-darkest: #030712;
    --bg-dark: #0a0e1a;
    --bg-card: rgba(10, 14, 26, 0.85);
    --bg-card-border: rgba(0, 240, 255, 0.08);
    --bg-card-hover: rgba(0, 240, 255, 0.04);

    --text-primary: #e8eaed;
    --text-secondary: rgba(232, 234, 237, 0.6);
    --text-muted: rgba(232, 234, 237, 0.3);

    /* Glows */
    --glow-cyan: 0 0 10px rgba(0, 240, 255, 0.5), 0 0 40px rgba(0, 240, 255, 0.15);
    --glow-pink: 0 0 10px rgba(255, 45, 107, 0.5), 0 0 40px rgba(255, 45, 107, 0.15);
    --glow-purple: 0 0 10px rgba(176, 38, 255, 0.5), 0 0 40px rgba(176, 38, 255, 0.15);
    --glow-cyan-strong: 0 0 15px rgba(0, 240, 255, 0.7), 0 0 60px rgba(0, 240, 255, 0.3), 0 0 100px rgba(0, 240, 255, 0.1);

    /* Typography */
    --font-display: 'Orbitron', 'Segoe UI', sans-serif;
    --font-body: 'Rajdhani', 'Segoe UI', sans-serif;
    --font-mono: 'Share Tech Mono', 'Consolas', monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Layout */
    --max-width: 1100px;
    --radius-sm: 4px;
    --radius-md: 8px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration-normal: 300ms;
    --duration-slow: 500ms;
}


/* ==============================================
   RESET & BASE
   ============================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background-color: var(--bg-darkest);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

::selection {
    background: rgba(0, 240, 255, 0.25);
    color: #fff;
}


/* ==============================================
   BACKGROUND LAYERS
   ============================================== */

/* Background image */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('cyberpunk_bg.png') center/cover no-repeat;
    opacity: 0.2;
    z-index: 0;
    pointer-events: none;
}

/* Dark gradient overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(0, 240, 255, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(176, 38, 255, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, rgba(3, 7, 18, 0.7) 0%, rgba(3, 7, 18, 0.95) 100%);
    z-index: 0;
    pointer-events: none;
}

/* Scanlines */
.scanlines {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.08) 2px,
        rgba(0, 0, 0, 0.08) 4px
    );
    opacity: 0.4;
}

/* Perspective grid */
.grid-bg {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40vh;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(0deg, rgba(0, 240, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.04) 1px, transparent 1px);
    background-size: 60px 40px;
    mask-image: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, transparent 100%);
    animation: grid-scroll 20s linear infinite;
}

@keyframes grid-scroll {
    0% { background-position: 0 0; }
    100% { background-position: 0 -400px; }
}

/* Particle canvas */
#particleCanvas {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* Page wrapper */
.page-wrapper {
    position: relative;
    z-index: 2;
}


/* ==============================================
   NAVBAR
   ============================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: var(--space-md) var(--space-xl);
    background: rgba(3, 7, 18, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 240, 255, 0.08);
    transition: all var(--duration-normal) var(--ease-out);
}

.navbar.scrolled {
    background: rgba(3, 7, 18, 0.92);
    border-bottom-color: rgba(0, 240, 255, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(0, 240, 255, 0.1);
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.nav-logo {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--neon-cyan);
    border-radius: var(--radius-sm);
    position: relative;
}

.nav-logo::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-sm);
    box-shadow: var(--glow-cyan);
    opacity: 0.3;
}

.nav-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    color: var(--text-primary);
}

.nav-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon-green);
    box-shadow: 0 0 8px var(--neon-green);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--neon-green); }
    50% { opacity: 0.5; box-shadow: 0 0 3px var(--neon-green); }
}

.status-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--neon-green);
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.4);
}


/* ==============================================
   HERO
   ============================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-4xl) var(--space-xl);
    position: relative;
}

.hero-content {
    animation: fadeInUp 1s var(--ease-out) 0.2s both;
}

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

/* Glitch title */
.hero-title-wrapper {
    position: relative;
    margin-bottom: var(--space-xl);
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2.5rem, 8vw, 5rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    overflow: hidden;
    pointer-events: none;
}

.glitch::before {
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
    animation: glitch-top 3s ease-in-out infinite;
    clip-path: inset(0 0 65% 0);
}

.glitch::after {
    color: var(--neon-pink);
    text-shadow: var(--glow-pink);
    animation: glitch-bottom 3s ease-in-out infinite;
    clip-path: inset(65% 0 0 0);
}

@keyframes glitch-top {
    0%, 90%, 100% { transform: translate(0); }
    92% { transform: translate(-3px, -2px); }
    94% { transform: translate(3px, 1px); }
    96% { transform: translate(-1px, 2px); }
    98% { transform: translate(2px, -1px); }
}

@keyframes glitch-bottom {
    0%, 90%, 100% { transform: translate(0); }
    91% { transform: translate(2px, 1px); }
    93% { transform: translate(-3px, -1px); }
    95% { transform: translate(1px, 2px); }
    97% { transform: translate(-2px, -2px); }
}

.hero-title-underline {
    height: 3px;
    margin-top: var(--space-md);
    background: linear-gradient(90deg, transparent, var(--neon-cyan), var(--neon-purple), var(--neon-pink), transparent);
    border-radius: 2px;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
    animation: underline-glow 3s ease-in-out infinite alternate;
}

@keyframes underline-glow {
    0% { box-shadow: 0 0 10px rgba(0, 240, 255, 0.4); opacity: 0.7; }
    100% { box-shadow: 0 0 25px rgba(176, 38, 255, 0.5); opacity: 1; }
}

/* Subtitle with typing */
.hero-subtitle {
    font-family: var(--font-mono);
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    color: var(--neon-cyan);
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
    margin-bottom: var(--space-2xl);
    letter-spacing: 0.05em;
    animation: fadeInUp 1s var(--ease-out) 0.6s both;
}

.subtitle-bracket {
    color: var(--text-muted);
}

.cursor-blink {
    color: var(--neon-cyan);
    animation: blink 0.8s step-end infinite;
}

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

/* Terminal line */
.terminal-line {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    animation: fadeInUp 1s var(--ease-out) 1s both;
}

.terminal-prompt {
    color: var(--neon-green);
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
}

.terminal-cmd {
    color: var(--text-secondary);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-2xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    animation: fadeInUp 1s var(--ease-out) 1.5s both;
}

.scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(180deg, var(--neon-cyan), transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.2); }
}

.scroll-text {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    color: var(--text-muted);
}


/* ==============================================
   PROJECTS SECTION
   ============================================== */
.projects {
    padding: var(--space-4xl) var(--space-xl);
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.section-container {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
}

.section-header {
    margin-bottom: var(--space-3xl);
}

.section-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: var(--space-sm);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.section-title-deco {
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
    margin-right: var(--space-sm);
    font-weight: 400;
}

.section-line {
    height: 2px;
    margin-top: var(--space-md);
    background: linear-gradient(90deg, var(--neon-cyan), transparent 70%);
    border-radius: 1px;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.section-footer-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-top: var(--space-3xl);
    opacity: 0.5;
}

/* Project cards */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-xl);
}

.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    overflow: hidden;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all var(--duration-normal) var(--ease-out);
}

/* Corner accents */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 50px;
    border-top: 2px solid rgba(0, 240, 255, 0.15);
    border-left: 2px solid rgba(0, 240, 255, 0.15);
    pointer-events: none;
    transition: all var(--duration-normal) var(--ease-out);
}

.project-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 50px;
    border-bottom: 2px solid rgba(176, 38, 255, 0.15);
    border-right: 2px solid rgba(176, 38, 255, 0.15);
    pointer-events: none;
    transition: all var(--duration-normal) var(--ease-out);
}

.project-card:hover {
    border-color: rgba(0, 240, 255, 0.25);
    transform: translateY(-6px);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(0, 240, 255, 0.08),
        inset 0 1px 0 rgba(0, 240, 255, 0.1);
}

.project-card:hover::before {
    width: 70px;
    height: 70px;
    border-color: rgba(0, 240, 255, 0.4);
}

.project-card:hover::after {
    width: 70px;
    height: 70px;
    border-color: rgba(176, 38, 255, 0.4);
}

/* Card glow */
.project-card-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 0%, rgba(0, 240, 255, 0.04) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
}

.project-card:hover .project-card-glow {
    opacity: 1;
}

/* Card scanline */
.project-card-scanline {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    opacity: 0;
    transform: translateY(0);
    pointer-events: none;
    transition: opacity var(--duration-fast);
}

.project-card:hover .project-card-scanline {
    opacity: 0.6;
    animation: card-scan 1.5s linear infinite;
}

@keyframes card-scan {
    0% { transform: translateY(0); }
    100% { transform: translateY(300px); opacity: 0; }
}

/* Card header */
.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.project-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: rgba(0, 240, 255, 0.06);
    border: 1px solid rgba(0, 240, 255, 0.12);
    color: var(--neon-cyan);
    transition: all var(--duration-normal) var(--ease-out);
}

.project-card:hover .project-icon {
    background: rgba(0, 240, 255, 0.1);
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: var(--glow-cyan);
}

.project-status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    color: var(--neon-green);
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(57, 255, 20, 0.2);
    background: rgba(57, 255, 20, 0.05);
}

.project-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--neon-green);
    box-shadow: 0 0 6px var(--neon-green);
    animation: pulse-dot 2s ease-in-out infinite;
}

/* Card content */
.project-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: 4px;
    transition: color var(--duration-normal);
}

.project-card:hover .project-name {
    color: var(--neon-cyan);
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.project-label {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--neon-purple);
    letter-spacing: 0.02em;
    margin-bottom: var(--space-md);
}

.project-desc {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
    flex: 1;
}

/* Card footer */
.project-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.project-tags {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.project-tag {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.1);
    color: var(--text-muted);
    transition: all var(--duration-normal);
}

.project-card:hover .project-tag {
    border-color: rgba(0, 240, 255, 0.2);
    color: var(--text-secondary);
}

.project-arrow {
    color: var(--text-muted);
    transition: all var(--duration-normal) var(--ease-out);
}

.project-card:hover .project-arrow {
    color: var(--neon-cyan);
    transform: translate(3px, -3px);
    filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.4));
}


/* ==============================================
   FOOTER
   ============================================== */
.footer {
    padding: var(--space-3xl) var(--space-xl) var(--space-xl);
    position: relative;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-grid-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.15), rgba(176, 38, 255, 0.15), transparent);
    margin-bottom: var(--space-2xl);
}

.footer-main {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.footer-logo {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(0, 240, 255, 0.4);
    border-radius: var(--radius-sm);
}

.glitch-sm {
    position: relative;
}

.glitch-sm::before,
.glitch-sm::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glitch-sm::before {
    color: var(--neon-pink);
    animation: glitch-top 4s ease-in-out infinite;
    clip-path: inset(0 0 60% 0);
}

.glitch-sm::after {
    color: var(--neon-purple);
    animation: glitch-bottom 4s ease-in-out infinite;
    clip-path: inset(60% 0 0 0);
}

.footer-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    color: var(--text-primary);
}

.footer-tagline {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.04);
    margin: var(--space-lg) 0;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.copyright {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

.footer-meta {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.meta-sep {
    color: rgba(0, 240, 255, 0.2);
}


/* ==============================================
   REVEAL ANIMATIONS
   ============================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}


/* ==============================================
   RESPONSIVE
   ============================================== */
@media (max-width: 768px) {
    .navbar {
        padding: var(--space-sm) var(--space-md);
    }

    .nav-name {
        font-size: 0.75rem;
    }

    .status-text {
        display: none;
    }

    .hero {
        padding: var(--space-4xl) var(--space-md);
    }

    .projects {
        padding: var(--space-3xl) var(--space-md);
    }

    .empty-state {
        padding: var(--space-2xl) var(--space-md);
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        letter-spacing: 0.02em;
    }

    .terminal-line {
        flex-direction: column;
        gap: 2px;
    }
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .glitch::before,
    .glitch::after,
    .glitch-sm::before,
    .glitch-sm::after {
        display: none;
    }

    #particleCanvas {
        display: none;
    }
}
