:root {
    --bg-color: #e9e9e4;
    --panel: #f7f7f2;
    --panel-strong: #ffffff;
    --ink: #151515;
    --ink-soft: #4d5357;
    --line-main: #171717;
    --line-light: rgba(20, 20, 20, 0.18);
    --grid-color: rgba(30, 34, 36, 0.08);
    --accent-yellow: #ffe600;
    --accent-cyan: #00d8e6;
    --accent-cyan-dark: #00a9b9;
    --accent-magenta: #ff3f9f;
    --accent-green: #8ee24b;
    --shadow-hard: 10px 10px 0 rgba(0, 0, 0, 0.12);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --view-padding: clamp(22px, 3.8vw, 58px);
}

@media (pointer: fine) {
    *, *::before, *::after { cursor: none !important; }
}

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

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    background:
        linear-gradient(90deg, rgba(255, 230, 0, 0.12), transparent 22%, transparent 78%, rgba(0, 216, 230, 0.10)),
        var(--bg-color);
    color: var(--ink);
    font-family: 'Outfit', 'Jost', -apple-system, BlinkMacSystemFont, 'Microsoft YaHei', sans-serif;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px),
        linear-gradient(0deg, rgba(0,0,0,0.035) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, transparent 0, #000 18%, #000 82%, transparent 100%);
}

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

::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--line-light);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-yellow); }

#custom-cursor {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 14px;
    height: 14px;
    border: 2px solid var(--line-main);
    background: var(--accent-yellow);
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width 0.18s ease, height 0.18s ease, background 0.18s ease, border-radius 0.18s ease;
    z-index: 999999;
    mix-blend-mode: multiply;
}

@media (pointer: fine) {
    #custom-cursor { display: block; }
}

#custom-cursor.hovering {
    width: 42px;
    height: 42px;
    background: transparent;
    border: 2px dashed var(--line-main);
}

.boot-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 45%, rgba(255, 230, 0, 0.22), transparent 26%),
        linear-gradient(135deg, rgba(0, 216, 230, 0.12), transparent 34%),
        #e9e9e4;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.boot-loader::before {
    content: "";
    position: absolute;
    inset: -30%;
    background:
        linear-gradient(90deg, rgba(0,0,0,0.08) 1px, transparent 1px),
        linear-gradient(0deg, rgba(0,0,0,0.07) 1px, transparent 1px);
    background-size: 58px 58px;
    transform: perspective(900px) rotateX(58deg) translateY(-8vh);
    transform-origin: center;
}

.boot-loader::after {
    content: "ACCESS DISTRIBUTION";
    position: absolute;
    left: -4vw;
    bottom: 7vh;
    color: rgba(0,0,0,0.045);
    font-size: clamp(72px, 12vw, 180px);
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    transform: rotate(-4deg);
}

.boot-loader.is-complete {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.boot-noise {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        repeating-linear-gradient(0deg, transparent 0 2px, rgba(255,255,255,0.16) 2px 3px),
        repeating-linear-gradient(90deg, transparent 0 30px, rgba(255,230,0,0.14) 30px 34px);
    mix-blend-mode: multiply;
    opacity: 0.5;
    animation: bootNoise 0.34s steps(2, end) infinite;
}

.boot-panel {
    position: relative;
    z-index: 2;
    width: min(720px, 100%);
    padding: clamp(24px, 4vw, 42px);
    border: 2px solid var(--line-main);
    border-left: 10px solid var(--accent-yellow);
    background: rgba(255,255,255,0.9);
    box-shadow: 16px 16px 0 rgba(0,0,0,0.12);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 32px), calc(100% - 32px) 100%, 0 100%);
}

.boot-panel::before,
.boot-panel::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.boot-panel::before {
    right: 24px;
    top: 24px;
    width: 118px;
    height: 118px;
    border: 2px dashed rgba(0,0,0,0.25);
    border-radius: 50%;
    animation: slowRotate 12s linear infinite;
}

.boot-panel::after {
    right: 42px;
    top: 70px;
    width: 130px;
    height: 18px;
    background: repeating-linear-gradient(90deg, var(--line-light) 0 3px, transparent 3px 7px);
}

.boot-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 42px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
    font-weight: 900;
}

.boot-brand {
    padding: 4px 8px;
    background: var(--ink);
    color: #fff;
}

.boot-state {
    color: var(--ink);
    border-bottom: 3px solid var(--accent-cyan);
}

.boot-title {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 520px;
    margin-bottom: 20px;
}

.boot-title span {
    color: var(--ink-soft);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 13px;
    font-weight: 900;
}

