/* ============================================
   RETRO TECH-NOIR VHS PORTFOLIO
   Art Proto — AI Innovation Director
   ============================================ */

/* CSS Variables */
:root {
    /* Core Colors */
    --bg-deep: #0a0e1a;
    --bg-primary: #0d1225;
    --bg-secondary: #111833;
    --bg-elevated: #151d3a;

    /* Accent Colors */
    --accent-primary: #00d4ff;
    --accent-secondary: #0099cc;
    --accent-glow: rgba(0, 212, 255, 0.3);
    --accent-dim: rgba(0, 212, 255, 0.1);

    /* Text Colors */
    --text-primary: #e8f4f8;
    --text-secondary: #8aa4b8;
    --text-muted: #4a6070;

    /* VHS Colors */
    --vhs-red: #ff3366;
    --vhs-green: #00ff88;
    --vhs-amber: #ffaa00;

    /* Fonts */
    --font-display: 'VT323', monospace;
    --font-mono: 'Space Mono', monospace;
    --font-body: 'Inter', -apple-system, sans-serif;

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

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
}

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

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

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

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* ============================================
   BACKGROUND CANVAS & EFFECTS
   ============================================ */

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.8;
}

/* Scan Lines Overlay */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    opacity: 0.4;
}

.scanlines::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        rgba(10, 14, 26, 0.3) 100%
    );
}

/* ============================================
   VHS CHROME
   ============================================ */

.vhs-chrome {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    pointer-events: none;
    padding: var(--space-lg);
}

/* VHS indicator inside nav */
.vhs-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--vhs-red);
}

.rec-dot {
    width: 10px;
    height: 10px;
    background: var(--vhs-red);
    border-radius: 50%;
    animation: rec-blink 1s infinite;
}

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

.vhs-timecode {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.vhs-play {
    position: fixed;
    bottom: var(--space-lg);
    left: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--text-primary);
}

.play-icon {
    font-size: 1rem;
}

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

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) var(--space-xl);
    background: linear-gradient(
        180deg,
        rgba(10, 14, 26, 0.95) 0%,
        rgba(10, 14, 26, 0) 100%
    );
    backdrop-filter: blur(10px);
}

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

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

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.1em;
}

.logo-bracket {
    color: var(--accent-primary);
}

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

.nav-links {
    display: flex;
    gap: var(--space-xl);
}

.nav-link {
    position: relative;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-decoration: none;
    letter-spacing: 0.15em;
    transition: color var(--transition-fast);
}

.nav-link::before {
    content: attr(data-section) '_';
    color: var(--text-muted);
    margin-right: var(--space-xs);
    font-size: 0.75rem;
}

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

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

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

.nav-link--cv {
    border: 1px solid var(--accent-primary);
    padding: 0.25em 0.75em;
    color: var(--accent-primary);
}

.nav-link--cv::before {
    display: none;
}

.nav-link--cv:hover {
    background: var(--accent-primary);
    color: var(--bg-deep);
}

.nav-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--vhs-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(0, 255, 136, 0); }
}

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

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--space-2xl) var(--space-xl);
    padding-top: 180px; /* Space for nav + VHS chrome */
    z-index: 2;
}

.hero-content {
    max-width: 800px;
}

.hero-label {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.label-line {
    width: 60px;
    height: 2px;
    background: var(--accent-primary);
}

.label-text {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: 0.2em;
}

.hero-title {
    margin-bottom: var(--space-lg);
}

.title-line {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    position: relative;
}

.title-line--accent {
    color: var(--accent-primary);
    text-shadow:
        0 0 20px var(--accent-glow),
        0 0 40px var(--accent-glow);
}

/* Glitch Effect on Hover */
.title-line {
    transition: all var(--transition-fast);
}

.title-line: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); }
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: var(--space-xl);
    line-height: 1.8;
}

.subtitle-prefix {
    color: var(--accent-primary);
    margin-right: var(--space-sm);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--accent-primary);
    line-height: 1;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.15em;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--text-muted);
    opacity: 0.3;
}

