* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


.video-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: grayscale(1) contrast(1.04) brightness(.92);
}

.video-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: rgba(245, 245, 243, .28);
}

:root {
    --bg: #f0f0ef;
    --ink: #171717;
    --soft: #666;
    --faint: #9b9b9b;
    --line: rgba(0, 0, 0, 0.16);
    --card: rgba(255, 255, 255, 0.18);
}

html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--ink);
    font-family: "Courier New", Courier, monospace;
    background-color: transparent;
}

.page-noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    opacity: 0.08;
    mix-blend-mode: multiply;
    background-image: url("bg-texture.png");
    background-repeat: repeat;
    background-size: 600px 300px;
}

.layout {
    position: relative;
    z-index: 3;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 46% 54%;
}

.sayori-side {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    isolation: isolate;
}

.sayori-stage {
    position: absolute;
    inset: 0;
}

.sayori-swing {
    position: absolute;
    top: 0;
    left: 49%;
    width: min(20vw, 315px);
    transform-origin: 49% 0%;
    animation: hanging-sway 7.2s ease-in-out infinite alternate;
    will-change: transform;
}

.sayori-image {
    display: block;
    width: 100%;
    height: auto;
    filter: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* Ziyaretçi IP — ekranın tam ortası */
.ip-stage {
    position: fixed;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    pointer-events: none;
    overflow: hidden;
}

.visitor-ip {
    display: block;
    color: var(--theme-ink, #171717);
    font-family: "Courier New", Courier, monospace;
    font-size: clamp(13px, 1.35vw, 18px);
    font-weight: 400;
    letter-spacing: 0.22em;
    text-indent: 0.22em;
    line-height: 1;
    white-space: nowrap;
    text-align: center;
    opacity: 0.72;
    transition: color 0.35s ease, opacity 0.35s ease;
    user-select: none;
    pointer-events: none;
}

[data-theme="dark"] .visitor-ip {
    color: var(--theme-ink, #f2f2f2);
    opacity: 0.78;
}

@keyframes hanging-sway {
    0% { transform: translateX(-50%) rotate(-0.7deg); }
    35% { transform: translateX(-50%) rotate(0.06deg); }
    67% { transform: translateX(-50%) rotate(0.66deg); }
    100% { transform: translateX(-50%) rotate(-0.12deg); }
}

.profile-side {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 56px 2.2vw 56px 0;
}

.content-wrap {
    width: min(100%, 540px);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 22px;
}

.profile-photo {
    width: 84px;
    height: 84px;
    flex: 0 0 84px;
    object-fit: cover;
    border: 1px solid rgba(0,0,0,.45);
    border-radius: 50%;
    filter: none;
}

.eyebrow,
.card-label,
.spotify-info small {
    color: var(--faint);
    text-transform: uppercase;
    letter-spacing: .18em;
}

.eyebrow {
    margin-bottom: 6px;
    font-size: 9px;
}

.profile-copy h1 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(44px, 3.9vw, 60px);
    font-weight: 700;
    line-height: .92;
    letter-spacing: -.06em;
}

.aliases {
    display: flex;
    gap: 6px;
    margin-top: 9px;
    color: var(--soft);
    font-size: 10px;
}

.quote {
    margin: 30px 0 28px;
    padding-left: 14px;
    border-left: 1px solid rgba(0,0,0,.28);
    color: #4c4c4c;
    font-size: 13px;
    font-style: italic;
    line-height: 1.7;
}

.discord-card {
    padding: 18px;
    border: 1px solid var(--line);
    background: var(--card);
}

.discord-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.discord-person {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

#discord-avatar {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(0,0,0,.25);
    filter: none;
}

.card-label {
    margin-bottom: 4px;
    font-size: 9px;
}

.discord-user h2 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.discord-status {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 4px;
    color: var(--soft);
    font-size: 11px;
}

#status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #a4a4a4;
}

.tiny-link {
    color: #333;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
    text-decoration: none;
    transition: transform .2s ease, color .2s ease;
}

.tiny-link:hover {
    color: #000;
    transform: translate(2px, -2px);
}

.discord-activity {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed rgba(0,0,0,.14);
}

#spotify-cover {
    display: none;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    object-fit: cover;
    filter: none;
}

