/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ── Variables ── */
:root {
    --accent: #a78bfa;
    --accent-dim: #7c3aed;
    --accent-glow: rgba(167, 139, 250, 0.18);
    --accent-amber: #fbbf24;
    --bg: #0a0a0f;
    --bg-surface: rgba(255,255,255,0.03);
    --bg-surface-hover: rgba(255,255,255,0.06);
    --border: rgba(255,255,255,0.07);
    --border-hover: rgba(167,139,250,0.35);
    --text: #f0eeff;
    --text-muted: rgba(240,238,255,0.5);
    --text-dim: rgba(240,238,255,0.3);
    --radius: 14px;
    --radius-sm: 8px;
}

/* ── Base ── */
body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    cursor: none;
}

/* ── Custom cursor ── */
.cursor-dot, .cursor-ring {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.3s;
}
.cursor-dot {
    width: 6px; height: 6px;
    background: var(--accent);
    transform: translate(-50%, -50%);
}
.cursor-ring {
    width: 32px; height: 32px;
    border: 1.5px solid rgba(167,139,250,0.5);
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, border-color 0.2s;
}
body:has(a:hover) .cursor-ring,
body:has(button:hover) .cursor-ring {
    width: 48px; height: 48px;
    border-color: var(--accent);
}

/* ── Background canvas ── */
#bgCanvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
}

/* ── Navbar ── */
.navbar {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background 0.3s, border-color 0.3s;
}
.navbar.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav-container {
    max-width: 1060px;
    margin: auto;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}
.logo {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text);
    letter-spacing: -0.02em;
}
.logo-dot { color: var(--accent); }
.nav-links {
    list-style: none;
    display: flex;
    gap: 32px;
    position: relative;
}
.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 400;
    transition: color 0.2s;
    letter-spacing: 0.01em;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }

/* ── Hero ── */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 24px 80px;
    max-width: 900px;
    margin: auto;
}
.hero-eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
    font-weight: 500;
}
.hero-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 28px;
    color: var(--text);
}
.hero-title span:first-child { color: var(--text-muted); }
.name-highlight {
    color: var(--text);
    border-right: 3px solid var(--accent);
    padding-right: 4px;
    animation: blink 0.9s step-end infinite;
}
@keyframes blink { 50% { border-color: transparent; } }
.hero-desc {
    max-width: 540px;
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.7;
}
.hero-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 60px;
}
.btn-primary {
    padding: 12px 28px;
    background: var(--accent);
    color: #0a0a0f;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: #c4b5fd; transform: translateY(-1px); }
.btn-ghost {
    padding: 12px 24px;
    border: 1px solid var(--border-hover);
    color: var(--text);
    border-radius: 40px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, transform 0.15s;
}
.btn-ghost:hover { background: var(--accent-glow); transform: translateY(-1px); }
.scroll-hint {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-dim);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.scroll-line {
    width: 40px;
    height: 1px;
    background: var(--text-dim);
    position: relative;
    overflow: hidden;
}
.scroll-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: translateX(-100%);
    animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine { 50% { transform: translateX(0); } 100% { transform: translateX(100%); } }

/* ── Sections ── */
.section {
    position: relative;
    z-index: 1;
    padding: 110px 24px;
}
.section-alt { background: rgba(255,255,255,0.015); }
.section-inner { max-width: 1060px; margin: auto; }
.section-label {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
    font-weight: 500;
}
.section-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 56px;
    line-height: 1.15;
    color: var(--text);
}
.section-title em {
    font-style: normal;
    color: var(--accent);
}

/* ── Reveal animation ── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── About ── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
.about-grid p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.75;
}
@media (max-width: 700px) { .about-grid { grid-template-columns: 1fr; } }

/* ── Skills ── */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}
.skill-group {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 30px;
    transition: border-color 0.25s, transform 0.25s;
}
.skill-group:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
}
.skill-group h3 {
    font-family: 'Syne', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}
