@font-face {
    font-family: 'KOTRAHOPE';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2110@1.0/KOTRAHOPE.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

body {
    font-family: 'KOTRAHOPE';
    height: 100dvh;
    width: 100vw;
    -webkit-tap-highlight-color: transparent;
}

a {
    text-decoration: none;
}

.background {
    position: fixed;
    inset: 0;
    height: 100dvh;
    background-image: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2110@1.0/2110_1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: -1;
}

.background.mesh {
    background: radial-gradient(ellipse at center, #1a1340 0%, #0d0820 100%);
    overflow: hidden;
}

.background.mesh .blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    will-change: transform;
}

.background.mesh .blob-1 {
    width: 60vmax;
    height: 60vmax;
    background: #887bea;
    top: -18%;
    left: -12%;
    opacity: 0.7;
    animation: drift-1 22s ease-in-out infinite alternate;
}

.background.mesh .blob-2 {
    width: 52vmax;
    height: 52vmax;
    background: #6a5acd;
    bottom: -22%;
    right: -12%;
    opacity: 0.6;
    animation: drift-2 28s ease-in-out infinite alternate;
}

.background.mesh .blob-3 {
    width: 40vmax;
    height: 40vmax;
    background: #2a2058;
    top: 35%;
    left: 30%;
    opacity: 0.85;
    animation: drift-3 32s ease-in-out infinite alternate;
}

.background.mesh .blob-4 {
    width: 28vmax;
    height: 28vmax;
    background: #a8a0f0;
    top: 12%;
    left: 38%;
    opacity: 0.35;
    animation: drift-4 18s ease-in-out infinite alternate;
}

@keyframes drift-1 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(8vw, 6vh) scale(1.1); }
}

@keyframes drift-2 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(-10vw, -5vh) scale(1.08); }
}

@keyframes drift-3 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(6vw, -8vh) scale(0.95); }
}

