: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;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.015;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.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;
    max-width: 1100px;
    margin: 0 auto;
}

.project-list {
    display: grid;
    grid-template-columns: repeat(2, 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;
}

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

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

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