/* === БАЗА === */
:root {
    --bg-primary: #faf8f5;
    --bg-secondary: #f5f0eb;
    --bg-card: #ffffff;
    --bg-card-hover: #fdfcf9;
    --text-primary: #1a1a1a;
    --text-secondary: #5c5c5c;
    --text-muted: #8c8c8c;
    --border-color: #e8e3dc;
    --accent-primary: #c9363d;
    --accent-dark: #a62b31;
    --accent-cyan: #0891b2;
    --accent-pink: #e8787c;
    --gradient-1: linear-gradient(135deg, #c9363d, #e8787c);
    --gradient-2: linear-gradient(135deg, #c9363d, #a62b31);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* === НАВИГАЦИЯ === */
.nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 16px 24px;
    background: rgba(250, 248, 245, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    font-size: 1.4rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Переключатель языков */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 3px;
    border: 1px solid var(--border-color);
}

.lang-btn {
    padding: 5px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s;
    font-family: inherit;
}

.lang-btn.active {
    background: #fff;
    color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.lang-divider {
    color: var(--border-color);
    font-size: 0.8rem;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* === HERO === */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 24px 80px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 60px;
}

.hero-content {
    flex: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 100px;
    background: rgba(201, 54, 61, 0.06);
    border: 1px solid rgba(201, 54, 61, 0.15);
    font-size: 0.85rem;
    color: var(--accent-primary);
    margin-bottom: 32px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 480px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient-2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(201, 54, 61, 0.25);
}

.btn-secondary {
    background: #fff;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    border-color: #ccc;
    box-shadow: var(--shadow-md);
}

.btn-arrow {
    transition: transform 0.3s;
}

.btn-primary:hover .btn-arrow {
    transform: translateX(4px);
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

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

/* Hero Visual */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-card {
    width: 380px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-card-header {
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.card-dots {
    color: #ccc;
    font-size: 0.7rem;
    letter-spacing: 2px;
}

.hero-card-body {
    padding: 24px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 2;
    color: var(--text-secondary);
}

.code-purple { color: #c9363d; }
.code-blue { color: #a62b31; }
.code-green { color: #059669; }

.cursor-blink {
    display: inline-block;
    animation: blink 1s step-end infinite;
    color: var(--accent-primary);
}

@keyframes blink {
    50% { opacity: 0; }
}

/* === СЕКЦИИ === */
section {
    position: relative;
    z-index: 1;
    padding: 100px 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* === КЕЙСЫ === */
.work {
    max-width: 1200px;
    margin: 0 auto;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.work-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: var(--shadow-sm);
}

.work-card:hover {
    border-color: rgba(201, 54, 61, 0.2);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.work-card-image {
    height: 200px;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.work-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.work-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
}

.placeholder-icon {
    font-size: 4rem;
    opacity: 0.7;
}

.work-card-content {
    padding: 24px;
}

.work-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tag {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(201, 54, 61, 0.06);
    color: var(--accent-primary);
    border: 1px solid rgba(201, 54, 61, 0.1);
}

.work-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.work-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.work-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.work-result {
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 500;
}

.work-role {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-style: italic;
}

/* === ОБО МНЕ === */
.about {
    max-width: 800px;
    margin: 0 auto;
}

.about-intro {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 40px;
    line-height: 1.7;
}

.about-details {
    display: grid;
    gap: 24px;
}

.detail-block {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.detail-block h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.detail-block p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* === КОНТАКТЫ === */
.contact {
    max-width: 1000px;
    margin: 0 auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s;
    resize: vertical;
    box-shadow: var(--shadow-sm);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(201, 54, 61, 0.08);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.contact-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s;
    padding: 12px;
    border-radius: 8px;
    background: var(--bg-primary);
}

.contact-link:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.contact-link-icon {
    font-size: 1.2rem;
}

/* === ФУТЕР === */
.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 24px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* === АДАПТИВ === */
@media (max-width: 968px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 100px;
    }
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { max-width: 100%; }
    .hero-buttons { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-visual { display: none; }
    .contact-grid { grid-template-columns: 1fr; }
    .work-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 24px;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
    }
    .nav-links.active { display: flex; }
    .menu-toggle { display: block; }
    .hero-title { font-size: 2rem; }
    .section-title { font-size: 2rem; }
    .hero-stats { gap: 24px; }
    .nav-right { gap: 12px; }
}
