/**
 * CyberFlame Theme - Main Stylesheet
 * 
 * Recreates portfolio-homepage-visual-reference.png with exact precision:
 * - Bespoke dark atmospheric palette, fire ember glow, neon orange accents
 * - Native 3D Rubik's cube navigation with 4 primary interactive buttons:
 *   1. ЗА МЕН (ABOUT)
 *   2. ПРОЕКТИ (PROJECTS)
 *   3. ЛИЧНО (PERSONAL)
 *   4. КОНТАКТ (CONTACT)
 * - Cybernetic frosted glass card with orange border, notch header, scroll track
 * - Embedded styled audio player with Epic Viking Battle Anthem and playlist controls
 * - Full responsive design (desktop, laptop, tablet, mobile)
 * - Accessibility (semantic HTML, WCAG contrast, focus indicators, prefers-reduced-motion)
 */

/* ==========================================================================
   1. RESET & CSS VARIABLES
   ========================================================================== */
:root {
    --bg-dark: #08090c;
    --bg-card: rgba(11, 13, 17, 0.94);
    --border-orange: #f26a1b;
    --border-orange-bright: #ff8833;
    --border-orange-dim: rgba(242, 106, 27, 0.35);
    --text-primary: #f0f2f5;
    --text-muted: #8e95a5;
    --text-accent: #f26a1b;
    --font-hand: 'Caveat', cursive, sans-serif;
    --font-heading: 'Space Grotesk', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --cube-size: 260px;
    --glow-strong: 0 0 25px rgba(242, 106, 27, 0.7), 0 0 50px rgba(242, 106, 27, 0.35);
    --glow-subtle: 0 0 15px rgba(242, 106, 27, 0.4);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    height: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.cyberflame-body {
    min-height: 100vh;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-heading);
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* ==========================================================================
   2. SITE WRAPPER & BACKGROUND ATMOSPHERE
   ========================================================================== */
.cyberflame-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: #07080a;
    background-image: url('../images/hero-clean-bg.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Atmospheric subtle vignette overlay pseudo-elements */
.cyberflame-wrapper::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(ellipse at center, transparent 45%, rgba(5, 6, 8, 0.6) 100%);
}

.cyberflame-wrapper::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    /* Soft ambient fire reflection drifting across right side */
    background: radial-gradient(circle 600px at 68% 46%, rgba(255, 110, 20, 0.045) 0%, transparent 70%);
    animation: ambientSmokeDrift 10s ease-in-out infinite alternate;
}

@keyframes ambientSmokeDrift {
    0%   { opacity: 0.65; transform: scale(0.98) translate(0, 0); }
    50%  { opacity: 1;    transform: scale(1.02) translate(8px, -4px); }
    100% { opacity: 0.75; transform: scale(1.0)  translate(-6px, 6px); }
}

/* Embers particle canvas */
.embers-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    opacity: 0.85;
}

/* ==========================================================================
   3. HEADER (Me, Myself & AI / Breadcrumbs / Slogan / Language Switcher)
   ========================================================================== */
.cyber-header {
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 2.2rem 4rem 1rem 4rem;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1680px;
    margin: 0 auto;
}

/* Brand block */
.brand-block {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.brand-link {
    text-decoration: none;
    font-family: var(--font-hand);
    font-size: 3.6rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    display: inline-block;
    transition: transform 0.2s ease;
}

.brand-link:hover {
    transform: scale(1.02);
}

.brand-white {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.brand-accent {
    color: var(--border-orange-bright);
    text-shadow: 0 0 15px rgba(242, 106, 27, 0.8), 0 0 30px rgba(242, 106, 27, 0.4);
}


/* Header Right: Slogan & Language Switcher */
.header-right-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.8rem;
}

.slogan-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: #d1d5db;
    padding-bottom: 0.4rem;
}

.slogan-x {
    color: var(--border-orange);
    font-size: 0.75rem;
}

.slogan-underline {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 48px;
    height: 2px;
    background-color: var(--border-orange);
    box-shadow: 0 0 8px var(--border-orange);
}

/* Language Switcher - Non-intrusive */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(18, 20, 26, 0.75);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.lang-btn {
    background: none;
    border: none;
    color: #717786;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.15rem 0.25rem;
    transition: color 0.2s ease;
}

.lang-btn:hover {
    color: #ffffff;
}

.lang-btn.active {
    color: var(--border-orange-bright);
    text-shadow: 0 0 8px rgba(242, 106, 27, 0.6);
}

.lang-sep {
    color: #3f4553;
    font-size: 0.7rem;
}

/* ==========================================================================
   4. MAIN VIEWPORT & 2-COLUMN LAYOUT
   ========================================================================== */
.cyber-main {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 5;
    padding: 0 4rem;
}

.cyber-viewport {
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
    min-height: calc(100vh - 230px);
}

/* ==========================================================================
   5. 3D INTERACTIVE RUBIK'S CUBE NAVIGATION
   ========================================================================== */
.cube-stage-column {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding-left: 0;
    z-index: 6;
}

.cube-interactive-container {
    position: relative;
    width: var(--cube-size);
    height: var(--cube-size);
    margin: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 992px) {
    .cube-interactive-container {
        transform: translate(115px, 22px);
    }
}

.cube-3d-scene {
    width: var(--cube-size);
    height: var(--cube-size);
    perspective: 1200px;
    position: relative;
    cursor: grab;
    user-select: none;
    outline: none;
}

.cube-3d-scene:active {
    cursor: grabbing;
}

/* Ambient Flame Aura */
.cube-flame-aura {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(var(--cube-size) * 1.5);
    height: calc(var(--cube-size) * 1.5);
    pointer-events: none;
    z-index: 1;
}

.flame-layer {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    filter: blur(28px);
    opacity: 0.65;
    animation: flamePulse 3.5s ease-in-out infinite alternate;
}

.flame-back {
    background: radial-gradient(circle, rgba(255, 60, 0, 0.45) 0%, rgba(242, 106, 27, 0.2) 50%, transparent 75%);
    transform: scale(1.1);
}

.flame-mid {
    background: radial-gradient(circle, rgba(255, 140, 0, 0.5) 0%, rgba(242, 106, 27, 0.25) 45%, transparent 70%);
    animation-delay: -1.2s;
}

.flame-front {
    background: radial-gradient(circle, rgba(255, 200, 50, 0.3) 0%, transparent 60%);
    animation-delay: -2.3s;
}

@keyframes flamePulse {
    0% { transform: scale(0.92) rotate(0deg); opacity: 0.5; }
    50% { transform: scale(1.08) rotate(3deg); opacity: 0.75; }
    100% { transform: scale(0.96) rotate(-2deg); opacity: 0.6; }
}

/* 3D Cube Object */
.cube-3d-object {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(-12deg) rotateY(15deg);
    transition: transform 0.65s cubic-bezier(0.18, 0.89, 0.32, 1.28), opacity 0.35s ease, filter 0.35s ease;
    z-index: 2;
}

/* Smooth fade-out of the 3D cube when video transition begins */
.cube-3d-object.cube-faded {
    opacity: 0;
    filter: blur(4px);
    pointer-events: none;
    transform: scale(0.85) rotateX(-12deg) rotateY(15deg);
}

