/* Project cards (list) */
.project-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

a.project-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1.25rem 1.375rem;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.05s;
}

a.project-card:hover {
    border-color: var(--brand-primary-light);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: inherit;
}

a.project-card:active {
    transform: translateY(1px);
}

.project-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.project-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    color: var(--text-primary);
}

.project-card-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0 0 1rem;
    line-height: 1.5;
    flex-grow: 1;
}

.project-card-meta {
    display: grid;
    gap: 0.5rem;
    margin: 0 0 1rem;
    font-size: 0.8125rem;
}

.project-card-meta dt {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin: 0;
}

.project-card-meta dd {
    margin: 0.125rem 0 0;
    color: var(--text-secondary);
}

.project-card-cta {
    margin-top: auto;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-primary);
}

.status-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    white-space: nowrap;
}

.status-planned {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #3730a3;
}

.status-inprogress {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.status-completed {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #374151;
}

.status-onhold {
    background: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}

/* Client project timeline */
.project-timeline .timeline-vertical {
    position: relative;
    padding-left: 1.75rem;
}

.project-timeline .timeline-vertical::before {
    content: "";
    position: absolute;
    left: 0.4375rem;
    top: 0.25rem;
    bottom: 0.25rem;
    width: 2px;
    background: var(--border);
}

.project-timeline .timeline-event {
    position: relative;
    padding-bottom: 1.25rem;
}

.project-timeline .timeline-event:last-child {
    padding-bottom: 0;
}

.project-timeline .timeline-marker {
    position: absolute;
    left: -1.75rem;
    top: 0.85rem;
    width: 0.875rem;
    height: 0.875rem;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--brand-primary);
    z-index: 1;
}

.project-timeline .timeline-card {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
    background: var(--surface);
}

.project-timeline .timeline-card-collapsed .timeline-card-header {
    margin-bottom: 0;
}

.project-timeline .timeline-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.project-timeline .timeline-toggle {
    color: var(--text-muted);
    line-height: 1;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.project-timeline .timeline-toggle:hover,
.project-timeline .timeline-toggle:focus {
    color: var(--text-primary);
}

.project-timeline .timeline-header-main {
    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.project-timeline .timeline-header-main:hover,
.project-timeline .timeline-header-main:focus {
    color: inherit;
    text-decoration: none;
}

.project-timeline h3.timeline-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.35;
}

.project-timeline .timeline-meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

.project-timeline .timeline-body {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.project-timeline .timeline-markdown :first-child {
    margin-top: 0;
}

.project-timeline .timeline-markdown :last-child {
    margin-bottom: 0;
}

.project-timeline .timeline-markdown p {
    margin: 0 0 0.75rem;
    line-height: 1.55;
}

.project-timeline .timeline-markdown ul,
.project-timeline .timeline-markdown ol {
    margin: 0 0 0.75rem 1.25rem;
    padding: 0;
}

.project-timeline .timeline-markdown h1,
.project-timeline .timeline-markdown h2,
.project-timeline .timeline-markdown h3,
.project-timeline .timeline-markdown h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0.75rem 0 0.35rem;
}

.project-timeline .timeline-markdown a {
    color: var(--brand-primary);
    text-decoration: underline;
}

.project-timeline .timeline-markdown code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.88em;
    background: var(--surface-alt);
    padding: 0.15em 0.35em;
    border-radius: 0.25rem;
}

.project-timeline .timeline-markdown pre {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    padding: 0.75rem;
    overflow-x: auto;
    margin: 0.5rem 0 0.75rem;
}

.project-timeline .timeline-markdown .mermaid {
    display: block;
    margin: 0.75rem 0;
    overflow-x: auto;
    text-align: center;
}

.project-timeline .timeline-links,
.project-timeline .timeline-files {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.project-timeline .timeline-links li,
.project-timeline .timeline-files li {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
}

.project-timeline .filter-bar .search-input {
    position: relative;
    display: flex;
    align-items: center;
}

.project-timeline .filter-bar .search-input .bi-search {
    position: absolute;
    left: 0.75rem;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

.project-timeline .filter-bar .search-input .form-control {
    padding-left: 2.25rem;
}
