/* --- VARIABLES & RESET --- */
:root {
    --bg-dark: #0f172a;
    --bg-light: #1e1b4b;
    --primary: #22d3ee; /* Cyan */
    --secondary: #a855f7; /* Purple */
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text: #f8fafc;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; }

body {
    background: radial-gradient(circle at top center, var(--bg-light), var(--bg-dark));
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

#particleCanvas {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.container {
    max-width: 850px;
    margin: 0 auto;
    padding: 30px 20px;
    position: relative;
    z-index: 1;
    /* Apply Animation */
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* --- IN-PAGE HEADER (Replacement for Navbar) --- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
}

.back-link {
    text-decoration: none;
    color: #94a3b8;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    transition: 0.3s;
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
    transform: translateX(-5px);
    border-color: var(--primary);
}

/* --- TYPOGRAPHY --- */
h1.main-title {
    font-size: 2.5rem;
    text-align: center;
    margin-top: 10px;
    background: linear-gradient(to bottom right, #fff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    letter-spacing: -1px;
}

p.subtitle {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 50px;
    font-size: 1.1rem;
}

/* --- CARDS & GRID --- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.glass-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px 30px;
    cursor: pointer;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy effect */
    text-align: center;
    text-decoration: none;
    display: block;
    color: var(--text);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: 0.5s;
}

.glass-card:hover::before { left: 100%; }

.glass-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.cat-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(34, 211, 238, 0.3));
}

/* --- LIST ITEMS --- */
.projects-list { display: flex; flex-direction: column; gap: 15px; }

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border: 1px solid var(--glass-border);
    padding: 25px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text);
    transition: 0.3s;
}

.list-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
    padding-left: 35px; /* Slight slide effect */
}

/* --- DETAIL VIEW --- */
.detail-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.detail-img {
    width: 100%;
    height: auto;
    aspect-ratio: 21 / 9; /* Wider cinematic look */
    object-fit: cover;
    border-bottom: 1px solid var(--glass-border);
    display: block;
}

.detail-content { padding: 35px; }

.feature-item {
    display: flex;
    align-items: center;
    margin: 10px 0;
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.6;
}

.feature-item::before {
    content: '⚡';
    margin-right: 10px;
    font-size: 0.8rem;
}

.btn-action {
    display: block;
    width: 100%;
    padding: 18px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 16px;
    color: #000;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    margin-top: 30px;
    transition: 0.3s;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.btn-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(34, 211, 238, 0.4);
}