.boot-title strong {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    padding: 8px 16px;
    border: 2px solid var(--line-main);
    background: var(--accent-yellow);
    font-size: clamp(1.75rem, 3.5vw, 2.8rem);
    font-weight: 900;
    line-height: 1.05;
    white-space: nowrap;
    box-shadow: 7px 7px 0 rgba(0,0,0,0.12);
}

.boot-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 34px;
}

.boot-metrics span {
    padding: 5px 8px;
    border: 1px solid var(--line-light);
    background: rgba(255,255,255,0.8);
    color: var(--ink-soft);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 11px;
    font-weight: 900;
}

.boot-progress-wrap {
    margin-bottom: 18px;
}

.boot-progress-track {
    position: relative;
    height: 16px;
    overflow: hidden;
    border: 2px solid var(--line-main);
    background:
        repeating-linear-gradient(90deg, rgba(0,0,0,0.12) 0 1px, transparent 1px 12px),
        #fff;
}

.boot-progress-bar {
    width: 0%;
    height: 100%;
    background:
        repeating-linear-gradient(45deg, rgba(0,0,0,0.22) 0 4px, transparent 4px 8px),
        var(--accent-yellow);
    box-shadow: 0 0 22px rgba(255,230,0,0.55);
    transition: width 0.16s linear;
}

.boot-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 8px;
    color: var(--ink-soft);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
    font-weight: 900;
}

.boot-progress-meta span:first-child {
    color: var(--ink);
    font-size: 1.15rem;
}

.boot-log {
    display: grid;
    gap: 6px;
    color: var(--ink-soft);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
    font-weight: 800;
}

.boot-log span {
    animation: bootLogPulse 1.1s ease-in-out infinite;
}

.boot-log span:nth-child(2) { animation-delay: 0.18s; }
.boot-log span:nth-child(3) { animation-delay: 0.36s; }

body.system-booting .container,
body.system-booting .edge-deco,
body.system-booting .grid-background-wrapper {
    opacity: 0;
}

body.system-online .container,
body.system-online .edge-deco,
body.system-online .grid-background-wrapper {
    animation: powerOnFlicker 1.15s steps(1, end) both;
}

body.system-online .content-frame,
body.system-online .character-card,
body.system-online .nav-btn,
body.system-online .banner-heading,
body.system-online .bracket-frame,
body.system-online .download-panel,
body.system-online .kpi-card {
    animation: panelVoltage 1.2s steps(1, end) both;
}

@keyframes bootNoise {
    0% { transform: translate(0, 0); opacity: 0.38; }
    50% { transform: translate(-6px, 3px); opacity: 0.56; }
    100% { transform: translate(4px, -2px); opacity: 0.44; }
}

@keyframes bootLogPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes powerOnFlicker {
    0% { opacity: 0; filter: brightness(2.2) contrast(1.2); transform: translateY(2px); }
    7% { opacity: 0.25; }
    10% { opacity: 0; }
    16% { opacity: 0.82; filter: brightness(1.8) contrast(1.28); }
    22% { opacity: 0.18; }
    28% { opacity: 1; filter: brightness(1.35) contrast(1.1); }
    34% { opacity: 0.45; }
    42% { opacity: 1; transform: translateX(-1px); }
    56% { opacity: 0.72; filter: brightness(1.18); }
    68% { opacity: 1; filter: brightness(1.05); transform: none; }
    100% { opacity: 1; filter: none; transform: none; }
}

@keyframes panelVoltage {
    0% { box-shadow: 0 0 0 rgba(255,230,0,0); }
    18% { box-shadow: 0 0 18px rgba(255,230,0,0.46), 4px 4px 0 rgba(0,0,0,0.12); }
    24% { box-shadow: none; }
    38% { box-shadow: 0 0 12px rgba(0,216,230,0.38), 7px 7px 0 rgba(0,0,0,0.10); }
    55% { box-shadow: none; }
    100% { }
}

.grid-background-wrapper {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    perspective: 1100px;
}

.grid-background {
    position: absolute;
    left: -35%;
    top: -45%;
    width: 170%;
    height: 170%;
    background-image:
        linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
    background-size: 64px 64px;
    transform: rotateX(58deg) translateY(-12vh);
}

.bg-slash,
.bg-slash-2 {
    position: absolute;
    top: -12%;
    height: 128%;
    transform: rotate(28deg);
}

.bg-slash {
    left: 28%;
    width: 13vw;
    background: repeating-linear-gradient(90deg, transparent 0 14px, rgba(255, 230, 0, 0.18) 14px 18px);
}

