/* --- ПАЛИТРА (MONOCHROME NOIR) --- */
:root {
    --bg-main: #0a0a0a;
    --bg-secondary: #111111;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent: #ffffff;
    --border-color: #333333;

    --font-head: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* --- BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 30px; }

/* Шум */
.noise-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%" height="100%" filter="url(%23noiseFilter)" opacity="0.05"/%3E%3C/svg%3E');
    pointer-events: none; z-index: -1; opacity: 0.4;
}

#matrixCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3; /* Легкая прозрачность, чтобы не мешать контенту */
}

/* --- CUSTOM SCROLLBAR --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; border: 1px solid var(--bg-main); }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* --- HEADER --- */
header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}
.header-content { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-head); font-weight: 900; font-size: 24px; letter-spacing: 2px; }
.dot { color: var(--text-secondary); }

nav ul { display: flex; gap: 40px; }
nav a {
    font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); font-weight: 600;
    position: relative;
}
nav a:hover { color: var(--text-primary); }
nav a::after {
    content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px;
    background: var(--accent); transition: 0.3s;
}
nav a:hover::after { width: 100%; }

/* --- HERO --- */
.hero-section {
    padding: 160px 0 100px;
    min-height: 80vh;
    display: flex; align-items: center; justify-content: center;
}
.hero-grid { display: flex; align-items: center; justify-content: center; width: 100%; }
.hero-text { max-width: 800px; text-align: center; }
.hero-visual { display: none; }

.greeting { color: var(--text-secondary); font-family: var(--font-mono); margin-bottom: 15px; }
.main-title {
    font-family: var(--font-head); font-size: 90px; font-weight: 900; line-height: 1; margin-bottom: 20px;
    background: linear-gradient(to bottom, #fff, #888); -webkit-background-clip: text; color: transparent;
}

/* --- ОБНОВЛЕННЫЕ СТИЛИ ДЛЯ DECODER EFFECT --- */
.subtitle {
    font-size: 24px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 30px;
    min-height: 40px;
    /* Важно: моноширинный шрифт для эффекта декодирования */
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cursor {
    display: inline-block;
    width: 10px; /* Чуть шире */
    height: 24px;
    background-color: var(--accent);
    margin-left: 5px;
    animation: blink 1s infinite;
    opacity: 0.7;
}
@keyframes blink { 0%, 100% { opacity: 0.7; } 50% { opacity: 0; } }

.description { color: var(--text-secondary); margin-bottom: 40px; font-size: 18px; max-width: 600px; margin-left: auto; margin-right: auto; }

.hero-btns { display: flex; gap: 20px; justify-content: center; }
.btn {
    padding: 15px 35px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
    border-radius: 4px; transition: 0.3s; font-size: 14px; cursor: pointer;
    font-family: var(--font-mono);
}
.btn-filled { background: var(--accent); color: var(--bg-main); border: 1px solid var(--accent); }
.btn-filled:hover { background: transparent; color: var(--accent); }
.btn-outline { background: transparent; color: var(--accent); border: 1px solid var(--border-color); }
.btn-outline:hover { border-color: var(--accent); background: rgba(255,255,255,0.05); }

/* --- SECTIONS --- */
section { padding: 80px 0; }
.section-heading {
    font-family: var(--font-head); font-size: 24px; text-transform: uppercase; letter-spacing: 4px;
    text-align: center; margin-bottom: 60px; position: relative;
}
.section-heading::after {
    content: ''; position: absolute; bottom: -15px; left: 50%; transform: translateX(-50%);
    width: 40px; height: 2px; background: var(--border-color);
}

/* --- DOSSIER CARD --- */
.dossier-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    overflow: hidden;
    max-width: 1000px;
    margin: 0 auto;
}

.dossier-banner { width: 100%; height: 350px; background: #000; }
.dossier-banner img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%); transition: 0.5s; }
.dossier-card:hover .dossier-banner img { filter: grayscale(0%); }

.dossier-content-wrapper { display: flex; gap: 50px; padding: 50px; }

.dossier-sidebar { width: 220px; flex-shrink: 0; text-align: center; }
.avatar-wrapper {
    width: 180px; height: 180px; margin: 0 auto 25px;
    border-radius: 50%; padding: 4px;
    border: 1px solid var(--border-color);
    position: relative; top: -80px;
    background: var(--bg-secondary);
    margin-bottom: -50px;
}
.avatar { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; filter: grayscale(100%) contrast(1.1); }
.tech-stack { display: flex; flex-direction: column; gap: 10px; margin-top: 30px; }
.tech-item {
    background: var(--bg-main); border: 1px solid var(--border-color);
    padding: 12px; font-family: var(--font-mono); font-size: 14px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: 0.3s;
}
.tech-item:hover { border-color: var(--accent); }

.dossier-info { flex-grow: 1; }
.nick { font-family: var(--font-head); font-size: 48px; line-height: 1; margin-bottom: 5px; }
.aka { color: var(--text-secondary); font-family: var(--font-mono); margin-bottom: 30px; }
.crossed { text-decoration: line-through; opacity: 0.6; }

