/* =====================================================
    CORE & THEME VARIABLES (Reused from Portfolio)
=====================================================
*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Core colors */
    --color-primary: #0071e3;
    --color-primary-light: #0077ed;
    --color-primary-dark: #005bbf;
    --color-secondary: #ff6b9d;
    --color-accent: #7877c6;
    
    /* Theme colors - Light */
    --bg-primary: #f5f5f7;
    --bg-secondary: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --accent: var(--color-primary);
    --accent-hover: var(--color-primary-light);
    
    /* Glass effects */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: rgba(0, 0, 0, 0.1);
    
    /* Navigation */
    --nav-bg: rgba(255, 255, 255, 0.8);
    --nav-border: rgba(255, 255, 255, 0.1);
    --nav-item-bg: rgba(255, 255, 255, 0.4);
    --nav-item-hover: rgba(255, 255, 255, 0.6);
    --nav-shadow: rgba(0, 0, 0, 0.05);

    /* Transitions & Sizing */
    --transition-base: 300ms;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --elevation-3: 0 8px 16px var(--glass-shadow);
}

[data-theme="dark"] {
    /* Theme colors - Dark */
    --bg-primary: #000000;
    --bg-secondary: #1d1d1f;
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --accent: #2997ff;
    --accent-hover: #409cff;
    
    /* Glass effects - Dark */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-shadow: rgba(0, 0, 0, 0.5);
    
    /* Navigation - Dark */
    --nav-bg: rgba(0, 0, 0, 0.7);
    --nav-border: rgba(255, 255, 255, 0.05);
    --nav-item-bg: rgba(255, 255, 255, 0.1);
    --nav-item-hover: rgba(255, 255, 255, 0.15);
    --nav-shadow: rgba(0, 0, 0, 0.2);
}

/* =====================================================
    GLOBAL STYLES (Reused from Portfolio)
=====================================================
*/
body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 107, 107, 0.3), transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(72, 219, 251, 0.3), transparent 50%);
    pointer-events: none;
    z-index: -1;
    opacity: 0.6;
}

[data-theme="dark"] body::before {
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.15), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 107, 107, 0.15), transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(72, 219, 251, 0.15), transparent 50%);
    opacity: 0.4;
}

/* =====================================================
    NAVIGATION & FOOTER (Reused from Portfolio)
=====================================================
*/
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
    padding: 0 2rem;
    background: var(--nav-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--nav-border);
    box-shadow: var(--nav-shadow);
}

.logo {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    font-size: 24px;
    background: linear-gradient(135deg, var(--accent), #ff6b9d);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.theme-toggle {
    background: var(--nav-item-bg);
    border: 1px solid var(--nav-border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
    color: var(--text-primary);
}

.theme-toggle:hover {
    background: var(--nav-item-hover);
}

.footer {
    padding: 40px 2rem;
    background: var(--bg-secondary);
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--nav-border);
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-link {
    width: 36px;
    height: 36px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s;
    border: 1px solid var(--glass-border);
}

.social-link:hover {
    background: var(--accent);
    color: #ffffff;
    transform: scale(1.1);
}

/* =====================================================
    CORE COMPONENTS (Glass, Buttons)
=====================================================
*/
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    transition: 
        transform var(--transition-base) var(--ease-out-expo),
        box-shadow var(--transition-base) var(--ease-out-expo);
    box-shadow: var(--elevation-3);
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px var(--glass-shadow);
}

.glass-button {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.glass-button:hover {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    transform: translateY(-2px);
}

.glass-button.secondary {
    background: transparent;
    border-color: var(--glass-border);
}

.glass-button.secondary:hover {
    background: var(--nav-item-hover);
    border-color: var(--glass-border);
    color: var(--text-primary);
}

/* =====================================================
    NEW: PROJECT PAGE STYLES
=====================================================
*/

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

.project-hero {
    text-align: center;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.project-hero h1 {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -1.5px;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.project-hero p {
    font-size: 20px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
    align-items: start; /* <-- THIS IS THE FIX */
}

.project-card {
    display: flex;
    flex-direction: column;
}

.project-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 1rem;
}

.project-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--glass-shadow);
}

.project-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-title-group {
    flex-grow: 1;
}

.project-title-group h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.project-title-group p {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

.type-tag {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.type-tag.ios {
    background: rgba(0, 113, 227, 0.1);
    color: var(--color-primary);
}
.type-tag.game {
    background: rgba(255, 107, 157, 0.1);
    color: var(--color-secondary);
}
.type-tag.web {
    background: rgba(120, 119, 198, 0.1);
    color: var(--color-accent);
}

[data-theme="dark"] .type-tag.ios {
    background: rgba(41, 151, 255, 0.15);
    color: var(--accent);
}

.project-summary {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 16px;
    margin-bottom: 1rem;
    flex-grow: 1; /* Makes card heights more consistent */
}

.project-tech-stack {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.project-tech-stack span {
    background: var(--nav-item-bg);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--glass-border);
}

.project-links {
    display: flex;
    gap: 12px;
    margin-bottom: 1.5rem;
}

/* =====================================================
    NEW: DRAWER SYSTEM STYLES
=====================================================
*/
.drawer-toggle {
    background: var(--nav-item-bg);
    border: 1px solid var(--nav-border);
    border-radius: 12px;
    padding: 10px 16px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.drawer-toggle:hover {
    background: var(--nav-item-hover);
    border-color: var(--glass-border);
}

.drawer-toggle i {
    transition: transform 0.3s var(--ease-out-expo);
}

.drawer-toggle.active i {
    transform: rotate(180deg);
}

.project-drawer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s var(--ease-out-expo);
}

.project-drawer.active {
    max-height: 1000px; /* Large value to allow for content */
}

.drawer-content {
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    margin-top: 1.5rem;
}

.drawer-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.drawer-content p,
.drawer-content ul {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.drawer-content ul {
    list-style: none;
    padding-left: 0;
}

.drawer-content ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
}

.drawer-content ul li i {
    position: absolute;
    left: 0;
    top: 5px;
    font-size: 14px;
    color: var(--accent);
}

/* =====================================================
    RESPONSIVE MEDIA QUERIES
=====================================================
*/
@media (max-width: 968px) {
    .project-hero h1 {
        font-size: 40px;
    }
    .project-hero p {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .project-container {
        padding: 1rem;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }

    nav {
        padding: 0 1rem;
    }
}

@media (max-width: 600px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .project-header {
        flex-direction: column;
    }

    .type-tag {
        align-self: flex-start;
        margin-top: 8px;
    }
}