/* ignatius-visser.com */

:root {
    --bg: #f7f8fa;
    --surface: #ffffff;
    --surface-2: #eef1f5;
    --text: #18202b;
    --muted: #5b6676;
    --border: #dde2e9;
    --accent: #0f6e78;
    --accent-strong: #0a545c;
    --accent-soft: #e2f2f3;
    --shadow: 0 1px 2px rgb(16 24 40 / 0.05), 0 4px 16px rgb(16 24 40 / 0.06);
    --radius: 14px;
    --max: 1080px;
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f141a;
        --surface: #161d25;
        --surface-2: #1e2731;
        --text: #e7ecf2;
        --muted: #9aa6b4;
        --border: #2a3542;
        --accent: #4cc3cc;
        --accent-strong: #7fd8de;
        --accent-soft: #15353a;
        --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 4px 16px rgb(0 0 0 / 0.25);
    }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.65;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1; padding-bottom: 4rem; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

/* Header & tabs ------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 64px;
}

.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text); font-weight: 650; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--accent);
    color: var(--surface);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}

.tabs { display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }

.tab {
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 550;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.tab:hover { background: var(--surface-2); color: var(--text); }
.tab.is-active { background: var(--accent-soft); color: var(--accent-strong); }

@media (max-width: 720px) {
    .header-inner { flex-direction: column; align-items: stretch; gap: 0.25rem; padding-top: 0.6rem; padding-bottom: 0.5rem; }
    .brand-name { font-size: 0.95rem; }
}

/* Hero (landing) ------------------------------------------------------ */

.hero { padding: 4.5rem 0 3rem; }
.hero-inner { display: grid; grid-template-columns: 1fr auto; gap: 3rem; align-items: center; }
.hero-photo img { width: 260px; height: 260px; object-fit: cover; border-radius: 50%; box-shadow: var(--shadow); border: 4px solid var(--surface); }

@media (max-width: 720px) {
    .hero { padding: 2.5rem 0 1.5rem; }
    .hero-inner { grid-template-columns: 1fr; gap: 1.5rem; }
    .hero-photo { order: -1; }
    .hero-photo img { width: 140px; height: 140px; }
}

.eyebrow { color: var(--accent); font-weight: 650; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; margin: 0 0 0.75rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 46rem; }
.lead p:first-child { margin-top: 0; }

/* Section buttons (landing) ------------------------------------------- */

.section-title { font-size: 1.35rem; margin: 2.5rem 0 1rem; }

.section-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }

.section-button {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.4rem 1.4rem 1.6rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: transform 0.15s, border-color 0.15s;
}
.section-button:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--text); }
.section-button-title { font-weight: 650; font-size: 1.15rem; }
.section-button-summary { color: var(--muted); font-size: 0.95rem; padding-right: 1.5rem; }
.section-button-arrow { position: absolute; right: 1.2rem; top: 1.25rem; color: var(--accent); font-size: 1.2rem; transition: transform 0.15s; }
.section-button:hover .section-button-arrow { transform: translateX(3px); }

/* Inner pages ----------------------------------------------------------- */

.page-header { padding: 3.5rem 1.25rem 1rem; }

.button {
    display: inline-block;
    padding: 0.6rem 1.1rem;
    border-radius: 10px;
    background: var(--accent);
    color: var(--surface);
    text-decoration: none;
    font-weight: 600;
}
.button:hover { background: var(--accent-strong); color: var(--surface); }

.rich-text > :first-child { margin-top: 0; }
.rich-text > :last-child { margin-bottom: 0; }

.prose { max-width: 46rem; }
.prose-wide { max-width: var(--max); }

.figure { margin: 2rem 0; }
.figure img { border-radius: var(--radius); }
figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.5rem; }

blockquote { margin: 2rem 0; padding: 0.25rem 0 0.25rem 1.25rem; border-left: 3px solid var(--accent); color: var(--muted); font-size: 1.15rem; }

/* CV timeline --------------------------------------------------------- */

.cv-section { margin-top: 1rem; }

.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }

.timeline-item { position: relative; display: grid; grid-template-columns: 9rem 1fr; gap: 1.5rem; padding: 0 0 2rem 1.5rem; }
.timeline-item::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 0.45rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--accent);
}
.timeline-meta { color: var(--muted); font-size: 0.9rem; padding-top: 0.15rem; }
.timeline-body h3 { margin-bottom: 0.15rem; }
.timeline-org { color: var(--accent-strong); font-weight: 550; margin: 0 0 0.5rem; }

@media (max-width: 720px) {
    .timeline-item { grid-template-columns: 1fr; gap: 0.25rem; }
}

.skill-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.skill-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }

/* Chips --------------------------------------------------------------- */

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; }

.chip {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.875rem;
    border: 1px solid transparent;
    font-family: inherit;
}
.chips-small .chip { font-size: 0.8rem; padding: 0.15rem 0.6rem; }

button.chip { cursor: pointer; border-color: var(--border); background: var(--surface); }
button.chip:hover { border-color: var(--accent); }
button.chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--surface); }

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 1.5rem; }

/* Cards --------------------------------------------------------------- */

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; margin-top: 1rem; }

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.4rem;
    overflow: hidden;
}
.card[hidden] { display: none; }
.card h3 { margin-bottom: 0.25rem; }
.card p { margin: 0 0 0.75rem; }
.card-meta { color: var(--muted); font-size: 0.9rem; }
.card-links { display: flex; gap: 1rem; margin-top: auto !important; padding-top: 0.5rem; font-weight: 600; font-size: 0.95rem; }

.project-card { padding: 0; }
.card-image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 1.4rem; }
.card-body .chips { margin-bottom: 0.75rem; }

details { margin-bottom: 0.75rem; }
summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 0.95rem; }
details[open] summary { margin-bottom: 0.5rem; }

.badge {
    align-self: flex-start;
    padding: 0.15rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem !important;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--accent-soft);
    color: var(--accent-strong);
}
.badge-degree { background: #ece6fb; color: #5130a8; }
.badge-award { background: #fdf0d8; color: #8a5a00; }
.badge-course { background: var(--surface-2); color: var(--muted); }

@media (prefers-color-scheme: dark) {
    .badge-degree { background: #2c2350; color: #c6b6ff; }
    .badge-award { background: #3d2f12; color: #f3c56b; }
}

/* Data ---------------------------------------------------------------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 1.5rem 0 2rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; display: flex; flex-direction: column; gap: 0.15rem; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--accent); line-height: 1.1; }
.stat-label { font-weight: 600; }
.stat-note { color: var(--muted); font-size: 0.875rem; }

.chart-card { margin: 0 0 2rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.chart-wrap { position: relative; height: 340px; }

.table-wrap { overflow-x: auto; margin: 0 0 2rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
caption { text-align: left; padding: 1rem 1rem 0.5rem; font-weight: 650; }
th, td { padding: 0.65rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--surface-2); font-weight: 650; }
tbody tr:last-child td { border-bottom: 0; }

/* Footer -------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1.5rem; padding-bottom: 1.5rem; }
.footer-inner p { margin: 0; }
.footer-links { list-style: none; display: flex; gap: 1.25rem; margin: 0; padding: 0; }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
