/* Shared styles for index.html (generated by cv/build.py), certifications.html and 404.html.
   Same palette as the CV (cv/cv.typ). System fonts only: no web-font or icon-font downloads. */

:root {
    --ink: #1b1f24;
    --soft: #39414b;
    --muted: #5b6472;
    --accent: #1d4e89;
    --accent-dark: #163d6b;
    --rule: #d6dee8;
    --tint: #f1f5fa;
    --bg: #ffffff;
    --radius: 10px;
    --wrap: 860px;
    --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
}

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

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--soft);
    background: var(--bg);
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-dark); }
strong { color: var(--ink); }
h1, h2, h3 { color: var(--ink); line-height: 1.25; margin: 0; }

:focus-visible { outline: 3px solid #7aa7dc; outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip-link {
    position: absolute; left: 12px; top: -48px; z-index: 10;
    padding: 8px 12px; background: var(--ink); color: #fff; border-radius: 6px;
}
.skip-link:focus { top: 12px; color: #fff; }

.icon { width: 1.1em; height: 1.1em; flex: none; }

/* ---------- Header band ---------- */
.hero { background: var(--tint); padding: 56px 0 44px; }
.hero h1 { font-size: clamp(2rem, 4.5vw + 1rem, 2.9rem); font-weight: 700; letter-spacing: -0.015em; }
.hero .role { margin: 10px 0 0; font-size: clamp(1.05rem, 1vw + 0.9rem, 1.3rem); font-weight: 500; color: var(--accent); }
.stack { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.stack li { padding: 3px 10px; border: 1px solid #c8d4e3; border-radius: 999px; background: var(--bg); font-size: 0.85rem; font-weight: 600; color: var(--soft); }
.hero .tagline { margin: 16px 0 0; max-width: 640px; font-size: 1.06rem; color: var(--soft); }
.hero .meta { margin: 10px 0 0; color: var(--muted); }
.availability { display: inline-flex; align-items: center; gap: 7px; color: #1d6b43; font-weight: 600; }
.availability::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2e9e62; box-shadow: 0 0 0 3px rgba(46, 158, 98, 0.18); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; border: 1px solid var(--rule); border-radius: 999px;
    background: var(--bg); color: var(--accent); font-weight: 600; text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { border-color: var(--accent); color: var(--accent-dark); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn small { font-weight: 500; opacity: 0.8; }
.credential {
    display: inline-flex; align-items: center; gap: 10px; margin-top: 18px;
    padding: 8px 14px; border-radius: var(--radius); background: rgba(29, 78, 137, 0.07);
    color: var(--soft); font-size: 0.92rem; text-decoration: none;
}
.credential .icon { color: var(--accent); width: 1.3em; height: 1.3em; }
.credential:hover { background: rgba(29, 78, 137, 0.12); color: var(--ink); }
.alt-formats { margin: 14px 0 0; font-size: 0.9rem; color: var(--muted); }

/* ---------- Sections ---------- */
main { padding-bottom: 24px; }
.section { margin-top: 52px; }
.section-label {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 20px; font-size: 0.8rem; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
}
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

.lead { margin: 0; font-size: 1.06rem; color: var(--ink); }

/* Highlights */
.highlights { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 36px 0 0; padding: 0; list-style: none; }
.highlight { padding: 18px 18px 16px; border: 1px solid var(--rule); border-radius: var(--radius); }
.highlight .value { display: block; font-size: 1.55rem; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.highlight .label { display: block; margin-top: 4px; font-size: 0.92rem; color: var(--muted); line-height: 1.45; }

/* Experience */
.job { padding: 22px 0; border-top: 1px solid var(--rule); }
.job:first-of-type { border-top: 0; padding-top: 0; }
.job-head { display: grid; grid-template-columns: 1fr auto; column-gap: 20px; row-gap: 2px; }
.job-head h3 { font-size: 1.08rem; }
.job-head p { margin: 0; }
.job-head .when { font-weight: 600; color: var(--soft); white-space: nowrap; text-align: right; }
.job-head .org { color: var(--muted); }
.job-head .org a { font-weight: 600; text-decoration: none; }
.job-head .org a:hover { text-decoration: underline; }
.job-head .where { color: var(--muted); white-space: nowrap; text-align: right; }
.job ul { margin: 12px 0 0; padding-left: 1.15em; }
.job li { margin: 6px 0; }
.job li::marker { color: var(--accent); }
.tech { margin: 10px 0 0; font-size: 0.88rem; color: var(--muted); }
.tech b { color: var(--soft); }

/* Skills */
.skills { display: grid; grid-template-columns: max-content 1fr; column-gap: 22px; row-gap: 10px; margin: 0; }
.skills dt { font-weight: 700; color: var(--ink); text-align: right; }
.skills dd { margin: 0; }

/* Certifications, education, languages */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card { padding: 18px; border: 1px solid var(--rule); border-radius: var(--radius); }
.card h3 { font-size: 1rem; }
.card p { margin: 6px 0 0; color: var(--muted); font-size: 0.95rem; }
.card .more { display: inline-block; margin-top: 10px; font-weight: 600; }
.card-cert { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-color: #b9c9de; background: var(--tint); }
.card-cert .more { margin-top: 0; white-space: nowrap; }
.sub-label { margin: 28px 0 14px; font-size: 1rem; }
.more-line { margin: 16px 0 0; font-weight: 600; }
.plain-list { margin: 0; padding-left: 1.15em; }
.plain-list li { margin: 4px 0; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 56px; padding: 26px 0 40px; border-top: 1px solid var(--rule); font-size: 0.9rem; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 8px; }

/* ---------- Inner pages (certifications, 404) ---------- */
.page-head { background: var(--tint); padding: 22px 0 26px; }
.page-head .home { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.page-head h1 { margin-top: 14px; font-size: clamp(1.6rem, 3vw + 1rem, 2.2rem); }
.page-head p { margin: 6px 0 0; color: var(--muted); }

.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 6px; }
.filter-btn {
    padding: 7px 14px; border: 1px solid var(--rule); border-radius: 999px;
    background: var(--bg); color: var(--soft); font: inherit; font-size: 0.92rem; font-weight: 600; cursor: pointer;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-result-announcer { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.certification-section { margin-top: 30px; }
.section-title {
    display: flex; align-items: center; gap: 14px; margin: 0 0 16px;
    font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.certifications-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.certification-item {
    display: flex; flex-direction: column; padding: 0; overflow: hidden; text-align: left;
    border: 1px solid var(--rule); border-radius: var(--radius); background: var(--bg);
    font: inherit; color: inherit; cursor: zoom-in;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.certification-item:hover { border-color: var(--accent); box-shadow: 0 6px 18px rgba(27, 31, 36, 0.08); transform: translateY(-1px); }
.certification-image-wrap { aspect-ratio: 4 / 3; background: var(--tint); display: flex; align-items: center; justify-content: center; }
.certification-image { width: 100%; height: 100%; object-fit: contain; }
.certification-details { display: block; padding: 12px 14px 14px; }
.certification-title, .certification-date { display: block; }
.certification-title { margin: 0; font-size: 0.92rem; font-weight: 600; color: var(--ink); line-height: 1.4; }
.certification-date { margin: 4px 0 0; font-size: 0.82rem; color: var(--muted); }

.loading, .empty-state { padding: 48px 0; text-align: center; color: var(--muted); }
.spinner {
    display: inline-block; width: 28px; height: 28px; border-radius: 50%;
    border: 3px solid var(--rule); border-top-color: var(--accent); animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Modal */
.modal { display: none; position: fixed; inset: 0; z-index: 1000; background: rgba(15, 20, 28, 0.88); align-items: center; justify-content: center; }
.modal.active { display: flex; }
.modal-content { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 1200px; padding: 16px; }
.modal-image-wrapper { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 200px; }
.modal-image { display: none; max-width: 100%; max-height: 86vh; border-radius: 6px; opacity: 0; transition: opacity 0.25s ease; }
.modal-image.loaded { display: block; opacity: 1; }
.modal-loading { display: none; }
.modal-loading.active { display: block; }
.modal-loading .spinner { border-color: rgba(255, 255, 255, 0.25); border-top-color: #fff; }
.close-btn, .nav-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, 0.14); color: #fff; cursor: pointer;
}
.close-btn { position: fixed; top: 16px; right: 16px; }
.close-btn:hover, .nav-btn:hover { background: rgba(255, 255, 255, 0.26); }
.nav-btn:disabled { opacity: 0.3; cursor: default; }
.close-btn .icon, .nav-btn .icon { width: 22px; height: 22px; }

/* ---------- Smaller screens ---------- */
@media (max-width: 860px) {
    .highlights { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
    .hero { padding: 40px 0 34px; }
    .cards { grid-template-columns: 1fr; }
    .card-cert { flex-direction: column; align-items: flex-start; }
    .credential { align-items: flex-start; }
    .job-head { grid-template-columns: 1fr; }
    .job-head .when, .job-head .where { text-align: left; }
    .skills { grid-template-columns: 1fr; row-gap: 2px; }
    .skills dt { text-align: left; margin-top: 10px; }
    .certifications-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .modal-content { padding: 8px; gap: 6px; }
    .nav-btn { width: 36px; height: 36px; }
}

@media (max-width: 480px) {
    .highlights { grid-template-columns: 1fr; }
}

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

@media print {
    .actions, .alt-formats, .skip-link, .site-footer nav { display: none; }
    .hero, .page-head { background: none; padding: 0 0 12px; }
    .job { break-inside: avoid; }
}
