:root {
    --bg-dark: #121010;
    --bg-panel: #1e1b1b;
    --text-main: #f0e6d2; /* Мягкий, тёплый "бумажный" цвет */
    --accent-amber: #ff9e00;
    --accent-yellow: #ffd000;
    --accent-red: #ff3366;
    
    --font-modern: 'Outfit', sans-serif;
    --font-pixel: 'VT323', monospace;
}

* {
    box-sizing: border-box;
}

html, body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-modern);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
}

.scanlines {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 3px 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.6;
}

/* Фиксированный Хедер */
.retro-header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: rgba(18, 16, 16, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--accent-amber);
    z-index: 100;
    box-shadow: 0 4px 20px rgba(255, 158, 0, 0.1);
}

.header-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2.2rem;
    color: var(--text-main);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.text-amber { color: var(--accent-amber); }

.blink {
    animation: blinker 1s step-start infinite;
}

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

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

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s;
}

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

.nav-links a::before, .nav-links a::after {
    content: '';
    position: absolute;
    opacity: 0;
    transition: all 0.3s;
    color: var(--accent-amber);
    font-family: var(--font-pixel);
    font-size: 1.2rem;
    top: -2px;
}

.nav-links a::before { content: '['; left: -16px; }
.nav-links a::after { content: ']'; right: -16px; }

.nav-links a:hover::before { opacity: 1; left: -12px; }
.nav-links a:hover::after { opacity: 1; right: -12px; }

.pixel-font { font-family: var(--font-pixel); }

/* Кнопка в хедере */
.pixel-btn {
    background: var(--accent-amber);
    color: var(--bg-dark);
    padding: 8px 20px;
    font-family: var(--font-pixel);
    font-size: 1.4rem;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: inset -3px -3px 0px rgba(0,0,0,0.4), inset 3px 3px 0px rgba(255,255,255,0.4);
    transition: transform 0.1s;
}

.pixel-btn:active {
    box-shadow: inset 3px 3px 0px rgba(0,0,0,0.4), inset -3px -3px 0px rgba(255,255,255,0.4);
    transform: translateY(2px);
}

/* Главный Экран */
.hero-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 160px 24px 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: 100vh;
}

.pixel-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border: 2px dashed var(--accent-amber);
    color: var(--accent-amber);
    background: rgba(255, 158, 0, 0.05);
    font-size: 1.5rem;
    margin-bottom: 32px;
}

