:root {
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(0, 0, 0, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --blob-1: #e0f2fe;
    --blob-2: #fae8ff;
    --blob-3: #f1f5f9;
}

body.dark-mode {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --blob-1: #1e1b4b;
    --blob-2: #312e81;
    --blob-3: #0f172a;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    transition: background-color 0.4s ease-in-out, color 0.4s ease-in-out;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
header {
    height: 80px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 10;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-weight: 800;
    letter-spacing: -1px;
    font-size: 1.5rem;
}

.logo span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
}

#theme-toggle:hover {
    transform: scale(1.1);
}

.sun-icon { display: none; }
body.dark-mode .moon-icon { display: none; }
body.dark-mode .sun-icon { display: block; }

/* Hero */
.hero {
    padding: 60px 0;
    text-align: center;
    position: relative;
    z-index: 5;
}

.hero h2 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -2px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.8;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    padding-bottom: 100px;
    position: relative;
    z-index: 5;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    box-shadow: var(--glass-shadow);
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.project-image {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background: rgba(0,0,0,0.05);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.project-info p {
    font-size: 0.95rem;
    opacity: 0.7;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-link {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #6366f1;
}

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: blur(100px);
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: var(--blob-1);
    animation: blobify 20s infinite alternate;
}

.blob-1 { top: -100px; right: -100px; background: var(--blob-1); }
.blob-2 { bottom: -100px; left: -100px; background: var(--blob-2); animation-delay: -5s; }
.blob-3 { top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--blob-3); animation-delay: -10s; }

@keyframes blobify {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--card-border);
    opacity: 0.6;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .hero h2 { font-size: 2.5rem; }
}
