/* ============================================================
   SITE-WIDE: variables, reset, fonts
   ============================================================ */
   :root {
    --col-bg:       #000000;
    --col-surface:  rgba(10, 10, 20, 0.72);
    --col-border:   rgba(255, 255, 255, 0.12);
    --col-text:     #e8e8e8;
    --col-dim:      #888;
    --col-accent:   #ffffff;
    --col-glow:     rgba(255,255,255,0.08);
    --col-yellow:   #f5e642;
    --col-blue:     #42b4f5;
    --nav-h:        64px;
    --font-pixel:   '8bitoperator', monospace;
    --font-body:    '8bitoperator', monospace;
}

/* ---- cutscene overlay ---- */
#cutscene-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    transition: opacity 1s ease;
}
#cutscene-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ---- main site container ---- */
#site {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    color: var(--col-text);
    font-family: var(--font-body);
}
.site-hidden {
    opacity: 0;
    pointer-events: none;
}
.site-visible {
    animation: siteReveal 1.2s ease forwards;
}
@keyframes siteReveal {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   TOPBAR
   ============================================================ */
#topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;

    /* blur only content behind the bar, NOT the bg (bg is fixed behind) */
    background: var(--col-surface);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border-bottom: 1px solid var(--col-border);
}

#topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

#nav-pfp {
    width: 36px;
    height: 36px;
    border-radius: 0; /* pixel style — square */
    object-fit: cover;
    image-rendering: pixelated;
    border: 2px solid var(--col-border);
    box-shadow: 0 0 8px rgba(255,255,255,0.15);
}

#nav-name {
    font-family: var(--font-pixel);
    font-size: 16px;
    letter-spacing: 0.08em;
    color: var(--col-accent);
    text-shadow: 0 0 10px rgba(255,255,255,0.4);
    text-transform: uppercase;
}

#topbar-center {
    display: flex;
    align-items: center;
    gap: 32px;
    flex: 1;
    justify-content: center;
}

.nav-link {
    font-family: var(--font-pixel);
    font-size: 14px;
    color: var(--col-dim);
    text-decoration: none;
    letter-spacing: 0.1em;
    text-transform: lowercase;
    position: relative;
    transition: color 0.2s;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0; right: 0;
    height: 2px;
    background: var(--col-accent);
    transform: scaleX(0);
    transition: transform 0.2s;
}
.nav-link:hover,
.nav-link.active {
    color: var(--col-accent);
    text-shadow: 0 0 8px rgba(255,255,255,0.5);
}
.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

#topbar-right {
    flex: 1;
}

/* ============================================================
   HOME PAGE
   ============================================================ */
#home-content {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: calc(var(--nav-h) + 60px) 80px 60px;
}

#hero {
    max-width: 640px;
}

.hero-greeting {
    font-family: var(--font-pixel);
    font-size: 13px;
    letter-spacing: 0.15em;
    color: var(--col-yellow);
    margin: 0 0 16px;
    text-shadow: 0 0 12px rgba(245, 230, 66, 0.5);
    animation: fadeUp 0.6s ease 0.2s both;
}

#hero-name {
    font-family: var(--font-pixel);
    font-size: clamp(40px, 6vw, 72px);
    font-weight: bold;
    color: var(--col-accent);
    margin: 0 0 20px;
    letter-spacing: 0.04em;
    text-shadow:
        0 0 20px rgba(255,255,255,0.3),
        0 0 60px rgba(255,255,255,0.1);
    line-height: 1.1;
    animation: fadeUp 0.6s ease 0.35s both;
}

#hero-desc {
    font-family: var(--font-pixel);
    font-size: 15px;
    color: var(--col-dim);
    line-height: 2;
    margin: 0 0 40px;
    letter-spacing: 0.05em;
    animation: fadeUp 0.6s ease 0.5s both;
}

#hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    animation: fadeUp 0.6s ease 0.65s both;
}

/* ============================================================
   PIXEL BUTTONS
   ============================================================ */
.btn-pixel {
    font-family: var(--font-pixel);
    font-size: 13px;
    letter-spacing: 0.1em;
    text-decoration: none;
    padding: 12px 28px;
    color: #000;
    background: var(--col-accent);
    border: none;
    cursor: pointer;
    display: inline-block;
    transition: transform 0.1s, box-shadow 0.2s;
    /* pixelated drop-shadow */
    box-shadow: 4px 4px 0 #555;
    text-transform: lowercase;
    image-rendering: pixelated;
}
.btn-pixel:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #555;
}
.btn-pixel:active {
    transform: translate(1px, 1px);
    box-shadow: 2px 2px 0 #555;
}
.btn-ghost {
    background: transparent;
    color: var(--col-accent);
    border: 2px solid var(--col-border);
    box-shadow: 4px 4px 0 rgba(255,255,255,0.1);
}
.btn-ghost:hover {
    border-color: var(--col-accent);
    box-shadow: 6px 6px 0 rgba(255,255,255,0.15);
}

