/* ============================================================
   kimstjohn.com — base stylesheet
   All colors/fonts come from CSS variables set by theme-*.css
   ============================================================ */

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--ink-strong);
    line-height: 1.2;
    margin: 0 0 .5em;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

p { margin: 0 0 1em; }

.wrap {
    width: min(1080px, 100% - 2.5rem);
    margin-inline: auto;
}

.section { padding: 3.5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-narrow { max-width: 760px; margin-inline: auto; }
.section-narrow-left { max-width: 760px; }

.section-title {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: .6rem;
}
.section-title::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 3rem; height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.lead { font-size: 1.2rem; color: var(--ink-strong); }

.page-title { font-size: 2.25rem; margin: 2.5rem 0 1rem; }
.page-intro { font-size: 1.15rem; color: var(--ink-soft); margin-bottom: 2rem; }

/* ---------- Theme preview bar (local only) ---------- */
.theme-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1rem;
    background: #111;
    color: #eee;
    font-size: .85rem;
    font-family: var(--font-body);
}
.theme-bar-label { opacity: .7; }
.theme-bar-btn {
    color: #eee;
    text-decoration: none;
    padding: .2rem .75rem;
    border-radius: 99px;
    border: 1px solid #444;
}
.theme-bar-btn:hover { border-color: #888; color: #fff; }
.theme-bar-btn.is-active { background: #fff; color: #111; border-color: #fff; font-weight: 600; }

/* ---------- Header / nav ---------- */
.site-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}
.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 4rem;
    gap: 1rem;
}
.brand {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--header-ink);
    text-decoration: none;
    letter-spacing: .01em;
}
.brand span { color: var(--accent); }

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.site-nav a {
    color: var(--header-ink);
    text-decoration: none;
    font-weight: 500;
    font-size: .98rem;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a.is-active { color: var(--accent); }

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    padding: .5rem;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    width: 24px; height: 2px;
    background: var(--header-ink);
    margin: 5px 0;
    transition: transform .2s ease, opacity .2s ease;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: .7rem 1.5rem;
    border-radius: var(--btn-radius);
    font-weight: 600;
    font-size: .98rem;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    font-family: var(--font-body);
    line-height: 1.4;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-sm { padding: .45rem 1.1rem; font-size: .9rem; }
.btn-accent { background: var(--accent); color: var(--accent-contrast); }
.btn-accent:hover { background: var(--accent-hover); color: var(--accent-contrast); }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.hero .btn-ghost { color: var(--hero-ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-invert { background: var(--accent-contrast); color: var(--accent); }
.btn-invert:hover { opacity: .92; }

.link-more { font-weight: 600; text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
    background-color: var(--hero-bg);
    background-image:
        linear-gradient(var(--hero-overlay), var(--hero-overlay)),
        var(--hero-image);
    background-size: cover;
    background-position: center;
    color: var(--hero-ink);
    padding: 4.5rem 0;
}
.hero-inner {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}
.hero-photo {
    width: 180px; height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--accent);
    flex-shrink: 0;
    box-shadow: 0 8px 30px rgba(0,0,0,.35);
}
.hero-kicker {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .8rem;
    opacity: .85;
    margin-bottom: .5rem;
}
.hero h1 {
    color: var(--hero-ink);
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    margin-bottom: .35em;
}
.hero-headline {
    font-size: 1.15rem;
    opacity: .92;
    max-width: 46rem;
    margin-bottom: 1.5rem;
}
.hero-actions { display: flex; gap: .9rem; flex-wrap: wrap; }

/* ---------- Stats ---------- */
.stats-grid {
    list-style: none;
    margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.25rem;
}
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 1.4rem 1.2rem;
    text-align: center;
}
.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: .25rem;
}
.stat-label { font-size: .88rem; color: var(--ink-soft); line-height: 1.4; display: block; }

/* ---------- Chips ---------- */
.chip-list {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}
.chip {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: .4rem 1rem;
    font-size: .92rem;
    color: var(--ink);
}
.chip-accent {
    background: var(--accent);
    color: var(--accent-contrast);
    border-color: var(--accent);
    font-weight: 600;
}
.chip-sm { padding: .25rem .8rem; font-size: .82rem; }

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

