@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    --secondary: #a855f7;
    --dark: #0f172a;
    --light: #f8fafc;
    --card-bg: rgba(15, 23, 42, 0.9);
    --hover-bg: rgba(99, 102, 241, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark);
    padding: 1rem;
}

/* Added Navigation Styles */
.portfolio-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

.nav-back {
    color: var(--light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
}

.nav-back:hover {
    background: var(--hover-bg);
    transform: translateX(-5px);
}

.portfolio-nav h2 {
    color: var(--light);
    font-size: 1.5rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.portfolio-container {
    width: 100%;
    max-width: 1200px;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    margin-top: 5rem; /* Add space for fixed nav */
}

.portfolio-container h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.admin-controls {
    margin-bottom: 2rem;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card:hover {
    transform: translateY(-5px);
    background: var(--hover-bg);
}

.project-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

.project-status.completed { color: #10b981; }
.project-status.in_progress { color: #f59e0b; }

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    color: var(--light);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.project-info p {
    color: #94a3b8;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Empty State Styles */
.no-projects {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.no-projects i {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.no-projects h2 {
    color: var(--light);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.no-projects p {
    color: #94a3b8;
    font-size: 1rem;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    width: 90%;
    max-width: 500px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal.hidden {
    display: none;
}

.modal h2 {
    color: var(--light);
    margin-bottom: 1.5rem;
    text-align: center;
}

.modal form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal input,
.modal textarea,
.modal select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--light);
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

.modal input:focus,
.modal textarea:focus,
.modal select:focus {
    outline: none;
    border-color: var(--primary);
}

@media (max-width: 768px) {
    .portfolio-container {
        margin: 1rem;
        padding: 1.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-nav {
        padding: 1rem;
    }
    
    .portfolio-nav h2 {
        font-size: 1.2rem;
    }
}

/* Tech Stack Styles */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-stack span {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #94a3b8;
    transition: all 0.3s ease;
}

.tech-stack span:hover {
    background: var(--hover-bg);
    color: var(--primary);
    transform: translateY(-2px);
}

.project-status.in_progress {
    background: rgba(234, 179, 8, 0.2);
    color: #eab308;
}
