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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: white;
    min-height: 100vh;
    padding: 40px 20px 40px 80px;
    position: relative;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    position: relative;
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 20px;
    padding: 0 20px;
}

.filter-btn {
    padding: 4px 8px;
    border: 1px solid #FF1493;
    background: white;
    color: #FF1493;
    border-radius: 12px;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: #FF1493;
    background: #FF1493;
    color: white;
}

.filter-btn.active {
    background: #FF1493;
    color: white;
    border-color: #FF1493;
}

.filter-btn.all {
    background: white;
    border-color: #FF1493;
    font-weight: 600;
}

.filter-btn.all.active {
    background: #FF1493;
    border-color: #FF1493;
    color: white;
}

.content-wrapper {
    position: relative;
    display: flex;
    gap: 0;
    margin-top: 20px;
}

.timeline-sidebar {
    width: 60px;
    flex-shrink: 0;
    position: absolute;
    left: -60px;
    top: 0;
    height: 100%;
    z-index: 50;
}

.timeline-line {
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #FF1493;
}

.year-marker {
    position: absolute;
    left: 0;
    padding-left: 20px;
}

.year-marker::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 3px;
    width: 10px;
    height: 10px;
    background: #FF1493;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #FF1493;
}

.year-label {
    font-size: 0.75rem;
    font-weight: bold;
    color: #FF1493;
}

.year-section {
    position: relative;
    margin-bottom: 40px;
}

.projects-container {
    flex: 1;
    position: relative;
    width: 100%;
}

.projects-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.project-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Importance-based widths (base 10) */
.project-card.importance-0,
.project-card.importance-1,
.project-card.importance-2,
.project-card.importance-3 {
    width: calc(15% - 12px); /* 1.5/10 of row */
}

.project-card.importance-4,
.project-card.importance-5,
.project-card.importance-6 {
    width: calc(30% - 12px); /* 3/10 of row */
}

.project-card.importance-7,
.project-card.importance-8,
.project-card.importance-9 {
    width: calc(45% - 12px); /* 4.5/10 of row */
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(255,20,147,0.3);
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #FF1493;
}

/* For cards with no title (importance < 3), make card just the image */
.project-card.importance-0,
.project-card.importance-1,
.project-card.importance-2 {
    display: flex;
    flex-direction: column;
}

.project-card.importance-0 .project-content,
.project-card.importance-1 .project-content,
.project-card.importance-2 .project-content {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0;
    background: transparent;
}

.project-content {
    padding: 8px;
    position: relative;
}

.project-title {
    font-weight: 600;
    color: #333;
    font-size: 0.7rem;
    line-height: 1.3;
    padding-right: 20px;
}

.delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 16px;
    height: 16px;
    background: rgba(255, 20, 147, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 0.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    padding: 0;
    line-height: 1;
    z-index: 10;
}

.project-card:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    background: rgba(230, 0, 122, 0.9);
}

.add-project-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #FF1493;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255,20,147,0.4);
    transition: transform 0.3s ease;
}

.add-project-btn:hover {
    transform: scale(1.1);
    background: #e6007a;
}

@media (max-width: 767px) {
    .container {
        padding: 20px;
    }

    .content-wrapper {
        gap: 20px;
    }

    .timeline-sidebar {
        width: 80px;
    }

    .projects-row {
        flex-wrap: wrap;
    }

    .project-card {
        min-width: calc(50% - 10px);
    }
}

@media (max-width: 500px) {
    .timeline-sidebar {
        display: none;
    }

    .project-card {
        min-width: 100%;
    }
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-content h2 {
    margin-bottom: 16px;
    color: #333;
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    color: #666;
    font-weight: 600;
    font-size: 0.8rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 70px;
}

.form-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-primary {
    background: #FF1493;
    color: white;
}

.btn-primary:hover {
    background: #e6007a;
}

.btn-secondary {
    background: #e0e0e0;
    color: #666;
}

.btn-secondary:hover {
    background: #d0d0d0;
}