/* Cube Faces */
.cube-face {
    position: absolute;
    width: var(--cube-size);
    height: var(--cube-size);
    border-radius: 12px;
    background: #0a0c10;
    border: 2px solid rgba(242, 106, 27, 0.4);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.9);
    backface-visibility: visible;
}

/* Half size: 130px for 260px cube */
.face-front  { transform: rotateY(0deg) translateZ(130px); }
.face-back   { transform: rotateY(180deg) translateZ(130px); }
.face-right  { transform: rotateY(90deg) translateZ(130px); }
.face-left   { transform: rotateY(-90deg) translateZ(130px); }
.face-top    { transform: rotateX(90deg) translateZ(130px); }
.face-bottom { transform: rotateX(-90deg) translateZ(130px); }

/* Front Face: 2x2 Glowing Navigation Grid */
.cube-nav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    padding: 8px;
    width: 100%;
    height: 100%;
    background: #060709;
    border-radius: 10px;
}

/* Individual Navigation Tile Button */
.cube-tile-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    position: relative;
    border-radius: 8px;
    background: linear-gradient(145deg, #181514, #0b0c0f);
    border: 1.5px solid var(--border-orange);
    box-shadow: 
        inset 0 0 12px rgba(242, 106, 27, 0.25),
        0 0 10px rgba(242, 106, 27, 0.35);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
    cursor: pointer;
    overflow: hidden;
}

.cube-tile-btn:hover,
.cube-tile-btn:focus-visible,
.cube-tile-btn.active {
    transform: scale(1.04);
    border-color: #ff9944;
    background: linear-gradient(145deg, #2a1c12, #121319);
    box-shadow: 
        inset 0 0 20px rgba(242, 106, 27, 0.5),
        0 0 22px rgba(242, 106, 27, 0.75);
    outline: none;
}

.tile-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
    z-index: 2;
    padding: 4px;
}

.tile-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff9944;
    filter: drop-shadow(0 0 6px rgba(242, 106, 27, 0.8));
    transition: transform 0.2s ease, filter 0.2s ease;
}

.cube-tile-btn:hover .tile-icon-box {
    transform: translateY(-2px);
    filter: drop-shadow(0 0 10px rgba(255, 170, 50, 1));
}

.tile-label {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #ffffff;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
    transition: color 0.2s ease;
}

.cube-tile-btn:hover .tile-label {
    color: #ffca88;
    text-shadow: 0 0 8px rgba(242, 106, 27, 0.8);
}

/* Cinematic Video Transition Overlay (Plays custom cut on navigation click) */
.cinematic-transition-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 568px;
    max-height: calc(100vh - 180px);
    border-radius: 20px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    z-index: 8;
    transition: opacity 0.3s ease;
    mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 72%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 72%, transparent 100%);
}

.cinematic-transition-wrapper.is-active {
    opacity: 1;
    pointer-events: auto;
}

.cinematic-transition-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* Rubik Grid for Other Cube Faces */
.rubik-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 4px;
    padding: 6px;
    width: 100%;
    height: 100%;
    background: #08090d;
    border-radius: 10px;
}

.rubik-cell {
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.6);
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.7);
    transition: filter 0.3s ease;
}

