:root {
    --bg: #0e0e0e;
    --card-bg: #161616;
    --text: #e0e0e0;
    --text-muted: #555;
    --accent: #6d5dfc;
    --border: #252525;
    --green: #34d399;
    --orange: #f59e0b;
    --red: #ef4444;
    --mono: 'IBM Plex Mono', monospace;
}

[data-theme="light"] {
    --bg: #fafafa;
    --card-bg: #fff;
    --text: #1a1a1a;
    --text-muted: #999;
    --border: #e0e0e0;
    --accent: #5b4ee8;
}

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

body {
    font-family: var(--mono);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

.noise {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.logo {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo span {
    color: var(--accent);
}

.theme-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s;
}

.theme-btn:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

body:not([data-theme="light"]) .icon-sun { display: none; }
body:not([data-theme="light"]) .icon-moon { display: block; }
[data-theme="light"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: none; }

.projects {
    padding: 7rem 3rem 4rem;
    padding-bottom: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

#skull-canvas {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

.project-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.project {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-img {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 5/3;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.project-img svg {
    width: 100%;
    height: 100%;
    display: block;
}

.project-img:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    border-color: var(--accent);
}

.project-info h3 {
    font-size: 1rem;
    font-weight: 500;
}

.project-info h3 a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.15s;
}

.project-info h3 a:hover {
    color: var(--accent);
}

/* Product page */
.product-page {
    max-width: 600px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
}

.back-link {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 3rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--text);
}

.product-header {
    margin-bottom: 3rem;
}

.product-header h1 {
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.download-section {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.25rem;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: opacity 0.2s;
}

.download-btn:hover {
    opacity: 0.85;
}

.version-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

.github-float {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    color: var(--text-muted);
    opacity: 0.15;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 50;
}

.github-float:hover {
    opacity: 0.5;
    transform: scale(1.1);
}

@media (max-width: 1000px) {
    .project-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        padding: 1.5rem;
    }

    .projects {
        padding: 6rem 1.5rem 3rem;
    }

    .project-list {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .github-float {
        bottom: 1rem;
        left: 1rem;
    }
}
