/* ============================================================
   lawrence.chiwaya — career profile
   Palette: console navy / signal amber
   Type: Archivo (display) · IBM Plex Sans (body) · IBM Plex Mono (data)
   ============================================================ */

:root {
    --ink: #0c1420;        /* page background */
    --panel: #131f2e;      /* raised surfaces */
    --line: #22344a;       /* hairlines and borders */
    --text: #e8edf4;       /* primary text */
    --muted: #8fa1b8;      /* secondary text */
    --amber: #f2b23e;      /* signal accent */
    --green: #4ade80;      /* operational dot only */

    --display: "Archivo", sans-serif;
    --body: "IBM Plex Sans", sans-serif;
    --mono: "IBM Plex Mono", monospace;

    --max: 880px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
}

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

a {
    color: var(--amber);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 3px;
    border-radius: 2px;
}

/* ---------------- Nav ---------------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 24px;
    background: rgba(12, 20, 32, 0.88);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.nav-brand {
    font-family: var(--mono);
    font-size: 0.9rem;
    color: var(--text);
    white-space: nowrap;
}

.nav-brand:hover {
    text-decoration: none;
    color: var(--amber);
}

.cursor {
    color: var(--amber);
    animation: blink 1.2s steps(1) infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--muted);
}

.nav-links a:hover {
    color: var(--amber);
    text-decoration: none;
}

/* ---------------- Hero ---------------- */

.hero {
    max-width: var(--max);
    margin: 0 auto;
    padding: 96px 24px 72px;
}

.hero-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 40px;
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.dot {
    flex: none;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.15);
}

.hero h1 {
    margin: 0 0 20px;
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(3rem, 10vw, 6rem);
    line-height: 0.95;
    letter-spacing: -0.025em;
    text-transform: uppercase;
}

.hero-role {
    margin: 0 0 56px;
    max-width: 40ch;
    font-size: 1.15rem;
    color: var(--muted);
}

/* Hero grid with photo */

.hero-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
    margin-bottom: 56px;
}

.hero-text .hero-role {
    margin-bottom: 0;
}

.hero-photo {
    width: 200px;
    height: 175px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--line);
    box-shadow: 0 0 0 4px var(--panel);
    justify-self: end;
}

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

    .hero-photo {
        justify-self: start;
        width: 170px;
        height: 149px;
    }
}

/* Metric readout strip */

.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1px;
    margin: 0;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.metric {
    background: var(--panel);
    padding: 18px 16px 14px;
}

.metric dd {
    margin: 0;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.9rem;
    letter-spacing: -0.01em;
    color: var(--amber);
}

.metric dt {
    margin: 0 0 6px;
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ---------------- Sections ---------------- */

.section {
    max-width: var(--max);
    margin: 0 auto;
    padding: 56px 24px;
    border-top: 1px solid var(--line);
}

.eyebrow {
    margin: 0 0 10px;
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--amber);
}

.section h2 {
    margin: 0 0 28px;
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    letter-spacing: -0.015em;
    line-height: 1.15;
}

.prose p {
    margin: 0 0 18px;
    max-width: 66ch;
}

.prose p:last-child {
    margin-bottom: 0;
}

/* ---------------- Experience timeline ---------------- */

.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.job {
    position: relative;
    padding: 0 0 48px 32px;
    border-left: 1px solid var(--line);
}

.job:last-child {
    padding-bottom: 0;
}

.job::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 8px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--ink);
    border: 2px solid var(--amber);
}

.job-head h3 {
    margin: 0 0 4px;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}

.job-flag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    vertical-align: middle;
    font-family: var(--mono);
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--amber);
    border: 1px solid var(--amber);
    border-radius: 999px;
}

.job-meta {
    margin: 0 0 14px;
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--muted);
}

.job-org {
    color: var(--text);
}

.job-note {
    margin: 0 0 16px;
    max-width: 62ch;
    font-style: italic;
    color: var(--muted);
}

.job-points {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 68ch;
}

.job-points li {
    position: relative;
    margin: 0 0 12px;
    padding-left: 20px;
}

.job-points li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--amber);
}

.job-points strong {
    color: var(--text);
    font-weight: 600;
}