.cell-orange { background: #d35400; box-shadow: inset 0 0 8px rgba(242, 106, 27, 0.5); }
.cell-red    { background: #c0392b; box-shadow: inset 0 0 8px rgba(231, 76, 60, 0.4); }
.cell-blue   { background: #2980b9; box-shadow: inset 0 0 8px rgba(52, 152, 219, 0.4); }
.cell-green  { background: #27ae60; box-shadow: inset 0 0 8px rgba(46, 204, 113, 0.4); }
.cell-yellow { background: #f39c12; box-shadow: inset 0 0 8px rgba(241, 196, 15, 0.4); }
.cell-white  { background: #bdc3c7; box-shadow: inset 0 0 8px rgba(236, 240, 241, 0.4); }

.cube-interaction-hint {
    position: absolute;
    bottom: -48px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    white-space: nowrap;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    pointer-events: none;
    z-index: 5;
}

/* ==========================================================================
   6. CYBERNETIC CONTENT CARD
   ========================================================================== */
.content-stage-column {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
}

.cyber-card-wrapper {
    position: relative;
    width: 100%;
    max-width: 670px;
}

/* Subtle warm background illumination & environmental fire reflection behind the card */
.cyber-card-wrapper::before {
    content: '';
    position: absolute;
    top: -40px;
    left: -50px;
    right: -40px;
    bottom: -40px;
    background: radial-gradient(circle 500px at 45% 48%, rgba(242, 106, 27, 0.08) 0%, rgba(242, 106, 27, 0.02) 50%, transparent 75%);
    pointer-events: none;
    z-index: 0;
    filter: blur(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Orange Cyber Border Frame */
.cyber-card {
    position: relative;
    z-index: 1;
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 12px;
    border: 1.5px solid var(--border-orange);
    box-shadow: 
        0 24px 60px rgba(0, 0, 0, 0.88),
        0 0 35px rgba(242, 106, 27, 0.28),
        inset 0 0 30px rgba(242, 106, 27, 0.08);
    overflow: hidden;
    height: 500px;
    display: flex;
    flex-direction: column;
    clip-path: polygon(
        0 16px, 16px 0, 
        calc(100% - 16px) 0, 100% 16px, 
        100% calc(100% - 16px), calc(100% - 16px) 100%, 
        16px 100%, 0 calc(100% - 16px)
    );
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.8rem 0.8rem 1.8rem;
    border-bottom: 1px solid rgba(242, 106, 27, 0.2);
    background: rgba(18, 20, 26, 0.5);
}

.card-title-tab {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.card-tab-bracket {
    color: var(--border-orange);
    font-family: var(--font-mono);
    font-weight: 700;
}

.card-title-text {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: var(--border-orange-bright);
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(242, 106, 27, 0.6);
}

.card-close-btn {
    background: none;
    border: none;
    color: #9aa2b1;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.3rem;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-close-btn:hover {
    color: #ff5544;
    transform: scale(1.15);
}

/* Scrollable Card Body */
.card-body-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 1.8rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border-orange) rgba(0, 0, 0, 0.4);
}

.card-body-scrollable::-webkit-scrollbar {
    width: 6px;
}

.card-body-scrollable::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.card-body-scrollable::-webkit-scrollbar-thumb {
    background-color: var(--border-orange);
    border-radius: 3px;
    box-shadow: 0 0 6px var(--border-orange);
}

/* Right Sleek Amber Scroll Track Accent */
.card-scrollbar-track {
    position: absolute;
    right: 8px;
    top: 55px;
    bottom: 20px;
    width: 3px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    pointer-events: none;
}

.card-scrollbar-thumb {
    position: absolute;
    top: 15%;
    width: 100%;
    height: 60px;
    background: var(--border-orange);
    box-shadow: 0 0 8px var(--border-orange);
    border-radius: 2px;
}

/* Layout for Card Content (Full-width, balanced cyber typography) */
.about-flex-layout,
.card-content-area,
.standard-page-layout {
    display: block;
    width: 100%;
}

/* About Section Hero Intro: Side-by-Side Portrait & Text */
.about-hero-intro {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1.8rem;
    margin-bottom: 1.6rem;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid rgba(242, 106, 27, 0.25);
}

.about-portrait-col {
    flex: 0 0 320px;
    max-width: 320px;
}

.portrait-frame-container {
    position: relative;
    width: 320px;
    height: 320px;
    aspect-ratio: 1 / 1;
    max-width: 100%;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Background flame & cyan aura on hover/focus */
.portrait-flame-aura {
    position: absolute;
    inset: -6px;
    border-radius: 16px;
    background: 
        radial-gradient(circle at 18% 82%, rgba(242, 106, 27, 0.35) 0%, transparent 60%),
        radial-gradient(circle at 82% 18%, rgba(0, 210, 255, 0.32) 0%, transparent 60%);
    opacity: 0.65;
    pointer-events: none;
    transition: opacity 0.4s ease, filter 0.4s ease;
    filter: blur(12px);
    z-index: 1;
}

/* Thin graphite frame with rounded corners, electric blue & orange dual-edge glow */
.photo-frame-glow {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(75, 92, 115, 0.65);
    background: #080a10;
    box-shadow: 
        -6px 6px 20px -2px rgba(242, 106, 27, 0.28),
        6px -6px 20px -2px rgba(0, 200, 255, 0.26),
        inset 0 0 16px rgba(0, 0, 0, 0.65);
    z-index: 2;
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.about-portrait-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    border-radius: 11px;
    transition: transform 0.45s ease, filter 0.4s ease;
}

/* Very subtle animated light glint sweep */
.photo-glint-overlay {
    position: absolute;
    inset: 0;
    border-radius: 11px;
    overflow: hidden;
    pointer-events: none;
    z-index: 3;
}

.photo-glint-overlay::after {
    content: '';
    position: absolute;
    top: -60%;
    left: -130%;
    width: 70%;
    height: 220%;
    background: linear-gradient(
        115deg,
        transparent 25%,
        rgba(255, 255, 255, 0.03) 42%,
        rgba(0, 210, 255, 0.12) 50%,
        rgba(242, 106, 27, 0.10) 56%,
        transparent 70%
    );
    transform: rotate(25deg);
    animation: subtleGlintSweep 7.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes subtleGlintSweep {
    0%, 65% {
        left: -130%;
        opacity: 0;
    }
    70% {
        opacity: 1;
    }
    85% {
        left: 170%;
        opacity: 0.85;
    }
    86%, 100% {
        left: 170%;
        opacity: 0;
    }
}

/* Subtle warm overlay that enhances lighting without hiding face */
.photo-heat-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to top, rgba(8, 10, 16, 0.4) 0%, transparent 45%);
    transition: opacity 0.35s ease;
    z-index: 2;
}

/* Small unobtrusive zoom icon in bottom-right corner */
.photo-zoom-hint {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(10, 14, 22, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(0, 210, 255, 0.45);
    color: #00d2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    z-index: 4;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.photo-zoom-hint::before {
    content: '';
    width: 13px;
    height: 13px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7'/%3E%3C/svg%3E") no-repeat center / contain;
    display: block;
}

/* Hover & Focus states: slight lift, scale, dual glow boost & zoom icon reveal */
.portrait-frame-container:hover,
.portrait-frame-container:focus-visible {
    transform: translateY(-4px) scale(1.02);
    outline: none;
}

.portrait-frame-container:hover .photo-frame-glow,
.portrait-frame-container:focus-within .photo-frame-glow,
.portrait-frame-container:focus-visible .photo-frame-glow {
    border-color: rgba(125, 155, 190, 0.85);
    box-shadow: 
        -8px 8px 30px rgba(242, 106, 27, 0.5),
        8px -8px 30px rgba(0, 210, 255, 0.45),
        inset 0 0 14px rgba(0, 0, 0, 0.4);
}

.portrait-frame-container:hover .portrait-flame-aura,
.portrait-frame-container:focus-within .portrait-flame-aura,
.portrait-frame-container:focus-visible .portrait-flame-aura {
    opacity: 1;
    filter: blur(14px);
    animation: flamePulse 2.4s infinite alternate ease-in-out;
}

.portrait-frame-container:hover .about-portrait-photo,
.portrait-frame-container:focus-within .about-portrait-photo,
.portrait-frame-container:focus-visible .about-portrait-photo {
    transform: scale(1.03);
    filter: contrast(1.04) brightness(1.03);
}

.portrait-frame-container:hover .photo-zoom-hint,
.portrait-frame-container:focus-within .photo-zoom-hint,
.portrait-frame-container:focus-visible .photo-zoom-hint {
    opacity: 1;
    transform: scale(1);
    border-color: #00d2ff;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.6), 0 0 18px rgba(242, 106, 27, 0.35);
}

@keyframes flamePulse {
    0% {
        opacity: 0.85;
        transform: scale(0.98);
        filter: blur(10px) brightness(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.03);
        filter: blur(14px) brightness(1.2);
    }
    100% {
        opacity: 0.9;
        transform: scale(1);
        filter: blur(11px) brightness(1.05);
    }
}

.about-intro-text-col {
    flex: 1;
    min-width: 0;
}

.about-hero-intro .bio-lead {
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.72;
    color: #f1f3f7;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    letter-spacing: 0.01em;
}

/* Fallback standalone bio-lead if used outside about-hero-intro */
.bio-lead {
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.7;
    color: #f3f4f6;
    margin-bottom: 1.4rem;
    letter-spacing: 0.01em;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(242, 106, 27, 0.2);
}

.bio-details h3,
.personal-section h3,
.contact-section h3 {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--border-orange-bright);
    margin-top: 1.2rem;
    margin-bottom: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bio-details h3::before,
.personal-section h3::before,
.contact-section h3::before {
    content: "■";
    font-size: 0.65rem;
    color: var(--border-orange);
}

.bio-details p,
.bio-details ul,
.personal-section p,
.contact-section p {
    font-size: 0.94rem;
    color: #cbd5e1;
    line-height: 1.68;
    margin-bottom: 0.9rem;
}

.bio-details ul {
    list-style: none;
    padding-left: 0;
    margin-top: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bio-details li {
    position: relative;
    padding-left: 1.5rem;
    color: #e2e8f0;
    line-height: 1.55;
}

.bio-details li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--border-orange);
    font-weight: bold;
    font-size: 1rem;
}

/* Projects Cinematic List & Items */
.projects-cinematic-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.cinematic-project-item {
    display: grid;
    grid-template-columns: minmax(280px, 42%) 1fr;
    gap: 1.6rem;
    align-items: start;
    background: rgba(18, 20, 26, 0.6);
    border: 1px solid rgba(242, 106, 27, 0.22);
    border-radius: 10px;
    padding: 1.4rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
}

.cinematic-project-item:hover {
    border-color: rgba(242, 106, 27, 0.55);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.6), 0 0 20px rgba(242, 106, 27, 0.15);
    transform: translateY(-2px);
}

/* Screenshot Column & Hover Heat Glow */
.project-screenshot-col {
    position: relative;
    width: 100%;
}

.project-screenshot-link {
    display: block;
    position: relative;
    border-radius: 8px;
    text-decoration: none;
    outline: none;
    cursor: pointer;
}

.project-screenshot-link:focus-visible {
    outline: 2px solid var(--border-orange-bright);
    outline-offset: 3px;
}

/* Subtle heat-light aura around screenshot on hover */
.screenshot-heat-aura {
    position: absolute;
    inset: -6px;
    border-radius: 12px;
    background: radial-gradient(ellipse at center, rgba(255, 106, 26, 0.45) 0%, rgba(220, 50, 10, 0.2) 50%, rgba(200, 20, 0, 0) 75%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, filter 0.4s ease;
    filter: blur(8px);
    z-index: 1;
}

.screenshot-frame-glow {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(242, 106, 27, 0.35);
    background: #0b0d14;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65), inset 0 0 14px rgba(0, 0, 0, 0.5);
    z-index: 2;
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.project-screenshot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.5s ease, filter 0.4s ease;
}

/* Glare & Reflection overlay */
.screenshot-glare-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.35) 100%);
    transition: opacity 0.35s ease;
}

/* Floating "Отвори сайта ↗" pill on hover */
.screenshot-hover-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    color: #ffffff;
    background: rgba(15, 17, 24, 0.85);
    border: 1px solid var(--border-orange);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(4px);
}

.screenshot-hover-badge .badge-icon {
    color: var(--border-orange-bright);
    font-weight: bold;
}

/* Hover / Focus Trigger on Screenshot */
.project-screenshot-link:hover .screenshot-heat-aura,
.project-screenshot-link:focus .screenshot-heat-aura {
    opacity: 1;
    filter: blur(10px);
    animation: flamePulse 2.6s infinite alternate ease-in-out;
}

.project-screenshot-link:hover .screenshot-frame-glow,
.project-screenshot-link:focus .screenshot-frame-glow {
    border-color: #ff6a1a;
    box-shadow: 0 0 22px rgba(242, 106, 27, 0.5), 0 0 35px rgba(220, 45, 10, 0.25);
    transform: translateY(-1px);
}

.project-screenshot-link:hover .project-screenshot-img,
.project-screenshot-link:focus .project-screenshot-img {
    transform: scale(1.03);
    filter: contrast(1.05) brightness(1.03);
}

.project-screenshot-link:hover .screenshot-hover-badge,
.project-screenshot-link:focus .screenshot-hover-badge {
    opacity: 1;
    transform: translateY(0);
}

/* Project Info Column */
.project-info-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.project-header {
    margin-bottom: 0.8rem;
}

.project-entry-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
    letter-spacing: 0.02em;
    margin: 0;
}

.project-entry-body {
    font-size: 0.93rem;
    color: #cbd5e1;
    line-height: 1.68;
    margin-bottom: 1rem;
}

.project-entry-body p {
    margin-bottom: 0.75rem;
}

.project-entry-body p:last-child {
    margin-bottom: 0;
}

.project-entry-body ul {
    list-style: none;
    padding-left: 0;
    margin: 0.6rem 0 0.8rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.project-entry-body li {
    position: relative;
    padding-left: 1.35rem;
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.55;
}

.project-entry-body li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--border-orange);
    font-weight: bold;
    font-size: 0.95rem;
}

/* Tags List */
.project-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.1rem;
}