/* Hero Visual - ASCII Terminal */
.hero-visual {
    position: absolute;
    right: var(--space-xl);
    top: 50%;
    transform: translateY(-50%);
    width: 440px;
    pointer-events: none;
    z-index: 5;
}

.ascii-terminal {
    background: var(--bg-secondary);
    border: 1px solid var(--accent-primary);
    box-shadow:
        0 0 30px var(--accent-glow),
        inset 0 0 60px rgba(0, 212, 255, 0.05);
    overflow: hidden;
    position: relative;
}

.ascii-terminal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(0, 212, 255, 0.03) 50%,
        transparent 100%
    );
    pointer-events: none;
    animation: ascii-flicker 4s infinite;
}

@keyframes ascii-flicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 1; }
    93% { opacity: 0.8; }
    94% { opacity: 1; }
    97% { opacity: 1; }
    98% { opacity: 0.9; }
    99% { opacity: 1; }
}

.ascii-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--accent-dim);
}

.ascii-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
}

.ascii-dot:nth-child(1) { background: var(--vhs-red); }
.ascii-dot:nth-child(2) { background: var(--vhs-amber); }
.ascii-dot:nth-child(3) { background: var(--vhs-green); }

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

.ascii-status {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--vhs-green);
    letter-spacing: 0.1em;
    animation: status-blink 1.5s infinite;
}

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

.ascii-viewport {
    position: relative;
    padding: var(--space-xs);
    overflow: hidden;
    background: linear-gradient(
        180deg,
        rgba(0, 20, 40, 0.8) 0%,
        rgba(5, 15, 35, 0.9) 100%
    );
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto; /* Explicitly catch mouse events */
    cursor: crosshair; /* Visual feedback */
}

.ascii-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(
        180deg,
        transparent,
        rgba(0, 212, 255, 0.3),
        transparent
    );
    animation: scanline-move 3s linear infinite;
    pointer-events: none;
    z-index: 10;
}

@keyframes scanline-move {
    0% { top: -4px; }
    100% { top: 100%; }
}

.ascii-art {
    font-family: 'Courier New', monospace;
    font-size: 5.2px;
    line-height: 1.0;
    color: var(--accent-primary);
    text-shadow:
        0 0 5px var(--accent-glow),
        0 0 10px var(--accent-glow);
    white-space: pre;
    margin: 0;
    letter-spacing: 0;
    animation: ascii-glow 3s ease-in-out infinite alternate;
    user-select: none;
    opacity: 1;
    transition: opacity 0.5s ease;
    pointer-events: none; /* Let events pass through to viewport */
}

.ascii-art.fade-out {
    opacity: 0;
}

@keyframes ascii-glow {
    0% {
        filter: brightness(1) contrast(1);
        text-shadow:
            0 0 5px var(--accent-glow),
            0 0 10px var(--accent-glow);
    }
    100% {
        filter: brightness(1.1) contrast(1.05);
        text-shadow:
            0 0 8px var(--accent-glow),
            0 0 15px var(--accent-glow),
            0 0 25px rgba(0, 212, 255, 0.2);
    }
}

/* VHS distortion effect on hover */
.ascii-terminal:hover .ascii-art {
    animation: ascii-glitch 0.3s ease;
}

@keyframes ascii-glitch {
    0% { transform: translate(0); filter: hue-rotate(0deg); }
    20% { transform: translate(-2px, 1px); filter: hue-rotate(10deg); }
    40% { transform: translate(2px, -1px); filter: hue-rotate(-10deg); }
    60% { transform: translate(-1px, 2px); filter: hue-rotate(5deg); }
    80% { transform: translate(1px, -2px); filter: hue-rotate(-5deg); }
    100% { transform: translate(0); filter: hue-rotate(0deg); }
}