.bg-slash-2 {
    left: 63%;
    width: 7vw;
    background: repeating-linear-gradient(90deg, transparent 0 18px, rgba(0, 216, 230, 0.12) 18px 22px);
}

.bg-fragment-text {
    position: absolute;
    font-size: clamp(90px, 13vw, 220px);
    font-weight: 900;
    color: rgba(0, 0, 0, 0.035);
    white-space: nowrap;
    line-height: 0.85;
}

.text-1 {
    top: 9%;
    left: -6%;
    transform: rotate(-5deg);
}

.text-2 {
    right: -8%;
    bottom: 4%;
    transform: rotate(3deg);
}

.wireframe-obj {
    position: absolute;
    right: 14%;
    top: 28%;
    width: 108px;
    height: 108px;
    opacity: 0.22;
    transform-style: preserve-3d;
    animation: cubeDrift 18s linear infinite;
}

.cube-face {
    position: absolute;
    width: 108px;
    height: 108px;
    border: 2px dashed var(--line-main);
    background: rgba(255, 255, 255, 0.16);
}

.cube-face.front { transform: translateZ(54px); }
.cube-face.back { transform: rotateY(180deg) translateZ(54px); }
.cube-face.right { transform: rotateY(90deg) translateZ(54px); }
.cube-face.left { transform: rotateY(-90deg) translateZ(54px); }
.cube-face.top { transform: rotateX(90deg) translateZ(54px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(54px); }

@keyframes cubeDrift {
    from { transform: rotateX(48deg) rotateY(0deg) rotateZ(18deg); }
    to { transform: rotateX(48deg) rotateY(360deg) rotateZ(18deg); }
}

.edge-deco {
    position: fixed;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.mono-text {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
}

.accent-text {
    color: var(--ink);
    background: var(--accent-yellow);
    padding: 3px 7px;
    border: 1px solid var(--line-main);
}

.top-left { top: 20px; left: 20px; }
.top-right {
    top: 20px;
    right: 20px;
    flex-direction: column;
    align-items: flex-end;
}
.bottom-left {
    bottom: 20px;
    left: 20px;
    align-items: flex-end;
}
.bottom-right {
    right: 20px;
    bottom: 20px;
}

.plus-icon {
    width: 13px;
    height: 13px;
    position: relative;
}

.plus-icon::before,
.plus-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    background: var(--line-main);
    transform: translate(-50%, -50%);
}

.plus-icon::before { width: 100%; height: 2px; }
.plus-icon::after { width: 2px; height: 100%; }

.circuit-line {
    position: relative;
    width: 80px;
    height: 2px;
    background: var(--line-main);
}

.circuit-line::after {
    content: "";
    position: absolute;
    right: 0;
    top: -3px;
    width: 7px;
    height: 7px;
    background: var(--line-main);
}

.mono-glow {
    text-align: right;
    text-shadow: 0 0 16px rgba(255, 230, 0, 0.35);
}

.circuit-line-vert {
    width: 2px;
    height: 60px;
    background: var(--line-main);
}

.circuit-line-vert.bit-short { height: 30px; }

.dot-matrix {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
    opacity: 0.56;
    letter-spacing: 2px;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
}

.broken-arrow-right {
    position: relative;
    width: 42px;
    height: 11px;
    margin-right: 12px;
    border: 2px solid var(--line-main);
    border-right: 0;
}

.broken-arrow-right::after {
    content: "";
    position: absolute;
    right: -12px;
    top: -2px;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 10px solid var(--line-main);
}

.color-ribbon {
    display: flex;
    height: 5px;
}

.cr.cyan { width: 26px; background: var(--accent-cyan); }
.cr.magenta { width: 18px; background: var(--accent-magenta); }
.cr.yellow-stripe {
    width: 46px;
    background: repeating-linear-gradient(45deg, var(--accent-yellow), var(--accent-yellow) 3px, transparent 3px, transparent 6px);
}

.edge-ribbon { margin-top: 5px; }

.container {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: clamp(28px, 4vw, 52px);
    width: 100vw;
    height: 100vh;
    padding: calc(var(--view-padding) + 10px) var(--view-padding);
}

.sidebar {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: space-between;
    gap: 22px;
}

.profile-section { flex: 0 0 auto; }

.character-card {
    position: relative;
    height: 330px;
    margin-bottom: 16px;
    overflow: hidden;
    border: 2px solid var(--line-main);
    background: var(--panel-strong);
    box-shadow: var(--shadow-hard);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 32px), calc(100% - 32px) 100%, 0 100%);
}