/* ---------------- Skills ---------------- */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.skill-group {
    padding: 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.skill-group h3 {
    margin: 0 0 12px;
    font-family: var(--mono);
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--amber);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tags li {
    padding: 4px 10px;
    font-size: 0.85rem;
    color: var(--text);
    background: var(--ink);
    border: 1px solid var(--line);
    border-radius: 4px;
}

/* ---------------- Certifications & education ---------------- */

.certs {
    list-style: none;
    margin: 0;
    padding: 0;
}

.certs li,
.edu {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 24px;
    margin: 0;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.certs li:last-child {
    border-bottom: none;
}

.cert-name {
    font-weight: 600;
}

.cert-org {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--muted);
}

/* ---------------- Contact & footer ---------------- */

.contact-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
    font-family: var(--mono);
    font-size: 0.95rem;
}

.footer {
    padding: 32px 24px 40px;
    border-top: 1px solid var(--line);
    text-align: center;
}

.footer p {
    margin: 0;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--muted);
}

/* ---------------- Small screens & preferences ---------------- */

@media (max-width: 560px) {
    .nav {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 20px;
    }

    .hero {
        padding-top: 64px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .cursor {
        animation: none;
    }
}


/* ==============================
   Typography refinements
   ============================== */

/* Name: tighter, better balanced */
.hero h1 {
    font-size: clamp(52px, 7.2vw, 88px);
    line-height: 1.02;
    letter-spacing: 0.015em;
    margin-bottom: 26px;
}

.hero-status {
    font-size: 11.5px;
    letter-spacing: 0.14em;
    line-height: 1.8;
}

.hero-role {
    font-size: 17px;
    line-height: 1.65;
    color: rgba(226, 236, 246, 0.82);
}

/* Jobs: clearer hierarchy */
.job {
    padding-bottom: 10px;
}

.job-head h3 {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.35;
}

.job-flag {
    vertical-align: 3px;
    margin-left: 6px;
}

.job-meta {
    margin-top: 7px;
    font-size: 13px;
    letter-spacing: 0.02em;
}

.job-org {
    color: var(--amber);
    font-weight: 500;
}

.job-note {
    font-style: normal;
    font-size: 14.5px;
    line-height: 1.7;
    color: rgba(226, 236, 246, 0.62);
    border-left: 2px solid var(--line);
    padding-left: 16px;
    margin-top: 14px;
    margin-bottom: 18px;
}

.job ul li {
    line-height: 1.75;
    margin-bottom: 12px;
}

.job ul li strong {
    color: #ffffff;
    font-weight: 600;
}

/* Education & certification rows: aligned two-column grid */
.certs li {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 32px;
    align-items: baseline;
    padding: 15px 0;
}

.cert-name {
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.5;
}

.cert-org {
    text-align: right;
    font-size: 12.5px;
    white-space: nowrap;
    opacity: 0.85;
}

@media (max-width: 640px) {
    .certs li {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .cert-org {
        text-align: left;
        white-space: normal;
    }

    .hero h1 {
        font-size: clamp(44px, 12vw, 60px);
    }
}


/* ==============================
   CTAs, polish & print CV
   ============================== */

html {
    scroll-behavior: smooth;
}

section {
    scroll-margin-top: 90px;
}

::selection {
    background: var(--amber);
    color: #101820;
}

:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 3px;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.04em;
    padding: 11px 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #e2ecf6;
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.15s;
}

.btn:hover {
    border-color: var(--amber);
    color: var(--amber);
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--amber);
    border-color: var(--amber);
    color: #101820;
    font-weight: 600;
}

.btn-primary:hover {
    background: #ffc55c;
    color: #101820;
}

.foot-tech {
    margin-top: 10px;
    font-size: 12px;
    opacity: 0.65;
}

.foot-tech a {
    color: var(--amber);
}

/* Print = clean one-click CV */
@media print {
    :root {
        --ink: #ffffff;
        --panel: #f4f6f9;
        --line: #d9dfe8;
        --amber: #946a00;
    }

    body {
        background: #ffffff !important;
        color: #1f2937 !important;
    }

    h1, h2, h3, strong, .cert-name {
        color: #0b1220 !important;
    }

    .hero-role, .job-note, .job ul li, p {
        color: #374151 !important;
    }

    nav, .hero-cta, .foot-tech {
        display: none !important;
    }

    .hero-photo {
        box-shadow: none;
    }

    a {
        color: #0b57d0 !important;
    }

    section {
        break-inside: avoid-page;
    }
}


/* CTA spacing fix */
.hero-cta {
    gap: 18px;
    margin-top: 32px;
}

.btn {
    padding: 12px 26px;
}


/* Compact mobile nav */
@media (max-width: 700px) {
    .nav {
        padding: 8px 16px;
        row-gap: 2px;
    }

    .nav-brand {
        font-size: 12.5px;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 1px 14px;
        font-size: 11.5px;
    }

    .nav-links li a {
        letter-spacing: 0.02em;
    }
}