/* ---------- Cards ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0 3rem;
}
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    box-shadow: var(--card-shadow);
}
.card h3 { font-size: 1.15rem; margin-bottom: .25rem; }
.card p { color: var(--ink-soft); font-size: .95rem; flex-grow: 1; }

/* ---------- Certifications ---------- */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}
.cert-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--card-radius);
    padding: 1.25rem 1.4rem;
}
.cert-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--accent-contrast);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-radius: 4px;
    padding: .2rem .6rem;
    margin-bottom: .6rem;
}
.cert-card h3 { font-size: 1.02rem; margin-bottom: .2rem; }
.cert-card p { font-size: .88rem; color: var(--ink-soft); margin: 0; }

/* ---------- Resume ---------- */
.resume-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.resume-actions { display: flex; gap: .75rem; }

.resume-doc {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--card-radius);
    padding: clamp(1.5rem, 4vw, 3.5rem);
    margin-bottom: 3.5rem;
    box-shadow: var(--card-shadow);
}
.resume-head {
    border-bottom: 2px solid var(--accent);
    padding-bottom: 1.25rem;
    margin-bottom: 1.75rem;
}
.resume-name { font-size: 2rem; margin-bottom: .2em; }
.resume-headline { color: var(--ink-soft); font-size: 1.05rem; margin-bottom: .3em; }
.resume-meta { font-size: .92rem; color: var(--ink-soft); margin: 0; }

.resume-section { margin-bottom: 2.25rem; }
.resume-section-title {
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--accent);
    border-bottom: 1px solid var(--border);
    padding-bottom: .4rem;
    margin-bottom: 1.1rem;
}

.job { margin-bottom: 1.9rem; }
.job-head {
    display: flex;
    align-items: baseline;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: .5rem;
}
.job-company { font-size: 1.2rem; margin: 0; }
.job-industry { font-size: .85rem; color: var(--ink-soft); }

.role { margin: 0 0 1.1rem .1rem; padding-left: 1.1rem; border-left: 3px solid var(--border); }
.role-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}
.role-title { font-size: 1.02rem; margin: 0 0 .15rem; }
.role-dates { font-size: .88rem; color: var(--ink-soft); white-space: nowrap; }
.role-summary { font-size: .96rem; margin: .3rem 0 .5rem; }

.role-group { margin: .6rem 0; }
.role-group h6 {
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink-soft);
    margin-bottom: .25rem;
}
.role-group ul { margin: 0; padding-left: 1.2rem; }
.role-group li { font-size: .95rem; margin-bottom: .3rem; }

.resume-certs { margin: 0; padding-left: 1.2rem; }
.resume-certs li { margin-bottom: .4rem; font-size: .96rem; }

.skills-group { margin-bottom: .9rem; }
.skills-group h4 { font-size: .95rem; margin-bottom: .15rem; }
.skills-group p { font-size: .9rem; color: var(--ink-soft); margin: 0; }

/* ---------- CTA band / footer ---------- */
.cta-band {
    background: var(--hero-bg);
    color: var(--hero-ink);
    padding: 3.5rem 0;
    text-align: center;
}
.cta-band h2 { color: var(--hero-ink); font-size: 1.9rem; }
.cta-band p { opacity: .85; margin-bottom: 1.5rem; }

.site-footer {
    background: var(--footer-bg);
    color: var(--footer-ink);
    padding: 1.5rem 0;
    font-size: .88rem;
}
.site-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 1.25rem; }
.site-footer a { color: var(--footer-ink); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
    .hero-inner { flex-direction: column; text-align: center; gap: 1.5rem; }
    .hero-actions { justify-content: center; }
    .two-col { grid-template-columns: 1fr; gap: 2rem; }

    .nav-toggle { display: block; }
    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        flex-direction: column;
        align-items: flex-start;
        background: var(--header-bg);
        border-bottom: 1px solid var(--border);
        padding: 1rem 1.25rem 1.25rem;
        gap: 1rem;
    }
    .site-nav.is-open { display: flex; }

    .role-head { flex-direction: column; gap: 0; }
    .site-footer-inner { flex-direction: column; text-align: center; }
}
