@font-face {
  font-family: 'Special Elite';
  src: url('/assets/specialelite-cyrillic.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
    --bg-color: #0d0d0d;
    --text-color: #b3b3b3;
    --title-color: #e6e6e6;
    --accent-color: #c02424;
    --accent-text-color: #ff6f6f;
    --border-color: #2a2a2a;
    --parallax-x: 0px;
    --parallax-y: 0px;
}

*, *::before, *::after { box-sizing: border-box; }
img, picture, video, canvas, svg { max-width: 100%; }

html { 
    scroll-behavior: smooth; 
}

body {
    background-color: #06080b;
    color: var(--text-color);
    font-family: 'Special Elite', monospace, 'Courier New';
    font-size: 17px;
    line-height: 1.75;
    margin: 0;
    cursor: default;
    position: relative;
    overflow-x: hidden;    
}

body.no-scroll {
    overflow: hidden !important;
    touch-action: none;
}

::selection { background: var(--accent-color); color: #fff; text-shadow: none; }
::-moz-selection { background: var(--accent-color); color: #fff; }
a, button, input, .menu-toggle, .lang-current { -webkit-tap-highlight-color: transparent; }

#bg-skyline {
    position: fixed;
    top: -40px;
    left: -40px;
    width: calc(100vw + 80px);
    height: calc(100vh + 80px);
    background-image: image-set(url('/assets/hero-background.webp') type('image/webp'), url('/assets/hero-background.jpg') type('image/jpeg'));
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: -4;
    will-change: transform, filter;
    transform: translate3d(var(--parallax-x), var(--parallax-y), 0);
    animation: skylineBreathe 30s ease-in-out infinite alternate;
}

@keyframes skylineBreathe {
    0% { filter: brightness(0.80) contrast(1.22); }
    50% { filter: brightness(0.88) contrast(1.30); }
    100% { filter: brightness(0.79) contrast(1.24); }
}

#bg-mist {
    position: fixed;
    top: 0;
    left: -30%;
    width: 160%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
    background: radial-gradient(ellipse 65% 38% at 30% 65%, rgba(130, 160, 200, 0.16) 0%, transparent 70%),
                radial-gradient(ellipse 55% 30% at 75% 45%, rgba(110, 145, 185, 0.14) 0%, transparent 65%),
                radial-gradient(ellipse 70% 40% at 50% 80%, rgba(80, 110, 150, 0.13) 0%, transparent 70%);
    animation: mistDrift 18s ease-in-out infinite alternate;
    mix-blend-mode: screen;
}

#bg-mist-secondary {
    position: fixed;
    top: 0;
    left: -20%;
    width: 150%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
    background: radial-gradient(ellipse 55% 28% at 65% 55%, rgba(140, 175, 215, 0.12) 0%, transparent 65%),
                radial-gradient(ellipse 45% 22% at 20% 40%, rgba(100, 135, 175, 0.10) 0%, transparent 60%);
    animation: mistDriftRev 24s ease-in-out infinite alternate;
    mix-blend-mode: screen;
}

@keyframes mistDrift {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(7%, -22px, 0) scale(1.05); }
    100% { transform: translate3d(-5%, -10px, 0) scale(1.02); }
}

@keyframes mistDriftRev {
    0% { transform: translate3d(0, 0, 0) scale(1.03); }
    50% { transform: translate3d(-6%, 18px, 0) scale(1); }
    100% { transform: translate3d(5%, 8px, 0) scale(1.04); }
}

#ambient-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
}

#page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle at center, rgba(6, 9, 14, 0.55) 0%, rgba(2, 3, 6, 0.90) 100%);
}

#page-content { 
    position: relative; 
    z-index: 1; 
    width: 100%;
}