.project-tag-pill {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    background: rgba(242, 106, 27, 0.12);
    color: #ff9944;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    border: 1px solid rgba(242, 106, 27, 0.3);
    letter-spacing: 0.03em;
}

/* Action Button: Cyberpunk Outlined Style */
.project-action-bar {
    margin-top: auto;
    padding-top: 0.4rem;
}

.cyber-btn-project {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--border-orange-bright);
    background: rgba(242, 106, 27, 0.08);
    border: 1px solid var(--border-orange);
    padding: 0.55rem 1.1rem;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.cyber-btn-project:hover,
.cyber-btn-project:focus-visible {
    background: var(--border-orange);
    color: #ffffff;
    border-color: #ff7e33;
    transform: translateX(3px);
    box-shadow: 0 0 14px rgba(242, 106, 27, 0.45);
}

.cyber-btn-arrow {
    transition: transform 0.2s ease;
}

.cyber-btn-project:hover .cyber-btn-arrow {
    transform: translateX(3px);
}

/* Fallback Projects Grid (legacy cards) */
.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.project-card {
    background: rgba(18, 20, 26, 0.65);
    border: 1px solid rgba(242, 106, 27, 0.25);
    border-radius: 8px;
    padding: 1.2rem;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.project-card:hover {
    border-color: var(--border-orange);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.project-card h3 {
    font-size: 1.05rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.project-card p {
    font-size: 0.9rem;
    color: #9aa2b1;
    margin-bottom: 0.8rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tech span {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    background: rgba(242, 106, 27, 0.12);
    color: #ff9944;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(242, 106, 27, 0.3);
}

/* Personal & Contact Elements */
.interests-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
    margin-top: 1rem;
}

.interest-item {
    background: rgba(18, 20, 26, 0.5);
    border-left: 3px solid var(--border-orange);
    padding: 0.8rem 1rem;
    border-radius: 0 6px 6px 0;
}

.interest-item h4 {
    font-size: 0.95rem;
    color: #ffffff;
    margin-bottom: 0.3rem;
}

.interest-item p {
    font-size: 0.88rem;
    color: #9aa2b1;
    margin-bottom: 0;
}

/* ==========================================================================
   6.4 CONTACT SECTION (Cinematic Email Card & Cyber Form)
   ========================================================================== */
.contact-cinematic-section {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    animation: cyberFadeIn 0.35s ease forwards;
}

/* 1. Official Email Header Card */
.contact-email-card {
    position: relative;
    background: linear-gradient(135deg, rgba(20, 24, 32, 0.9) 0%, rgba(12, 14, 20, 0.95) 100%);
    border: 1px solid rgba(242, 106, 27, 0.35);
    border-radius: 10px;
    padding: 1.4rem 1.6rem;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(242, 106, 27, 0.04);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-email-card:hover {
    border-color: rgba(242, 106, 27, 0.65);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.6), 0 0 15px rgba(242, 106, 27, 0.15);
}

.contact-email-aura {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(242, 106, 27, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.contact-email-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-email-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--border-orange-bright);
    background: rgba(242, 106, 27, 0.12);
    border: 1px solid rgba(242, 106, 27, 0.3);
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    align-self: flex-start;
}

.contact-email-badge .badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00ff88;
    box-shadow: 0 0 6px #00ff88;
    animation: badgePulse 2s infinite ease-in-out;
}

@keyframes badgePulse {
    0%, 100% { opacity: 0.6; transform: scale(0.9); }
    50%      { opacity: 1; transform: scale(1.2); }
}

.contact-email-link-wrap {
    display: flex;
    align-items: center;
}

.contact-email-anchor {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-mono);
    font-size: 1.18rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease;
}

.contact-email-anchor .email-icon {
    color: var(--border-orange-bright);
    filter: drop-shadow(0 0 6px rgba(242, 106, 27, 0.6));
    transition: transform 0.2s ease;
}

.contact-email-anchor:hover {
    color: var(--border-orange-bright);
    transform: translateX(3px);
    text-shadow: 0 0 12px rgba(242, 106, 27, 0.5);
}

.contact-email-anchor:hover .email-icon {
    transform: scale(1.15) rotate(-5deg);
}

.contact-intro-text p {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #9aa2b1;
    margin: 0;
}

/* 2. Contact Form Container */
.cyber-form-container {
    background: rgba(14, 17, 24, 0.65);
    border: 1px solid rgba(242, 106, 27, 0.2);
    border-radius: 10px;
    padding: 1.6rem 1.8rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.cyber-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.cyber-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.cyber-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    position: relative;
}

.cyber-label {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #c0c6d4;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.required-star {
    color: var(--border-orange-bright);
    font-weight: bold;
}

.cyber-input-wrap {
    position: relative;
}

.cyber-input,
.cyber-textarea {
    width: 100%;
    background: rgba(8, 10, 15, 0.85);
    border: 1px solid rgba(242, 106, 27, 0.25);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 0.92rem;
    color: #f1f3f7;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.cyber-input::placeholder,
.cyber-textarea::placeholder {
    color: rgba(154, 162, 177, 0.45);
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.cyber-input:focus,
.cyber-textarea:focus {
    border-color: var(--border-orange-bright);
    background: rgba(12, 15, 22, 0.95);
    box-shadow: 0 0 12px rgba(242, 106, 27, 0.35), inset 0 0 6px rgba(242, 106, 27, 0.1);
}

.cyber-input.has-error,
.cyber-textarea.has-error {
    border-color: #ff4757 !important;
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.4) !important;
}

.cyber-textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 1.5;
}

/* Subtle glow line at bottom of inputs */
.input-glow-line {
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(242, 106, 27, 0.6), transparent);
    opacity: 0;
    transition: opacity 0.3s ease, left 0.3s ease, right 0.3s ease;
    pointer-events: none;
}

