/* Modern Clean Design - Dark Mode Default */
:root {
    /* Dark Mode Defaults */
    --bg-color: #121212;
    --text-primary: #f5f5f5;
    --text-secondary: #a3a3a3;
    --card-bg: #1e1e1e;
    --card-hover-bg: #252525;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --accent-color: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4), 0 4px 10px rgba(0, 0, 0, 0.2);
    --transition-speed: 0.35s;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Light Mode Override */
body.light-mode {
    --bg-color: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --card-bg: #ffffff;
    --card-hover-bg: #ffffff;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
    --accent-color: #3b82f6;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.06), 0 5px 10px rgba(0, 0, 0, 0.04);
}

/* Theme Toggle Button */
.theme-toggle {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 0.9rem;
    transition: all var(--transition-speed) ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

body.light-mode .theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Header */
header {
    width: 100%;
    max-width: 1200px;
    padding: 4rem 2rem 2rem;
    text-align: center;
}

h1 {
    font-weight: 800;
    font-size: 3rem;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
}

/* Main Grid */
main {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    flex: 1;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
}

/* Project Card */
.project-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 220px;
    height: auto;
    position: relative;
    overflow: hidden;
    gap: 0.5rem;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    background-color: var(--card-hover-bg);
    border-color: var(--border-hover);
}

.project-icon {
    font-size: 3.2rem;
    margin-bottom: 0.2rem;
    color: var(--text-secondary);
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.project-card:hover .project-icon {
    color: var(--text-primary);
    transform: scale(1.1) translateY(-2px);
    filter: drop-shadow(0 8px 12px rgba(0,0,0,0.2));
}

.project-title {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Loading State */
.loader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    width: 100%;
    grid-column: 1 / -1;
    color: var(--text-secondary);
    font-size: 1.2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

/* Error State */
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    color: #ef4444;
    padding: 2rem;
    background: #fef2f2;
    border-radius: 8px;
    border: 1px solid #fee2e2;
}

/* Footer */
footer {
    width: 100%;
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: auto;
}