/* ── Layout ─────────────────────────────────────────────────────────────────── */

nav {
    border-bottom: 1px solid var(--pico-muted-border-color);
    padding: 0.75rem 0;
    margin-bottom: 2rem;
    background: var(--pico-background-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-title {
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    color: var(--pico-color);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

nav a.active {
    color: var(--pico-primary);
    font-weight: 600;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    color: inherit;
    width: auto;
    display: inline-flex;
    align-items: center;
}

footer {
    margin-top: 4rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--pico-muted-border-color);
    color: var(--pico-muted-color);
}

/* ── Homepage ───────────────────────────────────────────────────────────────── */

.hero {
    text-align: center;
    padding: 2rem 0 1rem;
}

.hero h1 { margin-bottom: 0.5rem; }
.hero p   { color: var(--pico-muted-color); }

.search-box {
    max-width: 600px;
    margin: 1.5rem auto;
}

.search-box input {
    width: 100%;
    font-size: 1.1rem;
}

.hint {
    text-align: center;
    color: var(--pico-muted-color);
    margin-top: 2rem;
}

.results-count {
    color: var(--pico-muted-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* ── People grid ────────────────────────────────────────────────────────────── */

.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.person-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    padding: 1rem 1.25rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.person-card:hover {
    border-color: var(--pico-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.person-name {
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.person-meta { margin-bottom: 0.3rem; }

.person-dates {
    font-size: 0.8rem;
    color: var(--pico-muted-color);
}

/* ── Tags ───────────────────────────────────────────────────────────────────── */

.tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: var(--pico-muted-border-color);
    color: var(--pico-color);
    margin-right: 0.25rem;
    white-space: nowrap;
}

.tag-eng  { background: #dbeafe; color: #1e40af; }
.tag-prom { background: #dcfce7; color: #166534; }

/* ── Person profile ─────────────────────────────────────────────────────────── */

.person-header {
    margin-bottom: 2rem;
}

.person-header h1 { margin: 0.25rem 0 0.5rem; }

.back {
    font-size: 0.9rem;
    color: var(--pico-muted-color);
    text-decoration: none;
}
.back:hover { color: var(--pico-primary); }

/* ── Timeline ───────────────────────────────────────────────────────────────── */

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.45rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--pico-muted-border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-marker {
    position: absolute;
    left: -1.6rem;
    top: 0.35rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    border: 2px solid;
}

.timeline-item.engagement .timeline-marker {
    background: #dbeafe;
    border-color: #3b82f6;
}

.timeline-item.promotion .timeline-marker {
    background: #dcfce7;
    border-color: #22c55e;
}

.timeline-content {
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    padding: 1rem 1.25rem;
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.event-type {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
}

.event-type.engagement { background: #dbeafe; color: #1e40af; }
.event-type.promotion  { background: #dcfce7; color: #166534; }

.event-date {
    font-size: 0.85rem;
    color: var(--pico-muted-color);
}

.event-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.event-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
    font-size: 0.875rem;
    color: var(--pico-muted-color);
}

/* ── Promotion from/to ──────────────────────────────────────────────────────── */

.promotion-arrow {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.from-box, .to-box {
    flex: 1;
    background: var(--pico-card-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    padding: 0.5rem 0.75rem;
}

.box-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pico-muted-color);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.classification { color: var(--pico-primary); font-weight: 600; }

.arrow {
    font-size: 1.25rem;
    color: var(--pico-muted-color);
    padding-top: 1.5rem;
}

/* ── Employment opportunities ───────────────────────────────────────────────── */

.filter-form { margin-bottom: 1.5rem; }

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.filter-row input {
    flex: 1;
    min-width: 150px;
    margin: 0;
}

.filter-row button, .filter-row a[role=button] {
    white-space: nowrap;
    margin: 0;
}

.eo-list { display: flex; flex-direction: column; gap: 1rem; }

.eo-card {
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    padding: 1rem 1.25rem;
}

.eo-card header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    border: none;
    padding: 0;
    margin-bottom: 0.75rem;
}

.eo-title {
    font-weight: 600;
    font-size: 1rem;
}

.eo-body { font-size: 0.875rem; }

.eo-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 2rem;
    color: var(--pico-muted-color);
    margin-bottom: 0.5rem;
}

.eo-website { margin-top: 0.25rem; }

/* ── Pagination ─────────────────────────────────────────────────────────────── */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 1rem 0;
    font-size: 0.9rem;
}