.cyber-input:focus ~ .input-glow-line,
.cyber-textarea:focus ~ .input-glow-line {
    opacity: 1;
    left: 0;
    right: 0;
}

.field-error-msg {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #ff5252;
    min-height: 1rem;
    display: none;
}

.field-error-msg.visible {
    display: block;
    animation: cyberFadeIn 0.2s ease forwards;
}

/* Privacy Consent Checkbox */
.cyber-consent-group {
    margin-top: 0.2rem;
}

.cyber-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.82rem;
    color: #9aa2b1;
    line-height: 1.45;
}

.cyber-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.cyber-checkbox-custom {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    background: rgba(8, 10, 15, 0.85);
    border: 1px solid rgba(242, 106, 27, 0.4);
    border-radius: 4px;
    margin-top: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.cyber-checkbox:focus-visible + .cyber-checkbox-custom {
    outline: 2px solid var(--border-orange-bright);
    outline-offset: 2px;
}

.cyber-checkbox:checked + .cyber-checkbox-custom {
    background: rgba(242, 106, 27, 0.25);
    border-color: var(--border-orange-bright);
    box-shadow: 0 0 8px rgba(242, 106, 27, 0.5);
}

.cyber-checkbox:checked + .cyber-checkbox-custom::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    position: absolute;
    top: 2px;
}

.cyber-link-accent {
    color: var(--border-orange-bright);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.cyber-link-accent:hover {
    color: #ffffff;
    text-shadow: 0 0 8px var(--border-orange);
}

/* Submit Button & Ember Glow */
.cyber-form-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 0.5rem;
}

.cyber-submit-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, rgba(242, 106, 27, 0.25) 0%, rgba(200, 75, 10, 0.35) 100%);
    border: 1.5px solid var(--border-orange-bright);
    border-radius: 6px;
    padding: 0.8rem 1.8rem;
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffffff;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.cyber-submit-btn .btn-ember-aura {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
    pointer-events: none;
}

.cyber-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(242, 106, 27, 0.6), inset 0 0 10px rgba(242, 106, 27, 0.3);
    background: linear-gradient(135deg, rgba(242, 106, 27, 0.4) 0%, rgba(200, 75, 10, 0.5) 100%);
}

.cyber-submit-btn:hover .btn-ember-aura {
    left: 150%;
}

.cyber-submit-btn:active {
    transform: translateY(0);
}

.cyber-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.cyber-submit-btn .btn-arrow {
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

.cyber-submit-btn:hover .btn-arrow {
    transform: translateX(4px);
}

/* Spinner */
.btn-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: btnSpin 0.7s linear infinite;
}

@keyframes btnSpin {
    to { transform: rotate(360deg); }
}

.cyber-submit-btn.is-loading .btn-spinner {
    display: inline-block;
}
.cyber-submit-btn.is-loading .btn-arrow {
    display: none;
}

/* Form Status Banner */
.cyber-form-status {
    padding: 0.9rem 1.2rem;
    border-radius: 6px;
    font-size: 0.88rem;
    line-height: 1.45;
    animation: cyberFadeIn 0.3s ease forwards;
}

.cyber-form-status.status-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.4);
    color: #49ff9b;
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.15);
}

.cyber-form-status.status-error {
    background: rgba(255, 71, 87, 0.12);
    border: 1px solid rgba(255, 71, 87, 0.45);
    color: #ff6b81;
    box-shadow: 0 0 12px rgba(255, 71, 87, 0.15);
}

/* Scroll Prompt Indicator below card */
.scroll-prompt-indicator {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 1.2rem;
    color: var(--border-orange);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.mouse-icon {
    width: 14px;
    height: 22px;
    border: 1.5px solid var(--border-orange);
    border-radius: 8px;
    position: relative;
}

.mouse-wheel {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 5px;
    background-color: var(--border-orange);
    border-radius: 1px;
    animation: mouseScroll 1.6s ease-in-out infinite;
}

@keyframes mouseScroll {
    0%   { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, 6px); }
}

.arrow-down {
    font-size: 0.9rem;
    animation: arrowBounce 1.6s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(4px); }
}

/* ==========================================================================
   7. FOOTER (Cyber Audio Player & Tech Badges)
   ========================================================================== */
.cyber-footer {
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 1rem 4rem 2rem 4rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1680px;
    margin: 0 auto;
}

/* Footer Player & Notice Column */
.footer-player-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
}

/* Cinematic Copyright Notice */
.cyber-copyright {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: rgba(164, 171, 184, 0.62);
    padding-left: 1.4rem;
    line-height: 1.4;
    transition: color 0.25s ease, opacity 0.25s ease;
    user-select: none;
}

.cyber-copyright:hover {
    color: var(--border-orange-bright);
    text-shadow: 0 0 8px rgba(242, 106, 27, 0.4);
}

.cyber-copyright.is-empty {
    display: none !important;
}

/* Stylized Audio Player */
.cyber-player {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    background: rgba(14, 16, 22, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(242, 106, 27, 0.35);
    border-radius: 30px;
    padding: 0.5rem 1.4rem;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.7);
}

.player-track-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 210px;
}

.player-music-icon {
    color: var(--border-orange-bright);
    font-size: 1.15rem;
    filter: drop-shadow(0 0 6px var(--border-orange));
    animation: iconSpin 8s linear infinite;
}