.ascii-footer {
    display: flex;
    justify-content: space-between;
    padding: var(--space-xs) var(--space-md);
    background: var(--bg-elevated);
    border-top: 1px solid var(--accent-dim);
    font-family: var(--font-mono);
    font-size: 0.625rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.ascii-coords,
.ascii-size,
.ascii-format {
    opacity: 0.7;
}

/* Chromatic aberration effect */
.ascii-viewport::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(90deg,
            rgba(255, 0, 0, 0.03) 0%,
            transparent 10%,
            transparent 90%,
            rgba(0, 255, 255, 0.03) 100%
        );
    pointer-events: none;
    z-index: -1; /* Move behind so it doesn't block events */
}

/* CRT curvature simulation */
.ascii-viewport::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 60%,
        rgba(0, 0, 0, 0.3) 100%
    );
    pointer-events: none;
    z-index: -1; /* Move behind so it doesn't block events */
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

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

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(
        180deg,
        var(--accent-primary) 0%,
        transparent 100%
    );
    animation: scroll-bounce 2s infinite;
}

@keyframes scroll-bounce {
    0%, 100% { transform: scaleY(1); opacity: 1; }
    50% { transform: scaleY(0.5); opacity: 0.5; }
}

/* ============================================
   SECTION COMMON STYLES
   ============================================ */

section {
    position: relative;
    z-index: 2;
    padding: var(--space-2xl) var(--space-xl);
}

.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.section-index {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--accent-primary);
    opacity: 0.5;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--text-primary);
    letter-spacing: 0.1em;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(
        90deg,
        var(--accent-primary) 0%,
        transparent 100%
    );
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about {
    padding-bottom: var(--space-xl);
    background:
        repeating-linear-gradient(
            0deg,
            rgba(60, 80, 220, 0.04) 0px,
            transparent 1px,
            transparent 3px,
            rgba(60, 80, 220, 0.02) 4px,
            transparent 5px,
            transparent 8px
        ),
        linear-gradient(
            180deg,
            #0a0e1a 0%,
            #0c1235 20%,
            #0e1545 50%,
            #0c1235 80%,
            #0a0e1a 100%
        );
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

/* Terminal Block */
.about-text {
    display: flex;
}

.terminal-block {
    background: var(--bg-secondary);
    border: 1px solid var(--bg-elevated);
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.terminal-body {
    flex: 1;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--bg-elevated);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
}

.terminal-dot:nth-child(1) { background: var(--vhs-red); }
.terminal-dot:nth-child(2) { background: var(--vhs-amber); }
.terminal-dot:nth-child(3) { background: var(--vhs-green); }

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

.terminal-body {
    padding: var(--space-lg);
}

.terminal-line {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.prompt {
    color: var(--accent-primary);
    margin-right: var(--space-sm);
}

.terminal-output {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--text-secondary);
    padding-left: var(--space-md);
    margin-bottom: var(--space-lg);
    border-left: 2px solid var(--accent-dim);
    line-height: 1.8;
}

.neofetch-label {
    display: inline-block;
    width: 70px;
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 700;
}

.terminal-line--cursor {
    margin-bottom: 0;
}

.cursor-blink {
    color: var(--accent-primary);
    animation: blink 1s step-end infinite;
}

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

/* Data Blocks */
.about-data {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.data-block {
    background: rgba(0, 212, 255, 0.03);
    border: 1px solid var(--accent-dim);
    padding: var(--space-lg);
}

.data-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--accent-primary);
    margin-bottom: var(--space-md);
    letter-spacing: 0.1em;
}

.data-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--accent-dim);
}

.data-item:last-child {
    border-bottom: none;
}

.data-year {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--accent-primary);
    white-space: nowrap;
}

.data-text {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

/* Experience Timeline */
.experience-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.exp-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    grid-template-rows: auto auto;
    gap: var(--space-xs) var(--space-md);
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--accent-dim);
}

.exp-item:last-child {
    border-bottom: none;
}

.exp-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-primary);
    grid-row: span 2;
}

.exp-role {
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
}