/* ============================================================
   PAGE SHELL (shared by projects, friends, contact)
   ============================================================ */
.page-shell {
    min-height: 100vh;
    padding: calc(var(--nav-h) + 60px) 64px 80px;
    color: var(--col-text);
    font-family: var(--font-body);
}

.page-header {
    margin-bottom: 52px;
}
.page-header h1 {
    font-family: var(--font-pixel);
    font-size: clamp(28px, 4vw, 52px);
    color: var(--col-accent);
    margin: 0 0 12px;
    letter-spacing: 0.06em;
    text-shadow: 0 0 20px rgba(255,255,255,0.25);
}
.page-header p {
    font-family: var(--font-pixel);
    font-size: 14px;
    color: var(--col-dim);
    line-height: 2;
    max-width: 560px;
    letter-spacing: 0.04em;
}

/* ============================================================
   PROJECTS GRID
   ============================================================ */
#projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--col-surface);
    border: 1px solid var(--col-border);
    padding: 28px 24px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
    backdrop-filter: blur(8px);
    animation: fadeUp 0.5s ease both;
}
.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: scaleX(0);
    transition: transform 0.3s;
}
.project-card:hover {
    border-color: rgba(255,255,255,0.35);
    transform: translateY(-3px);
}
.project-card:hover::before {
    transform: scaleX(1);
}

.project-tag {
    font-family: var(--font-pixel);
    font-size: 10px;
    letter-spacing: 0.15em;
    color: var(--col-yellow);
    text-transform: uppercase;
    margin-bottom: 12px;
    display: block;
}
.project-card h2 {
    font-family: var(--font-pixel);
    font-size: 18px;
    color: var(--col-accent);
    margin: 0 0 10px;
    letter-spacing: 0.04em;
}
.project-card p {
    font-family: var(--font-pixel);
    font-size: 12px;
    color: var(--col-dim);
    line-height: 2;
    margin: 0 0 20px;
    letter-spacing: 0.03em;
}
.project-link {
    font-family: var(--font-pixel);
    font-size: 12px;
    color: var(--col-blue);
    text-decoration: none;
    letter-spacing: 0.08em;
    border-bottom: 1px solid rgba(66,180,245,0.3);
    transition: border-color 0.2s, color 0.2s;
}
.project-link:hover {
    color: #fff;
    border-color: #fff;
}

/* ============================================================
   FRIENDS LIST
   ============================================================ */
#friends-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 800px;
}

.friend-entry {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 24px 0;
    border-bottom: 1px solid var(--col-border);
    animation: fadeUp 0.5s ease both;
    transition: background 0.2s;
}
.friend-entry:first-child { border-top: 1px solid var(--col-border); }
.friend-entry:hover {
    background: var(--col-glow);
    padding-left: 8px;
}

.friend-pic {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border: 2px solid var(--col-border);
    image-rendering: pixelated;
    object-fit: cover;
    background: #111;
    transition: border-color 0.2s;
}
.friend-entry:hover .friend-pic {
    border-color: rgba(255,255,255,0.4);
}

.friend-info { flex: 1; }
.friend-link {
    font-family: var(--font-pixel);
    font-size: 18px;
    color: var(--col-accent);
    text-decoration: none;
    letter-spacing: 0.04em;
    display: inline-block;
    margin-bottom: 6px;
    transition: text-shadow 0.2s;
}
.friend-link:hover {
    text-shadow: 0 0 12px rgba(255,255,255,0.5);
}
.friend-url {
    font-family: var(--font-pixel);
    font-size: 10px;
    color: var(--col-blue);
    display: block;
    margin-bottom: 8px;
    letter-spacing: 0.06em;
}
.friend-desc {
    font-family: var(--font-pixel);
    font-size: 12px;
    color: var(--col-dim);
    line-height: 1.9;
    letter-spacing: 0.03em;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
#contact-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 560px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: var(--col-surface);
    border: 1px solid var(--col-border);
    backdrop-filter: blur(8px);
    text-decoration: none;
    transition: border-color 0.2s, transform 0.15s;
    animation: fadeUp 0.5s ease both;
}
.contact-item:hover {
    border-color: rgba(255,255,255,0.4);
    transform: translateX(6px);
}

