:root {
    --accent-color: #ff003c;
    --accent-glow: rgba(255, 0, 60, 0.5);
    --bg-dark: #050002;
    --bg-panel: #110003;
}

[data-theme="coder"] {
    --accent-color: #00ff41;
    --accent-glow: rgba(0, 255, 65, 0.5);
    --bg-dark: #000802;
    --bg-panel: #001204;
}

[data-theme="rider"] {
    --accent-color: #00e5ff;
    --accent-glow: rgba(0, 229, 255, 0.5);
    --bg-dark: #00070a;
    --bg-panel: #001018;
}

[data-theme="gamer"] {
    --accent-color: #ff003c;
    --accent-glow: rgba(255, 0, 60, 0.5);
    --bg-dark: #050002;
    --bg-panel: #110003;
}

body {
    background-color: var(--bg-dark);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.5s ease;
}

/* ========================================
   CUSTOM CURSOR
   ======================================== */

/* Hide native cursor on the whole page */
html.custom-cursor-active,
html.custom-cursor-active *,
.custom-cursor,
.custom-cursor * {
    cursor: none !important;
}

/* Dot — small accent circle that snaps to mouse */
#cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 999999;
    /* absurdly high to beat ANY stacking context */
    box-shadow: 0 0 12px var(--accent-glow), 0 0 4px var(--accent-color);
    transition: width 0.2s, height 0.2s, margin 0.2s, background 0.3s;
}

/* Ring — larger border circle that trails behind */
#cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 999999;
    box-shadow: 0 0 8px var(--accent-glow);
    transition: width 0.2s, height 0.2s, margin 0.2s, border-color 0.3s, background-color 0.2s;
}

/* Hover states */
#cursor-ring.hovered {
    width: 56px;
    height: 56px;
    margin-top: -10px;
    margin-left: -10px;
    background-color: rgba(255, 255, 255, 0.06);
    border-color: #fff;
}

#cursor-dot.hovered {
    width: 5px;
    height: 5px;
    margin-top: 1.5px;
    margin-left: 1.5px;
}

/* On touch / mobile hide custom cursor, restore native */
@media (pointer: coarse) {

    #cursor-dot,
    #cursor-ring {
        display: none !important;
    }

    .custom-cursor,
    .custom-cursor * {
        cursor: auto !important;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

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

/* ========================================
   ACCENT UTILITIES
   ======================================== */
.text-accent {
    color: var(--accent-color);
    text-shadow: 0 0 15px var(--accent-glow);
    transition: all 0.3s ease;
}

.bg-accent {
    background-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
    transition: all 0.3s ease;
}

.border-accent {
    border-color: var(--accent-color);
    transition: all 0.3s ease;
}

.cyber-glow {
    box-shadow: 0 0 40px var(--accent-glow);
}

/* ========================================
   CYBER-NOIR FILTER
   ======================================== */
.cyber-filter {
    filter: contrast(110%) saturate(70%) sepia(20%) hue-rotate(min(0deg));
    transition: filter 1s ease;
}

[data-theme="coder"] .cyber-filter {
    filter: contrast(120%) saturate(80%) sepia(50%) hue-rotate(90deg);
}

[data-theme="rider"] .cyber-filter {
    filter: contrast(120%) saturate(80%) sepia(30%) hue-rotate(180deg);
}

/* ========================================
   SPEED LINES (Rider)
   ======================================== */
.speed-lines {
    background-image: repeating-linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.03) 1%, transparent 2%);
    background-size: 200% 100%;
    animation: moveLines 10s linear infinite;
}

@keyframes moveLines {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ========================================
   GLITCH EFFECT
   ======================================== */
.glitch {
    position: relative;
}

.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 var(--accent-color);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

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

@keyframes glitch-anim {
    0% {
        clip: rect(72px, 9999px, 83px, 0);
    }

    20% {
        clip: rect(12px, 9999px, 9px, 0);
    }

    40% {
        clip: rect(61px, 9999px, 81px, 0);
    }

    60% {
        clip: rect(6px, 9999px, 14px, 0);
    }

    80% {
        clip: rect(100px, 9999px, 60px, 0);
    }

    100% {
        clip: rect(31px, 9999px, 49px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(15px, 9999px, 20px, 0);
    }

    20% {
        clip: rect(40px, 9999px, 60px, 0);
    }

    40% {
        clip: rect(10px, 9999px, 15px, 0);
    }

    60% {
        clip: rect(80px, 9999px, 90px, 0);
    }

    80% {
        clip: rect(20px, 9999px, 30px, 0);
    }

    100% {
        clip: rect(5px, 9999px, 10px, 0);
    }
}

/* ========================================
   HERO LAYOUT
   ======================================== */
.hero-title {
    text-align: center;
    width: 100%;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
}

/* ========================================
   TECH LOADOUT — side-by-side layout
   ======================================== */
.tech-loadout-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: stretch;
    width: 100%;
}

@media (min-width: 1024px) {
    .tech-loadout-container {
        flex-direction: row;
    }
}

/* Left panel — skills.java IDE block */
.tech-left {
    width: 100%;
    flex-shrink: 0;
    overflow-x: auto;
}

@media (min-width: 1024px) {
    .tech-left {
        width: 60%;
        min-width: 440px;
    }
}

/* Right panel — project cards */
.tech-right {
    flex: 1;
    width: 100%;
    overflow: visible;
}

@media (min-width: 1024px) {
    .tech-right {
        width: 40%;
    }
}

/* ========================================
   IDE CODE LINES
   ======================================== */
.line {
    font-family: 'Fira Code', monospace;
    white-space: nowrap;
    line-height: 1.6;
    font-size: 13px;
    text-align: left;
}

/* ========================================
   HUD ELEMENTS (Gamer)
   ======================================== */
.hud-element {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hud-element:hover {
    transform: translateX(10px);
    box-shadow: -5px 0 0 var(--accent-color);
}