.hero-title {
    font-size: clamp(3rem, 5vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 24px;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.neon-text {
    color: var(--accent-yellow);
    text-shadow: 0 0 10px rgba(255, 208, 0, 0.5), 0 0 20px rgba(255, 208, 0, 0.3), 0 0 40px rgba(255, 208, 0, 0.1);
}

.hero-desc {
    font-size: 1.125rem;
    color: #c4b9a3;
    line-height: 1.6;
    max-width: 50ch;
    margin: 0 0 48px;
}

.hero-actions {
    display: flex;
    gap: 24px;
    margin-bottom: 56px;
}

/* Аркадные кнопки */
.arcade-btn {
    display: inline-block;
    padding: 16px 36px;
    font-size: 1.6rem;
    text-decoration: none;
    text-align: center;
    position: relative;
    transition: all 0.2s;
}

.arcade-btn.primary {
    background: var(--accent-red);
    color: #fff;
    box-shadow: 6px 6px 0 var(--bg-panel), 12px 12px 0 rgba(255, 51, 102, 0.2);
    border: 2px solid var(--text-main);
}

.arcade-btn.primary:hover {
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0 var(--bg-panel), 8px 8px 0 rgba(255, 51, 102, 0.2);
}

.arcade-btn.secondary {
    background: transparent;
    color: var(--accent-amber);
    border: 2px solid var(--accent-amber);
    box-shadow: 6px 6px 0 rgba(255, 158, 0, 0.15);
}

.arcade-btn.secondary:hover {
    background: rgba(255, 158, 0, 0.1);
    transform: translate(2px, 2px);
    box-shadow: 4px 4px 0 rgba(255, 158, 0, 0.15);
}

/* Статистика */
.retro-stats {
    display: flex;
    gap: 48px;
    border-top: 2px dashed #333;
    padding-top: 32px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 3rem;
    color: var(--accent-yellow);
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 2px 2px 0px rgba(255,0,0,0.5), -2px -2px 0px rgba(0,0,255,0.5); /* Хроматическая аберрация */
}

.stat-text {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #888;
}

/* Телевизор / Визуал */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.tv-frame {
    background: #2a2525;
    padding: 24px 24px 60px;
    border-radius: 30px;
    box-shadow: inset 0 5px 15px rgba(255,255,255,0.1), 0 30px 60px rgba(0,0,0,0.9);
    border: 6px solid #1a1818;
    position: relative;
    max-width: 480px;
    width: 100%;
}

.tv-screen {
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/5;
    box-shadow: inset 0 0 30px rgba(0,0,0,1);
}

/* Стилизация фото под ретро-игру */
.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.crt-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    box-shadow: inset 0 0 60px rgba(0,0,0,0.9);
}

/* Детали телевизора */
.tv-details {
    position: absolute;
    bottom: 16px;
    right: 32px;
    display: flex;
    gap: 16px;
    align-items: center;
}

.tv-knob {
    width: 20px; height: 20px;
    background: #111;
    border-radius: 50%;
    border: 3px solid #444;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.speaker-grill {
    display: flex;
    gap: 4px;
    margin-left: 10px;
}

.speaker-grill span {
    width: 4px; height: 20px;
    background: #111;
    border-radius: 2px;
}

/* Парящие иконки */
.floating-icon {
    position: absolute;
    font-size: 4rem;
    filter: drop-shadow(0 0 15px rgba(255, 158, 0, 0.6));
    z-index: 10;
}
.icon-1 { top: -30px; right: -20px; animation: float 4s ease-in-out infinite; }
.icon-2 { bottom: 60px; left: -40px; animation: float 5s ease-in-out infinite reverse; filter: drop-shadow(0 0 15px rgba(255, 51, 102, 0.6)); }

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

/* --- НОВЫЕ СЕКЦИИ --- */

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

.retro-section {
    padding: 100px 0;
    position: relative;
    border-top: 2px solid #333;
}

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

.section-title {
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 48px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Опыт (Windows Retro Style) */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.retro-window {
    background: var(--bg-dark);
    border: 4px solid #555;
    border-radius: 8px;
    box-shadow: 8px 8px 0 rgba(0,0,0,0.5);
    overflow: hidden;
}

.window-header {
    background: #555;
    color: #fff;
    padding: 8px 16px;
    font-size: 1.2rem;
    border-bottom: 4px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.window-content {
    padding: 24px;
}

.window-content h3 {
    color: var(--accent-yellow);
    font-size: 1.6rem;
    margin-top: 0;
}

.retro-list {
    padding-left: 20px;
}

.retro-list li {
    margin-bottom: 12px;
    color: #c4b9a3;
}

/* Скиллы (Bars) */
.skill-item {
    margin-bottom: 24px;
}

.skill-name {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.skill-bar {
    width: 100%;
    height: 16px;
    background: #333;
    border: 2px solid #555;
    border-radius: 8px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-amber), var(--accent-yellow));
    box-shadow: inset 0 0 10px rgba(255,255,255,0.2);
}

/* Кейсы (Cards) */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.case-card {
    background: var(--bg-panel);
    border: 2px dashed #555;
    padding: 32px;
    border-radius: 16px;
    transition: all 0.3s;
}

.case-card:hover {
    border-color: var(--accent-amber);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 158, 0, 0.1);
}

.case-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.case-title {
    font-size: 1.8rem;
    margin: 0 0 8px;
    color: #fff;
}

.case-subtitle {
    color: var(--accent-amber);
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.case-desc {
    color: #a09786;
    margin-bottom: 24px;
    line-height: 1.5;
}

.case-metrics {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-dark);
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid var(--accent-red);
}

.metric {
    font-size: 0.95rem;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 12px;
}

.metric .text-amber {
    font-size: 1.2rem;
}

/* CTA Banner (Blog) */
.cta-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(255,51,102,0.1), rgba(255,158,0,0.1));
    border: 4px solid var(--accent-red);
    padding: 48px;
    border-radius: 20px;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.5);
}

.cta-content {
    flex: 1;
    max-width: 600px;
}

.cta-title {
    font-size: 2.5rem;
    color: #fff;
    margin: 0 0 16px;
}

.cta-desc {
    font-size: 1.2rem;
    color: #ccc;
    margin-bottom: 32px;
}

.cta-actions {
    display: flex;
    gap: 20px;
}

.cta-visual pre {
    font-size: 1.2rem;
    line-height: 1.2;
    margin: 0;
}