.data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; padding-bottom: 30px; border-bottom: 1px solid var(--border-color); }
.data-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); margin-bottom: 5px; font-family: var(--font-mono); }
.data-value { font-size: 18px; font-weight: 600; }

.quote { font-style: italic; color: var(--text-secondary); border-left: 2px solid var(--accent); padding-left: 20px; margin-bottom: 30px; }

/* Кликабельные теги с подсказкой */
.tags-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; margin-bottom: 30px; }
.tag {
    font-family: var(--font-mono); font-size: 13px; color: var(--text-secondary);
    padding: 6px 14px; border: 1px solid var(--border-color); background: rgba(255,255,255,0.03);
    cursor: pointer; position: relative; transition: 0.3s;
}
.tag:hover { border-color: var(--accent); color: var(--accent); }
/* Всплывашка "Copied!" */
.tag::after {
    content: 'Copied!'; position: absolute; top: -30px; left: 50%; transform: translateX(-50%);
    background: var(--accent); color: var(--bg-main); padding: 2px 6px; font-size: 10px;
    border-radius: 4px; opacity: 0; pointer-events: none; transition: 0.3s; font-weight: bold;
}
.tag.copied::after { opacity: 1; top: -25px; }

.status-box { background: rgba(255,255,255,0.03); padding: 15px; border-radius: 4px; display: flex; align-items: center; gap: 15px; font-size: 14px; color: #bbb; border: 1px solid var(--border-color); }

/* --- CONTACTS --- */
.contact-links { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }
.contact-card {
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    padding: 30px 60px; border-radius: 4px; display: flex; flex-direction: column; align-items: center; gap: 15px; transition: 0.3s;
}
.contact-card i { font-size: 32px; color: var(--text-secondary); transition: 0.3s; }
.contact-card span { font-family: var(--font-mono); font-size: 14px; }
.contact-card:hover { border-color: var(--accent); background: var(--accent); }
.contact-card:hover i, .contact-card:hover span { color: var(--bg-main); }

/* --- BUTTON UP --- */
.scroll-top {
    position: fixed; bottom: 30px; right: 30px;
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    width: 45px; height: 45px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; opacity: 0; pointer-events: none; transition: 0.3s; z-index: 99;
}
.scroll-top.visible { opacity: 1; pointer-events: auto; }
.scroll-top:hover { background: var(--accent); color: var(--bg-main); }

/* --- FOOTER --- */
footer { padding: 40px 0; border-top: 1px solid var(--border-color); text-align: center; color: var(--text-secondary); font-size: 13px; font-family: var(--font-mono); }
.footer-content { display: flex; justify-content: space-between; }

/* --- MOBILE ADAPTATION --- */
.mobile-toggle { display: none; cursor: pointer; }
.bar { width: 25px; height: 2px; background: var(--text-primary); margin: 6px 0; transition: 0.3s; }

@media (max-width: 992px) {
    .main-title { font-size: 60px; }
    .dossier-content-wrapper { flex-direction: column; padding: 30px; gap: 30px; }
    .dossier-sidebar { width: 100%; display: flex; flex-direction: column; align-items: center; margin-top: -80px; }
    .avatar-wrapper { top: 0; margin-bottom: 20px; }
    .tech-stack { flex-direction: row; justify-content: center; width: 100%; margin-top: 10px; }
    .tech-item { flex: 1; max-width: 150px; }
    .data-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .mobile-toggle { display: block; z-index: 101; }
    .mobile-toggle.active .bar:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
    .mobile-toggle.active .bar:nth-child(2) { opacity: 0; }
    .mobile-toggle.active .bar:nth-child(3) { transform: rotate(45deg) translate(-5px, -6px); }

    nav {
        position: fixed; top: 0; right: 0; height: 100vh; width: 100%; background: var(--bg-main);
        display: flex; align-items: center; justify-content: center;
        transform: translateX(100%); transition: 0.4s ease-in-out;
    }
    nav.active { transform: translateX(0); }
    nav ul { flex-direction: column; align-items: center; gap: 30px; }
    nav a { font-size: 20px; }

    .hero-section { text-align: center; padding-top: 120px; }
    .main-title { font-size: 48px; }
    .footer-content { flex-direction: column; gap: 15px; }
    .contact-card { width: 100%; }

    /* ФИКС ДЛЯ КАРТОЧКИ НА ТЕЛЕФОНЕ */
    .dossier-banner { height: 180px !important; }
    .avatar-wrapper { width: 130px !important; height: 130px !important; top: -65px !important; margin-bottom: -40px !important; }
    .dossier-content-wrapper { padding: 20px !important; margin-top: -10px; }
}

/* --- ЗАЩИТА ОТ КОПИРОВАНИЯ --- */
body {
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE10+/Edge */
    user-select: none;         /* Standard */
}

/* Разрешаем выделять текст только в инпутах (если они будут), чтобы можно было писать */
input, textarea {
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
}

/* Запрещаем перетаскивание картинок (чтобы не утащили логотип на рабочий стол) */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    pointer-events: none; /* Отключает клики по картинкам вообще */
}