:root {
    --ink: #0E0E10;
    --surface: #16171A;
    --border: rgba(255, 255, 255, 0.09);
    --text: #F1EFEA;
    --text-muted: #9C9993;
    --accent: #C79A56;
    --accent-soft: rgba(199, 154, 86, 0.12);
}

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

body {
    background: var(--ink);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 64px 20px;
    line-height: 1.5;
}

/* --- Enter overlay --- */
#console-loader {
    position: fixed; inset: 0;
    background: var(--ink);
    z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
#console-loader.fade-out { opacity: 0; visibility: hidden; }

.enter-box { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.enter-title {
    font-family: 'Fraunces', serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    animation: pulse 1.6s ease-in-out infinite;
}
.enter-subtitle { font-size: 13px; color: var(--text-muted); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* --- Layout --- */
.container { width: 100%; display: flex; justify-content: center; }
.profile { width: 560px; max-width: 100%; }

.animate-in { animation: fadeUp 0.6s cubic-bezier(0.25, 1, 0.5, 1) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* --- Header --- */
.profile-header { text-align: center; padding-bottom: 28px; }

.pfp-wrapper { display: inline-block; margin-bottom: 18px; }
.avatar {
    width: 84px; height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

h1 {
    font-family: 'Fraunces', serif;
    font-size: 34px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.tagline { font-size: 14px; color: var(--text-muted); margin-bottom: 14px; }

.status-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 10px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #80848e; box-shadow: 0 0 6px currentColor; }
.custom-status-pill {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    line-height: 1;
    color: var(--text-muted);
}
#custom-status-text { line-height: 1; display: inline-flex; align-items: center; }
.status-emoji { width: 14px; height: 14px; display: block; }
#custom-status-emoji { display: inline-flex; align-items: center; justify-content: center; line-height: 1; font-size: 1em; }

.meta-line { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; letter-spacing: 0.2px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; }
#weather-info { display: inline-flex; align-items: center; gap: 4px; line-height: 1; }

.donate-pill {
    display: inline-block;
    font-size: 12px;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(199, 154, 86, 0.25);
    padding: 6px 14px;
    border-radius: 20px;
}

/* --- Sections --- */
.divider { height: 1px; background: var(--border); }
.profile-section { padding: 26px 0; }

.eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.section-copy { font-size: 15px; line-height: 1.7; color: var(--text); }

.stack-line { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); flex-wrap: wrap; }
.stack-line i { color: var(--accent); margin-right: 4px; }
.dot-sep { color: var(--text-muted); }

/* --- Projects --- */
.project-row {
    display: flex; align-items: center; gap: 14px;
    text-decoration: none; color: inherit;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.project-row:hover { border-color: var(--accent); transform: translateX(3px); }
.project-icon { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fbi-icon { background: rgba(0, 40, 104, 0.25); border: 1px solid rgba(255, 215, 0, 0.25); }
.project-info { flex-grow: 1; }
.project-name { font-size: 13px; font-weight: 600; color: var(--text); }
.project-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.project-arrow { color: var(--text-muted); font-size: 13px; transition: transform 0.2s ease, color 0.2s ease; }
.project-row:hover .project-arrow { color: var(--accent); transform: translateX(2px); }

/* --- Spotify --- */
.spotify-widget {
    display: flex; align-items: center; gap: 12px;
    background: rgba(30, 215, 96, 0.06);
    border: 1px solid rgba(30, 215, 96, 0.18);
    padding: 12px; border-radius: 8px; margin-bottom: 12px;
}
.spot-art { width: 44px; height: 44px; border-radius: 6px; }
.spot-info { flex-grow: 1; overflow: hidden; }
.spot-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spot-artist { font-size: 12px; color: #1ed760; }
.spot-logo { font-size: 18px; color: #1ed760; }

/* --- Music player --- */
.music-player {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 12px 16px; border-radius: 8px; margin-bottom: 12px;
}
.ctrl-btn {
    background: var(--accent); color: #161310; border: none;
    padding: 7px 16px; border-radius: 20px;
    font-weight: 600; font-size: 13px;
    display: flex; align-items: center; gap: 6px;
    cursor: pointer;
    transition: filter 0.2s ease;
}
.ctrl-btn:hover { filter: brightness(1.08); }
.volume-control { display: flex; align-items: center; gap: 8px; margin-left: auto; color: var(--text-muted); font-size: 13px; }

input[type=range] { -webkit-appearance: none; appearance: none; width: 90px; height: 3px; background: var(--border); border-radius: 2px; outline: none; cursor: pointer; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 13px; width: 13px; border-radius: 50%; background: var(--accent); cursor: pointer; }
input[type=range]::-moz-range-thumb { height: 13px; width: 13px; border-radius: 50%; background: var(--accent); border: none; cursor: pointer; }

/* --- YouTube / lyrics --- */
.ytmusic-widget { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; }
.ytmusic-header { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-muted); }
.ytmusic-header i { color: #ff0000; font-size: 17px; }
.now-playing-track { margin-top: 8px; }
.track-name { font-weight: 600; font-size: 15px; color: var(--text); }
.track-artist { font-size: 12px; color: var(--accent); margin-top: 2px; }
#yt-player-container { margin-top: 12px; border-radius: 6px; overflow: hidden; }

.lyrics-container {
    margin-top: 12px;
    height: 170px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.25);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    scrollbar-width: none;
}
.lyrics-container::-webkit-scrollbar { display: none; }
.lyrics-container.unsynced { border: 1px dashed var(--border); }
.lyrics-scroll { display: flex; flex-direction: column; gap: 12px; padding: 70px 16px; }
.lyric-line { font-size: 13px; color: var(--text-muted); text-align: center; transition: color 0.3s ease, font-size 0.3s ease; }
.lyric-line.active { color: var(--accent); font-weight: 600; font-size: 15px; }
.lyrics-sync-note { position: absolute; top: 6px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--text-muted); z-index: 1; }

/* --- Links --- */
.links { display: flex; flex-direction: column; gap: 10px; }
.btn {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px; font-weight: 500;
    transition: all 0.2s ease;
}
.btn i { font-size: 15px; color: inherit; }
.btn:hover { color: var(--accent); border-color: var(--accent); transform: translateX(3px); }

/* --- Guestbook --- */
.guestbook-form { display: flex; flex-direction: column; gap: 10px; }
.guestbook-input {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease;
}
.guestbook-input:focus { border-color: var(--accent); }
.guestbook-input::placeholder { color: var(--text-muted); }
.guestbook-textarea { resize: vertical; min-height: 70px; }
.guestbook-submit { align-self: flex-start; }
.guestbook-status { font-size: 12px; color: var(--text-muted); min-height: 16px; }

/* --- Footer --- */
.profile-footer { display: flex; justify-content: center; padding-top: 26px; }
.visitor-badge { opacity: 0.75; height: 20px; }

/* --- Mobile --- */
@media (max-width: 600px) {
    body { padding: 40px 16px; }
    h1 { font-size: 28px; }
    .avatar { width: 68px; height: 68px; }
    .profile-section { padding: 20px 0; }
    .section-copy { font-size: 14px; }
    .music-player { padding: 12px; justify-content: center; }
    .volume-control { width: 100%; margin-left: 0; justify-content: center; }
    input[type=range] { width: 140px; }
    .lyrics-container { height: 140px; }
    .lyrics-scroll { padding: 60px 10px; }
    .btn { padding: 11px 12px; font-size: 12px; }

    .meta-line { font-size: 11px; gap: 3px; }
    .custom-status-pill { font-size: 11px; padding: 3px 10px; }
    .donate-pill { font-size: 11px; padding: 5px 12px; }

    .guestbook-input { font-size: 13px; padding: 9px 11px; }
    .guestbook-textarea { min-height: 60px; }
    .guestbook-submit { align-self: stretch; text-align: center; justify-content: center; }

    .profile-footer { padding-top: 20px; }
}