.contact-icon {
    font-size: 20px;
    width: 32px;
    text-align: center;
    flex-shrink: 0;
}
.contact-label {
    font-family: var(--font-pixel);
    font-size: 14px;
    color: var(--col-accent);
    display: block;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}
.contact-value {
    font-family: var(--font-pixel);
    font-size: 11px;
    color: var(--col-dim);
    letter-spacing: 0.05em;
}

/* ============================================================
   SHARED ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* stagger cards */
.project-card:nth-child(1) { animation-delay: 0.05s; }
.project-card:nth-child(2) { animation-delay: 0.10s; }
.project-card:nth-child(3) { animation-delay: 0.15s; }
.project-card:nth-child(4) { animation-delay: 0.20s; }
.project-card:nth-child(5) { animation-delay: 0.25s; }
.project-card:nth-child(6) { animation-delay: 0.30s; }

.friend-entry:nth-child(1) { animation-delay: 0.05s; }
.friend-entry:nth-child(2) { animation-delay: 0.12s; }
.friend-entry:nth-child(3) { animation-delay: 0.19s; }
.friend-entry:nth-child(4) { animation-delay: 0.26s; }
.friend-entry:nth-child(5) { animation-delay: 0.33s; }

.contact-item:nth-child(1) { animation-delay: 0.05s; }
.contact-item:nth-child(2) { animation-delay: 0.12s; }
.contact-item:nth-child(3) { animation-delay: 0.19s; }
.contact-item:nth-child(4) { animation-delay: 0.26s; }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #333; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
    #home-content { padding: calc(var(--nav-h) + 40px) 24px 40px; }
    .page-shell { padding: calc(var(--nav-h) + 40px) 24px 60px; }
    #topbar-center { gap: 16px; }
    .nav-link { font-size: 11px; }
    .friend-pic { width: 48px; height: 48px; }
}

/* ============================================================
   STATUS DOT
   ============================================================ */
#nav-pfp-wrap {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}
#nav-status-dot,
#status-dot {
    display: none; /* hidden; shown by JS once status loads */
}
#nav-status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #747f8d;
    border: 2px solid #000;
    display: block;
    transition: background 0.4s, box-shadow 0.4s;
}

/* ============================================================
   HOME — allow scrolling, pin bg
   ============================================================ */
#home-content {
    min-height: 100vh;       /* hero fills viewport */
    overflow: visible;
    display: block;
    padding: 0;
}

#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: calc(var(--nav-h) + 60px) 80px 60px;
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
#about-section {
    position: relative;
    z-index: 10;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.92) 120px);
    padding: 80px 80px 120px;
}

#about-inner {
    max-width: 720px;
    display: flex;
    flex-direction: column;
    gap: 72px;
}

.about-block {
    animation: fadeUp 0.6s ease both;
}

.about-label {
    font-family: var(--font-pixel);
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--col-yellow);
    text-transform: uppercase;
    display: block;
    margin-bottom: 14px;
    text-shadow: 0 0 10px rgba(245, 230, 66, 0.4);
}

.about-heading {
    font-family: var(--font-pixel);
    font-size: clamp(22px, 3vw, 36px);
    color: var(--col-accent);
    margin: 0 0 20px;
    letter-spacing: 0.06em;
    text-shadow: 0 0 20px rgba(255,255,255,0.15);
}

.about-body {
    font-family: var(--font-pixel);
    font-size: 13px;
    color: var(--col-dim);
    line-height: 2.2;
    letter-spacing: 0.04em;
    margin: 0 0 16px;
    max-width: 640px;
}
.about-body:last-child { margin-bottom: 0; }

/* separator between hero and about */
#about-section::before {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: rgba(255,255,255,0.15);
    margin-bottom: 72px;
}

/* ============================================================
   SCROLL INDICATOR on hero
   ============================================================ */
#scroll-hint {
    position: absolute;
    bottom: 200px;
    left: 80px;
    font-family: var(--font-pixel);
    font-size: 11px;
    letter-spacing: 0.15em;
    color: var(--col-dim);
    animation: scrollBob 2s ease-in-out infinite;
}
#scroll-hint::before { content: '↓ '; }

@keyframes scrollBob {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50%       { transform: translateY(5px); opacity: 1; }
}

@media (max-width: 640px) {
    #hero { padding: calc(var(--nav-h) + 40px) 24px 60px; }
    #about-section { padding: 60px 24px 80px; }
    #scroll-hint { left: 24px; }
}