@keyframes iconSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.track-title {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #e5e7eb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.player-btn {
    background: none;
    border: none;
    color: #9aa2b1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem;
    border-radius: 50%;
    transition: color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.player-btn:hover {
    color: #ffffff;
    transform: scale(1.1);
}

.player-btn:focus-visible {
    outline: 2px solid var(--border-orange);
}

.player-btn.play-btn {
    width: 38px;
    height: 38px;
    background: rgba(242, 106, 27, 0.2);
    border: 1.5px solid var(--border-orange);
    color: var(--border-orange-bright);
    box-shadow: 0 0 10px rgba(242, 106, 27, 0.35);
}

.player-btn.play-btn:hover {
    background: rgba(242, 106, 27, 0.4);
    color: #ffffff;
    box-shadow: 0 0 16px rgba(242, 106, 27, 0.7);
}

.player-volume-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.4rem;
}

/* Custom Cyber Range Slider */
.cyber-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.cyber-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-orange-bright);
    box-shadow: 0 0 8px var(--border-orange);
    cursor: pointer;
}

.cyber-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-orange-bright);
    box-shadow: 0 0 8px var(--border-orange);
    border: none;
    cursor: pointer;
}

/* Footer Tech Badges */
.footer-badges {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.tech-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #626978;
    cursor: default;
    transition: color 0.2s ease, transform 0.2s ease;
}

.tech-badge:hover {
    color: var(--border-orange);
    transform: translateY(-2px);
    filter: drop-shadow(0 0 6px var(--border-orange));
}

@keyframes cyberFadeIn {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   8. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1200px) {
    :root {
        --cube-size: 220px;
    }
    .face-front  { transform: rotateY(0deg) translateZ(110px); }
    .face-back   { transform: rotateY(180deg) translateZ(110px); }
    .face-right  { transform: rotateY(90deg) translateZ(110px); }
    .face-left   { transform: rotateY(-90deg) translateZ(110px); }
    .face-top    { transform: rotateX(90deg) translateZ(110px); }
    .face-bottom { transform: rotateX(-90deg) translateZ(110px); }

    .cyber-viewport {
        gap: 1.5rem;
    }
}