.character-card::before {
    content: "OPERATOR // COMBAT DESIGNER";
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 2;
    padding: 3px 7px;
    background: var(--ink);
    color: #fff;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 10px;
    font-weight: 900;
}

.character-card::after {
    content: "";
    position: absolute;
    right: -58px;
    top: -32px;
    width: 188px;
    height: 188px;
    border: 24px solid rgba(255, 230, 0, 0.85);
    border-radius: 50%;
}

.card-bg-pattern {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, transparent 0 68%, rgba(0, 216, 230, 0.12) 68% 100%),
        repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.045) 0 2px, transparent 2px 9px);
}

.profile-mech {
    position: absolute;
    right: -48px;
    top: 18px;
    width: 330px;
    max-width: none;
    opacity: 0.78;
    filter: contrast(1.08) saturate(0.96);
}

.industrial-emblem {
    position: absolute;
    inset: 42px 24px 88px 24px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    pointer-events: none;
}

.emblem-hex {
    width: 60px;
    height: 69px;
    border: 4px solid var(--accent-yellow);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    box-shadow: inset 0 0 0 10px rgba(255, 230, 0, 0.22);
    animation: slowRotate 16s linear infinite;
}

.emblem-hex::before {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    margin: 17px;
    background: var(--line-main);
    transform: rotate(45deg);
}

.emblem-text {
    margin-top: 10px;
    color: rgba(0, 0, 0, 0.24);
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 10px;
    line-height: 1;
    transform: translateX(4px);
}

.emblem-barcode {
    width: 76%;
    height: 16px;
    margin-top: 14px;
    background: repeating-linear-gradient(90deg, rgba(0,0,0,0.35) 0 3px, transparent 3px 6px, rgba(0,0,0,0.35) 6px 12px, transparent 12px 16px);
}

.card-overlays {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 20px;
    z-index: 3;
}

.card-label {
    display: inline-block;
    padding: 2px 5px;
    background: var(--ink);
    color: #fff;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 10px;
    font-weight: 900;
}

.card-label::before { content: "PROFILE_UNLOCKED"; }

.card-name-box {
    width: min(100%, 278px);
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.94);
    border-left: 5px solid var(--accent-yellow);
    box-shadow: 6px 6px 0 rgba(0,0,0,0.12);
}

.cn-sub {
    display: block;
    margin-bottom: 2px;
    color: var(--ink-soft);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 10px;
    font-weight: 800;
}

.cn-main {
    position: relative;
    font-size: 1.85rem;
    font-weight: 900;
    line-height: 1.05;
}

.cn-icon {
    position: absolute;
    right: 0;
    bottom: 2px;
    color: var(--ink-soft);
    font-size: 1rem;
}

.cn-stars {
    margin-top: 4px;
    color: var(--ink);
    font-size: 10px;
    letter-spacing: 4px;
}

.class-title {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line-light);
    background: rgba(255,255,255,0.58);
    font-weight: 900;
}

.class-icon {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    background: var(--ink);
    transform: rotate(45deg);
}

.main-nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
}

.nav-btn {
    all: unset;
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 14px;
    overflow: hidden;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.42);
    font-weight: 900;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.nav-btn::before {
    content: "";
    position: absolute;
    inset: auto auto 0 0;
    width: 0;
    height: 5px;
    background: var(--accent-yellow);
    transition: width 0.35s var(--ease-out-expo);
}

.nav-btn:hover {
    transform: translateX(4px);
    border-color: var(--line-light);
    background: rgba(255, 255, 255, 0.8);
}

.nav-btn.active {
    border-color: var(--line-main);
    background: var(--panel-strong);
    box-shadow: 6px 6px 0 rgba(0,0,0,0.08);
}

.nav-btn.active::before { width: 62%; }
.nav-num {
    color: var(--ink-soft);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.9rem;
}
.nav-label { letter-spacing: 0; }
.nav-deco { display: none; }

.social-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.social-link {
    display: flex;
    min-height: 50px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-light);
    border-left: 4px solid var(--accent-magenta);
    background: rgba(255,255,255,0.74);
    color: var(--ink);
    text-decoration: none;
    transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.social-link:nth-child(1) { border-left-color: var(--accent-yellow); }
.social-link:nth-child(2) { border-left-color: var(--accent-cyan); }
.social-link:nth-child(3) { border-left-color: var(--accent-magenta); }
.sl-cn { font-size: 0.92rem; font-weight: 900; }
.sl-en {
    margin-top: 2px;
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 1px;
    opacity: 0.72;
}
.social-link:hover {
    transform: translateY(-3px);
    background: var(--ink);
    color: var(--accent-yellow);
}

