/* ===== Foldash — неоновая тема ===== */
:root {
    --bg: #07070f;
    --bg-card: #0d0d1c;
    --text: #e8e8f5;
    --muted: #8a8aa8;
    --cyan: #00f0ff;
    --magenta: #ff2fd6;
    --purple: #8b5cf6;
    --border: rgba(139, 92, 246, 0.25);
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Rubik", sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* фоновый canvas с частицами */
#bg {
    position: fixed;
    inset: 0;
    z-index: -1;
}

h1, h2, h3, .logo { font-family: "Unbounded", sans-serif; }

/* ===== Шапка ===== */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 10;
    background: rgba(7, 7, 15, 0.75);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

nav {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 20px;
    font-weight: 900;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 2px;
    text-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}

.blink { color: var(--cyan); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    margin-left: 28px;
    font-size: 15px;
    transition: color 0.2s, text-shadow 0.2s;
}
.nav-links a:hover { color: var(--cyan); text-shadow: 0 0 10px var(--cyan); }

/* ===== Основное ===== */
main { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Хиро */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.hero-tag {
    color: var(--cyan);
    font-family: "Consolas", monospace;
    font-size: 16px;
    margin-bottom: 10px;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.glitch {
    font-size: clamp(48px, 10vw, 110px);
    font-weight: 900;
    letter-spacing: 4px;
    position: relative;
    background: linear-gradient(100deg, var(--cyan) 20%, var(--purple) 55%, var(--magenta) 85%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 22px rgba(139, 92, 246, 0.45));
}

/* глитч-слои */
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    background: inherit;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0;
}
.glitch::before { animation: glitch-a 4s infinite; }
.glitch::after  { animation: glitch-b 4s infinite; }

@keyframes glitch-a {
    0%, 91%, 100% { opacity: 0; transform: none; clip-path: none; }
    92% { opacity: 0.85; transform: translate(-5px, 2px); clip-path: inset(20% 0 55% 0); }
    94% { opacity: 0.85; transform: translate(4px, -2px);  clip-path: inset(60% 0 15% 0); }
    96% { opacity: 0; }
}
@keyframes glitch-b {
    0%, 93%, 100% { opacity: 0; transform: none; clip-path: none; }
    94% { opacity: 0.7; transform: translate(5px, 1px);  clip-path: inset(45% 0 35% 0); }
    97% { opacity: 0.7; transform: translate(-4px, -1px); clip-path: inset(8% 0 78% 0); }
    98% { opacity: 0; }
}

.hero-sub {
    font-size: 19px;
    color: var(--muted);
    max-width: 520px;
    margin: 18px 0 34px;
}

.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

/* ===== Кнопки ===== */
.btn {
    display: inline-block;
    padding: 13px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-primary {
    background: linear-gradient(100deg, var(--cyan), var(--purple));
    color: #05050c;
    font-weight: 700;
    box-shadow: 0 0 24px rgba(0, 240, 255, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 38px rgba(0, 240, 255, 0.6); }

.btn-ghost {
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-ghost:hover { border-color: var(--cyan); box-shadow: 0 0 18px rgba(0, 240, 255, 0.25); }

/* ===== Секции ===== */
section { padding: 70px 0; }

h2 {
    font-size: 30px;
    margin-bottom: 36px;
    letter-spacing: 1px;
}
.accent {
    color: var(--cyan);
    text-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}

/* ===== Карточки ===== */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    overflow: hidden;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 240, 255, 0.5);
    box-shadow: 0 8px 40px rgba(139, 92, 246, 0.25);
}

.card-glow {
    position: absolute;
    top: -60px; right: -60px;
    width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.35), transparent 70%);
    pointer-events: none;
}

.card-icon { font-size: 34px; margin-bottom: 14px; }

.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; margin-bottom: 18px; }

.card-empty {
    border-style: dashed;
    opacity: 0.6;
}
.card-empty:hover { transform: none; box-shadow: none; border-color: var(--border); }

.tags { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tag {
    font-size: 12.5px;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(0, 240, 255, 0.35);
    color: var(--cyan);
}

.btn-card {
    background: rgba(0, 240, 255, 0.08);
    border: 1px solid rgba(0, 240, 255, 0.4);
    color: var(--cyan);
    padding: 10px 22px;
    font-size: 14px;
}
.btn-card:hover { background: rgba(0, 240, 255, 0.18); box-shadow: 0 0 16px rgba(0, 240, 255, 0.3); }

.soon {
    font-size: 11px;
    background: var(--magenta);
    color: #05050c;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

/* ===== Обо мне ===== */
.about-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--cyan);
    border-radius: 12px;
    padding: 28px 32px;
    font-size: 17px;
    max-width: 720px;
}
.about-box strong { color: var(--cyan); }

.contacts { margin-top: 16px; }
.contacts a {
    color: var(--cyan);
    text-decoration: none;
    transition: text-shadow 0.2s;
}
.contacts a:hover { text-shadow: 0 0 10px var(--cyan); }

/* ===== Подвал ===== */
footer {
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 28px;
    color: var(--muted);
    font-size: 14px;
}

/* ===== Появление при скролле ===== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ===== Мобильные ===== */
@media (max-width: 600px) {
    .nav-links a { margin-left: 16px; font-size: 14px; }
    section { padding: 48px 0; }
}