@media (max-width: 992px) {
    .cyberflame-wrapper {
        background-position: 30% center;
    }
    .cyber-header {
        padding: 1.5rem 1.8rem 1rem 1.8rem;
    }
    .brand-link {
        font-size: 2.8rem;
    }
    .cyber-main {
        padding: 0 1.8rem;
    }
    .cyber-viewport {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        min-height: auto;
        padding: 1rem 0 3rem 0;
    }
    .cube-stage-column {
        order: 1;
        padding-left: 0;
    }
    .content-stage-column {
        order: 2;
        justify-content: center;
    }
    .cyber-card-wrapper {
        max-width: 100%;
    }
    .cyber-card {
        height: auto;
        min-height: 420px;
    }
    .cyber-footer {
        padding: 1rem 1.8rem 1.5rem 1.8rem;
    }
    .footer-inner {
        flex-direction: column;
        gap: 1.2rem;
    }
    .footer-player-col {
        width: 100%;
        align-items: center;
    }
    .cyber-copyright {
        padding-left: 0;
        text-align: center;
    }
    .cyber-player {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .cinematic-cube-stage {
        max-width: 380px;
        max-height: 55vh;
        margin: 0 auto;
    }
    .cinematic-cube-hud {
        width: 230px;
        height: 210px;
        top: 58.5%;
        left: 52%;
    }
    .cube-tile-btn {
        min-height: 48px;
    }
}

@media (max-width: 480px) {
    .cinematic-cube-stage {
        max-width: 320px;
        max-height: 50vh;
    }
    .cinematic-cube-hud {
        width: 210px;
        height: 190px;
        top: 58.5%;
        left: 52%;
    }
    .tile-label {
        font-size: 0.8rem;
    }
    .tile-svg {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 640px) {
    :root {
        --cube-size: 190px;
    }
    .face-front  { transform: rotateY(0deg) translateZ(95px); }
    .face-back   { transform: rotateY(180deg) translateZ(95px); }
    .face-right  { transform: rotateY(90deg) translateZ(95px); }
    .face-left   { transform: rotateY(-90deg) translateZ(95px); }
    .face-top    { transform: rotateX(90deg) translateZ(95px); }
    .face-bottom { transform: rotateX(-90deg) translateZ(95px); }

    .cinematic-transition-wrapper {
        width: 260px;
        height: 460px;
    }

    .cube-interaction-hint {
        bottom: -38px;
        font-size: 0.65rem;
    }

    .header-inner {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    .header-right-block {
        align-items: flex-start;
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
    }
    .track-title {
        max-width: 130px;
    }
    .cyber-slider {
        width: 50px;
    }

    /* About Section Mobile Stacking */
    .about-hero-intro {
        flex-direction: column;
        align-items: center;
        text-align: left;
        gap: 1.4rem;
    }
    .about-portrait-col {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        display: flex;
        justify-content: center;
    }
    .portrait-frame-container {
        width: 290px;
        height: 290px;
        max-width: 82vw;
        max-height: 82vw;
    }

    /* Projects Section Mobile Stacking */
    .cinematic-project-item {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        padding: 1.1rem;
    }
    .project-screenshot-col {
        width: 100%;
    }

    /* Contact Section Mobile Stacking */
    .contact-email-card {
        padding: 1.1rem 1.2rem;
    }
    .contact-email-anchor {
        font-size: 0.98rem;
        word-break: break-all;
    }
    .cyber-form-container {
        padding: 1.2rem 1.1rem;
    }
    .cyber-form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .cyber-submit-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   9. ACCESSIBILITY & PREFERS-REDUCED-MOTION
   ========================================================================== */
@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;
    }
    .cube-3d-object {
        transform: rotateX(0deg) rotateY(0deg) !important;
        transition: none !important;
    }
    .flame-layer {
        animation: none !important;
        opacity: 0.3 !important;
    }
    .cyberflame-wrapper::after {
        animation: none !important;
        opacity: 0.7 !important;
    }
    .embers-canvas {
        display: none !important;
    }
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--border-orange-bright);
    outline-offset: 3px;
}

/* ==========================================================================
   14. HOLOGRAPHIC REVEAL PROFILE PHOTO LIGHTBOX / MODAL
   ========================================================================== */

/* Body scroll lock when lightbox is active */
body.holo-modal-open {
    overflow: hidden !important;
}

/* Modal Backdrop */
.holo-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 999999;
    background: rgba(6, 8, 14, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.holo-modal-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Modal Dialog */
.holo-modal-dialog {
    position: relative;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.88);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.holo-modal-backdrop.is-open .holo-modal-dialog {
    transform: scale(1);
    opacity: 1;
}

/* Content Box with Delicate Glowing Frame */
.holo-modal-content {
    position: relative;
    background: #080a10;
    border-radius: 14px;
    border: 1.5px solid rgba(75, 90, 110, 0.85);
    box-shadow: 
        -12px 12px 35px rgba(242, 106, 27, 0.35), 
        12px -12px 35px rgba(0, 210, 255, 0.32), 
        0 30px 70px rgba(0, 0, 0, 0.92);
    overflow: hidden;
    max-width: 100%;
    max-height: 85vh;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Short blue-orange impulse across the border on open */
.holo-modal-backdrop.is-open .holo-modal-content {
    animation: holoBorderImpulse 0.55s ease-out 1;
}

@keyframes holoBorderImpulse {
    0% {
        border-color: rgba(75, 90, 110, 0.85);
        box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
    }
    50% {
        border-color: #00d2ff;
        box-shadow: 
            -18px 18px 50px rgba(242, 106, 27, 0.65), 
            18px -18px 50px rgba(0, 210, 255, 0.75), 
            inset 0 0 25px rgba(0, 210, 255, 0.3);
    }
    100% {
        border-color: rgba(85, 105, 130, 0.85);
        box-shadow: 
            -12px 12px 35px rgba(242, 106, 27, 0.35), 
            12px -12px 35px rgba(0, 210, 255, 0.32), 
            0 30px 70px rgba(0, 0, 0, 0.92);
    }
}

/* Image Viewport */
.holo-photo-viewport {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.holo-modal-photo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 12px;
}

/* Thin Blue Holographic Scanline (400-600ms single sweep) */
.holo-scanline {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg, 
        transparent 0%, 
        rgba(0, 210, 255, 0.3) 15%, 
        #00d2ff 48%, 
        #ffffff 50%, 
        #00d2ff 52%, 
        rgba(0, 210, 255, 0.3) 85%, 
        transparent 100%
    );
    box-shadow: 
        0 0 14px #00d2ff, 
        0 0 28px rgba(0, 210, 255, 0.85), 
        0 1px 4px rgba(255, 255, 255, 0.95);
    opacity: 0;
    pointer-events: none;
    z-index: 5;
}

.holo-modal-backdrop.is-open .holo-scanline {
    animation: holoScanSweep 0.5s cubic-bezier(0.2, 0.8, 0.4, 1) 1 forwards;
}

@keyframes holoScanSweep {
    0% {
        top: 0%;
        opacity: 1;
    }
    85% {
        top: 100%;
        opacity: 0.95;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Close Button 'X' */
.holo-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(12, 16, 24, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.holo-modal-close:hover,
.holo-modal-close:focus-visible {
    background: rgba(242, 106, 27, 0.25);
    border-color: #f26a1b;
    color: #ffaa6c;
    transform: rotate(90deg) scale(1.08);
    box-shadow: 0 0 14px rgba(242, 106, 27, 0.6);
    outline: none;
}

/* Modal Mobile Viewport */
@media (max-width: 768px) {
    .holo-modal-backdrop {
        padding: 1rem;
    }
    .holo-modal-dialog {
        width: 100%;
        max-width: 92vw;
    }
    .holo-modal-content {
        width: min(92vw, 75vh);
        height: min(92vw, 75vh);
        aspect-ratio: 1 / 1;
        max-height: 75vh;
        max-width: 92vw;
    }
    .holo-modal-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
}

/* ==========================================================================
   14. LITERARY SECTION — "BEYOND THE CODE / ОТВЪД КОДА"
   ========================================================================== */

.literary-personal-section {
    display: flex;
    flex-direction: column;
    gap: 3.25rem;
    padding-bottom: 2rem;
    position: relative;
}

/* Scroll reveal animations */
.literary-reveal-block {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.literary-reveal-block.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   SECTION A: HERO / ОТВЪД КОДА
   -------------------------------------------------------------------------- */
.literary-hero-section {
    position: relative;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.literary-hero-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.95fr;
    gap: 2.25rem;
    align-items: center;
}

.literary-hero-text-col {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.literary-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    color: #ff9944;
    text-transform: uppercase;
}

.literary-eyebrow .eyebrow-accent {
    color: #00e5ff;
    font-weight: 700;
}

.literary-eyebrow .eyebrow-code {
    color: #00e5ff;
    opacity: 0.85;
}

.literary-hero-title {
    font-size: 2.35rem;
    font-weight: 700;
    line-height: 1.18;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin: 0;
    text-shadow: 0 0 25px rgba(255, 255, 255, 0.2), 0 0 45px rgba(242, 106, 27, 0.25);
}

.literary-hero-subtitle {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-style: italic;
    color: #ffaa55;
    margin: 0;
    letter-spacing: 0.01em;
    line-height: 1.4;
}

.literary-lead-body {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    margin-top: 0.4rem;
}

.literary-lead-body p {
    font-size: 0.98rem;
    line-height: 1.75;
    color: #cdd4e0;
    margin: 0;
}

/* Atmospheric Glowing Folio Visual */
.literary-hero-visual-col {
    display: flex;
    justify-content: center;
    align-items: center;
}

.literary-book-stage {
    position: relative;
    width: 100%;
    max-width: 320px;
    padding: 1.5rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: radial-gradient(circle at 50% 50%, rgba(20, 26, 38, 0.6) 0%, rgba(10, 13, 19, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(242, 106, 27, 0.06);
    overflow: hidden;
}

.literary-book-stage::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff7700, #00e5ff, transparent);
    opacity: 0.7;
}

.literary-book-aura {
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255, 102, 0, 0.2) 0%, rgba(0, 229, 255, 0.08) 45%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    filter: blur(12px);
    animation: bookAuraPulse 4s ease-in-out infinite alternate;
}

@keyframes bookAuraPulse {
    0% { transform: translate(-50%, -50%) scale(0.92); opacity: 0.65; }
    100% { transform: translate(-50%, -50%) scale(1.12); opacity: 0.95; }
}

.literary-book-container {
    width: 100%;
    max-width: 260px;
    position: relative;
    z-index: 2;
    animation: bookFloat 5s ease-in-out infinite alternate;
}

@keyframes bookFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-6px); }
}

.literary-book-svg {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.65));
}

.book-ember-dot {
    animation: emberTwinkle 2.5s ease-in-out infinite alternate;
}
.book-ember-dot.e1 { animation-delay: 0.2s; }
.book-ember-dot.e2 { animation-delay: 0.7s; }
.book-ember-dot.e3 { animation-delay: 1.1s; }
.book-ember-dot.e4 { animation-delay: 1.6s; }
.book-ember-dot.e5 { animation-delay: 2.0s; }

@keyframes emberTwinkle {
    0% { opacity: 0.3; transform: scale(0.85); }
    100% { opacity: 1; transform: scale(1.3); filter: drop-shadow(0 0 4px currentColor); }
}

.literary-book-caption {
    margin-top: 0.85rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    color: #9aa4b7;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
}

.literary-book-caption .caption-marker {
    color: #f26a1b;
    font-size: 0.65rem;
}

/* --------------------------------------------------------------------------
   SECTION B: ПУБЛИКУВАНИ ПРОИЗВЕДЕНИЯ (PUBLISHED WORKS)
   -------------------------------------------------------------------------- */
.literary-works-section {
    position: relative;
}

.literary-section-header {
    text-align: center;
    margin-bottom: 1.85rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
}

.literary-section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.15em;
    color: #ff9944;
    padding: 0.25rem 0.75rem;
    background: rgba(242, 106, 27, 0.08);
    border: 1px solid rgba(242, 106, 27, 0.25);
    border-radius: 999px;
    text-transform: uppercase;
}

