/*
 * Автор: RAIF (https://github.com/RaifSpace)
 * Стили для терминального лендинга
 * Дизайн создан при участии AI-ассистента (вайб-кодинг)
 * Основано на эстетике терминалов, адаптивно под все устройства
 * Использует шрифт JetBrains Mono с Google Fonts
 * Цветовая схема: #00ff41 (неоновый зелёный), #00d4ff (электрик-синий)
 */

/* ===== БАЗА ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0b0e14;
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    color: #00ff41;
}

.terminal {
    max-width: 1000px;
    width: 100%;
    background: #0f131a;
    border: 1px solid #1e2a3a;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 255, 65, 0.05);
    overflow: hidden;
}

/* ===== Верхняя панель терминала ===== */
.terminal-header {
    background: #0b0e14;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #1e2a3a;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    display: inline-block;
}

.red { background: #ff5f57; }
.yellow { background: #ffbd2e; }
.green { background: #28c840; }

.terminal-title {
    margin-left: 16px;
    color: #6a7a8a;
    font-size: 0.85rem;
}

/* ===== Тело терминала ===== */
.terminal-body {
    padding: 24px 28px 16px;
    background: #0f131a;
    min-height: 500px;
}

/* ===== Промпт-линия ===== */
.prompt-line {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: #00ff41;
    margin-bottom: 8px;
}

.prompt-sign {
    color: #00d4ff;
    font-weight: 700;
}

.command {
    color: #f0f0f0;
}

/* ===== Вывод (блоки) ===== */
.output-block {
    margin: 6px 0 24px 28px;
    padding-left: 8px;
    border-left: 2px solid #1e2a3a;
}

/* Приветствие */
.output-block h1 {
    font-size: 2.6rem;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.2;
}

.highlight {
    color: #00d4ff;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

/* ===== КУРСОР ===== */
.cursor {
    display: inline-block;
    font-size: inherit;   
    color: #00ff41;
    animation: blink 1s step-end infinite;
    margin-left: 2px;     
    line-height: 1;       
    transform: translateY(-2px);
}

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

.subhead {
    font-size: 1rem;
    color: #6a7a8a;
    margin-top: 4px;
}

/* ===== Сетка услуг (как терминальный вывод) ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 4px;
}

.service-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #1e2a3a;
    transition: all 0.3s;
}

.service-item:hover {
    border-color: #00ff41;
    background: rgba(0, 255, 65, 0.04);
}

.service-icon {
    font-size: 1.6rem;
    line-height: 1.4;
}

.service-item h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e0e0e0;
}

.service-item p {
    font-size: 0.8rem;
    color: #6a7a8a;
}

/* ===== Портфолио ===== */
.portfolio-block {
    padding: 0;
}

.portfolio-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #1e2a3a;
    transition: all 0.3s;
    margin-top: 4px;
}

.portfolio-item:hover {
    border-color: #00d4ff;
}

.portfolio-link {
    display: flex;
    flex-wrap: wrap;
    text-decoration: none;
    color: inherit;
}

.portfolio-screenshot {
    flex: 1;
    min-width: 200px;
    background: #0b0e14;
}

.portfolio-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 16/9;
    display: block;
    filter: brightness(0.9);
    transition: filter 0.3s;
}

.portfolio-item:hover .portfolio-screenshot img {
    filter: brightness(1);
}

.portfolio-description {
    flex: 1;
    padding: 20px 24px;
    min-width: 200px;
}

.portfolio-description h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 8px;
}

.portfolio-description p {
    color: #6a7a8a;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.link-arrow {
    color: #00d4ff;
    font-weight: 600;
    display: inline-block;
    transition: transform 0.2s;
}

.portfolio-item:hover .link-arrow {
    transform: translateX(8px);
}

/* ===== Контакты ===== */
.contact-block {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 48px;
    padding: 4px 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}

.contact-label {
    color: #6a7a8a;
    font-weight: 400;
    text-transform: lowercase;
}

.contact-item a {
    color: #00d4ff;
    text-decoration: none;
    border-bottom: 1px dashed #1e2a3a;
    transition: border-color 0.3s;
}

.contact-item a:hover {
    border-color: #00d4ff;
}

.status-online {
    color: #28c840;
    font-weight: 600;
}

/* ===== Нижняя строка с мигающим курсором ===== */
.last-line {
    margin-top: 24px;
    margin-bottom: 0;
}

.blinking-cursor {
    animation: blink 1s step-end infinite;
    color: #00ff41;
}

/* ===== Футер терминала ===== */
.terminal-footer {
    display: flex;
    justify-content: space-between;
    padding: 12px 28px;
    border-top: 1px solid #1e2a3a;
    background: #0b0e14;
    font-size: 0.75rem;
    color: #3a4a5a;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .terminal-body {
        padding: 16px;
    }

    .output-block {
        margin-left: 8px;
    }

    .output-block h1 {
        font-size: 1.8rem;
    }

    .services-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .service-item {
        padding: 10px 12px;
    }

    .portfolio-link {
        flex-direction: column;
    }

    .portfolio-description {
        padding: 16px;
    }

    .contact-block {
        flex-direction: column;
        gap: 12px;
    }

    .terminal-footer {
        flex-direction: column;
        align-items: center;
        gap: 4px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .terminal {
        border-radius: 8px;
    }

    .terminal-header {
        padding: 8px 12px;
    }

    .terminal-body {
        padding: 12px;
    }

    .output-block h1 {
        font-size: 1.4rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .prompt-line {
        font-size: 0.85rem;
    }

    .command {
        font-size: 0.85rem;
    }

    .subhead {
        font-size: 0.85rem;
    }

    .portfolio-description h3 {
        font-size: 1rem;
    }

    .contact-item {
        font-size: 0.85rem;
        flex-wrap: wrap;
    }
}

/* ===== Дополнительный эффект "мерцания" экрана ===== */
.terminal {
    animation: flicker 8s infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    3% { opacity: 0.92; }
    6% { opacity: 1; }
    7% { opacity: 0.95; }
    8% { opacity: 1; }
}