.exp-company {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Skills Section */
.skills-section {
    margin-bottom: var(--space-xl);
}

.skills-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    letter-spacing: 0.1em;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.skill-card {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--accent-dim);
    padding: var(--space-lg);
    transition: all var(--transition-base);
    cursor: default;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        var(--accent-glow) 0%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity var(--transition-base);
}

.skill-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
}

.skill-card:hover::before {
    opacity: 1;
}

.skill-icon {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: var(--space-sm);
}

.skill-name {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

/* Brands Section */
.brands-section {
    overflow: hidden;
}

.brands-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    letter-spacing: 0.1em;
}

.brands-marquee {
    position: relative;
    overflow: hidden;
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--accent-dim);
    border-bottom: 1px solid var(--accent-dim);
}

.marquee-wrapper {
    display: flex;
    width: max-content;
    will-change: transform;
    animation: marquee 60s linear infinite;
}

.marquee-track {
    display: flex;
    gap: var(--space-lg);
    flex-shrink: 0;
    padding-right: var(--space-lg);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.brand {
    font-family: var(--font-mono);
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    transition: color var(--transition-fast);
}

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

.brand-dot {
    color: var(--accent-primary);
    font-size: 1.2rem;
    opacity: 0.5;
    display: inline-flex;
    align-items: center;
}

/* ============================================
   GLASSES + EYE TRACKING
   ============================================ */

.glasses-section {
    position: relative;
    z-index: 3;
    background: var(--bg-deep);
    padding: 0;
    margin-top: 0;
    margin-bottom: 0;
    box-shadow: 0 -30px 40px 20px var(--bg-deep);
}

.glasses-section + .projects {
    padding-top: 2rem;
}

.glasses-wrapper {
    position: relative;
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
}

.glasses-img {
    display: block;
    width: 100%;
    height: auto;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

/* Eye containers */
.eye {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1;
    /* Center eyes vertically within their area */
    top: 50%;
    transform: translateY(-50%);
}

.eye--left {
    left: 20%;
    width: 22%;
}

.eye--right {
    left: 56%;
    width: 22%;
}

/* Eye core — the moving part */
.eye-core {
    position: relative;
    width: clamp(40px, 6.5vw, 85px);
    height: clamp(40px, 6.5vw, 85px);
    transition: transform 0.06s ease-out;
}

/* Concentric rings */
.eye-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.eye-ring--outer {
    width: 100%;
    height: 100%;
    border-color: rgba(255, 40, 80, 0.6);
    border-width: 1.5px;
    box-shadow:
        0 0 20px rgba(255, 40, 80, 0.3),
        inset 0 0 20px rgba(255, 40, 80, 0.15);
}

.eye-ring--mid {
    width: 70%;
    height: 70%;
    border-color: rgba(255, 50, 90, 0.8);
    border-width: 2px;
}

.eye-ring--inner {
    width: 42%;
    height: 42%;
    border-color: #ff2255;
    border-width: 2.5px;
    box-shadow:
        0 0 12px rgba(255, 34, 85, 0.7),
        inset 0 0 10px rgba(255, 34, 85, 0.4);
}

/* Central pupil dot */
.eye-pupil {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 22%;
    height: 22%;
    background: #ff2255;
    border-radius: 50%;
    box-shadow:
        0 0 8px #ff2255,
        0 0 20px rgba(255, 34, 85, 0.8),
        0 0 40px rgba(255, 34, 85, 0.4),
        0 0 60px rgba(255, 34, 85, 0.2);
}

/* Crosshair lines */
.eye-crosshair {
    position: absolute;
    background: rgba(255, 51, 102, 0.25);
}

.eye-crosshair--h {
    width: 100%;
    height: 1px;
    top: 50%;
    left: 0;
    transform: translateY(-0.5px);
    background: rgba(255, 34, 85, 0.35);
}

.eye-crosshair--v {
    width: 1px;
    height: 100%;
    left: 50%;
    top: 0;
    transform: translateX(-0.5px);
    background: rgba(255, 34, 85, 0.35);
}

/* Scanning line */
.eye-scanline {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 51, 102, 0.4) 30%,
        rgba(255, 51, 102, 0.6) 50%,
        rgba(255, 51, 102, 0.4) 70%,
        transparent 100%
    );
    top: 0;
    left: 0;
    animation: eye-scan 2.5s linear infinite;
    border-radius: 50%;
}