.literary-section-badge .badge-dot.orange {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f26a1b;
    box-shadow: 0 0 8px #f26a1b;
}

.literary-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.01em;
}

.literary-section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 240px;
    margin-top: 0.25rem;
}

.literary-section-divider .div-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15));
}
.literary-section-divider .div-line.right {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), transparent);
}

.literary-section-divider .div-diamond {
    color: #00e5ff;
    font-size: 0.7rem;
    opacity: 0.8;
}

/* 3-Column Literary Cards Grid */
.literary-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.literary-card {
    position: relative;
    border-radius: 12px;
    background: rgba(14, 18, 26, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
                border-color 0.35s ease,
                box-shadow 0.35s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.literary-card .card-glow-aura {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: radial-gradient(circle at 50% 0%, rgba(242, 106, 27, 0.12) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.literary-card:hover {
    transform: translateY(-5px);
    border-color: rgba(242, 106, 27, 0.6);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.55),
                0 0 22px rgba(242, 106, 27, 0.28),
                0 0 10px rgba(0, 229, 255, 0.2);
}

.literary-card:hover .card-glow-aura {
    opacity: 1;
}

.literary-card .card-inner-frame {
    position: relative;
    z-index: 1;
    padding: 1.4rem 1.25rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-top-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.9rem;
}

.work-year-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: rgba(255, 136, 0, 0.14);
    border: 1px solid rgba(255, 136, 0, 0.35);
    color: #ffaa44;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.work-tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.25);
    color: #00e5ff;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.card-title-wrap {
    margin-bottom: 0.85rem;
}

.work-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: #ffffff;
    margin: 0 0 0.4rem;
    letter-spacing: -0.01em;
}

.work-venue-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: #929bad;
    line-height: 1.35;
}

.work-venue-label .venue-icon {
    font-size: 0.85rem;
    opacity: 0.8;
}

.card-excerpt-wrap {
    flex: 1;
    margin-bottom: 1.25rem;
}

.card-excerpt-wrap p {
    font-size: 0.9rem;
    line-height: 1.62;
    color: #bcc3d1;
    margin: 0;
}

.card-action-wrap {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.literary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: all 0.25s ease;
    cursor: pointer;
    outline: none;
}

.literary-btn-primary {
    background: rgba(242, 106, 27, 0.12);
    border: 1px solid rgba(242, 106, 27, 0.5);
    color: #ffaa66;
}

.literary-btn-primary:hover,
.literary-btn-primary:focus-visible {
    background: #f26a1b;
    border-color: #ff8833;
    color: #0b0e14;
    box-shadow: 0 0 16px rgba(242, 106, 27, 0.6);
    transform: translateY(-1px);
}

.literary-btn-secondary {
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.4);
    color: #88edff;
}

.literary-btn-secondary:hover,
.literary-btn-secondary:focus-visible {
    background: #00e5ff;
    border-color: #55f3ff;
    color: #080a0f;
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.6);
    transform: translateY(-1px);
}

.literary-btn .btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease;
}

.literary-btn:hover .btn-icon {
    transform: translateX(2px) translateY(-1px);
}

/* --------------------------------------------------------------------------
   SECTION C: ИСТОРИИ, КОИТО ПРЕДСТОЯТ (UPCOMING STORIES)
   -------------------------------------------------------------------------- */
.literary-upcoming-section {
    position: relative;
}

.upcoming-panel {
    position: relative;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(16, 21, 30, 0.85) 0%, rgba(22, 18, 26, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-left: 3px solid #f26a1b;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.upcoming-ambient-glow {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(242, 106, 27, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    filter: blur(20px);
}

.upcoming-inner {
    position: relative;
    z-index: 1;
    padding: 1.75rem 2rem;
}

.upcoming-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.9rem;
}

.upcoming-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    color: #00e5ff;
    padding: 0.2rem 0.65rem;
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.25);
    border-radius: 999px;
    text-transform: uppercase;
}

.upcoming-badge .badge-dot.cyan {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00e5ff;
    box-shadow: 0 0 8px #00e5ff;
}

.upcoming-icon-wrap {
    color: #ff9944;
    opacity: 0.85;
}

.upcoming-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.85rem;
    letter-spacing: -0.01em;
}

.upcoming-body-text p {
    font-size: 0.98rem;
    line-height: 1.75;
    color: #cbd3e2;
    margin: 0;
}

.upcoming-footer-flair {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    opacity: 0.6;
}

.upcoming-footer-flair .flair-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(242, 106, 27, 0.4), transparent);
}

.upcoming-footer-flair .flair-symbol {
    color: #f26a1b;
    font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   SECTION D: ФИНАЛЕН ЦИТАТ (FINAL QUOTE)
   -------------------------------------------------------------------------- */
.literary-quote-section {
    position: relative;
    padding-top: 0.5rem;
}

.literary-quote-container {
    text-align: center;
    padding: 2.25rem 2rem;
    background: radial-gradient(circle at 50% 50%, rgba(20, 25, 36, 0.6) 0%, rgba(12, 15, 22, 0.75) 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.quote-opening-mark {
    font-family: Georgia, serif;
    font-size: 3.5rem;
    line-height: 1;
    color: rgba(242, 106, 27, 0.35);
    margin-bottom: -0.5rem;
}

.literary-quote-text {
    margin: 0;
    padding: 0;
}

.literary-quote-text p {
    font-size: 1.32rem;
    line-height: 1.55;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.015em;
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.18), 0 0 30px rgba(242, 106, 27, 0.2);
    margin: 0;
}

.literary-quote-divider {
    width: 90px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00e5ff, #f26a1b, transparent);
    margin: 1.25rem auto 1rem;
    border-radius: 2px;
}

.literary-quote-author {
    font-family: var(--font-heading);
    font-style: normal;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffaa55;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: inline-block;
}

.literary-quote-author .author-dash {
    color: #00e5ff;
}

/* --------------------------------------------------------------------------
   RESPONSIVE LAYOUT & MEDIA QUERIES
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
    .literary-hero-grid {
        grid-template-columns: 1fr;
        gap: 1.85rem;
    }

    .literary-hero-visual-col {
        order: 2;
    }

    .literary-hero-text-col {
        order: 1;
    }

    .literary-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .upcoming-inner {
        padding: 1.5rem 1.4rem;
    }

    .literary-quote-container {
        padding: 1.75rem 1.25rem;
    }

    .literary-quote-text p {
        font-size: 1.18rem;
    }
}

@media (max-width: 680px) {
    .literary-personal-section {
        gap: 2.25rem;
    }

    .literary-hero-title {
        font-size: 1.85rem;
    }

    .literary-hero-subtitle {
        font-size: 1.05rem;
    }

    .literary-section-title {
        font-size: 1.45rem;
    }

    .upcoming-title {
        font-size: 1.25rem;
    }

    .literary-quote-text p {
        font-size: 1.05rem;
    }
}

/* Reduced Motion Mode */
@media (prefers-reduced-motion: reduce) {
    .literary-reveal-block {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .literary-book-aura,
    .literary-book-container,
    .book-ember-dot {
        animation: none !important;
    }

    .literary-card {
        transition: none !important;
    }

    .literary-card:hover {
        transform: none !important;
    }
}

