@font-face {
    font-family: 'IBM Plex Mono';
    src: url('/fonts/IBMPlexMono-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Mono';
    src: url('/fonts/IBMPlexMono-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('/fonts/Montserrat-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

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

html {
    scroll-behavior: auto;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

body {
    font-family: 'IBM Plex Mono', monospace;
    background: #0d0d1a;
    color: #ffffff;
    position: relative;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    margin: 0;
}

.l-wrapper {
    position: relative;
    z-index: 2;
    min-width: 320px;
    display: flex;
    flex-direction: column;
}

.l-video-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.5;
    pointer-events: none;
}

.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.2;
    pointer-events: none;
}

.l-header {
    background: rgba(0, 0, 0, 0.9);
    padding: 12px 20px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid #ff69b4;
    box-shadow: 0 0 12px rgba(255, 105, 180, 0.4);
}

.l-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
}

.l-header__title {
    margin: 0;
}

.title-logo {
    max-height: 35px;
    width: auto;
    filter: drop-shadow(0 0 8px #ff69b4);
    transition: transform 0.3s ease;
}

.title-logo:hover {
    transform: scale(1.05);
}

.l-header__nav ul {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.l-header__nav a {
    font-family: 'Montserrat', sans-serif;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color 0.3s, text-shadow 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.l-header__nav a:hover,
.l-header__nav a.active {
    color: #ff4d4d;
    text-shadow: 0 0 6px #ff4d4d;
}

.section-symbol {
    width: 12px;
    height: 12px;
    transition: transform 0.3s ease;
}

.l-header__nav a:hover .section-symbol,
.l-header__nav a.active .section-symbol {
    transform: scale(1.1);
}

.burger-menu {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.burger-menu__line {
    width: 22px;
    height: 2px;
    background: #ff69b4;
    margin: 4px 0;
    transition: all 0.3s ease;
}

.burger-menu.active .burger-menu__line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu.active .burger-menu__line:nth-child(2) {
    opacity: 0;
}

.burger-menu.active .burger-menu__line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.l-main {
    position: relative;
    padding-top: 50px;
    z-index: 2;
    height: auto;
    min-height: 100vh;
    overflow-y: visible;
    overflow-x: hidden;
}

.c-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    box-sizing: border-box;
    z-index: 3;
}

.c-section__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.7;
    z-index: 0;
}

.door-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.door {
    position: absolute;
    width: calc(50% - 1px); /* Adjust for single border overlap */
    height: 100%;
    background-size: 100% 100%; /* Ensure full image visibility */
    background-repeat: no-repeat;
    border: 1px solid #ff69b4;
    box-shadow: 0 0 10px rgba(255, 105, 180, 0.4);
    animation: neon-door 2s infinite ease-in-out;
}

.door-left {
    left: 0;
    background-image: url('/images/doorL.webp');
    background-position: right; /* Align image to right edge */
    border-right: none; /* Remove right border to avoid overlap */
}

.door-right {
    right: 0;
    background-image: url('/images/doorR.webp');
    background-position: left; /* Align image to left edge */
    border-left: none; /* Remove left border to avoid overlap */
}

@keyframes neon-door {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 105, 180, 0.3); }
    50% { box-shadow: 0 0 12px rgba(77, 168, 255, 0.5); }
}

.fragment-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 11;
    pointer-events: none;
}

.fragment {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #ff69b4, transparent);
    border-radius: 50%;
    box-shadow: 0 0 4px #ff69b4;
}

.fragment-neon {
    background: radial-gradient(circle, #4da8ff, transparent);
    box-shadow: 0 0 6px #4da8ff;
}

#loading-hologram {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 40px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #ff69b4;
    border-radius: 5px;
    display: none;
    z-index: 12;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.progress-label {
    font-family: 'IBM Plex Mono', monospace;
    color: #ff69b4;
    font-size: 0.9em;
    margin-bottom: 5px;
    text-shadow: 0 0 4px #ff69b4;
}

.progress {
    width: 0%;
    height: 20px;
    background: linear-gradient(90deg, #ff69b4, #4da8ff);
    border-radius: 3px;
}

.c-section__content {
    max-width: 800px;
    width: 100%;
    text-align: center;
    background: rgba(0, 0, 0, 0.85);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #ff69b4;
    box-shadow: 0 0 12px rgba(255, 105, 180, 0.3);
    z-index: 5;
    position: relative;
}

.c-section__content--centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.c-section__content--asymetric, .c-section__content--projects {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    max-width: 1200px;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
}

.title-container {
    flex: 0 0 40%;
    max-width: 400px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #ff69b4;
    border-radius: 0 10px 10px 0;
    box-shadow: 0 0 15px rgba(255, 105, 180, 0.4);
    position: relative;
    z-index: 5;
}

.title-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid #4da8ff;
    border-radius: 0 12px 12px 0;
    z-index: -1;
    animation: neon-pulse 3s infinite ease-in-out;
}

.title-centered {
    flex: 0 0 100%;
    max-width: 600px;
    margin: 0 auto 20px;
    border-radius: 10px;
}

.title-centered::before {
    border-radius: 12px;
}

.title-left {
    margin-right: auto;
}

.title-right {
    margin-left: auto;
    border-radius: 10px 0 0 10px;
}

.title-right::before {
    border-radius: 12px 0 0 12px;
}

.title-top-left {
    flex: 0 0 100%;
    max-width: 500px;
    margin: 0 0 20px 20px;
}

.content-container {
    flex: 0 0 50%;
    max-width: 600px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #4da8ff;
    border-radius: 10px 0 10px 0;
    box-shadow: 0 0 15px rgba(77, 168, 255, 0.4);
    position: relative;
    z-index: 5;
}

.content-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid #ff69b4;
    border-radius: 12px 0 12px 0;
    z-index: -1;
    animation: neon-pulse 3s infinite ease-in-out;
}