.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.2s;
}
.skill-item:hover { color: var(--text); }
.dots { display: flex; gap: 7px; }
.dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    transition: background 0.2s, transform 0.2s;
}
.dot.filled { background: var(--accent); }
.skill-item:hover .dot.filled { background: #c4b5fd; transform: scale(1.2); }

/* ── Filter bar ── */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}
.filter-btn {
    padding: 7px 18px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    border-radius: 40px;
    font-size: 0.82rem;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--border-hover); color: var(--text); }
.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #0a0a0f;
    font-weight: 500;
}

/* ── Projects grid ── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.proj-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.25s, transform 0.25s;
    cursor: pointer;
}
.proj-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}
.proj-card.hidden { display: none; }
.proj-thumb {
    aspect-ratio: 16/9;
    background: rgba(167,139,250,0.05);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.proj-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}
.proj-thumb-placeholder {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: rgba(167,139,250,0.25);
    letter-spacing: -0.01em;
    z-index: 1;
}
.hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10,10,15,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 2;
    backdrop-filter: blur(4px);
}
.proj-card:hover .hover-overlay { opacity: 1; }
.overlay-btn {
    padding: 8px 18px;
    border: 1px solid rgba(167,139,250,0.5);
    color: #c4b5fd;
    border-radius: 40px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    font-family: 'DM Sans', sans-serif;
}
.overlay-btn:hover { background: var(--accent); color: #0a0a0f; border-color: var(--accent); }
.proj-body { padding: 18px 20px; }
.proj-body h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
    color: var(--text);
}
.proj-body p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 14px;
}
.project-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.project-tags li {
    font-size: 0.75rem;
    padding: 3px 10px;
    background: rgba(167,139,250,0.08);
    border: 1px solid rgba(167,139,250,0.2);
    color: #c4b5fd;
    border-radius: 40px;
}
/* ── Art ── */
.art-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 24px;
}
.art-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.25s, transform 0.25s;
}
.art-card:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.art-card img {
    width: 100%;
    max-height: 440px;
    object-fit: contain;
    display: block;
}
.art-caption {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}
.art-quote {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 900px) { .art-showcase { grid-template-columns: 1fr; } }

/* ── Buzzle asset gallery ── */
.buzzle-full {
    grid-column: 1 / -1;
}
.buzzle-title-showcase {
    margin: 24px auto;
    max-width: 420px;   /* controls title image size */
    text-align: center;
}

.buzzle-title-showcase img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    image-rendering: pixelated;
}

.buzzle-sheet {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    padding: 24px;
    background: rgba(10,10,15,0.4);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.buzzle-sheet img {
    width: min(800px, 100%);
    height: auto;
    display: block;
    image-rendering: pixelated;
}
/* ── Audio ── */
.audio-list { max-width: 780px; display: flex; flex-direction: column; gap: 16px; }
.audio-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 20px;
    transition: border-color 0.25s;
}
.audio-card:hover { border-color: var(--border-hover); }
.audio-info h3 {
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text);
}
.audio-info p { font-size: 0.82rem; color: var(--text-muted); }
audio {
    width: 260px;
    accent-color: var(--accent);
    filter: invert(0.05);
}
audio::-webkit-media-controls-panel { background: rgba(167,139,250,0.08); }
@media (max-width: 680px) {
    .audio-card { grid-template-columns: 1fr; }
    audio { width: 100%; }
}

/* ── Footer ── */
footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    padding: 28px 24px;
}
.footer-inner {
    max-width: 1060px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--text-dim);
}
.footer-inner a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.footer-inner a:hover { color: var(--accent); }

/* ── Buttons shared ── */
.btn, .btn-outline {
    padding: 9px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
    display: inline-block;
}
.btn { background: var(--accent); color: #0a0a0f; font-weight: 500; }
.btn:hover { background: #c4b5fd; }
.btn-outline { border: 1px solid var(--border-hover); color: var(--accent); }
.btn-outline:hover { background: var(--accent-glow); }