.social-link[data-missing-file="true"],
.ext-btn[data-missing-file="true"] {
    opacity: 0.55;
    filter: grayscale(1);
}

.content-area {
    min-width: 0;
    height: 100%;
}

.content-frame {
    position: relative;
    width: 100%;
    height: 100%;
    border: 2px solid var(--line-light);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.96), rgba(245,246,241,0.94)),
        var(--panel);
    box-shadow: 18px 18px 0 rgba(0,0,0,0.08);
}

.content-frame::before {
    content: "";
    position: absolute;
    inset: 16px 16px auto auto;
    width: 154px;
    height: 22px;
    background: repeating-linear-gradient(90deg, var(--line-light) 0 2px, transparent 2px 6px);
    opacity: 0.5;
}

.terminal-strip {
    position: absolute;
    top: 0;
    left: 132px;
    right: 26px;
    z-index: 18;
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    height: 30px;
    padding-top: 7px;
    color: var(--ink-soft);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 10px;
    font-weight: 900;
    overflow: hidden;
    white-space: nowrap;
}

.terminal-strip span {
    flex: 0 1 auto;
}

.tech-line {
    position: absolute;
    background: var(--line-main);
}

.tech-line.top {
    top: 0;
    left: 58px;
    right: 18%;
    height: 2px;
}

.tech-line.left {
    top: 58px;
    bottom: 18%;
    left: 0;
    width: 2px;
}

.corner-tech {
    position: absolute;
    z-index: 18;
    width: 24px;
    height: 24px;
    border: 2px solid var(--line-main);
}

.corner-tech.top-left {
    top: -2px;
    left: -2px;
    border-right: 0;
    border-bottom: 0;
}

.corner-tech.top-left::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 28px;
    width: 8px;
    height: 8px;
    border: 2px solid var(--line-main);
    background: var(--accent-yellow);
}

.corner-tech.bottom-right {
    right: -2px;
    bottom: -2px;
    border-left: 0;
    border-top: 0;
}

.view-container {
    position: absolute;
    inset: 2px;
    overflow: hidden;
}

.view-section {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    padding: clamp(36px, 5vw, 64px) clamp(32px, 5.6vw, 72px) 72px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity 0.32s ease, transform 0.42s var(--ease-out-expo);
}

.view-section.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.banner-heading {
    position: relative;
    margin-bottom: 30px;
    padding-left: 20px;
}

.banner-heading::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 0;
    width: 4px;
    background: var(--accent-cyan);
}

.bh-top {
    display: flex;
    margin-bottom: 7px;
}

.bh-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 9px;
    background: rgba(0, 0, 0, 0.08);
    font-size: 0.82rem;
    font-weight: 900;
}