.content-aligned {
    margin-left: 0;
    margin-right: auto;
}

.content-right {
    margin-left: auto;
}

.content-diagonal {
    transform: skew(-5deg);
    border-radius: 10px;
}

.content-cascade {
    margin-top: 50px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    z-index: 5;
}

.project-card {
    position: relative;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #ff69b4;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 0 15px rgba(255, 105, 180, 0.4);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px) rotateY(5deg);
}

.project-card img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border: 1px solid #ff69b4;
    border-radius: 5px;
    box-shadow: 0 0 8px rgba(255, 105, 180, 0.4);
}

.threejs-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 10px;
}

.section-symbol-large {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
    filter: drop-shadow(0 0 8px #ff69b4);
}

.featured-image {
    max-width: 100%;
    max-height: 220px;
    margin: 12px auto;
    display: block;
    border: 1px solid #ff69b4;
    border-radius: 5px;
    box-shadow: 0 0 8px rgba(255, 105, 180, 0.4);
    transition: transform 0.3s ease;
}

.featured-image:hover {
    transform: scale(1.03);
}

h2.gothic {
    font-family: 'Orbitron', sans-serif;
    color: #ffffff;
    font-size: clamp(2.2em, 5vw, 3em);
    margin-bottom: 10px;
    text-shadow: 0 0 10px #ff69b4;
    text-transform: uppercase;
}

.terminal-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(1.2em, 3vw, 1.4em);
    line-height: 1.6;
    color: #ffffff;
    text-shadow: 0 0 2px #ff69b4;
}

.retro-btn {
    font-family: 'Montserrat', sans-serif;
    background: #ff69b4;
    color: #0d0d1a;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
    text-decoration: none;
    display: inline-block;
    margin-top: 12px;
}

.retro-btn:hover {
    background: #ff4d4d;
    box-shadow: 0 0 8px #ff4d4d;
    transform: translateY(-2px);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    padding: 12px;
    max-width: 100%;
    transform: skew(-5deg);
    z-index: 5;
}

.gallery-grid img {
    width: 100%;
    height: auto;
    border: 1px solid #ff69b4;
    border-radius: 5px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 0 8px #ff4d4d;
}

.contact-form {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    z-index: 5;
}

.contact-form input,
.contact-form textarea {
    font-family: 'IBM Plex Mono', monospace;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #ff69b4;
    padding: 12px;
    color: #ffffff;
    border-radius: 5px;
    font-size: clamp(1.1em, 2.5vw, 1.2em);
    width: 100%;
    transition: box-shadow 0.3s;
}

.contact-form input:hover,
.contact-form textarea:hover {
    box-shadow: 0 0 8px #ff69b4;
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.form-message {
    font-size: clamp(1em, 2.5vw, 1.1em);
    color: #ff69b4;
}

.form-message.error {
    color: #ff4d4d;
}

.l-footer {
    background: rgba(0, 0, 0, 0.9);
    padding: 15px;
    text-align: center;
    border-top: 1px solid #ff69b4;
    box-shadow: 0 0 12px rgba(255, 105, 180, 0.4);
    z-index: 2;
}

.l-footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 100% 3px;
    animation: scanline 6s linear infinite;
    z-index: -1;
}

@keyframes neon-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes scanline {
    0% { background-position: 0 0; }
    100% { background-position: 0 100%; }
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #0d0d1a;
}

::-webkit-scrollbar-thumb {
    background: #ff69b4;
    border-radius: 6px;
    border: 2px solid #0d0d1a;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff4d4d;
}

@media (max-width: 768px) {
    .l-header {
        padding: 8px;
    }

    .title-logo {
        max-height: 30px;
    }

    .burger-menu {
        display: block;
        position: fixed;
        right: 12px;
        top: 12px;
        background: #ff69b4;
        padding: 8px;
        border-radius: 5px;
        border: 1px solid #ffffff;
        box-shadow: 0 0 8px #ff69b4;
    }

    .l-header__nav {
        display: none;
        position: fixed;
        top: 50px;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.95);
        padding: 12px;
        border-bottom: 1px solid #ff69b4;
        box-shadow: 0 5px 8px rgba(255, 105, 180, 0.4);
        z-index: 2000;
    }

    .l-header__nav.active {
        display: block;
    }

    .l-header__nav ul {
        flex-direction: column;
        gap: 10px;
    }

    .l-header__nav a {
        font-size: 0.85em;
        padding: 6px;
    }

    .section-symbol {
        width: 10px;
        height: 10px;
    }

    .l-main {
        padding-top: 50px;
    }

    .c-section {
        padding: 40px 12px;
        min-height: 100vh;
    }

    .c-section__content--asymetric, .c-section__content--projects {
        flex-direction: column;
        align-items: center;
    }

    .title-container {
        flex: 0 0 100%;
        max-width: 100%;
        margin: 0 0 20px;
        border-radius: 10px;
    }

    .title-container::before {
        border-radius: 12px;
    }

    .title-right, .title-left, .title-top-left {
        margin: 0 auto;
    }

    .content-container {
        flex: 0 0 100%;
        max-width: 100%;
        border-radius: 10px;
    }

    .content-container::before {
        border-radius: 12px;
    }
}