.spotify-info {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.spotify-info small {
    font-size: 9px;
}

.spotify-info strong {
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.spotify-info span {
    overflow: hidden;
    color: var(--soft);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.links {
    margin-top: 16px;
    border-top: 1px solid var(--line);
}

.links a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 0 4px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    text-decoration: none;
    letter-spacing: .03em;
    transition: padding .2s ease, background .2s ease;
}

.links a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 0;
    height: 1px;
    background: var(--ink);
    transform: translateY(-50%);
    transition: width .2s ease;
}

.links a:hover {
    padding-left: 17px;
    background: rgba(0,0,0,.02);
}

.links a:hover::before {
    width: 9px;
}

.link-arrow {
    font-size: 15px;
}

footer {
    margin-top: 24px;
    color: var(--faint);
    font-size: 9px;
    letter-spacing: .16em;
}

@media (max-width: 1100px) {
    .layout {
        grid-template-columns: 42% 58%;
    }

    .sayori-swing {
        left: 51%;
        width: min(22vw, 300px);
    }

    .visitor-ip {
        font-size: clamp(12px, 1.5vw, 16px);
    }

    .profile-side {
        justify-content: flex-end;
        padding: 36px 2vw 36px 0;
    }

    .content-wrap {
        width: min(100%, 500px);
    }

    .profile-copy h1 {
        font-size: 44px;
    }
}

@media (max-width: 760px) {
    .layout {
        display: block;
    }

    .sayori-side {
        min-height: 44vh;
        height: 44vh;
    }

    .sayori-swing {
        top: 0;
        left: 50%;
        width: min(50vw, 260px);
    }

    .visitor-ip {
        font-size: 12px;
        letter-spacing: 0.16em;
        text-indent: 0.16em;
    }

    .profile-side {
        min-height: auto;
        padding: 18px 18px 38px;
    }

    .content-wrap {
        width: 100%;
    }

    .profile-photo {
        width: 76px;
        height: 76px;
        flex-basis: 76px;
    }

    .profile-copy h1 {
        font-size: 36px;
    }

    .quote {
        font-size: 12px;
    }

    #discord-avatar {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sayori-swing {
        animation: none;
        transform: translateX(-50%);
    }
}


/* =========================
   ENTER / INTRO SCREEN
========================= */
.enter-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #000;
    color: #f1f1f1;
    cursor: pointer;
    user-select: none;
    opacity: 1;
    visibility: visible;
    transition: opacity .6s ease, visibility .6s ease;
}

.enter-screen::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .08;
    background-image: url("bg-texture.png");
    background-repeat: repeat;
    background-size: 600px 300px;
    mix-blend-mode: screen;
}

.enter-text {
    position: relative;
    z-index: 1;
    font-family: "Courier New", Courier, monospace;
    font-size: clamp(24px, 2.6vw, 34px);
    font-weight: 400;
    letter-spacing: .38em;
    text-indent: .38em;
    color: rgba(255,255,255,.82);
    transition: color .2s ease, letter-spacing .25s ease, text-shadow .2s ease;
}

.enter-screen:hover .enter-text {
    color: #fff;
    letter-spacing: .46em;
    text-shadow: 0 0 10px rgba(255,255,255,.2);
}

.enter-screen.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body:not(.site-entered) {
    overflow: hidden;
}


/* =========================
   THEME TOGGLE
========================= */
.top-controls {
    position: fixed;
    top: 22px;
    right: 24px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle,
.audio-toggle {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(0,0,0,.18);
    border-radius: 50%;
    background: rgba(245,245,243,.34);
    color: #222;
    font: inherit;
    cursor: pointer;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}

.theme-toggle:hover,
.audio-toggle:hover {
    transform: rotate(18deg);
    background: rgba(255,255,255,.55);
}

.theme-icon,
.audio-icon {
    font-size: 18px;
    line-height: 1;
}

.audio-toggle.is-muted {
    opacity: .62;
}

/* =========================
   DARK / LIGHT THEME
========================= */
:root,
[data-theme="light"] {
    --theme-ink: #171717;
    --theme-muted: #666;
    --theme-faint: #9b9b9b;
    --theme-line: rgba(0, 0, 0, 0.16);
    --theme-card: rgba(255, 255, 255, 0.18);
    --theme-panel: rgba(245,245,243,.22);
    --theme-video-filter: grayscale(1) contrast(1.04) brightness(.92);
    --theme-grain-opacity: .08;
    --theme-grain-blend: multiply;
    --theme-overlay: rgba(245, 245, 243, .28);
}

[data-theme="dark"] {
    --theme-ink: #f2f2f2;
    --theme-muted: #9a9a9a;
    --theme-faint: #777772;
    --theme-line: rgba(255, 255, 255, 0.14);
    --theme-card: rgba(18, 18, 18, 0.72);
    --theme-panel: rgba(10, 10, 10, .56);
    --theme-video-filter: grayscale(1) contrast(1.2) brightness(0.42) saturate(0);
    --theme-grain-opacity: .18;
    --theme-grain-blend: soft-light;
    --theme-overlay:
        radial-gradient(ellipse at 28% 50%, transparent 10%, rgba(0, 0, 0, 0.55) 70%, rgba(0, 0, 0, 0.82) 100%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0.78) 100%);
}

