* {
    box-sizing: border-box;
    font-family: 'IBM Plex Mono', monospace;
}

body {
    margin: 0;
    background: #000;
    color: #00ff00; /* Зеленый цвет как в терминале */
}

/* Стили для прелоадера */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loader {
    border: 4px solid #00ff00;
    border-top: 4px solid transparent;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Скрытие основного контента */
.hidden {
    display: none;
}

/* Остальные стили (из предыдущего примера) */
.title {
    font-size: 2.5em;
    margin: 0;
    text-transform: uppercase;
    color: #00ff00;
    text-shadow: 10px 10px 20px #00cc00;
}

.subtitle {
    font-size: 1.5em;
    font-weight: bold;
    text-transform: uppercase;
    margin: 0;
    color: #00ff00;
    text-shadow: 10px 10px 20px #00cc00;
}

.text-container {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    vertical-align: bottom;
    width: 0;
    font-family: monospace;
    position: relative;
}

.title .text-container {
    animation: typing 8s steps(15, end) infinite;
}

.subtitle .text-container {
    animation: typing 6s steps(15, end) infinite 4s;
}

@keyframes typing {
    0% { width: 0; }
    50% { width: 100%; }
    100% { width: 0; }
}

.terminal-cursor {
    display: inline-block;
    border-right: 0.5em solid #00ff00;
    height: 0.7em;
    box-shadow: 10px 10px 20px #00cc00;
    margin-left: 0.1em;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Хедер */
.main-header {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #000;
    position: relative;
    overflow: hidden;
}

.header-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('/assets/background.gif') center/cover;
    opacity: 0.5;
    animation: matrix 20s infinite linear;
}

/* Добавляем полупрозрачный градиент ближе к концу картинки */
.header-bg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10%; /* Высота градиента (можно настроить) */
    background: linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
    pointer-events: none; /* Чтобы градиент не перехватывал события мыши */
}

@keyframes matrix {
    0% { background-position: 0 0; }
    100% { background-position: 100% 100%; }
}

/* Навбар */
.navbar {
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1;
}

.logo {
    width: 60px;
    filter: brightness(0) invert(1);
    animation: rotate 10s infinite alternate;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(15deg);
    }
    50% {
        transform: rotate(15deg);
    }
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: #00ff00;
    text-decoration: none;
    font-size: 1.2em;
    text-shadow: 0 0 5px #00ff00;
    transition: all 0.3s;
}

.nav-links a:hover {
    color: #00cc00;
    text-shadow: 0 0 10px #00cc00;
}

/* Основной контент */
.content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    z-index: 1;
}

.title {
    font-size: 2.5em;
    margin: 0;
    text-transform: uppercase;
    white-space: nowrap;
    color: #00ff00;
    text-shadow: 10px 10px 20px #00cc00;
}

.subtitle {
    font-size: 1.5em;
    font-weight: bold;
    white-space: nowrap;
    text-transform: uppercase;
    margin: 0;
    color: #00ff00;
    text-shadow: 10px 10px 20px #00cc00;
}

.terminal-cursor {
    display: inline-block;
    border-right: 0.5em solid;
    color: #00ff00;
    height: 0.7em;
    box-shadow: 10px 10px 20px #00cc00;
    margin-left: 0.1em;
}

/* Секции */
section {
    padding: 50px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-card {
    background: #1b1b1b;
    padding: 5px 20px 20px;
    border-radius: 10px;
    border: 1px solid #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.project-card h3 {
    color: #00ff00;
}

.project-card p {
    color: #00cc00;
}

.project-card a {
    color: #00ff00;
    text-decoration: none;
    transition: all 0.3s;
}

.project-card a:hover {
    color: #00cc00;
    text-shadow: 0 0 5px #00cc00;
}

/* Контакты */
.contacts {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

/* Footer */
.social-icons {
    display: inline-block;
}

.icon {
    text-decoration: none;
    color: #00cc00;
    font-size: 1em;
    margin-right: 15px;
    animation: blink 2s infinite;
    transition: color 0.5s;
}

.icon:hover {
    color: #33ff33;
    text-decoration: underline;
}

@keyframes blink {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }
}