@keyframes eye-scan {
    0% { top: 10%; }
    100% { top: 90%; }
}

/* ============================================
   PROJECTS SECTION
   ============================================ */

.projects {
    background:
        repeating-linear-gradient(
            0deg,
            rgba(100, 50, 200, 0.03) 0px,
            transparent 1px,
            transparent 4px,
            rgba(100, 50, 200, 0.02) 5px,
            transparent 6px,
            transparent 10px
        ),
        linear-gradient(
            180deg,
            #0a0e1a 0%,
            #0e1040 20%,
            #100e3a 50%,
            #0e1040 80%,
            #0a0e1a 100%
        );
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.project-card {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--accent-dim);
    overflow: hidden;
    transition: all var(--transition-base);
}

.project-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.1);
}

.project-card--featured {
    grid-column: span 2;
}

.project-frame {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    border-bottom: 1px solid var(--accent-dim);
}

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

.status-live {
    width: 8px;
    height: 8px;
    background: var(--vhs-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dev {
    width: 8px;
    height: 8px;
    background: var(--vhs-amber);
    border-radius: 50%;
}

.project-index {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--accent-primary);
    opacity: 0.3;
}

.project-content {
    padding: var(--space-lg);
}

.project-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    letter-spacing: 0.05em;
}

.project-role {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--accent-primary);
    margin-bottom: var(--space-md);
}

.project-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

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

.tag {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--accent-primary);
    background: var(--accent-dim);
    padding: var(--space-xs) var(--space-sm);
    letter-spacing: 0.1em;
    border: 1px solid var(--accent-dim);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.project-link:hover {
    gap: var(--space-md);
}

.link-arrow {
    transition: transform var(--transition-fast);
}

.project-link:hover .link-arrow {
    transform: translateX(4px);
}

.project-visual {
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 100%;
    pointer-events: none;
    opacity: 0.3;
}

.visual-noise {
    width: 100%;
    height: 100%;
    background:
        linear-gradient(135deg, var(--accent-dim) 0%, transparent 100%),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' 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)' opacity='0.4'/%3E%3C/svg%3E");
}

/* ============================================
   CONTACT SECTION
   ============================================ */

.contact {
    background:
        repeating-linear-gradient(
            0deg,
            rgba(40, 100, 255, 0.04) 0px,
            transparent 1px,
            transparent 3px,
            rgba(150, 50, 255, 0.02) 4px,
            transparent 5px,
            transparent 7px
        ),
        linear-gradient(
            180deg,
            #0a0e1a 0%,
            #0b1240 30%,
            #0d1550 60%,
            #0e1248 80%,
            #0a0e1a 100%
        );
}

.contact-content {
    max-width: 1000px;
    margin: 0 auto;
}

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

.cta-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6.5rem);
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: var(--space-lg);
    letter-spacing: 0.04em;
    white-space: nowrap;
    position: relative;
}

.cta-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    color: transparent;
    -webkit-text-stroke: 1px rgba(0, 212, 255, 0.1);
    transform: translate(4px, 4px);
    z-index: -1;
}

.cta-code-line {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    margin-bottom: var(--space-sm);
    letter-spacing: 0.05em;
    opacity: 0.6;
}

.cta-code-line:last-of-type {
    margin-top: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.cta-comment {
    color: var(--text-muted);
}

.cta-fn {
    color: var(--vhs-red);
}

.cta-name {
    color: var(--accent-primary);
}

.cta-return {
    color: var(--vhs-red);
}

.cta-str {
    color: var(--vhs-green);
}

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

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.contact-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--accent-dim);
    padding: var(--space-lg);
    text-decoration: none;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.contact-card > * {
    position: relative;
    z-index: 1;
}