/* Footer */
.retro-footer {
    background: var(--bg-dark);
    padding: 32px 0;
    border-top: 4px solid var(--accent-amber);
}

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

.footer-links {
    display: flex;
    gap: 24px;
    align-items: center;
    font-size: 1rem;
    color: #888;
}

.footer-links a {
    color: var(--accent-yellow);
    text-decoration: none;
    font-weight: 600;
}

/* Адаптив для новых секций */
@media (max-width: 992px) {
    .about-grid { grid-template-columns: 1fr; }
    .cta-banner { flex-direction: column; text-align: center; gap: 40px; padding: 32px 20px; }
    .cta-actions { justify-content: center; flex-wrap: wrap; }
    .footer-content { flex-direction: column; gap: 16px; text-align: center; }
}

/* --- MODALS (RETRO OS) --- */
.modals-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-window {
    display: none;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-dark);
    box-shadow: 12px 12px 0 rgba(0,0,0,0.9), 0 0 40px rgba(255, 158, 0, 0.2);
    animation: openModal 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes openModal {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.close-modal-btn {
    background: #333;
    color: var(--accent-red);
    border: 2px solid #555;
    font-weight: bold;
    cursor: pointer;
    padding: 2px 8px;
    transition: 0.2s;
}

.close-modal-btn:hover {
    background: var(--accent-red);
    color: #fff;
    border-color: #fff;
}

.modal-title {
    font-size: 2rem;
    margin-bottom: 32px;
    border-bottom: 2px dashed #444;
    padding-bottom: 16px;
}

.story-section {
    margin-bottom: 32px;
}

.story-section h4 {
    color: var(--text-muted);
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 600;
}

.ascii-arch {
    background: #000;
    padding: 20px;
    border: 2px solid #333;
    border-radius: 8px;
    overflow-x: auto;
    line-height: 1.2;
    color: var(--accent-amber);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8);
}

.expand-hint {
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    opacity: 0.5;
    transition: 0.3s;
}

.clickable-card {
    cursor: pointer;
}

.clickable-card:hover .expand-hint {
    opacity: 1;
    color: var(--accent-amber);
}

/* Custom Scrollbar for Modal */
.modal-window::-webkit-scrollbar {
    width: 12px;
}
.modal-window::-webkit-scrollbar-track {
    background: #222;
    border-left: 2px solid #444;
}
.modal-window::-webkit-scrollbar-thumb {
    background: #555;
    border: 2px solid #222;
}
.modal-window::-webkit-scrollbar-thumb:hover {
    background: var(--accent-amber);
}

/* --- БЛОГ И ФИЛЬТРЫ --- */
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.filter-tag {
    background: #333;
    border: 2px solid #555;
    color: #ccc;
    padding: 8px 16px;
    cursor: pointer;
    font-family: var(--font-mono);
    text-transform: uppercase;
    transition: 0.2s;
}

.filter-tag:hover, .filter-tag.active {
    background: var(--accent-amber);
    color: #000;
    border-color: var(--accent-yellow);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.blog-card {
    background: var(--bg-dark);
    border: 2px solid #444;
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: 0.3s;
    cursor: pointer;
}

.blog-card:hover {
    border-color: var(--accent-amber);
    transform: translateY(-5px);
}

.blog-card.hidden {
    display: none;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.blog-tags {
    color: var(--accent-amber);
}

.blog-card h3 {
    font-size: 1.4rem;
    color: #fff;
    margin-top: 0;
    margin-bottom: 12px;
}

.blog-card p {
    color: #aaa;
    font-size: 1rem;
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 24px;
}

.blog-read-btn {
    align-self: flex-start;
    color: var(--accent-yellow);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-read-btn:hover {
    text-decoration: underline;
}

/* --- ФОРМА ЗАЯВКИ --- */
.form-window {
    display: block;
    background: var(--bg-dark);
    color: #fff;
    max-width: 500px;
    border: 2px solid var(--accent-amber);
    box-shadow: 0 0 20px rgba(255, 176, 0, 0.2), inset 0 0 10px rgba(255, 176, 0, 0.1);
    border-radius: 0;
    position: relative;
}

.form-window::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.1) 2px, rgba(0,0,0,0.1) 4px);
    pointer-events: none;
    z-index: 10;
}