.inf-icon {
    display: inline-block;
    transform: rotate(90deg);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.bh-main {
    display: inline-block;
    max-width: 100%;
    padding: 7px 22px 8px;
    border: 2px solid var(--line-main);
    background: var(--accent-yellow);
    box-shadow: 7px 7px 0 rgba(0,0,0,0.10);
}

.bh-main h2 {
    margin-bottom: 6px;
    font-size: clamp(1.7rem, 3.2vw, 2.6rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: 0;
}

.bh-sub {
    margin-top: 10px;
    color: var(--ink-soft);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.86rem;
    font-weight: 900;
}

.about-content {
    position: relative;
    z-index: 1;
    display: flex;
    max-width: 980px;
    flex-direction: column;
    gap: 22px;
}

.resume-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.kpi-card {
    position: relative;
    min-height: 78px;
    padding: 12px 14px;
    overflow: hidden;
    border: 2px solid rgba(0, 0, 0, 0.18);
    border-top: 4px solid var(--line-main);
    background: rgba(255,255,255,0.86);
}

.kpi-card::after {
    content: "";
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 42px;
    height: 8px;
    background: repeating-linear-gradient(90deg, var(--accent-yellow) 0 5px, transparent 5px 8px);
    opacity: 0.9;
}

.kpi-num {
    display: block;
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1;
}

.kpi-label {
    display: block;
    margin-top: 8px;
    color: var(--ink-soft);
    font-size: 0.85rem;
    font-weight: 900;
}

.bracket-frame {
    position: relative;
    padding: 24px;
    background: rgba(255, 255, 255, 0.62);
}

.bracket-frame::before,
.bracket-frame::after {
    content: "";
    position: absolute;
    width: 34px;
    height: 34px;
    pointer-events: none;
}

.bracket-frame::before {
    top: 0;
    left: 0;
    border-top: 5px solid var(--accent-cyan);
    border-left: 5px solid var(--accent-cyan);
}

.bracket-frame::after {
    right: 0;
    bottom: 0;
    border-right: 5px solid rgba(0,0,0,0.16);
    border-bottom: 5px solid rgba(0,0,0,0.16);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
}

.info-item {
    min-width: 0;
    padding-left: 14px;
    border-left: 4px solid var(--line-main);
}

.info-item .label {
    display: block;
    margin-bottom: 5px;
    color: var(--ink-soft);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.84rem;
    font-weight: 900;
}

.info-item .value {
    display: block;
    overflow-wrap: anywhere;
    font-size: 1.08rem;
    font-weight: 900;
}

.value.accent {
    display: inline-block;
    width: fit-content;
    padding: 2px 8px;
    background: var(--ink);
    color: var(--accent-yellow);
}

.info-block {
    position: relative;
    padding: 4px 0;
}

.info-block h3 {
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px dashed var(--line-light);
    font-size: 1.06rem;
    font-weight: 900;
}

.yellow-box {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    border: 2px solid var(--line-main);
    background: var(--accent-yellow);
    vertical-align: middle;
}

.skill-group {
    margin-bottom: 18px;
}

.skill-group h4 {
    margin-bottom: 10px;
    color: var(--ink-soft);
    font-size: 0.92rem;
    font-weight: 900;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border: 2px solid var(--line-main);
    background: var(--panel-strong);
    font-size: 0.9rem;
    font-weight: 900;
}

.tag:nth-child(3n) {
    border-color: var(--accent-cyan-dark);
}

.dashed-block {
    padding: 22px;
    border: 2px dashed var(--line-main);
    background: rgba(255, 255, 255, 0.52);
}

.sys-msg {
    margin-bottom: 8px;
    font-size: 0.96rem;
    font-weight: 800;
    line-height: 1.65;
}

.sys-msg::before {
    content: ">";
    margin-right: 8px;
    color: var(--accent-cyan-dark);
    font-weight: 900;
}

.exp-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.exp-card {
    position: relative;
    padding: 22px;
    border: 2px solid var(--line-main);
    background: var(--panel-strong);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.exp-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 8px;
    height: 54px;
    background: var(--accent-yellow);
}

.exp-card:hover {
    transform: translateX(5px);
    box-shadow: -7px 7px 0 rgba(0,0,0,0.10);
}

.exp-card.dim {
    border-color: rgba(0,0,0,0.38);
}

.exp-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.exp-title {
    border-bottom: 4px solid var(--accent-yellow);
    font-size: 1.28rem;
    font-weight: 900;
}

.exp-role {
    flex: 0 0 auto;
    padding: 4px 10px;
    border: 2px solid var(--line-main);
    background: #fff;
    font-size: 0.9rem;
    font-weight: 900;
}

.exp-role.accent-bg {
    border-color: var(--accent-cyan-dark);
    background: var(--accent-cyan-dark);
    color: #fff;
}

.exp-time {
    margin-bottom: 14px;
    padding-bottom: 11px;
    border-bottom: 1px dashed var(--line-light);
    color: var(--ink-soft);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.86rem;
    font-weight: 900;
}

.exp-details {
    margin-left: 19px;
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.75;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

.download-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding: 20px 22px;
    border: 2px solid var(--line-main);
    border-left: 8px solid var(--accent-yellow);
    background:
        linear-gradient(90deg, rgba(255, 230, 0, 0.18), transparent 46%),
        rgba(255,255,255,0.78);
    box-shadow: 8px 8px 0 rgba(0,0,0,0.08);
}

.download-kicker {
    display: inline-block;
    margin-bottom: 6px;
    padding: 3px 7px;
    background: var(--ink);
    color: #fff;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1px;
}

.download-copy h3 {
    margin-bottom: 6px;
    font-size: 1.28rem;
    font-weight: 900;
}

.download-copy p {
    max-width: 620px;
    color: var(--ink-soft);
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.6;
}

.download-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.project-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-img-wrapper {
    position: relative;
    display: flex;
    min-height: 220px;
    aspect-ratio: 16 / 11;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid var(--line-main);
    background:
        repeating-linear-gradient(45deg, #e7e7e2 0 10px, #fff 10px 20px);
    text-align: center;
}

.project-img-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0 58%, rgba(255,255,255,0.82) 58% 100%);
}

.project-visual {
    position: absolute;
    left: -20px;
    bottom: 26px;
    width: 86%;
    max-width: none;
    opacity: 0.55;
    filter: grayscale(0.2) contrast(1.08);
}

.project-visual-tall {
    left: auto;
    right: -58px;
    bottom: -28px;
    width: 72%;
    opacity: 0.5;
}

.project-visual-shift {
    left: auto;
    right: -26px;
    bottom: 30px;
    width: 92%;
}

.project-visual-demo {
    left: auto;
    right: -46px;
    bottom: -44px;
    width: 72%;
    opacity: 0.42;
    filter: invert(1) grayscale(1) contrast(1.4);
}

.img-label {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 3;
    padding: 4px 8px;
    border: 2px solid var(--line-main);
    background: var(--accent-yellow);
    color: var(--ink);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 11px;
    font-weight: 900;
}

.lbl-small {
    margin-left: 8px;
    font-size: 8px;
}

.center-text {
    position: relative;
    z-index: 2;
    max-width: min(86%, 340px);
    padding: 13px 20px;
    border: 2px solid var(--line-main);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 5px 5px 0 rgba(0,0,0,0.12);
    font-size: 1.12rem;
    font-weight: 900;
    line-height: 1.45;
}

.bottom-bar {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 3;
    padding: 5px 10px;
    border-top: 2px solid var(--line-main);
    background: #e8e8e3;
    color: var(--ink-soft);
    font-size: 0.75rem;
    font-weight: 900;
    text-align: left;
}

.type-demo {
    background:
        repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 16px),
        #171a1b;
}

