/* ============================================
   GLOBAL RESET & VARIABLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e14;
    --bg-secondary: #11171f;
    --bg-card: #161e28;
    --text-primary: #d4d4d4;
    --text-muted: #8899aa;
    --accent: #00d4a0;
    --accent-dim: #1a8a6b;
    --accent-glow: rgba(0, 212, 160, 0.15);
    --border: #1e2a36;
    --font: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    --radius: 8px;
    --transition: 0.25s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: #66f0cc;
    text-decoration: underline;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(6px);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.logo {
    font-size: 1.3rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}
.logo-bracket { color: var(--text-muted); }
.logo-text { color: var(--accent); font-weight: 600; }
.logo-prompt { color: var(--text-muted); margin-left: 6px; }

.nav {
    display: flex;
    gap: 24px;
    font-size: 0.95rem;
}
.nav a {
    color: var(--text-muted);
    font-weight: 400;
}
.nav a:hover {
    color: var(--accent);
    text-decoration: none;
}

/* ============================================
   HERO
   ============================================ */
.hero {
    padding: 60px 0 40px;
    background: radial-gradient(ellipse at 20% 50%, var(--bg-secondary) 0%, var(--bg-primary) 70%);
    border-bottom: 1px solid var(--border);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 400;
    letter-spacing: -0.02em;
}
.hero-title .dollar { color: var(--accent); }
.hero-title .cmd { color: #f0f0f0; }
.hero-title .blink {
    animation: blink 1.2s step-end infinite;
    color: var(--accent);
    font-weight: 300;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-sub {
    font-size: 1.15rem;
    margin-top: 12px;
    color: var(--text-muted);
}
.hero-sub .keyword { color: #c792ea; }
.hero-sub .ident { color: #82aaff; }
.hero-sub .op { color: var(--accent); }
.hero-sub .fn { color: #f78c6c; }
.hero-sub .paren { color: var(--text-muted); }
.hero-sub .arrow { color: var(--text-muted); }
.hero-sub .type { color: #ffcb6b; }

.hero-tags {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.tag {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

.hero-links {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    display: inline-block;
    padding: 10px 28px;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}
.btn-primary {
    background: var(--accent);
    color: #0a0e14;
    border-color: var(--accent);
}
.btn-primary:hover {
    background: #66f0cc;
    border-color: #66f0cc;
    text-decoration: none;
    color: #0a0e14;
}
.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border);
}
.btn-outline:hover {
    background: var(--bg-card);
    border-color: var(--accent);
    text-decoration: none;
    color: var(--accent);
}

.hero-ascii pre {
    font-size: 0.65rem;
    line-height: 1.2;
    color: var(--text-muted);
    opacity: 0.6;
    letter-spacing: -0.01em;
    overflow-x: auto;
    padding: 6px 0;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 56px 0 64px;
    border-bottom: 1px solid var(--border);
}
.section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 36px;
    color: var(--text-primary);
}
.section-title .prompt {
    color: var(--accent);
    margin-right: 6px;
}

/* ============================================
   PROJECTS
   ============================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 26px;
    transition: var(--transition);
}
.project-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
    transform: translateY(-2px);
}

.project-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.project-icon {
    font-size: 1.6rem;
    line-height: 1;
}
.project-header h3 {
    font-size: 1.2rem;
    font-weight: 500;
    color: #f0f0f0;
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 16px;
    line-height: 1.5;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}
.lang {
    background: var(--bg-primary);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 2px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    letter-spacing: 0.02em;
}

.project-links {
    display: flex;
    gap: 18px;
    font-size: 0.9rem;
}
.project-links a {
    color: var(--accent);
}
.project-links a:hover {
    color: #66f0cc;
}

/* ============================================
   STACK
   ============================================ */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
}

.stack-category h4 {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}
.stack-category ul {
    list-style: none;
    padding: 0;
}
.stack-category li {
    color: var(--text-muted);
    font-size: 0.92rem;
    padding: 4px 0;
    border-bottom: 1px solid var(--bg-card);
}
.stack-category li:last-child {
    border-bottom: none;
}

/* ============================================
   ARTICLES
   ============================================ */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    transition: var(--transition);
}
.article-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 24px var(--accent-glow);
}
.article-card a {
    display: block;
    color: inherit;
}
.article-card a:hover {
    text-decoration: none;
}
.article-card h3 {
    font-size: 1.05rem;
    font-weight: 500;
    color: #f0f0f0;
    margin-bottom: 6px;
}
.article-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin: 6px 0 12px;
}
.article-card .article-date {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-right: 16px;
}
.article-card .article-platform {
    background: var(--bg-primary);
    color: var(--text-muted);
    font-size: 0.7rem;
    padding: 1px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

/* ============================================
   FOOTER & ICONS
   ============================================ */
.footer {
    padding: 28px 0 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}
.footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.footer-left p {
    color: var(--text-muted);
    font-size: 0.85rem;
}
.footer-license {
    font-size: 0.75rem;
    color: #4a5a6a;
}
.footer-right {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-right a {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.footer-right a:hover {
    color: var(--accent);
    text-decoration: none;
}
.social-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    filter: opacity(0.6);
    transition: var(--transition);
}
.footer-right a:hover .social-icon {
    filter: opacity(1) drop-shadow(0 0 4px var(--accent));
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 820px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .hero-ascii pre {
        font-size: 0.5rem;
    }
    .hero-title {
        font-size: 1.7rem;
    }
    .header .container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .nav {
        justify-content: center;
        flex-wrap: wrap;
        gap: 14px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 30px 0 20px;
    }
    .hero-title {
        font-size: 1.3rem;
    }
    .hero-sub {
        font-size: 0.95rem;
    }
    .projects-grid,
    .articles-grid {
        grid-template-columns: 1fr;
    }
    .stack-grid {
        grid-template-columns: 1fr; /* Фикс для предотвращения сжатия длинных слов */
    }
    .footer .container {
        flex-direction: column;
        text-align: center;
    }
    .footer-right {
        justify-content: center;
    }
    .btn {
        padding: 8px 18px;
        font-size: 0.85rem;
    }
}