/* ============================================================
   ART PAGE
   ============================================================ */

/* Filter bar */
#art-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.art-filter-btn {
    font-family: var(--font-pixel);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: lowercase;
    padding: 8px 18px;
    background: transparent;
    color: var(--col-dim);
    border: 1px solid var(--col-border);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.art-filter-btn:hover {
    color: var(--col-accent);
    border-color: rgba(255,255,255,0.3);
}
.art-filter-btn.active {
    color: #000;
    background: var(--col-accent);
    border-color: var(--col-accent);
}

/* Gallery grid — masonry-like via CSS columns */
#art-grid {
    columns: 3 280px;
    column-gap: 20px;
}

/* Art card */
.art-card {
    break-inside: avoid;
    margin-bottom: 20px;
    cursor: pointer;
    border: 1px solid var(--col-border);
    background: var(--col-surface);
    backdrop-filter: blur(8px);
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
    animation: fadeUp 0.5s ease both;
}
.art-card:hover {
    border-color: rgba(255,255,255,0.35);
    transform: translateY(-3px);
}

.art-card-img-wrap {
    position: relative;
    overflow: hidden;
    display: block;
    line-height: 0;
}
.art-card-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
    image-rendering: pixelated;
}
.art-card:hover .art-card-img {
    transform: scale(1.04);
}

.art-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}
.art-card:hover .art-card-overlay {
    opacity: 1;
}
.art-card-expand {
    font-family: var(--font-pixel);
    font-size: 13px;
    color: #fff;
    letter-spacing: 0.1em;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.art-card-footer {
    padding: 12px 14px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.art-card-medium {
    font-family: var(--font-pixel);
    font-size: 9px;
    letter-spacing: 0.15em;
    color: var(--col-yellow);
    text-transform: uppercase;
    flex-shrink: 0;
}
.art-card-title {
    font-family: var(--font-pixel);
    font-size: 13px;
    color: var(--col-accent);
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Lightbox ──────────────────────────────────────────────── */
#lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-hidden {
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.lightbox-visible {
    pointer-events: auto;
    opacity: 1;
    transition: opacity 0.25s ease;
}

#lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.88);
    backdrop-filter: blur(6px);
}

#lightbox-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: 32px;
    max-width: min(90vw, 1000px);
    max-height: 90vh;
    padding: 12px;
    background: rgba(10,10,20,0.85);
    border: 1px solid var(--col-border);
    backdrop-filter: blur(16px);
    overflow: auto;
    animation: fadeUp 0.25s ease;
}

#lightbox-close {
    position: absolute;
    top: 12px;
    right: 14px;
    font-family: var(--font-pixel);
    font-size: 14px;
    color: var(--col-dim);
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s;
    z-index: 2;
}
#lightbox-close:hover { color: var(--col-accent); }

#lightbox-img {
    width: auto;
    max-width: 55%;
    max-height: 80vh;
    object-fit: contain;
    flex-shrink: 0;
    image-rendering: pixelated;
    display: block;
}

#lightbox-meta {
    flex: 1;
    padding: 8px 32px 8px 4px;
    min-width: 180px;
}

#lightbox-top {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 14px;
}
#lightbox-medium {
    font-family: var(--font-pixel);
    font-size: 9px;
    letter-spacing: 0.15em;
    color: var(--col-yellow);
    text-transform: uppercase;
}
#lightbox-year {
    font-family: var(--font-pixel);
    font-size: 9px;
    letter-spacing: 0.12em;
    color: var(--col-dim);
}

#lightbox-title {
    font-family: var(--font-pixel);
    font-size: clamp(18px, 2.5vw, 28px);
    color: var(--col-accent);
    margin: 0 0 16px;
    letter-spacing: 0.06em;
}
#lightbox-desc {
    font-family: var(--font-pixel);
    font-size: 12px;
    color: var(--col-dim);
    line-height: 2.1;
    letter-spacing: 0.04em;
    margin: 0 0 24px;
}
#lightbox-link {
    font-family: var(--font-pixel);
    font-size: 12px;
    color: var(--col-blue);
    text-decoration: none;
    letter-spacing: 0.08em;
    border-bottom: 1px solid rgba(66,180,245,0.3);
    transition: color 0.2s, border-color 0.2s;
}
#lightbox-link:hover {
    color: #fff;
    border-color: #fff;
}

@media (max-width: 640px) {
    #lightbox-inner {
        flex-direction: column;
        max-width: 95vw;
    }
    #lightbox-img {
        max-width: 100%;
        max-height: 50vh;
    }
}