.type-demo::after {
    background: linear-gradient(180deg, transparent 0 54%, rgba(0,0,0,0.68) 54% 100%);
}

.type-demo .center-text {
    border-color: var(--accent-cyan);
    background: rgba(0,0,0,0.5);
    color: var(--accent-cyan);
    box-shadow: 5px 5px 0 rgba(0, 216, 230, 0.16);
}

.bg-cyan {
    border-color: var(--accent-cyan-dark);
    background: var(--accent-cyan-dark);
    color: #fff;
}

.bg-cyan-dark {
    border-color: var(--accent-cyan-dark);
    background: var(--accent-cyan-dark);
    color: #fff;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 4;
    width: 100%;
    height: 5px;
    background: rgba(255, 230, 0, 0.9);
    animation: scan 3.2s linear infinite;
}

.scan-line.delay { animation-delay: 1.35s; }

@keyframes scan {
    from { transform: translateY(-8px); }
    to { transform: translateY(230px); }
}

.corner-cut {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 5;
    width: 42px;
    height: 42px;
    background: var(--accent-yellow);
    clip-path: polygon(100% 0, 0 100%, 100% 100%);
}

.project-info h3 {
    margin-bottom: 7px;
    font-size: 1.06rem;
    font-weight: 900;
}

.project-info p {
    color: var(--ink-soft);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.62;
}

.ext-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    margin-top: 12px;
    padding: 6px 12px;
    border: 2px solid var(--line-main);
    color: var(--ink);
    font-size: 0.84rem;
    font-weight: 900;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-doc,
.btn-download { background: var(--accent-yellow); }
.btn-vid {
    border-color: var(--accent-cyan-dark);
    background: var(--accent-cyan-dark);
    color: #fff;
}
.ext-btn:hover {
    transform: translateY(-2px);
    background: var(--ink);
    color: var(--accent-yellow);
}

.desc-text {
    padding-left: 15px;
    border-left: 4px solid var(--accent-yellow);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.7;
}

.game-cat {
    margin-bottom: 15px;
}

.game-cat h4 {
    margin-bottom: 7px;
    padding-bottom: 5px;
    border-bottom: 1px dashed var(--line-light);
    font-size: 1.02rem;
    font-weight: 900;
}

.game-cat p {
    color: var(--ink-soft);
    font-size: 0.94rem;
    font-weight: 800;
    line-height: 1.65;
}

.cyan-dashed {
    border-color: var(--accent-cyan-dark);
    background: rgba(0, 216, 230, 0.06);
}

.tech-deco-overlay {
    position: absolute;
    right: -18px;
    top: 84px;
    z-index: -1;
    display: flex;
    width: 330px;
    height: 330px;
    flex-direction: column;
    align-items: flex-end;
    opacity: 0.16;
    pointer-events: none;
}

.deco-art {
    position: absolute;
    right: 0;
    top: 52px;
    width: 270px;
    opacity: 0.78;
}