@keyframes drift-4 {
    from { transform: translate(0, 0) scale(1); opacity: 0.3; }
    to   { transform: translate(-4vw, 4vh) scale(1.15); opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
    .background.mesh .blob,
    .b_list button:hover,
    .b_list button:focus-visible,
    .c_content button:hover,
    .c_content button:focus-visible {
        animation: none;
    }
}

.hotbar {
    position: fixed;
    top: env(safe-area-inset-top, 0);
    right: calc(env(safe-area-inset-right, 0) + 5px);
}

.hotbar img {
    height: 30px;
    width: 30px;
    margin: 12px;
}

.title {
    color: cyan;
    text-align: center;
    font-size: 50px;
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-shadow:
        0 0 18px rgba(0, 255, 255, 0.45),
        0 0 40px rgba(136, 123, 234, 0.35);
    letter-spacing: 0.02em;
    visibility: hidden;
}

.title.ready {
    visibility: visible;
}

.title .placeholder {
    visibility: hidden;
}

.title .actual {
    position: absolute;
    left: 0;
    top: 0;
}

.title.typing .actual::after {
    content: '|';
    color: cyan;
    margin-left: 4px;
    animation: cursor-blink 0.7s steps(1) infinite;
    text-shadow: 0 0 12px rgba(0, 255, 255, 0.6);
}

@keyframes cursor-blink {
    50% { opacity: 0; }
}

.b_list {
    position: fixed;
    bottom: max(10%, calc(env(safe-area-inset-bottom, 0) + 1rem));
    right: max(5%, calc(env(safe-area-inset-right, 0) + 1rem));
}

.b_list:has(> .b_group) {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 18px;
}

.b_list .b_group {
    display: flex;
    flex-direction: column;
}

@property --hue {
    syntax: '<number>';
    initial-value: 0;
    inherits: false;
}

.b_list button {
    display: block;
    width: 130px;
    margin-bottom: 10px;
    padding: 10px;
    background-color: transparent;
    color: cyan;
    border: 3px solid white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    transform-origin: right center;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.b_list button:hover,
.b_list button:focus-visible {
    transform: scale(1.06);
    animation: border-cycle 4s linear infinite;
    outline: none;
}

@keyframes hue-cycle {
    from { --hue: 0; }
    to { --hue: 360; }
}

@keyframes border-cycle {
    0%     { border-color: hsl(0,   90%, 70%); box-shadow: 0 0 16px hsl(0,   90%, 60%, 0.5); }
    16.6%  { border-color: hsl(60,  90%, 70%); box-shadow: 0 0 16px hsl(60,  90%, 60%, 0.5); }
    33.3%  { border-color: hsl(120, 90%, 70%); box-shadow: 0 0 16px hsl(120, 90%, 60%, 0.5); }
    50%    { border-color: hsl(180, 90%, 70%); box-shadow: 0 0 16px hsl(180, 90%, 60%, 0.5); }
    66.6%  { border-color: hsl(240, 90%, 70%); box-shadow: 0 0 16px hsl(240, 90%, 60%, 0.5); }
    83.3%  { border-color: hsl(300, 90%, 70%); box-shadow: 0 0 16px hsl(300, 90%, 60%, 0.5); }
    100%   { border-color: hsl(360, 90%, 70%); box-shadow: 0 0 16px hsl(360, 90%, 60%, 0.5); }
}

.copyright {
    color: #fff;
    text-align: center;
    position: fixed;
    bottom: env(safe-area-inset-bottom, 0);
    left: 0;
    width: 100%;
    padding: 1rem;
    margin: 0;
}

.hidden {
    color: #fff;
}

.hidden:hover {
    color: cyan;
}

/* ─── about page ─── */

.a_list {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    width: min(90vw, 360px);
    max-height: 85vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.profile {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.profile img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.profile h1 {
    margin: 0;
    color: cyan;
    text-shadow: 0 0 12px rgba(0, 255, 255, 0.35);
}

.profile .sub {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: normal;
}

.info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
}

.info .c {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info .c img {
    max-width: 32px;
    max-height: 32px;
    border-radius: 6px;
}

.info p {
    margin: 0;
}

.discord-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    margin-bottom: 16px;
    backdrop-filter: blur(6px);
    font-size: 12px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #80848e;
    flex-shrink: 0;
    transition: background 0.2s, box-shadow 0.2s;
}

.status-dot[data-status="online"]  { background: #23a55a; box-shadow: 0 0 8px #23a55a; }
.status-dot[data-status="idle"]    { background: #f0b232; box-shadow: 0 0 8px #f0b232; }
.status-dot[data-status="dnd"]     { background: #f23f43; box-shadow: 0 0 8px #f23f43; }
.status-dot[data-status="offline"] { background: #80848e; }

.status-info {
    line-height: 1.3;
    min-width: 0;
    flex: 1;
}

.status-label {
    color: #fff;
    font-weight: bold;
}

.status-activity {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tech-stack {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tech-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: bold;
}

.tech-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-icons img {
    width: 22px;
    height: 22px;
    opacity: 0.75;
    transition: opacity 0.18s ease, transform 0.18s ease, filter 0.18s ease;
    cursor: default;
}

.tech-icons img:hover {
    opacity: 1;
    transform: translateY(-2px);
    filter: drop-shadow(0 0 6px rgba(0, 255, 255, 0.6));
}

/* ─── Beat Saber stats (hidden page) ─── */

.bs-stats {
    position: fixed;
    top: 56%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: min(90vw, 380px);
}

.bs-card {
    display: block;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 14px 12px;
    backdrop-filter: blur(8px);
    color: #fff;
    text-align: center;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.bs-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 255, 255, 0.5);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 12px rgba(0, 255, 255, 0.2);
}

.bs-platform {
    color: cyan;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: bold;
    margin-bottom: 10px;
}

.bs-rank {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.1;
}

.bs-country {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
    font-weight: normal;
}

.bs-pp {
    margin-top: 10px;
    color: cyan;
    font-weight: bold;
    font-size: 15px;
}

.pp-unit {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: normal;
    margin-left: 2px;
}

/* ─── 404 page ─── */

.notfound {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
}

.nf-code {
    font-size: clamp(100px, 22vw, 180px);
    margin: 0;
    color: cyan;
    letter-spacing: 0.05em;
    text-shadow:
        0 0 24px rgba(0, 255, 255, 0.5),
        0 0 60px rgba(136, 123, 234, 0.4);
    line-height: 1;
}

.nf-msg {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.75);
    margin: 16px 0 32px;
}

.nf-home {
    width: 130px;
    padding: 10px;
    background-color: transparent;
    color: cyan;
    border: 3px solid #fff;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    font-family: inherit;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.nf-home:hover,
.nf-home:focus-visible {
    transform: scale(1.06);
    animation: border-cycle 4s linear infinite;
    outline: none;
}

/* ─── projects page ─── */

.p_list {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(90vw, 480px);
    max-height: 70vh;
    overflow-y: auto;
}

.p_list details {
    margin-bottom: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(6px);
}

.p_list summary {
    cursor: pointer;
    color: cyan;
    font-weight: bold;
    user-select: none;
}

.p_list details[open] summary {
    margin-bottom: 8px;
}

.p_list a,
.p_list span {
    display: block;
    color: rgba(255, 255, 255, 0.85);
    padding: 4px 0;
    transition: color 0.15s ease;
}

.p_list a:hover {
    color: cyan;
}

/* ─── contact page ─── */

.page-heading {
    color: cyan;
    text-align: center;
    position: fixed;
    top: 22%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-shadow: 0 0 16px rgba(0, 255, 255, 0.4);
    margin: 0;
}

.c_content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    width: min(80vw, 220px);
}

.c_content a {
    display: block;
}

.c_content button {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.c_content button:hover,
.c_content button:focus-visible {
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.3),
        0 0 0 3px hsl(var(--hue), 90%, 70%),
        0 0 24px hsl(var(--hue), 90%, 60%);
    animation: hue-cycle 4s linear infinite;
    outline: none;
}

.btn-email   { background: #f05353; color: #fff; }
.btn-discord { background: #8075f3; color: #fff; }
.btn-twitter { background: #000;    color: #fff; }
.btn-kakao   { background: #f1f130; color: #000; }
