:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1b2330;
  --muted: #5b6676;
  --line: #dde2ea;
  --accent: #1f6feb;
  --accent-soft: #e8f0fe;
  --draft: #9a6700;
  --draft-bg: #fff8c5;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141b;
    --surface: #171e28;
    --text: #e6ebf2;
    --muted: #96a2b4;
    --line: #283242;
    --accent: #6ea8ff;
    --accent-soft: #1b2a44;
    --draft: #e3b341;
    --draft-bg: #2e2a12;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem; }

header.site { border-bottom: 1px solid var(--line); background: var(--surface); }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1.5rem; padding-top: 1rem; padding-bottom: 1rem; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
nav.site { display: flex; flex-wrap: wrap; gap: 0.25rem; }
nav.site a { padding: 0.3rem 0.7rem; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 0.95rem; }
nav.site a:hover { color: var(--text); background: var(--bg); }
nav.site a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }

main { padding: 2.5rem 0 3rem; }
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.75rem; }
h2 { font-size: 1.25rem; margin: 2.25rem 0 0.5rem; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 38rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.card { display: block; height: 100%; padding: 1.1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; }
a.card:hover { border-color: var(--accent); }
.card h3 { margin: 0 0 0.3rem; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.project { padding: 1.4rem 1.4rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-top: 1.5rem; }
.project h2, .project h3 { margin-top: 0; }
.project h3 { font-size: 1.15rem; margin-bottom: 0.6rem; letter-spacing: -0.01em; }
.project h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0.25rem 0 0.4rem; }
section + section { margin-top: 3rem; }

/* Technology and skill labels. */
ul.tags, .project ul.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; padding: 0; margin: 0 0 0.9rem; }
ul.tags li, .project ul.tags li { margin: 0; font-size: 0.8rem; font-weight: 600; padding: 0.1rem 0.6rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
ul.tags-lg li { font-size: 0.9rem; padding: 0.2rem 0.75rem; }

/* Key features beside business impact; stacked on a narrow screen. */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0 1.5rem; }
.cols ul { font-size: 0.95rem; }
.project ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.project li { margin-bottom: 0.3rem; }
.tag { display: inline-block; font-size: 0.8rem; font-weight: 600; padding: 0.1rem 0.6rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); vertical-align: middle; margin-left: 0.4rem; }
.button { display: inline-block; padding: 0.5rem 1rem; border-radius: 8px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; font-size: 0.95rem; }
@media (prefers-color-scheme: dark) { .button { color: #0f141b; } }
.note { font-size: 0.9rem; color: var(--muted); }

/* Text still to be supplied by the site owner. Nothing with this class should remain when the site goes public. */
.draft { background: var(--draft-bg); color: var(--draft); border-left: 4px solid var(--draft); padding: 0.6rem 0.9rem; border-radius: 0 8px 8px 0; font-size: 0.95rem; }

footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
footer.site .wrap { padding-top: 1.25rem; padding-bottom: 2rem; }

/* Experience page: one block per role. */
.job { padding: 1rem 0 0.25rem; border-top: 1px solid var(--line); }
.job:first-of-type { border-top: none; }
.job-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0 1rem; }
.job h3 { margin: 0; font-size: 1.1rem; }
.when { color: var(--muted); font-size: 0.95rem; white-space: nowrap; }
.where { color: var(--muted); margin: 0.1rem 0 0.5rem; font-size: 0.95rem; }
.job ul { margin: 0 0 0.75rem; padding-left: 1.2rem; }
.job li { margin-bottom: 0.3rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; }

/* Contact details. */
.contact-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.contact-list li { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.contact-list .label { min-width: 6rem; color: var(--muted); font-weight: 600; }

/* Contact form. */
.contact-form-wrap { margin-top: 2.5rem; }
.contact-form { display: grid; gap: 0.35rem; max-width: 34rem; }
.contact-form label { font-weight: 600; font-size: 0.95rem; margin-top: 0.5rem; }
.contact-form input, .contact-form textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 0.55rem 0.7rem; width: 100%; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.contact-form textarea { resize: vertical; min-height: 8rem; }
.contact-form .button { border: none; cursor: pointer; font: inherit; font-weight: 600; }
.contact-form .button:disabled { opacity: 0.6; cursor: default; }
.form-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 0.75rem; }
.form-status { font-size: 0.95rem; }
.form-status.ok { color: #1a7f37; }
.form-status.err { color: #cf222e; }
@media (prefers-color-scheme: dark) { .form-status.ok { color: #56d364; } .form-status.err { color: #ff7b72; } }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Home page (2026-10-04): hero, "What I work on", and the Aviation Weather Map picture. */
.hero { padding: 0.5rem 0 0.5rem; }
.eyebrow { margin: 0 0 0.4rem; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-size: clamp(2rem, 6vw, 3rem); }
.hero .lead { color: var(--text); opacity: 0.88; }
.hero .actions { margin-top: 1.5rem; gap: 0.75rem; }
.button-quiet { background: var(--surface); color: var(--accent); border: 1px solid var(--accent); }
@media (prefers-color-scheme: dark) { .button-quiet { color: var(--accent); } }
.button:hover { text-decoration: underline; }
.button:focus-visible, .preview-frame:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.cards-3 { margin-top: 1rem; }
.cards-3 .card { border-top: 3px solid var(--accent); }
.muted { color: var(--muted); font-weight: 400; }
.aside { margin-top: 3rem; }

/* The picture is wider than the text column: up to 62rem, centred on the page. */
.preview { position: relative; left: 50%; transform: translateX(-50%); width: min(62rem, calc(100vw - 2.5rem)); margin: 1.25rem 0 0.75rem; }
.preview-frame { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #0d0d0d; aspect-ratio: 16 / 9; box-shadow: 0 8px 28px rgba(15, 20, 27, 0.18); }
.preview-frame:hover { border-color: var(--accent); }
.preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.preview img:not([src]) { visibility: hidden; }
.preview-missing .preview-frame { display: none; }
.preview figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; padding: 0.6rem 0.1rem 0; font-size: 0.95rem; }

/* Projects & Tools (2026-10-04): problem / solution / impact at a glance, the rest behind "View details". */
.jump { font-size: 0.95rem; color: var(--muted); }
.feature { border-top: 3px solid var(--accent); }
.psi { display: grid; gap: 0.55rem; margin: 0.25rem 0 0.9rem; }
.psi div { display: grid; grid-template-columns: 5.5rem 1fr; gap: 0 0.75rem; }
.psi dt { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding-top: 0.15rem; }
.psi dd { margin: 0; }
@media (max-width: 30rem) { .psi div { grid-template-columns: 1fr; } }
.project details { border-top: 1px solid var(--line); padding-top: 0.6rem; }
.project summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 0.95rem; width: max-content; }
.project summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.project details[open] summary { margin-bottom: 0.75rem; }
.shot { margin: 1rem 0; }
.shot a { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #0d0d0d; aspect-ratio: 16 / 9; }
.shot a:hover { border-color: var(--accent); }
.shot a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shot img:not([src]) { visibility: hidden; }
.shot figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.4rem; }

/* A simple left-to-right data flow; stacks on phones. */
.flow { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 1rem 0 1.25rem; counter-reset: none; }
.flow li { position: relative; flex: 1 1 8rem; padding: 0.55rem 0.7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-weight: 600; font-size: 0.9rem; line-height: 1.35; }
.flow li span { display: block; font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.flow li + li::before { content: "→"; position: absolute; left: -0.5rem; top: 50%; transform: translate(-50%, -50%); color: var(--accent); font-weight: 700; }
@media (max-width: 40rem) {
  .flow { flex-direction: column; gap: 1.1rem; }
  .flow li + li::before { content: "↓"; left: 50%; top: -0.55rem; }
}

/* Experience (2026-10-04): numbers at a glance, the career path, and the roles as a vertical timeline. */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0.75rem; list-style: none; padding: 0; margin: 1rem 0 1.25rem; }
.stats li { padding: 0.75rem 0.9rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 0.9rem; color: var(--muted); line-height: 1.4; }
.stats strong { display: block; font-size: 1.2rem; color: var(--text); letter-spacing: -0.01em; }
.path { display: flex; list-style: none; padding: 0; margin: 0 0 1.75rem; gap: 0; }
.path li { flex: 1 1 0; position: relative; padding: 1.1rem 0.4rem 0 0; font-size: 0.85rem; font-weight: 600; line-height: 1.3; }
.path li::before { content: ""; position: absolute; top: 0.3rem; left: 0; right: 0; height: 2px; background: var(--line); }
.path li::after { content: ""; position: absolute; top: 0; left: 0; width: 0.65rem; height: 0.65rem; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.path li.now::after { background: var(--accent); }
.path .yr { display: block; font-weight: 400; color: var(--muted); font-size: 0.8rem; }
@media (max-width: 40rem) {
  .path { flex-direction: column; gap: 0.6rem; }
  .path li { padding: 0 0 0 1.4rem; }
  .path li::before { top: 0.65rem; bottom: -0.6rem; left: 0.3rem; right: auto; width: 2px; height: auto; }
  .path li:last-child::before { display: none; }
  .path li::after { top: 0.2rem; }
}
.timeline { position: relative; padding-left: 1.6rem; }
.timeline::before { content: ""; position: absolute; left: 0.35rem; top: 1.4rem; bottom: 1rem; width: 2px; background: var(--line); }
.timeline .job { position: relative; }
.timeline .job::before { content: ""; position: absolute; left: -1.6rem; top: 1.35rem; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.timeline .job.current::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
@media (max-width: 30rem) { .timeline { padding-left: 1.2rem; } .timeline .job::before { left: -1.2rem; } .timeline::before { left: 0.3rem; } }
