:root {
    --bg: #090a0f;
    --bg-alt: #0d0e14;
    --surface: #13151f;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.2);
    --text: #ecedf0;
    --muted: #8b8f9e;
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* Сброс стилей */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    width: 100%;
}

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    display: inline-block;
}

img,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

svg {
    flex-shrink: 0;
}

.container {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

/* Навигация */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9, 10, 15, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    width: 100%;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.brand-dot {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 2px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 1.25rem;
}

.nav-links a {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--text);
}

.social-icons-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 1rem;
    border-left: 1px solid var(--border);
}

.social-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    transition: all 0.2s ease;
}

.social-icon-btn:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.social-icon-btn.tg:hover {
    background: #0088cc;
    border-color: #0088cc;
    color: #fff;
}

.social-icon-btn.yt:hover {
    background: #ff0000;
    border-color: #ff0000;
    color: #fff;
}

/* Hero Section */
.hero {
    padding: 5rem 0 4rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2.5rem;
    align-items: center;
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.hero-copy h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

.hero-copy h1 span {
    color: #818cf8;
}

.hero-copy p {
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 34rem;
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}

.mini-stat strong {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
}

.mini-stat span {
    font-size: 0.85rem;
    color: var(--muted);
}

/* Terminal Card */
.terminal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    width: 100%;
}

.terminal-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red {
    background: #ef4444;
}
.dot.yellow {
    background: #f59e0b;
}
.dot.green {
    background: #10b981;
}

.terminal-title {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    color: var(--muted);
    font-family: monospace;
}

.terminal-body {
    padding: 1.5rem;
    font-family: monospace;
    font-size: 0.875rem;
    min-height: 160px;
}

.code-line {
    margin-bottom: 0.75rem;
    color: var(--text);
    word-break: break-word;
}

.keyword {
    color: #818cf8;
}

.terminal-status {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.pulse {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
}

/* Sections & Cards */
.section {
    padding: 5rem 0;
}

.bg-alt {
    background-color: var(--bg-alt);
}

.section-title {
    margin-bottom: 2.5rem;
}

.section-title h2 {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-title p {
    color: var(--muted);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
}

.project-cover {
    height: 160px;
    background: linear-gradient(135deg, #1e202e, #13151f);
    border-bottom: 1px solid var(--border);
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.project-cover-bg {
    position: absolute;
    inset: 0;
    opacity: 0.15;
}

.project-cover-1 {
    background-image: radial-gradient(circle, #6366f1 10%, transparent 20%);
}
.project-cover-2 {
    background-image: radial-gradient(circle, #ec4899 10%, transparent 20%);
}
.project-cover-3 {
    background-image: radial-gradient(circle, #10b981 10%, transparent 20%);
}

.project-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.card-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.status-tag {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--muted);
}

.project-card p {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.tag-list {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: var(--muted);
}

.project-links {
    display: flex;
    gap: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
}

.link-btn {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    transition: color 0.2s ease;
}

.link-btn:hover {
    color: #818cf8;
}

/* Team & Platforms Grid */
.team-grid,
.platforms-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
}

.avatar-badge {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.9rem;
    margin-bottom: 0.85rem;
    color: #818cf8;
}

.team-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
}

.team-card .role {
    font-size: 0.8rem;
    color: var(--muted);
}

.platform-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.platform-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.platform-card p {
    font-size: 0.85rem;
    color: var(--muted);
}

/* Footer */
.footer {
    padding: 2.5rem 0;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Анимации появления (Reveal) */
.js-enabled .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.js-enabled .reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Адаптивность */
@media (max-width: 820px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .nav-container {
        height: 4rem;
    }

    .nav-right {
        gap: 0.75rem;
    }

    .nav-links {
        gap: 0.75rem;
    }

    .nav-links a {
        font-size: 0.85rem;
    }

    .social-icons-nav {
        padding-left: 0.5rem;
    }

    .social-icon-btn {
        width: 32px;
        height: 32px;
    }

    .footer-container {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        flex-direction: column;
        gap: 0.75rem;
    }

    .projects-grid,
    .team-grid,
    .platforms-grid {
        grid-template-columns: 1fr;
    }
}