:root {
    --bg: #0a0e14;
    --bg-panel: #0f141c;
    --fg: #c9d1d9;
    --dim: #6e7681;
    --neon: #00ffc8;
    --neon-pink: #ff2e88;
    --border: #1e2a38;
    --font-mono: "Courier New", "Consolas", monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-mono);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
    radial-gradient(ellipse at 20% 0%, rgba(0, 255, 200, 0.06), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(255, 46, 136, 0.05), transparent 50%);
}

.scanlines {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0px,
                                          rgba(0, 0, 0, 0) 2px,
                                          rgba(0, 0, 0, 0.15) 3px,
                                          rgba(0, 0, 0, 0) 4px
    );
    opacity: 0.4;
    mix-blend-mode: multiply;
}

.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 3rem 1.25rem 2rem;
}

.hero {
    padding: 2rem 0 3rem;
    border-bottom: 1px solid var(--border);
}

.hero__subtitle {
    color: var(--neon);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
    opacity: 0.8;
}

.hero__role {
    color: var(--dim);
    margin-top: 0.5rem;
    font-size: 1rem;
}

.hero__desc {
    margin-top: 1.25rem;
    max-width: 640px;
    color: var(--fg);
    opacity: 0.85;
    font-size: 0.95rem;
}

.glitch {
    position: relative;
    display: inline-block;
    font-size: clamp(1.8rem, 6vw, 3.2rem);
    letter-spacing: 0.04em;
    color: var(--fg);
    text-shadow: 0 0 8px rgba(0, 255, 200, 0.35);
    user-select: none;
}

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

.glitch::before {
    color: var(--neon);
    z-index: -1;
    text-shadow: -2px 0 var(--neon);
    clip-path: inset(0 0 0 0);
    animation: glitch-shift 2.6s infinite steps(2, end);
}

.glitch::after {
    color: var(--neon-pink);
    z-index: -2;
    text-shadow: 2px 0 var(--neon-pink);
    clip-path: inset(0 0 0 0);
    animation: glitch-shift 1.9s infinite reverse steps(2, end);
}

.glitch {
    animation: glitch-main 4s infinite steps(1, end);
}

@keyframes glitch-main {
    0%, 92%, 100% { transform: translate(0, 0); }
    93% { transform: translate(-2px, 1px); }
    94% { transform: translate(2px, -1px); }
    95% { transform: translate(-1px, -2px); }
    96% { transform: translate(1px, 2px); }
    97% { transform: translate(0, 0); }
}

@keyframes glitch-shift {
    0%, 100% {
        clip-path: inset(0 0 0 0);
        transform: translate(0, 0);
    }
    10% {
        clip-path: inset(10% 0 60% 0);
        transform: translate(-3px, 0);
    }
    20% {
        clip-path: inset(50% 0 20% 0);
        transform: translate(3px, 0);
    }
    30% {
        clip-path: inset(20% 0 55% 0);
        transform: translate(-2px, 1px);
    }
    40% {
        clip-path: inset(70% 0 5% 0);
        transform: translate(2px, -1px);
    }
    50% {
        clip-path: inset(0 0 0 0);
        transform: translate(0, 0);
    }
    60% {
        clip-path: inset(35% 0 40% 0);
        transform: translate(-3px, 0);
    }
    70% {
        clip-path: inset(5% 0 75% 0);
        transform: translate(3px, 0);
    }
    80% {
        clip-path: inset(60% 0 15% 0);
        transform: translate(-1px, 1px);
    }
    90% {
        clip-path: inset(15% 0 45% 0);
        transform: translate(1px, -1px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .glitch,
    .glitch::before,
    .glitch::after {
        animation: none;
    }
}

.section {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border);
}

.section__title {
    color: var(--neon);
    font-size: 1.1rem;
    letter-spacing: 0.12em;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 6px rgba(0, 255, 200, 0.3);
}

.skills {
    list-style: none;
    display: grid;
    gap: 0.9rem;
}

.skills__item {
    display: grid;
    grid-template-columns: 1fr minmax(120px, 220px);
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.skills__name {
    color: var(--fg);
}

.skills__bar {
    position: relative;
    display: block;
    height: 6px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.skills__bar::before {
    content: "";
    position: absolute;
    inset: 0;
    width: var(--level, 50%);
    background: linear-gradient(90deg, var(--neon), var(--neon-pink));
    box-shadow: 0 0 8px rgba(0, 255, 200, 0.6);
    transform-origin: left;
    animation: skill-fill 1.2s ease-out both;
}

@keyframes skill-fill {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
    .skills__bar::before { animation: none; }
}

.projects {
    display: grid;
    gap: 1rem;
}

.project {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-left: 3px solid var(--neon);
    padding: 1.25rem 1.25rem 1.25rem 1.1rem;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.project:hover {
    border-left-color: var(--neon-pink);
    transform: translateY(-2px);
    box-shadow: 0 4px 18px rgba(0, 255, 200, 0.08);
}

.project__title {
    font-size: 1.05rem;
    color: var(--fg);
    margin-bottom: 0.25rem;
}

.project__meta {
    font-size: 0.78rem;
    color: var(--neon);
    letter-spacing: 0.05em;
    margin-bottom: 0.6rem;
    opacity: 0.85;
}

.project__desc {
    font-size: 0.9rem;
    color: var(--dim);
}

.footer {
    padding: 2rem 0 1rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--dim);
}

.footer__contacts {
    margin-top: 0.4rem;
}

.footer a {
    color: var(--neon);
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.footer a:hover,
.footer a:focus-visible {
    color: var(--neon-pink);
    border-bottom-color: var(--neon-pink);
    outline: none;
}

@media (max-width: 520px) {
    .skills__item {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }
    .skills__bar {
        width: 100%;
    }
}
