/* Layout concept: an online CV sheet. A fixed identity column (who, how to reach them)
   beside a single reading column in standard CV order. Real screenshots are the only images. */
@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --ground: #f4f6f9;
  --ink: #101d30;
  --muted: #4d5c71;
  --line: #d6deea;
  --accent: #1d4ed8;
  --side: #101d30;
  --side-ink: #eef3fa;
  --side-muted: #a9b8cc;
  --side-line: #2a3b53;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0d1725; --ink: #eaf0f8; --muted: #a9b8cc; --line: #2a3b53; --accent: #8fb2ff;
    --side: #152235; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #0d1725; --ink: #eaf0f8; --muted: #a9b8cc; --line: #2a3b53; --accent: #8fb2ff;
  --side: #152235; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 17px/1.6 var(--body); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); }
h1, h2, h3, p, ul, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; letter-spacing: -.015em; text-wrap: balance; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: #101d30; padding: 8px 14px; z-index: 30; }
.skip:focus { left: 12px; }

.sheet { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 100vh; }

/* Identity column */
.side { position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 28px; padding-block: 40px; padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: 28px; background: var(--side); color: var(--side-ink); }
.id { display: grid; gap: 14px; }
.mono { width: 76px; height: 76px; display: grid; place-items: center; border: 2px solid var(--side-ink); border-radius: 50%; font: 700 28px/1 var(--display); }
.name { font: 700 28px/1.1 var(--display); letter-spacing: -.015em; }
.role { color: var(--side-muted); font-size: 15.5px; margin-top: 4px; }
.contact { display: grid; gap: 12px; font-size: 15px; line-height: 1.4; }
.contact span { display: block; font-size: 13px; color: var(--side-muted); }
.contact a { color: var(--side-ink); overflow-wrap: anywhere; }
.btn { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 16px; border-radius: 6px; background: var(--side-ink); color: #101d30; font: 600 15.5px/1.2 var(--body); text-decoration: none; }
.btn:hover { background: #fff; }
.toc { display: grid; gap: 2px; border-top: 1px solid var(--side-line); padding-top: 18px; }
.toc a { color: var(--side-muted); text-decoration: none; font-size: 15px; padding: 5px 0; }
.toc a:hover, .toc a.on { color: var(--side-ink); }
.toc a.on { font-weight: 600; }

/* Reading column */
main { max-width: 900px; width: 100%; padding-block: 56px 32px; padding-left: clamp(24px, 5vw, 64px); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
section { padding-block: 34px; border-bottom: 1px solid var(--line); }
section:first-child { padding-top: 0; }
#skills { border-bottom: 0; }
h1 { font-size: clamp(40px, 5vw, 58px); font-weight: 700; }
.sub { font-size: 20px; font-weight: 600; margin-top: 8px; color: var(--accent); }
.lede { margin-top: 18px; font-size: 19px; max-width: 62ch; }
h2 { font-size: 26px; font-weight: 700; margin-bottom: 20px; }
h3 { font-size: 19px; font-weight: 600; }

.areas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 28px; }
.areas h3 { font-size: 17.5px; margin-bottom: 4px; }
.areas p { font-size: 15.5px; line-height: 1.5; color: var(--muted); }

.jobs { display: grid; gap: 24px; }
.job { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 16px; }
.when { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.where { color: var(--muted); font-size: 15px; }
.job ul { list-style: disc; padding-left: 18px; margin-top: 8px; display: grid; gap: 4px; }


.skills { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px 16px; }
.skills dt { font-weight: 600; }
.skills dd { color: var(--muted); }
footer { padding-top: 12px; font-size: 14px; color: var(--muted); }

@media (max-width: 1100px) {
  .areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .sheet { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; gap: 20px; padding-block: 28px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
  .id { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .mono { width: 60px; height: 60px; font-size: 22px; }
  .toc { display: none; }
  main { padding-block: 36px 24px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
  #profile h1 { display: none; }
  .sub { margin-top: 0; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .lede { font-size: 17px; }
  .areas { grid-template-columns: minmax(0, 1fr); }
  .job { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .skills { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .skills dd { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media print {
  :root { --ground: #fff; --ink: #000; --muted: #333; --accent: #1d4ed8; }
  body { font-size: 11pt; }
  .sheet { display: block; }
  .side { position: static; height: auto; padding: 0 0 12pt; background: none; color: #000; gap: 8pt; }
  .mono, .btn, .toc, .skip { display: none; }
  .role, .contact span { color: #333; }
  .contact a { color: #000; }
  main { max-width: none; padding: 0; }
  #profile h1 { display: none; }
  section { padding-block: 12pt; break-inside: avoid-page; }
  .areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  footer { display: none; }
}
