/* ========================================
   Web3 Resume - Shared Styles
   ======================================== */

/* CSS Variables */
:root {
    --neon-green: #c4f20d;
    --glitch-red: #ff003c;
    --glitch-blue: #00f0ff;
    --bg-black: #0a0a0a;
}

/* Base Styles */
body {
    font-family: 'Space Grotesk', sans-serif;
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c4f20d;
}

/* Glass Panel Effect */
.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Holographic Card */
.holo-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.01) 50%, rgba(255,255,255,0.05) 100%);
    border-top: 1px solid rgba(255,255,255,0.2);
    border-left: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Neon Text Effect */
.neon-text {
    text-shadow: 0 0 10px rgba(196, 242, 13, 0.5);
}

/* Grid Background */
.grid-bg {
    background-size: 40px 40px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

/* ========================================
   Glitch Effect Styles
   ======================================== */
.glitch-wrapper {
    text-align: center;
    position: relative;
}

.username {
    position: relative;
    font-size: clamp(3rem, 12vw, 8rem);
    font-weight: 900;
    color: white;
    text-transform: uppercase;
    letter-spacing: -3px;
    cursor: pointer;
    transition: all 0.3s;
    outline: none;
    line-height: 0.9;
}

.username:hover {
    color: var(--neon-green);
    text-shadow: 0 0 20px rgba(196, 242, 13, 0.6);
}

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

.username:hover::before {
    left: 2px;
    text-shadow: -2px 0 var(--glitch-red);
    background: var(--bg-black);
    clip-path: inset(10% 0 80% 0);
    animation: glitch-anim 0.4s infinite linear alternate-reverse;
}

.username:hover::after {
    left: -2px;
    text-shadow: 2px 0 var(--glitch-blue);
    background: var(--bg-black);
    clip-path: inset(60% 0 10% 0);
    animation: glitch-anim-2 0.4s infinite linear alternate-reverse;
}

.status-code {
    margin-top: 20px;
    font-family: monospace;
    color: var(--neon-green);
    font-size: 14px;
    opacity: 0;
    transition: 0.3s;
}

.glitch-wrapper:hover .status-code {
    opacity: 0.6;
}

@keyframes glitch-anim {
    0% { clip-path: inset(20% 0 50% 0); transform: translate(-2px); }
    20% { clip-path: inset(60% 0 10% 0); transform: translate(2px); }
    40% { clip-path: inset(10% 0 70% 0); transform: translate(-1px); }
    60% { clip-path: inset(40% 0 40% 0); transform: translate(1px); }
    80% { clip-path: inset(80% 0 5% 0); transform: translate(-2px); }
    100% { clip-path: inset(0% 0 90% 0); transform: translate(2px); }
}

@keyframes glitch-anim-2 {
    0% { clip-path: inset(10% 0 80% 0); transform: translate(2px); }
    50% { clip-path: inset(50% 0 30% 0); transform: translate(-2px); }
    100% { clip-path: inset(30% 0 60% 0); transform: translate(1px); }
}

/* ========================================
   Navigation Styles
   ======================================== */
.nav-link {
    position: relative;
    padding-bottom: 4px;
}

.nav-link.active {
    color: #c4f20d;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #c4f20d;
    transition: width 0.3s ease;
}

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

/* ========================================
   Skill Network Styles
   ======================================== */
.skill-node.active .node-inner {
    border-color: #c4f20d;
    box-shadow: 0 0 20px rgba(196, 242, 13, 0.5);
}

.skill-node.active .node-text {
    color: white;
}

.network-line {
    transition: stroke 0.3s ease;
}

.network-line.active {
    stroke: #c4f20d;
    filter: drop-shadow(0 0 4px rgba(196, 242, 13, 0.6));
}

/* ========================================
   Edit Mode Styles
   ======================================== */
.edit-mode #btn-edit-mode {
    background: #c4f20d;
    border-color: #c4f20d;
}

.edit-mode #btn-edit-mode span {
    color: black;
}

.editable-area {
    position: relative;
}

.edit-btn {
    display: none;
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #c4f20d;
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    z-index: 30;
}

.edit-btn span {
    font-size: 14px;
    color: black;
}

.edit-mode .edit-btn {
    display: flex;
}

.edit-mode .editable-area {
    outline: 1px dashed rgba(196, 242, 13, 0.3);
    outline-offset: 4px;
}

/* ========================================
   Editor Page Styles
   ======================================== */
.node-template {
    cursor: grab;
    user-select: none;
}

.node-template:active {
    cursor: grabbing;
}

.canvas-node {
    position: absolute;
    touch-action: none;
    cursor: move;
    pointer-events: auto;
    user-select: none;
}

.canvas-node.selected {
    outline: 2px solid #c4f20d;
    outline-offset: 4px;
}

.canvas {
    position: relative;
    background:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

.connection-line {
    stroke: #374151;
    stroke-width: 2;
    cursor: pointer;
    pointer-events: stroke;
}

.connection-line:hover {
    stroke: #6b7280;
}

.connection-line.selected {
    stroke: #c4f20d;
    filter: drop-shadow(0 0 4px rgba(196, 242, 13, 0.6));
}

.connection-line.active {
    stroke: #c4f20d;
    filter: drop-shadow(0 0 4px rgba(196, 242, 13, 0.6));
}

.connect-point {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #374151;
    border: 2px solid #555;
    border-radius: 50%;
    cursor: crosshair;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s, background 0.2s;
    z-index: 10;
}

.canvas-node:hover .connect-point,
.connect-point.dragging {
    opacity: 1;
}

.connect-point:hover {
    background: #c4f20d;
    border-color: #c4f20d;
    transform: scale(1.3);
}

.temp-line {
    stroke: #c4f20d;
    stroke-width: 2;
    stroke-dasharray: 5, 5;
    pointer-events: none;
}