.td-text {
    margin-top: 15px;
    padding-right: 10px;
    border-right: 3px solid var(--accent-yellow);
    color: var(--line-main);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 3px;
    text-align: right;
}

.td-circle {
    width: 120px;
    height: 120px;
    border: 2px dashed var(--line-main);
    border-radius: 50%;
    animation: slowRotate 24s linear infinite;
}

.td-grid {
    width: 150px;
    height: 60px;
    margin-top: 15px;
    background: repeating-linear-gradient(45deg, transparent 0 5px, var(--line-light) 5px 6px);
}

.td-hex {
    width: 100px;
    height: 115px;
    margin-right: 20px;
    border: 3px solid var(--line-main);
    background: rgba(0, 216, 230, 0.10);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.td-wave {
    width: 180px;
    height: 40px;
    margin-top: 20px;
    background: linear-gradient(90deg, transparent 50%, var(--line-main) 50%);
    background-size: 10px 100%;
}

.global-scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 17px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.75;
    pointer-events: none;
    transform: translateX(-50%);
    animation: breathArrow 2s ease-in-out infinite;
}

.scroll-hint-text {
    margin-bottom: 5px;
    color: var(--line-main);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 2px;
}

.scroll-arrow-down {
    width: 14px;
    height: 14px;
    border-right: 3px solid var(--line-main);
    border-bottom: 3px solid var(--line-main);
    transform: rotate(45deg);
}

@keyframes slowRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes breathArrow {
    0%, 100% { transform: translate(-50%, 0); opacity: 0.35; }
    50% { transform: translate(-50%, 10px); opacity: 0.95; }
}

@media (max-width: 1180px) {
    .container {
        grid-template-columns: 300px minmax(0, 1fr);
        gap: 28px;
    }

    .character-card { height: 300px; }
    .terminal-strip span:nth-child(2) { display: none; }
    .view-section { padding-right: 34px; padding-left: 34px; }
}

@media (max-width: 1320px) {
    .terminal-strip {
        left: 190px;
        gap: 14px;
        font-size: 9px;
    }

    .terminal-strip span:nth-child(2) { display: none; }
}

@media (max-width: 900px) {
    body {
        overflow: auto;
    }

    .edge-deco,
    .wireframe-obj,
    .global-scroll-hint {
        display: none;
    }

    .container {
        display: flex;
        width: 100%;
        min-height: 100vh;
        height: auto;
        flex-direction: column;
        padding: 20px;
    }

    .sidebar {
        width: 100%;
    }

    .character-card {
        height: 260px;
        margin-bottom: 12px;
    }

    .profile-mech {
        right: -60px;
        top: 28px;
        width: 300px;
    }

    .main-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .nav-btn {
        min-height: 50px;
        padding: 0 10px;
        font-size: 0.9rem;
    }

    .content-area {
        height: auto;
    }

    .content-frame {
        min-height: 70vh;
        height: auto;
        box-shadow: 8px 8px 0 rgba(0,0,0,0.08);
    }

    .terminal-strip {
        display: none;
    }

    .view-container {
        position: relative;
        inset: auto;
        min-height: 70vh;
        overflow: visible;
    }

    .view-section {
        display: none;
        position: relative;
        inset: auto;
        height: auto;
        min-height: 70vh;
        padding: 34px 22px 44px;
        overflow: visible;
        transform: none;
    }

    .view-section.active {
        display: block;
    }

    .resume-kpis,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .download-panel {
        grid-template-columns: 1fr;
    }

    .download-actions {
        justify-content: flex-start;
    }

    .tech-deco-overlay {
        display: none;
    }
}

@media (max-width: 560px) {
    .container {
        padding: 14px;
    }

    .character-card {
        height: 238px;
    }

    .emblem-text {
        font-size: 1.55rem;
        letter-spacing: 7px;
    }

    .card-name-box {
        width: 100%;
    }

    .cn-main {
        font-size: 1.55rem;
    }

    .main-nav,
    .social-links {
        grid-template-columns: 1fr;
    }

    .bh-main {
        padding: 6px 12px 8px;
    }

    .bh-main h2 {
        font-size: 1.45rem;
    }

    .bracket-frame,
    .exp-card,
    .dashed-block {
        padding: 18px;
    }

    .exp-head {
        flex-direction: column;
        gap: 8px;
    }

    .exp-role {
        align-self: flex-start;
    }

    .project-img-wrapper {
        min-height: 190px;
    }

    .center-text {
        font-size: 1rem;
    }

    .download-actions .ext-btn {
        width: 100%;
    }

    .boot-title strong {
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}