.form-window .window-header {
    background: var(--accent-amber);
    color: #000;
    border-bottom: 2px solid var(--accent-amber);
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-window .close-form-btn {
    background: #000;
    color: var(--accent-amber);
    border: 1px solid #000;
    font-family: var(--font-pixel);
    cursor: pointer;
    border-radius: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.form-window .close-form-btn:hover {
    background: var(--accent-red);
    color: #fff;
    border-color: var(--accent-red);
}

.form-content {
    padding: 32px 24px;
    position: relative;
    z-index: 20;
}

.form-title {
    font-size: 1.8rem;
    margin-bottom: 8px;
    font-family: var(--font-pixel);
    border-bottom: none;
    padding-bottom: 0;
    color: var(--accent-pink);
    text-shadow: 0 0 10px rgba(255, 42, 109, 0.5);
    text-align: center;
    text-transform: uppercase;
}

.form-desc {
    color: #aaa;
    margin-bottom: 24px;
    font-size: 0.95rem;
    text-align: center;
    font-family: var(--font-mono);
}

.retro-form .form-group {
    margin-bottom: 20px;
}

.retro-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-family: var(--font-pixel);
    color: var(--accent-amber);
}

.retro-form input[type="text"],
.retro-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--accent-amber);
    border-radius: 0;
    background: #0a0a0a;
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent-amber);
    outline: none;
    transition: 0.3s;
}

.retro-form input[type="text"]:focus,
.retro-form textarea:focus {
    box-shadow: 0 0 10px rgba(255, 176, 0, 0.3);
    background: #111;
}

.retro-form input[type="text"]::placeholder,
.retro-form textarea::placeholder {
    color: rgba(255, 176, 0, 0.3);
}

.contact-method-toggle {
    display: flex;
    gap: 12px;
}

.toggle-btn {
    flex: 1;
    padding: 10px;
    background: #111;
    border: 1px dashed var(--accent-amber);
    border-radius: 0;
    color: #888;
    cursor: pointer;
    font-family: var(--font-mono);
    font-weight: 600;
    transition: 0.2s;
    text-transform: uppercase;
}

.toggle-btn.active {
    background: rgba(255, 176, 0, 0.1);
    color: var(--accent-amber);
    border-style: solid;
    text-shadow: 0 0 5px rgba(255, 176, 0, 0.5);
}

.checkbox-group {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.checkbox-group input {
    margin-top: 4px;
    width: 16px;
    height: 16px;
    accent-color: var(--accent-amber);
    cursor: pointer;
}

.checkbox-group label {
    text-transform: none;
    font-weight: 400;
    font-size: 0.75rem;
    color: #aaa;
    font-family: var(--font-mono);
    line-height: 1.4;
}

.checkbox-group a {
    color: var(--accent-pink);
    text-decoration: none;
    border-bottom: 1px dashed var(--accent-pink);
    transition: 0.2s;
}

.checkbox-group a:hover {
    color: #fff;
    border-color: #fff;
    text-shadow: 0 0 5px #fff;
}

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.form-actions .arcade-btn {
    width: 100%;
    text-align: center;
    padding: 16px;
    font-size: 1rem;
    justify-content: center;
}

.submit-btn {
    background: var(--accent-pink);
    color: #fff;
    border: none;
    text-transform: uppercase;
    font-family: var(--font-pixel);
    border-radius: 0;
    box-shadow: 0 0 15px rgba(255, 42, 109, 0.4);
}

.submit-btn:hover {
    background: #ff4a85;
    box-shadow: 0 0 25px rgba(255, 42, 109, 0.8);
    transform: translateY(-2px);
}

.alt-btn {
    background: transparent;
    color: var(--accent-amber);
    border: 1px dashed var(--accent-amber);
    font-family: var(--font-mono);
    border-radius: 0;
}

.alt-btn:hover {
    background: rgba(255, 176, 0, 0.1);
    color: #fff;
    border-style: solid;
}

/* Адаптив */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 140px;
    }
    
    .nav-links { display: none; } /* Скрываем на мобилках до этапа меню */
    
    .hero-text { align-items: center; }
    .hero-actions { justify-content: center; flex-wrap: wrap; }
    .retro-stats { justify-content: center; }
    
    .tv-frame { margin: 0 auto; }
}

@media (max-width: 768px) {
    .retro-stats {
        flex-wrap: wrap;
        gap: 24px;
        justify-content: center;
    }
    .stat-num {
        font-size: 2.5rem;
    }
    .icon-1 { right: 0; top: -10px; font-size: 3rem; }
    .icon-2 { left: 0; bottom: 20px; font-size: 3rem; }
}
