/* StackMates — style.css */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

:root {
    --bg: #0d0f14;
    --surface: #151820;
    --surface2: #1c2030;
    --border: #2a2f42;
    --accent: #6c63ff;
    --accent2: #ff6b6b;
    --green: #3ecf8e;
    --text: #e8eaf0;
    --muted: #7a7f94;
    --radius: 12px;
    --radius-sm: 8px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* NAV */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 64px;
    background: rgba(13, 15, 20, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-logo {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--text);
    text-decoration: none;
}

.nav-logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
}

.nav-links .btn-nav {
    background: var(--accent);
    color: #fff;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: opacity 0.2s;
}

.nav-links .btn-nav:hover {
    opacity: 0.85;
    color: #fff;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.3rem;
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.18s;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: #5a52e0;
}

.btn-danger {
    background: var(--accent2);
    color: #fff;
}

.btn-danger:hover {
    background: #e05555;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-success {
    background: var(--green);
    color: #0d0f14;
    font-weight: 600;
}

.btn-success:hover {
    background: #35b87a;
}

/* CARDS */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* BADGES */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.badge-stack {
    background: rgba(108, 99, 255, 0.15);
    color: var(--accent);
    border: 1px solid rgba(108, 99, 255, 0.3);
}

.badge-role {
    background: rgba(255, 107, 107, 0.12);
    color: var(--accent2);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.badge-open {
    background: rgba(62, 207, 142, 0.12);
    color: var(--green);
    border: 1px solid rgba(62, 207, 142, 0.3);
}

.badge-inprogress {
    background: rgba(255, 200, 80, 0.12);
    color: #ffc850;
    border: 1px solid rgba(255, 200, 80, 0.3);
}

.badge-done {
    background: rgba(120, 120, 140, 0.15);
    color: var(--muted);
    border: 1px solid var(--border);
}

/* FORMS */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.1rem;
}

label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input,
textarea,
select {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    padding: 0.7rem 1rem;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

select option {
    background: var(--surface2);
}

/* TAG INPUT */
.tags-input-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    cursor: text;
    transition: border-color 0.2s;
}

.tags-input-wrapper:focus-within {
    border-color: var(--accent);
}

.tags-input-wrapper .tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(108, 99, 255, 0.2);
    color: var(--accent);
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.tags-input-wrapper .tag button {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
}

.tags-input-wrapper input {
    background: transparent;
    border: none;
    padding: 0.2rem 0.3rem;
    font-size: 0.9rem;
    flex: 1;
    min-width: 100px;
}

/* LAYOUT */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.page-header {
    padding: 3rem 0 2rem;
}

.page-header h1 {
    font-family: 'Syne', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--muted);
    font-size: 1rem;
}

/* GRID */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.2rem;
    padding-bottom: 3rem;
}

/* TOAST */
#toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.8rem 1.3rem;
    font-size: 0.9rem;
    color: var(--text);
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.25s;
    pointer-events: none;
}

#toast.show {
    opacity: 1;
    transform: translateY(0);
}

#toast.success {
    border-color: var(--green);
    color: var(--green);
}

#toast.error {
    border-color: var(--accent2);
    color: var(--accent2);
}

/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    width: 100%;
    max-width: 520px;
    transform: translateY(20px);
    transition: transform 0.25s;
}

.modal-overlay.open .modal {
    transform: translateY(0);
}

.modal h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.3rem;
}

.modal-actions {
    display: flex;
    gap: 0.7rem;
    justify-content: flex-end;
    margin-top: 1.2rem;
}

/* AVATAR */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    flex-shrink: 0;
}

/* FILTERS */
.filters {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.filter-btn {
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s;
    font-family: 'DM Sans', sans-serif;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--muted);
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* RESPONSIVE */
@media (max-width: 640px) {
    nav {
        padding: 0 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }
}