body {
    color: var(--theme-ink);
    transition: color .35s ease, background-color .35s ease;
}

.video-bg {
    z-index: 0;
    filter: var(--theme-video-filter);
    transition: filter .45s ease;
}

.video-overlay {
    z-index: 1;
    background: var(--theme-overlay);
    transition: background .45s ease;
}

.page-noise {
    z-index: 2;
    opacity: var(--theme-grain-opacity);
    mix-blend-mode: var(--theme-grain-blend);
    transition: opacity .35s ease;
}

.layout {
    z-index: 3;
}

.theme-toggle {
    z-index: 100;
}

[data-theme="dark"] body {
    background: #070707;
}

[data-theme="dark"] .content-wrap {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

[data-theme="dark"] .profile-side {
    position: relative;
}

[data-theme="dark"] .content-wrap {
    position: relative;
}

[data-theme="dark"] .content-wrap::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -30px -32px -28px;
    border: 1px solid var(--theme-line);
    background: var(--theme-panel);
    box-shadow: 0 22px 80px rgba(0,0,0,.42);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    pointer-events: none;
}

[data-theme="dark"] .profile-copy h1,
[data-theme="dark"] .discord-user h2,
[data-theme="dark"] .spotify-info strong,
[data-theme="dark"] .links a {
    color: var(--theme-ink);
}

[data-theme="dark"] .aliases,
[data-theme="dark"] .discord-status,
[data-theme="dark"] .spotify-info span {
    color: var(--theme-muted);
}

[data-theme="dark"] .eyebrow,
[data-theme="dark"] .card-label,
[data-theme="dark"] .spotify-info small,
[data-theme="dark"] footer {
    color: var(--theme-faint);
}

[data-theme="dark"] .quote {
    color: #d4d4d4;
    border-left-color: rgba(255,255,255,.22);
}

[data-theme="dark"] .profile-photo,
[data-theme="dark"] #discord-avatar {
    border-color: rgba(255,255,255,.22);
    filter: none;
}

[data-theme="dark"] #spotify-cover {
    filter: none;
}

[data-theme="dark"] .discord-card {
    border-color: var(--theme-line);
    background: var(--theme-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

[data-theme="dark"] .discord-activity {
    border-top-color: rgba(255,255,255,.12);
}

[data-theme="dark"] .tiny-link {
    color: #d4d4d4;
}

[data-theme="dark"] .tiny-link:hover {
    color: #fff;
}

[data-theme="dark"] .links {
    border-top-color: var(--theme-line);
}

[data-theme="dark"] .links a {
    border-bottom-color: var(--theme-line);
}

[data-theme="dark"] .links a::before {
    background: #f2f2f2;
}

[data-theme="dark"] .links a:hover {
    background: rgba(255,255,255,.035);
}

[data-theme="dark"] .theme-toggle,
[data-theme="dark"] .audio-toggle {
    border-color: rgba(255,255,255,.16);
    background: rgba(20,20,20,.72);
    color: #f2f2f2;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

[data-theme="dark"] .theme-toggle:hover,
[data-theme="dark"] .audio-toggle:hover {
    background: rgba(30,30,30,.84);
}

.spotify-embed-player {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    opacity: .001;
    pointer-events: none;
    border: 0;
    clip-path: inset(50%);
    z-index: -1;
}

.spotify-embed-player[hidden] {
    display: none;
}

.spotify-embed-player iframe {
    display: block;
    width: 300px !important;
    height: 80px !important;
    border: 0;
}

@media (max-width: 760px) {
    [data-theme="dark"] .video-bg {
        filter: grayscale(1) contrast(1.15) brightness(.28);
    }

    [data-theme="dark"] .content-wrap {
        padding: 0;
    }

    [data-theme="dark"] .content-wrap::before {
        inset: -24px -20px;
    }

    .top-controls {
        top: 14px;
        right: 14px;
        gap: 7px;
    }

    .theme-toggle,
    .audio-toggle {
        width: 32px;
        height: 32px;
    }
}

/* Sayori ayrı PNG değil; karakter bg.mp4 içinde. IP için .ip-stage kullanılıyor. */
.sayori-stage,
.sayori-swing,
.sayori-image {
    display: none !important;
}
