/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ---- Theme Variables ---- */
[data-theme="dark"] {
    --bg:          #0c0c15;
    --surface:     #13131f;
    --surface-hov: #18182a;
    --border:      rgba(255, 255, 255, 0.07);
    --border-hov:  rgba(255, 255, 255, 0.14);
    --text:        #eeeef5;
    --muted:       #7878a0;
    --accent:      #a78bfa;
    --glow:        rgba(167, 139, 250, 0.07);
    --toggle-bg:   #1a1a2e;
    --shadow:      rgba(0, 0, 0, 0.45);
}

[data-theme="light"] {
    --bg:          #f6f5f2;
    --surface:     #ffffff;
    --surface-hov: #fafaff;
    --border:      rgba(0, 0, 0, 0.08);
    --border-hov:  rgba(0, 0, 0, 0.16);
    --text:        #1b1b2e;
    --muted:       #707090;
    --accent:      #7c3aed;
    --glow:        rgba(124, 58, 237, 0.05);
    --toggle-bg:   #ececf8;
    --shadow:      rgba(0, 0, 0, 0.1);
}

/* ---- Base ---- */
html {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 16px;
}

body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.3s, color 0.3s;
    position: relative;
}

/* ---- Background glow ---- */
.bg-glow {
    position: fixed;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, var(--glow) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

/* ---- Theme Toggle ---- */
.theme-toggle {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    background: var(--toggle-bg);
    border: 1px solid var(--border);
    color: var(--text);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s, border-color 0.25s, transform 0.2s;
    z-index: 100;
    line-height: 1;
}

.theme-toggle:hover {
    border-color: var(--border-hov);
    transform: rotate(20deg);
}

/* ---- Container ---- */
.container {
    flex: 1;
    max-width: 840px;
    margin: 0 auto;
    padding: 7rem 1.5rem 3rem;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* ---- Header ---- */
.site-header {
    text-align: center;
    margin-bottom: 3.5rem;
    animation: fadeUp 0.5s ease both;
}

.site-title {
    font-size: clamp(2.8rem, 7vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 0.875rem;
}

.site-title .accent {
    color: var(--accent);
}

.site-tagline {
    font-size: 1rem;
    color: var(--muted);
    font-weight: 400;
}

/* ---- Grid ---- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.125rem;
    animation: fadeUp 0.5s 0.1s ease both;
}

@media (max-width: 520px) {
    .projects-grid { grid-template-columns: 1fr; }
}

/* ---- Card ---- */
.project-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--card-accent);
    border-radius: 16px;
    padding: 1.75rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    background: var(--surface-hov);
    box-shadow: 0 20px 60px var(--shadow);
}

.pokebrowse-card { --card-accent: #f59e0b; }
.yomineko-card   { --card-accent: #f472b6; }
.idlequest-card  { --card-accent: #ef4444; }

.card-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.card-icon {
    font-size: 2rem;
    line-height: 1;
    width: 2rem;
    height: 2rem;
    object-fit: contain;
    image-rendering: pixelated;
}

.badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.25em 0.65em;
    border-radius: 99px;
    background: rgba(244, 114, 182, 0.12);
    color: #f472b6;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-desc {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.65;
    flex: 1;
}

.card-cta {
    display: block;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--card-accent);
}

/* ---- More coming ---- */
.more-coming {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.8rem;
    color: var(--muted);
    animation: fadeUp 0.5s 0.2s ease both;
}

/* ---- Footer ---- */
.site-footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.8rem;
    color: var(--muted);
    position: relative;
    z-index: 1;
}

/* ---- Animation ---- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Easter Egg: Sparkle Trail ---- */
.sparkle {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    user-select: none;
    line-height: 1;
    transform-origin: center;
    mix-blend-mode: screen;
}

[data-theme="light"] .sparkle {
    mix-blend-mode: multiply;
}

.spark-flash {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #c4b5fd 0%, transparent 70%);
    pointer-events: none;
    z-index: 9998;
}

[data-theme="light"] .spark-flash {
    background: radial-gradient(circle at center, #7c3aed55 0%, transparent 70%);
}