.contact-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    background: var(--bg-elevated);
}

.contact-icon {
    font-family: var(--font-mono);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.contact-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.15em;
}

.contact-value {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-primary);
}

.contact-card--location {
    cursor: default;
}

/* Languages */
.contact-languages {
    display: flex;
    gap: var(--space-xl);
    justify-content: center;
}

.lang-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.lang-name {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    width: 80px;
}

.lang-bar {
    width: 150px;
    height: 4px;
    background: var(--bg-elevated);
    overflow: hidden;
}

.lang-fill {
    height: 100%;
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-glow);
}

.lang-level {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-primary);
    width: 60px;
}

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

.footer {
    background: var(--bg-deep);
    border-top: 1px solid var(--accent-dim);
    padding: var(--space-lg) var(--space-xl);
}

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

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
}

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

.footer-divider {
    color: var(--accent-dim);
}

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

.footer-line {
    height: 2px;
    background: var(--bg-secondary);
    overflow: hidden;
}

.line-animation {
    width: 100px;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        var(--accent-primary),
        transparent
    );
    animation: line-move 3s linear infinite;
}

@keyframes line-move {
    0% { transform: translateX(-100px); }
    100% { transform: translateX(calc(100vw + 100px)); }
}

/* ============================================
   AI WIDGET
   ============================================ */

.ai-widget {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    z-index: 1001;
}

.ai-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--accent-primary);
    padding: var(--space-md) var(--space-lg);
    cursor: pointer;
    transition: all var(--transition-base);
}

.ai-toggle:hover {
    background: var(--bg-elevated);
    box-shadow: 0 0 30px var(--accent-glow);
}

.ai-toggle-icon {
    position: relative;
    width: 24px;
    height: 24px;
}

.toggle-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    animation: ring-pulse 2s infinite;
}

@keyframes ring-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.5; }
}

.toggle-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
}

.ai-toggle-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: 0.15em;
}

/* Active state — green glow when connected */
.ai-widget.active .ai-toggle {
    border-color: var(--vhs-green);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.ai-widget.active .toggle-ring {
    border-color: var(--vhs-green);
}

.ai-widget.active .toggle-core {
    background: var(--vhs-green);
}

.ai-widget.active .ai-toggle-label {
    color: var(--vhs-green);
}

/* AI Chat Panel */
.ai-chat {
    position: absolute;
    bottom: 60px;
    right: 0;
    width: 380px;
    background: var(--bg-secondary);
    border: 1px solid var(--accent-primary);
    display: none;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.ai-chat.active {
    display: flex;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--accent-dim);
}

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

.status-indicator {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: background 0.3s;
}

.ai-widget.active .status-indicator {
    background: var(--vhs-green);
    animation: pulse 2s infinite;
}

.status-text {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-primary);
    letter-spacing: 0.1em;
}

.chat-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.chat-close:hover {
    color: var(--accent-primary);
}

/* Voice visualizer */
.voice-visualizer {
    padding: var(--space-lg) var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.voice-canvas {
    width: 100%;
    height: 100px;
    display: block;
}

.voice-mode {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--accent-primary);
    letter-spacing: 0.2em;
    text-align: center;
    min-height: 1.4em;
    text-shadow: 0 0 10px var(--accent-glow);
}

