* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root { --bg: #000000; --text: #ffffff; --accent: #0f0; --dim-text: #666; }
html, body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'IBM Plex Mono', monospace;
    margin: 0; padding: 0;
    width: 100%; max-width: 100%;
    overflow-x: hidden; position: relative;
}
canvas {
    display: block; position: fixed; top: 0; left: 0; z-index: 0;
    pointer-events: none; width: 100vw; height: 100vh;
}
.card-layer {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    z-index: 1; padding: 20px; max-width: 100vw; 
    transform-origin: center center;
    /* Важно: transition отсутствует, чтобы не было конфликтов с JS */
    will-change: transform, opacity, filter;
}

/* --- ЧАСЫ --- */
.system-hud {
    position: absolute; 
    top: 33%; left: 50%;
    transform: translate(-50%, -50%);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    pointer-events: none; z-index: 20;
}
.hud-time {
    font-family: 'Share Tech Mono', monospace; font-size: 1.4rem;
    font-weight: 400; color: #fff; letter-spacing: 4px;
    text-shadow: 0px 0px 5px rgba(255, 255, 255, 0.3); line-height: 1;
    display: flex; align-items: center; justify-content: center;
}
.hud-time .sep {
    display: inline-block;
    transform: translateY(-5px);
    margin: 0 2px;
    opacity: 0.8;
    font-size: 1.2rem;
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.3; }
}

.header-block {
    position: absolute; top: 7%; left: 3%; text-align: left;
    padding-left: 20px; max-width: 85%; height: auto; 
    display: flex; flex-direction: column; justify-content: flex-start;
}
.intro-line {
    position: absolute; top: 0; left: 0; width: 2px; background: #fff;
    height: 0%; transition: height 1.0s ease-out;
}
h1 { 
    font-size: 4rem; margin: 0; line-height: 1; letter-spacing: -2px; 
    text-shadow: 2px 2px 0px #000; white-space: nowrap; 
    display: flex; align-items: center; min-height: 1em; width: fit-content;
    transform-origin: left center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.4s ease-out;
    will-change: transform, filter;
}
.char-span {
    display: inline-block; overflow: hidden; vertical-align: bottom;
    max-width: 1.2em; padding: 0 1px; transition: max-width 0.2s ease-in-out;
}
.char-span.active-scan { background-color: #fff; color: #000; text-shadow: none; }
.char-span.deleted { max-width: 0px; padding: 0; }
.name { 
    font-size: 1.2rem; margin-top: 15px; font-weight: 600; text-shadow: 1px 1px 0px #000; 
    min-height: 1.2rem; display: flex; align-items: center; white-space: nowrap;
}
.role { 
    color: #bbb; font-size: 0.9rem; margin-top: 5px; text-shadow: 1px 1px 0px #000; 
    min-height: 0.9rem; display: flex; align-items: center; white-space: nowrap;
}
.typing-cursor {
    display: inline-block; width: 0.6em; height: 1.1em;      
    background-color: #fff; margin-left: 2px; vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}
h1 .typing-cursor { width: 0.5em; height: 0.8em; margin-left: 5px; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.links-container {
    position: absolute; top: 55%; left: 50%; transform: translate(-50%, -50%);
    display: flex; flex-direction: column; align-items: flex-start; 
    gap: 25px; width: max-content; max-width: 90%;
}
.glitch-link {
    text-decoration: none; color: #fff; font-size: 1.5rem;
    transition: transform 0.3s ease, color 0.3s; position: relative;
    text-shadow: 2px 2px 4px #000; white-space: nowrap; cursor: pointer; display: inline-block;
}
.glitch-link:hover { color: #ccc; transform: translateX(15px); }
.glitch-link::before {
    content: '>'; position: absolute; left: -25px; opacity: 0; transition: 0.3s; color: #fff;
}
.glitch-link:hover::before { opacity: 1; left: -20px; }

/* --- СТРЕЛКА --- */
.scroll-arrow-container {
    position: fixed; bottom: 40px; left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    opacity: 0; transition: opacity 0.5s ease;
    pointer-events: auto; 
    cursor: pointer;
    will-change: opacity, filter; 
    display: flex; justify-content: center; align-items: center;
}
.scroll-arrow-container::after {
    content: ''; position: absolute;
    top: -20px; left: -20px; right: -20px; bottom: -20px;
}

.arrow-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 2.5rem; 
    font-weight: 300;
    color: #fff; 
    letter-spacing: -5px; 
    transform: rotate(90deg); 
    animation: arrow-bounce 3s infinite ease-in-out, text-glitch 5s infinite;
}

@keyframes arrow-bounce {
    0%, 20%, 50%, 80%, 100% { transform: rotate(90deg) translateX(0); }
    40% { transform: rotate(90deg) translateX(8px); } 
    60% { transform: rotate(90deg) translateX(4px); }
}

@keyframes text-glitch {
    0%, 90% { color: #fff; text-shadow: 0 0 5px rgba(255, 255, 255, 0.4); }
    92% { color: #0f0; text-shadow: 2px 0 10px #0f0, -2px 0 5px #fff; }
    95% { color: #fff; text-shadow: 0 0 15px rgba(255, 255, 255, 1); }
    100% { color: #fff; text-shadow: 0 0 5px rgba(255, 255, 255, 0.4); }
}
.arrow-visible { opacity: 1; }

.scroll-layer {
    position: relative; z-index: 2; margin-top: 100vh; width: 100%; min-height: 80vh;
    background: transparent; display: flex; flex-direction: column; align-items: center; 
    justify-content: center; padding: 20px; pointer-events: none; overflow-x: hidden;
}
.floating-content {
    pointer-events: auto; width: 100%; max-width: 700px; text-align: left;
    text-shadow: 0 0 15px #000, 0 0 20px #000; 
}
.console-container {
    font-family: 'IBM Plex Mono', monospace; font-size: 1.1rem;
    color: var(--accent); margin-bottom: 40px; opacity: 1; display: flex; align-items: center;
}
.console-prompt { color: #666; margin-right: 12px; }
.console-command { color: #fff; font-weight: bold; }
.bio-text { font-size: 1.35rem; line-height: 1.6; font-weight: 400; word-wrap: break-word; }
.bio-paragraph { margin-bottom: 25px; opacity: 1; }
.bio-paragraph:last-child { margin-bottom: 0; }
.bio-text strong { color: #fff; border-bottom: 1px solid rgba(255,255,255,0.3); }
.email-container { 
    width: 100%; text-align: center; margin-top: 40px; padding-bottom: 20px; opacity: 1; 
}
.footer-link { 
    color: #aaa; text-decoration: none; font-size: 1.1rem; 
    border-bottom: 1px dashed #555; transition: 0.3s; 
}
.footer-link:hover { color: #fff; border-color: #fff; }

@media (max-width: 600px) {
    .card-layer { display: block; padding: 0; }
    .header-block {
        position: absolute; width: 90%; left: 5%;
        margin: 0; padding-left: 10px; top: 7%; 
    }
    h1 { font-size: 2.5rem; }
    .system-hud {
        position: absolute; left: 50%; transform: translate(-50%, -50%); 
        width: auto; margin: 0; top: 35%; 
    }
    .links-container {
        position: absolute; left: 50%; transform: translate(-50%, 0);
        align-items: flex-start; gap: 20px; top: 50%; 
    }
    .scroll-arrow-container { bottom: 7%; }
    .bio-text { font-size: 1.15rem; } 
    .glitch-link { font-size: 1.3rem; }
    .console-container { font-size: 1rem; }
    .footer-link { font-size: 1rem; }
    .arrow-text { font-size: 2rem; }
}
