/* ===================== */
/* Base Theme Variables */
/* ===================== */
.theme-dark {
    /* Dark theme variables */
    --bg-primary: #121212;
    --text-primary: #f0f0f0;
    --text-secondary: #aaa;
    --card-bg: #1e1e1e;
    --footer-bg: #0a0a0a;
    --logo-color: #f0f0f0;
    --logo-accent: #6C63FF;
    --card-shadow: 0 20px 30px rgba(0, 0, 0, 0.4);
    --theme-toggle-bg: #1e1e1e;
    --theme-toggle-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    --theme-icon-color: #f0f0f0;
    --nav-link-color: #aaa;
    --card-link-color: #6C63FF;
    --card-link-hover-bg: #6C63FF;
    --card-link-hover-color: #ffffff;
    --social-icon-color: #aaa;
    --copyright-color: #666;
    --border-color: #333;
    --error-description-color: #aaa;
    --home-button-hover-shadow: 0 10px 20px rgba(108, 99, 255, 0.2);
}

.theme-light {
    /* Light theme variables */
    --bg-primary: #f8f9fa;
    --text-primary: #333;
    --text-secondary: #666;
    --card-bg: #ffffff;
    --footer-bg: #e8e8e8;
    --logo-color: #333;
    --logo-accent: #6C63FF;
    --card-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
    --theme-toggle-bg: #f0f0f0;
    --theme-toggle-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --theme-icon-color: #333;
    --nav-link-color: #666;
    --social-icon-color: #666;
    --copyright-color: #888;
    --border-color: #e0e0e0;
    --error-description-color: #666;
    --home-button-hover-shadow: 0 10px 20px rgba(108, 99, 255, 0.1);
}

/* ===================== */
/* Base Styles */
/* ===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    min-height: 100vh;
}

body {
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    transition: background 0.5s ease, color 0.5s ease;
}

/* ===================== */
/* Header & Navigation */
/* ===================== */
header {
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 1px;
    min-height: 2rem;
    display: flex;
    align-items: center;
}

.logo a.img-link {
	line-height: 0;
}

nav a {
    color: var(--nav-link-color);
    text-decoration: none;
    margin-left: 1.75rem;
    font-size: 0.95rem;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--logo-accent);
}

/* ===================== */
/* Hero Section */
/* ===================== */
.hero {
    text-align: center;
    padding: 6rem 5% 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    line-height: 1.1;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 3rem;
    transition: color 0.5s ease;
}

/* ===================== */
/* Projects Grid */
/* ===================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.project-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow);
}

.card-image {
    position: relative;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
}

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

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

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.card-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.card-link {
    margin-top: auto;
    display: inline-block;
    color: var(--card-link-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    padding: 8px 15px;
    border: 1px solid var(--card-link-color);
    border-radius: 20px;
}

.card-link:hover {
    color: var(--card-link-hover-color);
    background: var(--card-link-hover-bg);
}

.card-link i {
    margin-left: 5px;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.card-link:hover i {
    transform: translateX(3px);
}

/* ===================== */
/* Footer */
/* ===================== */
footer {
    margin-top: auto;
    padding: 3rem 5%;
    text-align: center;
    background: var(--footer-bg);
    transition: background 0.5s ease;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.social-links a {
    color: var(--social-icon-color);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--logo-accent);
}

.copyright {
    color: var(--copyright-color);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* ===================== */
/* Theme Toggle */
/* ===================== */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--theme-toggle-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--theme-toggle-shadow);
    z-index: 100;
    transition: background 0.5s ease, box-shadow 0.5s ease;
}

.theme-toggle i {
    font-size: 1.2rem;
    color: var(--theme-icon-color);
    transition: color 0.5s ease;
}

/* ===================== */
/* 404 Page Styles */
/* ===================== */
.error-container {
    text-align: center;
    padding: 5rem 2rem;
    max-width: 700px;
    margin: 0 auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.error-code {
    font-size: 8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6C63FF 0%, #8a84ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
    line-height: 1;
}

.error-message {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

.error-description {
    color: var(--error-description-color);
    margin-bottom: 3rem;
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.home-button {
    display: inline-block;
    padding: 12px 30px;
    background: #6C63FF;
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: 2px solid #6C63FF;
}

.home-button:hover {
    background: transparent;
    color: #6C63FF;
    transform: translateY(-3px);
    box-shadow: var(--home-button-hover-shadow);
}

/* ===================== */
/* Responsive Styles */
/* ===================== */
@media (max-width: 768px) {
    .projects-grid {
        padding: 2rem 8%;
    }
    
    .hero {
        padding: 4rem 5% 2rem;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1rem;
        padding: 0 5%;
    }
    
    .error-code {
        font-size: 6rem;
    }
}

@media (max-width: 480px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem 5%;
    }
    
    nav {
        display: flex;
        justify-content: center;
        width: 100%;
    }
    
    nav a {
        margin: 0 0.75rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .error-code {
        font-size: 4rem;
    }
    
    .error-message {
        font-size: 1.4rem;
    }
    
    .theme-toggle {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
    
    .theme-toggle i {
        font-size: 1rem;
    }
}