/* Transcript */
.voice-transcript {
    max-height: 120px;
    overflow-y: auto;
    padding: 0 var(--space-md) var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.voice-transcript:empty {
    display: none;
}

.voice-transcript-line {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.5;
    padding: var(--space-xs) var(--space-sm);
}

.voice-transcript-line--agent {
    color: var(--accent-primary);
    border-left: 2px solid var(--accent-primary);
}

.voice-transcript-line--user {
    color: var(--text-secondary);
    border-left: 2px solid var(--text-muted);
}

.voice-transcript-label {
    font-size: 0.625rem;
    letter-spacing: 0.1em;
    opacity: 0.5;
    display: block;
    margin-bottom: 2px;
}

/* Voice controls */
.voice-controls {
    display: flex;
    border-top: 1px solid var(--accent-dim);
}

.voice-btn {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-deep);
    border: none;
    border-right: 1px solid var(--accent-dim);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.voice-btn:last-child {
    border-right: none;
}

.voice-btn:hover {
    background: var(--bg-elevated);
}

.voice-btn-icon {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    transition: color 0.3s;
}

.voice-btn:hover .voice-btn-icon {
    color: var(--accent-primary);
}

.voice-btn--call .voice-btn-icon {
    color: var(--vhs-green);
}

.voice-btn--end .voice-btn-icon {
    color: var(--vhs-red);
}

.voice-btn--mute.muted {
    background: var(--bg-elevated);
}

.voice-btn--mute.muted .voice-btn-icon {
    color: var(--vhs-red);
}

.voice-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.voice-btn:disabled:hover {
    background: var(--bg-deep);
}

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

@media (max-width: 1400px) {
    .hero-visual {
        width: 380px;
    }

    .ascii-art {
        font-size: 4.8px;
    }
}

@media (max-width: 1200px) {
    .hero-visual {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        width: 100%;
        max-width: 380px;
        margin: var(--space-xl) auto 0;
    }

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

    .hero-content {
        max-width: 100%;
    }

    .hero-label {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .ascii-art {
        font-size: 4.2px;
    }
}

@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card--featured {
        grid-column: span 1;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --space-xl: 2rem;
        --space-2xl: 4rem;
    }

    .nav {
        padding: var(--space-md);
    }

    .nav-links {
        display: none;
    }

    .nav-status {
        display: none;
    }

    .vhs-chrome {
        padding: var(--space-md);
    }

    .vhs-play {
        bottom: var(--space-md);
        left: var(--space-md);
    }

    .hero {
        padding-top: 120px;
    }

    .hero-visual {
        max-width: 100%;
        overflow-x: auto;
    }

    .ascii-art {
        font-size: 3.5px;
    }

    .hero-stats {
        flex-wrap: wrap;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-languages {
        flex-direction: column;
        align-items: center;
    }

    .ai-chat {
        width: calc(100vw - var(--space-lg) * 2);
        right: 0;
    }

    .footer-content {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
}

@media (max-width: 480px) {
    .title-line {
        font-size: 3rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .cta-title {
        font-size: 2rem;
        white-space: normal;
    }
}

/* ============================================
   ANIMATIONS ON SCROLL
   ============================================ */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Glitch text effect */
.glitch-text {
    position: relative;
}

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

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 var(--vhs-red);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 var(--accent-primary);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(30px, 9999px, 10px, 0); }
    5% { clip: rect(54px, 9999px, 98px, 0); }
    10% { clip: rect(23px, 9999px, 71px, 0); }
    15% { clip: rect(87px, 9999px, 43px, 0); }
    20% { clip: rect(15px, 9999px, 66px, 0); }
    25% { clip: rect(43px, 9999px, 19px, 0); }
    30% { clip: rect(92px, 9999px, 55px, 0); }
    35% { clip: rect(11px, 9999px, 77px, 0); }
    40% { clip: rect(67px, 9999px, 32px, 0); }
    45% { clip: rect(21px, 9999px, 89px, 0); }
    50% { clip: rect(78px, 9999px, 14px, 0); }
    55% { clip: rect(36px, 9999px, 95px, 0); }
    60% { clip: rect(59px, 9999px, 27px, 0); }
    65% { clip: rect(84px, 9999px, 48px, 0); }
    70% { clip: rect(17px, 9999px, 73px, 0); }
    75% { clip: rect(45px, 9999px, 8px, 0); }
    80% { clip: rect(91px, 9999px, 61px, 0); }
    85% { clip: rect(28px, 9999px, 84px, 0); }
    90% { clip: rect(63px, 9999px, 39px, 0); }
    95% { clip: rect(9px, 9999px, 96px, 0); }
    100% { clip: rect(52px, 9999px, 22px, 0); }
}