::-webkit-scrollbar { width: 8px; } 
::-webkit-scrollbar-track { background: #06080b; } 
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #444; }

#crt-canvas { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 1001; pointer-events: none; opacity: 0.6; }

#archive-link.glitch-effect { position: relative; color: var(--title-color); display: inline-block; }
#archive-link.glitch-effect::before, #archive-link.glitch-effect::after { content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-color); overflow: hidden; clip-path: inset(0 0 0 0); }
#archive-link.glitch-effect::before { left: 2px; text-shadow: -1px 0 var(--accent-color); animation: glitch-anim-1 2s infinite linear alternate-reverse; }
#archive-link.glitch-effect::after { left: -2px; text-shadow: -1px 0 #00ffff; animation: glitch-anim-2 3s infinite linear alternate-reverse; }

@keyframes glitch-anim-1 { 0% { clip-path: inset(20% 0 80% 0); } 20% { clip-path: inset(60% 0 10% 0); } 40% { clip-path: inset(40% 0 50% 0); } 60% { clip-path: inset(80% 0 5% 0); } 80% { clip-path: inset(10% 0 70% 0); } 100% { clip-path: inset(30% 0 20% 0); } }
@keyframes glitch-anim-2 { 0% { clip-path: inset(10% 0 60% 0); } 20% { clip-path: inset(30% 0 20% 0); } 40% { clip-path: inset(70% 0 10% 0); } 60% { clip-path: inset(20% 0 50% 0); } 80% { clip-path: inset(60% 0 30% 0); } 100% { clip-path: inset(0% 0 80% 0); } }

.preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: #000; display: flex; justify-content: center; align-items: center; z-index: 2000; padding: 20px; transition: opacity 0.8s ease, visibility 0.8s ease; }
.preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-terminal { font-family: 'Special Elite', monospace; color: #ccc; font-size: clamp(1rem, 2.5vw, 1.3rem); letter-spacing: 1px; width: 100%; max-width: 700px; line-height: 1.5; }
.preloader-terminal .terminal-line { opacity: 0; white-space: pre-wrap; animation: fadeInLine 0.1s forwards; margin-bottom: 5px; }
.preloader-terminal .terminal-line.cursor::after { content: '█'; animation: blink 1s step-end infinite; margin-left: 5px; color: #fff; }
.preloader-skip-notice { position: absolute; bottom: 30px; font-family: 'Inter', sans-serif; font-size: 0.8rem; color: #9a9a9a; text-transform: uppercase; letter-spacing: 2px; opacity: 0; animation: fadeIn 1s 2s forwards; cursor: pointer; transition: color 0.3s; }
.preloader-skip-notice:hover { color: #d0d0d0; }

@keyframes blink { 50% { opacity: 0; } }
@keyframes fadeInLine { from { opacity: 0; } to { opacity: 1; } }

.mouse-glow { display: none; }
@media (hover: hover) and (pointer: fine) {
    .mouse-glow { display: block; position: fixed; width: 400px; height: 400px; background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 60%); border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; z-index: 999; will-change: left, top; mix-blend-mode: screen; }
    .button:hover { background-color: var(--text-color); color: #050505; border-color: var(--text-color); box-shadow: 0 0 15px rgba(255,255,255,0.2); }
    .button.accent:hover { background-color: var(--accent-color); color: #fff; border-color: var(--accent-color); box-shadow: 0 0 20px rgba(179, 0, 0, 0.4); }
    footer a:hover { color: #ffffff !important; }
    .control-button:hover { background-color: rgba(255, 255, 255, 0.15); transform: scale(1.1); }
    #modal-close-btn:hover { color: var(--accent-color); transform: rotate(90deg); }
}

.hero { 
    position: relative; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    text-align: center; 
    min-height: 100vh;
    padding: 100px 20px 60px;
    background: transparent; 
    overflow: hidden; 
}
.hero-overlay { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: transparent; 
    z-index: 1; 
}
.hero-content { 
    position: relative; 
    z-index: 2; 
    animation: fadeIn 1.2s ease-out both; 
    padding: 0 20px; 
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.author-name { 
    font-family: 'Special Elite', monospace; 
    font-size: clamp(1.75rem, 5.8vw, 4.2rem); 
    margin: 0 0 16px; 
    color: var(--title-color); 
    letter-spacing: 0.04em; 
    text-shadow: 0 6px 28px rgba(0, 0, 0, 0.9); 
    line-height: 1.16; 
    will-change: transform;
    overflow-wrap: break-word;
    word-break: normal;
}
.tagline { 
    font-size: clamp(1.15rem, 2.3vw, 1.38rem); 
    margin: 0 auto 44px; 
    color: #d8e2ee; 
    letter-spacing: 0.06em; 
    line-height: 1.65;
    max-width: 760px;
    will-change: transform;
}
.scroll-cue {
    display: inline-block;
    color: #9cb0c6;
    font-size: 2.2rem;
    font-weight: 700;
    animation: bounceDown 2.2s infinite ease-in-out;
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); opacity: 0.35; }
    50% { transform: translateY(7px); opacity: 0.85; }
}

main { 
    width: 100%; 
    max-width: 980px; 
    margin: 0 auto; 
    padding: 60px 24px 80px; 
}

.project-showcase { 
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 56px;
    align-items: center;
    margin-bottom: 120px; 
    position: relative; 
    z-index: 5; 
    scroll-margin-top: 80px;
    perspective: 1000px;
}
.project-showcase:last-of-type {
    margin-bottom: 80px;
}

.showcase-media {
    position: relative;
    width: 100%;
    max-width: 100%;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75);
    border: 1px solid #1c2332;
    background: #000;
    transform-style: preserve-3d;
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}
.showcase-media:hover {
    border-color: #3b465c;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
}
.showcase-media::after, .registry-showcase::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
        280px circle at var(--spot-x, -999px) var(--spot-y, -999px),
        rgba(245, 237, 224, 0.08),
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    mix-blend-mode: screen;
    z-index: 5;
}
.showcase-media:hover::after, .registry-showcase:hover::after {
    opacity: 1;
}
.showcase-media picture, .showcase-media img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

.showcase-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.showcase-meta {
    font-family: 'Special Elite', monospace;
    font-size: 0.95rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #b8c8dc;
    margin-bottom: 12px;
    font-weight: 700;
}

.showcase-title {
    font-family: 'Special Elite', monospace;
    font-size: clamp(1.7rem, 3.4vw, 2.3rem);
    color: #ffffff;
    margin: 0 0 18px;
    line-height: 1.25;
    letter-spacing: 0.02em;
}

.showcase-text {
    font-family: 'Special Elite', monospace;
    font-size: 1.15rem;
    color: #e6ebf2;
    line-height: 1.85;
    margin-bottom: 28px;
    letter-spacing: 0.03em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
.showcase-text p { margin: 0 0 16px; }
.showcase-text p:last-child { margin-bottom: 0; }

.book-weathered {
    filter: sepia(0.24) saturate(0.72) contrast(1.05) brightness(0.86);
}

.evidence-tape-wrap {
    position: absolute;
    top: 50%;
    left: -28px;
    right: -28px;
    transform: translateY(-50%) rotate(-8deg);
    z-index: 6;
    pointer-events: none;
    will-change: transform, opacity;
}
.evidence-tape-wrap.stamp-active {
    animation: tapeThump 0.55s cubic-bezier(0.18, 0.89, 0.32, 1.28) both;
}
.evidence-tape {
    background: #6e1515;
    background: repeating-linear-gradient(
        -45deg,
        rgba(130, 24, 24, 0.96),
        rgba(130, 24, 24, 0.96) 12px,
        rgba(92, 15, 15, 0.96) 12px,
        rgba(92, 15, 15, 0.96) 24px
    );
    color: #f7ebeb;
    border-top: 1px solid rgba(255, 160, 160, 0.35);
    border-bottom: 2px solid rgba(0, 0, 0, 0.85);
    padding: 10px 14px;
    text-align: center;
    font-family: 'Special Elite', monospace;
    font-size: clamp(0.82rem, 2vw, 0.98rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85);
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
@keyframes tapeThump {
    0% { transform: translateY(-50%) rotate(-8deg) scale(1.4); opacity: 0; }
    55% { transform: translateY(-50%) rotate(-8deg) scale(0.97); opacity: 1; }
    75% { transform: translateY(-50%) rotate(-8deg) scale(1.02); }
    100% { transform: translateY(-50%) rotate(-8deg) scale(1); opacity: 1; }
}

.redacted {
    display: inline;
    background: #080a0e;
    color: transparent;
    padding: 2px 5px;
    border-radius: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    cursor: help;
    user-select: none;
    transition: background 0.25s ease, color 0.25s ease, text-shadow 0.25s ease;
}
.redacted:hover, .redacted:focus {
    background: rgba(139, 30, 30, 0.35);
    color: #f5f0f0;
    text-shadow: 0 0 8px rgba(255, 120, 120, 0.7);
}

.showcase-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.registry-showcase {
    position: relative;
    z-index: 5;
    margin-bottom: 20px;
    scroll-margin-top: 80px;
    background: radial-gradient(circle at center, rgba(16, 21, 30, 0.55), rgba(8, 11, 16, 0.92));
    border: 1px solid #222c3d;
    border-radius: 4px;
    padding: 32px 28px 28px;
    text-align: center;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.65);
}
.registry-content {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.registry-showcase .showcase-meta { margin-bottom: 8px; }
.registry-showcase .showcase-title { margin-bottom: 10px; }
.registry-showcase .showcase-text {
    margin-bottom: 20px;
    font-size: 1.05rem;
    line-height: 1.65;
    color: #e6ebf2;
}

.button { 
    display: inline-flex; 
    align-items: center;
    justify-content: center;
    font-family: 'Special Elite', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none; 
    border: 1px solid #333d4e; 
    border-radius: 2px; 
    background: rgba(13, 17, 24, 0.8); 
    color: #c4cdd9; 
    padding: 12px 26px; 
    transition: all 0.25s ease; 
    cursor: pointer;
}
.button:hover { 
    border-color: #7d8c9e; 
    color: #ffffff; 
    background: rgba(22, 28, 38, 0.95); 
}
.button.accent { 
    border-color: #8b1e1e; 
    color: #f0f3f8; 
    background: rgba(26, 12, 12, 0.7); 
}
.button.accent:hover { 
    border-color: #d32f2f; 
    background: #8b1e1e; 
    color: #ffffff; 
    box-shadow: 0 0 20px rgba(211, 47, 47, 0.35); 
}
.button.disabled {
    border-color: #853333;
    color: #e88e8e;
    background: rgba(45, 14, 14, 0.6);
    font-size: 0.88rem;
    letter-spacing: 0.1em;
    font-weight: 700;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: 0 0 15px rgba(133, 51, 51, 0.25);
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.project { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); will-change: opacity, transform; }
.project.visible { opacity: 1; transform: translateY(0); }

footer { 
    width: 100%;
    text-align: center; 
    padding: 40px 20px 45px; 
    background-color: #080a0e; 
    border-top: 1px solid #2a3547; 
    margin-top: 60px; 
    position: relative;
    z-index: 10;
    box-shadow: 0 -15px 35px rgba(0, 0, 0, 0.85);
}

.footer-container { 
    max-width: 800px; 
    margin: 0 auto; 
}

.footer-links-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 26px;
    margin-bottom: 16px;
}

.footer-link {
    font-family: 'Special Elite', monospace;
    font-size: 0.95rem;
    color: #d0dbe8;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
}

.footer-link:hover { 
    color: #ffffff; 
}

.footer-copy {
    font-family: 'Special Elite', monospace;
    font-size: 0.88rem;
    color: #8fa0b5;
    margin: 0;
    letter-spacing: 0.05em;
}

.control-button { position: fixed; bottom: 30px; width: 45px; height: 45px; background-color: rgba(20, 20, 20, 0.8); color: #fff; border: 1px solid #333; border-radius: 50%; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.4s, transform 0.3s, background-color 0.3s; z-index: 998; cursor: pointer; backdrop-filter: blur(5px); }
.control-button.visible { opacity: 1; pointer-events: auto; }
.scroll-to-top { right: 30px; font-size: 20px; text-decoration: none; padding-bottom: 3px; }
#audio-toggle { right: 85px; font-size: 16px; }
#audio-toggle .audio-icon-on { display: none; }
#audio-toggle.audio-on .audio-icon-off { display: none; }
#audio-toggle.audio-on .audio-icon-on { display: block; color: var(--accent-text-color); text-shadow: 0 0 10px var(--accent-color); }

.lang-switcher {
    position: fixed;
    top: 30px;
    right: 40px;
    z-index: 1002;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
    color: #c2c2c2;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.9);
}
.lang-switcher.visible { opacity: 1; pointer-events: auto; }

.lang-current {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: inherit;
    padding: 0;
    font: inherit;
}
.lang-switcher:hover .lang-current, .lang-current:focus-visible { color: #fff; outline: none; }
.lang-current span {
    font-family: 'Special Elite', monospace;
    font-size: 1rem;
    position: relative;
    top: 1px;
}
.lang-globe { width: 20px; height: 20px; stroke: currentColor; }
.lang-arrow { width: 16px; height: 16px; stroke: currentColor; transition: transform 0.3s ease; }
.lang-switcher.open .lang-arrow { transform: rotate(180deg); }

.lang-dropdown {
    display: none;
    position: absolute;
    top: 120%;
    right: 0;
    background-color: rgba(15, 15, 15, 0.94);
    backdrop-filter: blur(5px);
    border: 1px solid #333;
    border-radius: 2px;
    padding: 5px;
    min-width: 100%;
}
.lang-switcher.open .lang-dropdown { display: block; }
.lang-option {
    display: block;
    color: #cfcfcf;
    text-decoration: none;
    font-family: 'Special Elite', monospace;
    font-size: 1rem;
    padding: 8px 12px;
    text-align: center;
    transition: color 0.3s, background-color 0.3s;
}
.lang-option:hover { background-color: rgba(255, 255, 255, 0.1); color: #fff; }
.lang-option.active { color: #fff; font-weight: bold; pointer-events: none; background-color: rgba(255, 255, 255, 0.05); }

.menu-toggle { position: fixed; top: 30px; left: 40px; z-index: 2002; cursor: pointer; width: 30px; height: 20px; background: transparent; border: none; display: flex; flex-direction: column; justify-content: space-between; opacity: 0; pointer-events: none; transition: opacity 0.4s; padding: 0; mix-blend-mode: difference; }
.menu-toggle.visible { opacity: 1; pointer-events: auto; }
.menu-toggle .bar { display: block; width: 100%; height: 2px; background-color: #fff; transition: all 0.3s ease; transform-origin: center; }
.menu-toggle.open .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle.open .bar:nth-child(2) { opacity: 0; }
.menu-toggle.open .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.menu-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(5, 5, 5, 0.95); backdrop-filter: blur(10px); z-index: 2001; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: all 0.5s ease; }
.menu-overlay.open { opacity: 1; visibility: visible; }
.main-menu { list-style: none; padding: 0 16px; max-width: 100%; box-sizing: border-box; text-align: center; }
.main-menu li { margin: 25px 0; transform: translateY(30px); opacity: 0; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s; }
.menu-overlay.open .main-menu li { opacity: 1; transform: translateY(0); }
.main-menu a { font-family: 'Special Elite', monospace; color: #ddd; text-decoration: none; font-size: clamp(1.8rem, 5vw, 3rem); transition: color 0.3s; position: relative; display: inline-block; }
.main-menu a:hover { color: var(--accent-color); }
.menu-link-disabled {
    font-family: 'Special Elite', monospace;
    color: #556274;
    font-size: clamp(1.6rem, 4.4vw, 2.6rem);
    display: inline-block;
    cursor: not-allowed;
    user-select: none;
    opacity: 0.6;
}
.nav-lock-badge {
    font-size: 0.72em;
    color: #7b889b;
    margin-left: 8px;
    letter-spacing: 0.08em;
    vertical-align: middle;
}

#modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.92); z-index: 2003; display: flex; align-items: center; justify-content: center; flex-direction: column; transition: opacity 0.4s ease, visibility 0.4s ease; padding: 16px; }
#modal-overlay.modal-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.custom-modal-box {
    border-radius: 10px;
    background: linear-gradient(165deg, rgba(26, 28, 33, 0.98), rgba(10, 10, 12, 0.98));
    border: 1px solid rgba(179, 0, 0, 0.52);
    box-shadow: 0 12px 44px rgba(0, 0, 0, 0.68), 0 0 35px rgba(179, 0, 0, 0.2);
    padding: 36px 32px;
    text-align: center;
    max-width: 540px;
    width: 100%;
    position: relative;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}

#modal-overlay:not(.modal-hidden) .custom-modal-box { transform: scale(1); opacity: 1; }

.custom-modal-box h3 {
    margin: 0 0 14px;
    font-family: 'Special Elite', monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e2e2e2;
    text-shadow: 0 0 10px rgba(179, 0, 0, 0.2);
}
.custom-modal-box p {
    margin: 0 auto 24px;
    color: #b2b2b2;
    font-size: 1.02rem;
    line-height: 1.6;
}

#password-input {
    width: 220px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-bottom: 2px solid rgba(179, 0, 0, 0.7);
    color: #fff;
    font-family: 'Special Elite', monospace;
    font-size: 2rem;
    text-align: center;
    letter-spacing: 0.15em;
    padding: 6px 10px;
    transition: border-color .3s, box-shadow .3s;
    outline: none;
}
#password-input:focus {
    border-bottom-color: #ff4a4a;
    box-shadow: 0 8px 18px -10px rgba(225, 30, 30, 0.45);
}

.custom-modal-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 24px;
}
.custom-modal-actions button {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #9f9f9f;
    font-family: 'Special Elite', monospace;
    font-size: 0.85rem;
    padding: 10px 22px;
    cursor: pointer;
    letter-spacing: .1em;
    text-transform: uppercase;
    transition: all .2s ease;
    min-width: 120px;
}
.custom-modal-actions button:hover { color: #fff; border-color: #666; }
.custom-modal-actions button.confirm { border-color: rgba(179, 0, 0, 0.75); color: var(--accent-text-color); }
.custom-modal-actions button.confirm:hover { background: rgba(179, 0, 0, 0.18); box-shadow: 0 0 18px rgba(179, 0, 0, 0.45); color: #fff; }

#password-error {
    min-height: 1.2rem;
    margin-top: 12px;
    color: #ff5f5f;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.25s ease;
}
#password-error.visible {
    opacity: 1;
    animation: shake 0.35s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

#archive-content {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}
#modal-container {
    font-family: 'Special Elite', monospace;
    position: relative;
    background: #111;
    border: 1px solid var(--border-color);
    padding: 30px 40px;
    width: 100%;
    max-width: 800px;
    max-height: 80vh;
    margin: 0 auto;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.4s ease;
}
#modal-overlay:not(.modal-hidden) #modal-container { transform: scale(1); }
#modal-close-btn {
    position: absolute;
    top: 8px;
    right: 14px;
    background: none;
    border: none;
    font-size: 2.2rem;
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
}
.protocol-entry { margin-bottom: 40px; }
.protocol-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    font-size: 0.95rem;
    color: #9d9d9d;
    margin-bottom: 10px;
    border-bottom: 1px dotted #555;
    padding-bottom: 5px;
    gap: 10px;
}
.protocol-entry blockquote { margin: 0; padding-left: 15px; border-left: 2px solid var(--accent-color); color: var(--text-color); }
.protocol-entry blockquote p { font-size: 1.1rem; line-height: 1.9; }

body.lang-en .protocol-entry blockquote p { font-size: 1.02rem; }

#modal-container h4 { color: #ccc; letter-spacing: 1px; }
.modal-content hr { border: none; height: 1px; background-color: var(--border-color); margin: 30px 0; }
.redacted { background-color: #000; color: #000; user-select: none; }
.stamp { color: var(--accent-color); font-weight: bold; }
.handwritten-note { display: block; margin-top: 1em; text-align: left; }
.protocol-entry em, .protocol-entry b { font-style: italic; color: #b3b3b3; }

@media (max-width: 820px) {
    main { padding: 40px 18px 50px; }
    .project-showcase { grid-template-columns: 1fr; gap: 28px; margin-bottom: 75px; }
    .showcase-media { max-width: 320px; margin: 0 auto; }
    .showcase-body { align-items: center; text-align: center; }
    .registry-showcase { padding: 36px 20px 32px; }
}

@media (max-width: 768px) { 
    body { font-size: 16px; } 
    footer { padding-bottom: 85px; }
    #modal-container { width: 100%; max-height: calc(100vh - 30px); padding: 20px 18px; }
    .custom-modal-box { width: 100%; padding: 24px 18px; }
    .control-button { width: 50px; height: 50px; bottom: 20px; }
    .scroll-to-top { right: 20px; }
    #audio-toggle { right: 80px; }
    .protocol-header { flex-direction: column; align-items: flex-start; gap: 5px; font-size: 0.8rem; }
    
    
    .footer-terminal-status,
    #terminal-trigger,
    .terminal-modal {
        display: none !important;
    }
}

@media (max-width: 640px) {
    .hero-content {
        padding: 0 16px;
    }
    .author-name {
        font-size: clamp(1.35rem, 6.2vw, 2.05rem);
        letter-spacing: 0.015em;
        line-height: 1.2;
    }
    .tagline {
        font-size: clamp(0.95rem, 3.8vw, 1.15rem);
        margin: 0 auto 34px;
    }
    .menu-toggle {
        top: 16px !important;
        left: 16px !important;
        width: 38px !important;
        height: 38px !important;
        background: rgba(10, 14, 22, 0.9) !important;
        backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        border-radius: 4px !important;
        padding: 10px 8px !important;
        mix-blend-mode: normal !important;
    }
    .lang-switcher {
        top: 16px !important;
        right: 16px !important;
        background: rgba(10, 14, 22, 0.9) !important;
        backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        border-radius: 4px !important;
        padding: 6px 12px !important;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 0 12px;
    }
    .author-name {
        font-size: clamp(1.2rem, 6.4vw, 1.75rem);
        letter-spacing: 0.01em;
    }
}

.button:active, .control-button:active, .menu-toggle:active, .footer-link:active, .terminal-btn:active {
    transform: translateY(2px) scale(0.97) !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8) !important;
}

.terminal-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.terminal-modal.modal-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.terminal-window {
    width: 100%;
    max-width: 940px;
    height: 620px;
    max-height: 88vh;
    background: #020603;
    border: 2px solid #164e29;
    box-shadow: 0 0 50px rgba(22, 78, 41, 0.45), inset 0 0 45px rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    font-family: 'Special Elite', monospace, 'Courier New';
    color: #4ade80;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}
.terminal-window::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(18, 35, 20, 0) 50%, rgba(0, 0, 0, 0.3) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 2;
}
.terminal-header {
    background: #051408;
    border-bottom: 1px solid #164e29;
    padding: 10px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.92rem;
    letter-spacing: 0.1em;
    color: #86efac;
    z-index: 3;
}
.terminal-close-btn {
    background: transparent;
    border: none;
    color: #86efac;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 6px;
    transition: color 0.15s ease;
}
.terminal-close-btn:hover {
    color: #ff6b6b;
}
.terminal-body {
    flex: 1;
    padding: 18px 24px;
    overflow-y: auto;
    font-size: 1.15rem;
    line-height: 1.65;
    z-index: 3;
    word-break: break-word;
    color: #4ade80;
    text-shadow: 0 0 6px rgba(74, 222, 128, 0.45);
}
.terminal-body::-webkit-scrollbar {
    width: 6px;
}
.terminal-body::-webkit-scrollbar-track {
    background: #030804;
}
.terminal-body::-webkit-scrollbar-thumb {
    background: #164e29;
    border-radius: 2px;
}
.terminal-body::-webkit-scrollbar-thumb:hover {
    background: #22c55e;
}

.vtmb-box {
    position: relative;
    border: 1px dashed #34d399;
    padding: 10px 16px;
    margin-bottom: 16px;
    text-align: center;
    background: rgba(6, 28, 14, 0.4);
    box-shadow: inset 0 0 14px rgba(52, 211, 153, 0.08);
}
.vtmb-box::before {
    content: '+';
    position: absolute;
    top: -10px;
    left: -6px;
    color: #4ade80;
    font-weight: 700;
    background: #020603;
    padding: 0 2px;
    line-height: 1;
}
.vtmb-box::after {
    content: '+';
    position: absolute;
    top: -10px;
    right: -6px;
    color: #4ade80;
    font-weight: 700;
    background: #020603;
    padding: 0 2px;
    line-height: 1;
}
.vtmb-corner-bl, .vtmb-corner-br {
    position: absolute;
    bottom: -10px;
    color: #4ade80;
    font-weight: 700;
    background: #020603;
    padding: 0 2px;
    line-height: 1;
}
.vtmb-corner-bl { left: -6px; }
.vtmb-corner-br { right: -6px; }

.vtmb-title-main {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #86efac;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(134, 239, 172, 0.6);
    margin: 0;
}
.vtmb-title-sub {
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    color: #4ade80;
    margin-top: 5px;
    opacity: 0.9;
}
.vtmb-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #86efac;
    margin: 12px 0 6px 0;
    letter-spacing: 0.05em;
    text-shadow: 0 0 6px rgba(134, 239, 172, 0.45);
}
.vtmb-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 8px;
}
.vtmb-list-item {
    margin-bottom: 5px;
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: 1.12rem;
}
.vtmb-key {
    color: #86efac;
    font-weight: 700;
    min-width: 40px;
}
.vtmb-cmd {
    color: #a7f3d0;
    font-weight: 700;
    min-width: 105px;
}
.vtmb-desc {
    color: #4ade80;
    opacity: 0.92;
}
.vtmb-doc-box {
    background: rgba(8, 22, 12, 0.6);
    border-left: 3px solid #22c55e;
    padding: 14px 18px;
    margin: 12px 0 16px 0;
    line-height: 1.7;
}
.vtmb-doc-meta {
    font-size: 0.96rem;
    color: #86efac;
    margin-bottom: 10px;
    border-bottom: 1px dashed rgba(74, 222, 128, 0.3);
    padding-bottom: 6px;
}
.vtmb-doc-text {
    font-size: 1.12rem;
    color: #4ade80;
}
.vtmb-doc-text p {
    margin: 0 0 10px 0;
}
.vtmb-doc-text p:last-child {
    margin-bottom: 0;
}
.vtmb-nav-hint {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed rgba(74, 222, 128, 0.25);
    color: #86efac;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
}
.vtmb-alert-msg {
    color: #fca5a5;
    background: rgba(69, 10, 10, 0.4);
    border: 1px dashed #ef4444;
    padding: 8px 12px;
    margin: 12px 0;
    font-size: 1rem;
    text-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

.terminal-prompt-line {
    display: flex;
    align-items: center;
    padding: 12px 22px;
    background: #040d06;
    border-top: 1px solid #14381d;
    z-index: 3;
    gap: 12px;
}
.terminal-prompt {
    font-size: 1.15rem;
    font-weight: 700;
    color: #86efac;
    white-space: nowrap;
    text-shadow: 0 0 6px rgba(134, 239, 172, 0.5);
}
.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #a7f3d0;
    font-family: 'Special Elite', monospace;
    font-size: 1.15rem;
    letter-spacing: 0.05em;
    caret-color: #4ade80;
}

.footer-terminal-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: 14px;
    padding: 3px 9px;
    font-family: 'Special Elite', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: #7d8c9e;
    background: rgba(13, 17, 24, 0.7);
    border: 1px solid rgba(51, 61, 78, 0.6);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.25s ease;
    vertical-align: middle;
}
.footer-terminal-status:hover, .footer-terminal-status:focus {
    color: #86efac;
    border-color: #22c55e;
    background: rgba(6, 25, 12, 0.85);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
    outline: none;
}
.terminal-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
    animation: statusPulse 2.4s ease-in-out infinite;
}
@keyframes statusPulse {
    0%, 100% { opacity: 0.35; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.15); box-shadow: 0 0 9px #4ade80; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    #crt-canvas, .mouse-glow { display: none !important; }
}
