:root {
    --bg-color: #050505;
    --card-bg: rgba(20, 20, 20, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    cursor: none;
    /* Custom cursor everywhere */
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Custom Cursor */
#cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
    mix-blend-mode: difference;
}

#cursor.hovered {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: transparent;
}

/* Animated Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at center, #1a1a2e 0%, #000000 100%);
}

header {
    position: relative;
    padding: 6rem 2rem 4rem;
    text-align: center;
    z-index: 10;
}

h1 {
    font-size: 5rem;
    font-weight: 900;
    letter-spacing: -3px;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    animation: fadeUp 1s ease-out forwards;
}

p.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0;
    animation: fadeUp 1s ease-out 0.2s forwards;
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 3rem;
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
    z-index: 10;
    position: relative;
}

/* Card Styling */
.card-wrapper {
    perspective: 1000px;
}

.card {
    position: relative;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    transition: transform 0.1s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    transform-style: preserve-3d;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.card-image-container {
    height: 240px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.19, 1, 0.22, 1);
    filter: grayscale(20%);
}

/* Navigation Filters */
.nav-filters {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    margin-right: 2rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: none;
    /* Keep custom cursor */
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
    background: var(--text-primary);
    color: var(--bg-color);
    border-color: var(--text-primary);
}

.card:hover .card-image {
    transform: scale(1.1);
    filter: grayscale(0%);
}

.card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.01) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.card-header {
    margin-bottom: 1rem;
}

.card-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 2rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-type {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
}

.type-game {
    color: var(--accent-rose);
    border: 1px solid rgba(244, 63, 94, 0.2);
}

.type-app {
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.type-tool {
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.type-edu {
    color: var(--accent-purple);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.card-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.btn-action {
    align-self: flex-start;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
    width: fit-content;
}

.btn-action::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 1px;
    background: var(--text-primary);
    transition: width 0.3s ease;
}

.card:hover .btn-action {
    gap: 1rem;
}

.card:hover .btn-action::after {
    width: 100%;
}

.arrow-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 3rem;
    }

    .grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    #cursor {
        display: none;
    }

    /* No custom cursor on touch */
    * {
        cursor: auto;
    }
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    z-index: 100;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.nav-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 1rem;
}

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

/* Footer structure */
footer {
    position: relative;
    background: rgba(10, 10, 10, 0.8);
    border-top: 1px solid var(--card-border);
    padding: 4rem 2rem 2rem;
    margin-top: 6rem;
    z-index: 10;
    backdrop-filter: blur(20px);
}

.footer-content {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

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

.footer-brand p {
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 350px;
}

.footer-column h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

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

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-blue);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .navbar {
        padding: 1rem;
    }

    .nav-links {
        display: none;
        /* Simple mobile hide for now */
    }
}