/* giovannicuchiaro.com — v3
   Layout: barra lateral fixa (identidade + navegação numerada) e coluna editorial à direita.
   Tipos: serifa nos títulos, grotesca no texto, mono nos rótulos. Paleta mantida. */
:root {
  --paper: #f2f2ee;
  --side: #e9e9e3;
  --surface: #fbfbf8;
  --ink: #1c2320;
  --graphite: #59615c;
  --rule: #d3d6d0;
  --marker: #f2d24b;
  --marker-ink: #1c2320;
  --pine: #1e5a4f;
  --pine-deep: #17352f;
  --pine-soft: #e3ece8;
  --on-deep: #eef1ec;
  --serif: "Newsreader", "Source Serif 4", Georgia, serif;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --side-w: 248px;
  --gut: clamp(16px, 4vw, 56px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #151a18; --side: #111614; --surface: #1c2320; --ink: #ebece7; --graphite: #a3aba5; --rule: #333c38;
    --marker: #e6c43c; --pine: #8cc7b6; --pine-deep: #1f3b35; --pine-soft: #22312c; --on-deep: #eef1ec;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #151a18; --side: #111614; --surface: #1c2320; --ink: #ebece7; --graphite: #a3aba5; --rule: #333c38;
  --marker: #e6c43c; --pine: #8cc7b6; --pine-deep: #1f3b35; --pine-soft: #22312c; --on-deep: #eef1ec;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 1rem; line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--pine); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--marker); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0 0 1em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; }
.mono { font-family: var(--mono); }
.label { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--graphite); }

/* ---------- Barra lateral ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--side); border-right: 1px solid var(--rule); display: flex; flex-direction: column; padding: 24px 0 18px; z-index: 10; }
.id { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; padding: 0 20px; text-decoration: none; color: var(--ink); }
.mark { width: 40px; height: 40px; border: 1.5px solid var(--ink); display: grid; place-items: center; font-family: var(--serif); font-size: 1.15rem; }
.id b { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.02rem; letter-spacing: 0.04em; line-height: 1.15; text-transform: uppercase; }
.id small { display: block; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--graphite); margin-top: 3px; }
.where { margin: 18px 20px 0; font-size: 0.82rem; color: var(--graphite); display: flex; align-items: center; gap: 8px; }
.where i { width: 7px; height: 7px; border-radius: 50%; background: var(--pine); display: inline-block; }
.side nav { margin: auto 0; }
.toc { list-style: none; margin: 0; padding: 0; }
.toc a { display: grid; grid-template-columns: 34px 1fr; align-items: baseline; padding: 9px 20px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 1.12rem; border-left: 2px solid transparent; }
.toc a span { font-family: var(--mono); font-size: 0.66rem; color: var(--graphite); }
.toc a:hover { background: color-mix(in srgb, var(--ink) 4%, transparent); }
.toc a.is-on, .toc a[aria-current="page"] { border-left-color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.side-foot { border-top: 1px solid var(--rule); margin: 0 20px; padding-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.side-foot .label { font-size: 0.62rem; line-height: 1.4; max-width: 9em; }
.icons { display: flex; gap: 8px; }
.icons a { width: 32px; height: 32px; border: 1px solid var(--rule); display: grid; place-items: center; color: var(--ink); background: var(--surface); }
.icons a:hover { border-color: var(--ink); }
.icons svg { width: 15px; height: 15px; }

/* ---------- Conteúdo ---------- */
.main { margin-left: var(--side-w); }
.col { max-width: 1320px; margin-inline: auto; padding-inline: var(--gut); }
.block { padding-block: clamp(56px, 8vw, 96px); border-top: 1px solid var(--rule); scroll-margin-top: 16px; }
.block-head { margin-bottom: clamp(28px, 4vw, 44px); }
.block-head h2 { font-family: var(--serif); font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.05; letter-spacing: -0.02em; margin-top: 10px; }
.block-head p { color: var(--graphite); max-width: 36em; margin: 14px 0 0; }

/* Hero */
.hero { padding-block: clamp(36px, 6vw, 72px) clamp(40px, 6vw, 64px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: end; }
.hero h1 { font-family: var(--serif); font-size: clamp(2.8rem, 7vw, 5.4rem); line-height: 0.98; letter-spacing: -0.03em; margin-top: 14px; }
.hl { display: inline-block; background: var(--marker); color: var(--marker-ink); font-family: var(--mono); font-size: 0.8rem; padding: 3px 8px; margin-top: 18px; }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.18rem); max-width: 34em; margin-top: 20px; }
.portrait { margin: 0; }
.portrait img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border: 1px solid var(--rule); background: var(--side); padding: 6px; }
.portrait figcaption { margin-top: 8px; }

.now-card { margin-top: 32px; background: var(--pine-deep); color: var(--on-deep); border-radius: 12px; padding: 20px 22px; display: grid; grid-template-columns: auto 1fr; gap: 18px; max-width: 640px; }
.now-card .label { color: color-mix(in srgb, var(--on-deep) 70%, transparent); }
.now-card h2 { font-family: var(--sans); font-weight: 650; font-size: 1.15rem; letter-spacing: -0.01em; margin-top: 4px; }
.now-card ul { list-style: none; padding: 0; margin: 10px 0 0; font-size: 0.93rem; }
.now-card li { padding: 4px 0 4px 20px; position: relative; }
.now-card li::before { content: "↳"; position: absolute; left: 0; color: var(--marker); }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--marker); margin-top: 6px; box-shadow: 0 0 0 0 color-mix(in srgb, var(--marker) 60%, transparent); }
@media (prefers-reduced-motion: no-preference) { .pulse { animation: pulse 2.4s ease-out infinite; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--marker) 55%, transparent); } 80%, 100% { box-shadow: 0 0 0 10px transparent; } }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--rule); background: var(--surface); margin-top: 40px; }
.stats a { padding: 16px 18px; text-decoration: none; color: var(--ink); border-left: 1px solid var(--rule); }
.stats a:first-child { border-left: 0; }
.stats a:hover { background: color-mix(in srgb, var(--marker) 14%, transparent); }
.stats b { display: block; font-family: var(--serif); font-weight: 500; font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.1; letter-spacing: -0.02em; }
.stats span { display: block; font-size: 0.84rem; color: var(--graphite); margin-top: 4px; }
.caption { font-family: var(--mono); font-size: 0.74rem; color: var(--graphite); margin-top: 10px; }

/* Experiência */
.job { padding-block: 34px; border-top: 1px solid var(--rule); }
.job:first-of-type { border-top: 0; padding-top: 0; }
.job-head { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; align-items: end; padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
.logo { width: 56px; height: 56px; display: grid; place-items: center; font-family: var(--serif); font-size: 1.05rem; letter-spacing: 0.02em; }
.logo img { width: 100%; height: 100%; object-fit: contain; }
.logo.mac { background: #ffffff; border: 1px solid var(--rule); padding: 5px; }
.logo.itau { padding: 0; }
.logo.bba { background: #000000; padding: 4px; border-radius: 6px; }
.job-head h3 { font-family: var(--serif); font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.05; letter-spacing: -0.015em; }
.job-head .num { font-family: var(--mono); font-size: 0.7rem; color: var(--graphite); display: block; margin-bottom: 2px; }
.job-head .role { margin-top: 6px; }
.job-head .when { text-align: right; font-family: var(--mono); font-size: 0.74rem; color: var(--graphite); line-height: 1.6; }
.job-sum { margin: 18px 0 0 72px; max-width: 40em; }
.tags { list-style: none; margin: 12px 0 0 72px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-family: var(--mono); font-size: 0.72rem; padding: 3px 9px; border: 1px solid var(--rule); background: var(--surface); }
.sub { margin: 18px 0 0 72px; border: 1px solid var(--rule); background: var(--surface); padding: 18px 20px 6px; }
.sub + .sub { margin-top: 12px; }
.sub h4 { font-family: var(--serif); font-size: 1.35rem; line-height: 1.2; margin: 6px 0 4px; }
.sub .meta { color: var(--graphite); font-size: 0.92rem; margin: 0 0 10px; }
.sub ul { list-style: none; margin: 0; padding: 0; }
.sub li { position: relative; padding: 10px 0 10px 26px; border-top: 1px solid var(--rule); font-size: 0.94rem; }
.sub li::before { content: "↳"; position: absolute; left: 4px; top: 10px; color: var(--graphite); }
.aside-line { margin: 16px 0 0 72px; font-family: var(--serif); font-style: italic; color: var(--graphite); }

/* Projetos */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--rule); display: flex; flex-direction: column; min-width: 0; }
.card-body { padding: 4px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.shot-img { display: block; border-bottom: 1px solid var(--rule); background: var(--side); overflow: hidden; aspect-ratio: 16 / 10; }
.shot-img img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform .4s ease; }
.shot-img:hover img { transform: scale(1.02); }
@media (prefers-reduced-motion: reduce) { .shot-img img { transition: none; } }
.card-wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.card-wide .shot-img { border-bottom: 0; border-right: 1px solid var(--rule); aspect-ratio: auto; }
.card-wide .card-body { padding: 18px 22px; }
.card-wide h3 { font-size: 1.9rem; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 14px 0 6px; }
.card h3 { font-family: var(--serif); font-size: 1.45rem; line-height: 1.15; }
.card p { color: var(--graphite); font-size: 0.94rem; margin: 6px 0 0; }
.card .stack-line { font-family: var(--mono); font-size: 0.72rem; color: var(--graphite); margin-top: auto; padding-top: 14px; }
.cat { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 7px; background: var(--pine-soft); color: var(--pine); }
.idx { font-family: var(--mono); font-size: 0.7rem; color: var(--graphite); }
.more-list { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.more-list li { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr) minmax(0, 0.8fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 0.94rem; align-items: baseline; }
.more-list b { font-family: var(--serif); font-weight: 500; font-size: 1.12rem; }
.more-list span { color: var(--graphite); }
.more-list .mono { font-size: 0.72rem; color: var(--graphite); }

/* Telas ilustrativas */
.shot { background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 14px; font-size: 0.78rem; line-height: 1.35; color: var(--ink); min-height: 220px; overflow: hidden; }
.shot-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--rule); font-weight: 600; font-size: 0.8rem; }
.shot-bar span { font-weight: 400; color: var(--graphite); white-space: nowrap; font-family: var(--mono); font-size: 0.68rem; }
.shot table { width: 100%; border-collapse: collapse; }
.shot th { text-align: left; font-weight: 500; color: var(--graphite); padding: 4px 6px 6px 0; border-bottom: 1px solid var(--rule); }
.shot td { padding: 7px 6px 7px 0; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--pine-soft); color: var(--pine); font-weight: 600; font-size: 0.72rem; }
.chip.warn { background: color-mix(in srgb, var(--marker) 35%, transparent); color: var(--ink); }
.chip.muted { background: color-mix(in srgb, var(--rule) 60%, transparent); color: var(--graphite); }
.tasks { list-style: none; margin: 0; padding: 0; }
.tasks li { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.box { width: 14px; height: 14px; border: 1.5px solid var(--graphite); border-radius: 3px; }
.box.on { background: var(--pine); border-color: var(--pine); position: relative; }
.box.on::after { content: ""; position: absolute; left: 3.5px; top: 0.5px; width: 4px; height: 8px; border: solid var(--surface); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tasks .done { color: var(--graphite); text-decoration: line-through; }
.tasks small { color: var(--graphite); }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.kpi { border: 1px solid var(--rule); border-radius: 6px; padding: 8px; background: var(--surface); }
.kpi b { display: block; font-size: 1.15rem; letter-spacing: -0.02em; }
.kpi span { color: var(--graphite); font-size: 0.7rem; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 70px; border-bottom: 1px solid var(--rule); }
.bars i { flex: 1; background: var(--pine); opacity: .85; border-radius: 2px 2px 0 0; }
.bars i.hl { background: var(--marker); opacity: 1; }
.bars-x { display: flex; gap: 6px; color: var(--graphite); font-size: 0.66rem; margin-top: 4px; }
.bars-x span { flex: 1; text-align: center; }
.note { margin-top: 10px; padding: 8px 10px; border-left: 3px solid var(--marker); background: color-mix(in srgb, var(--marker) 12%, transparent); font-size: 0.76rem; }
.doc { --d-bg: #ffffff; --d-ink: #1c2320; --d-mute: #59615c; --d-rule: #e3e5e0; background: var(--d-bg); color: var(--d-ink); border: 1px solid var(--rule); width: 80%; margin: 0 auto; padding: 14px 16px; }
.doc h4 { margin: 0 0 2px; font-size: 0.84rem; font-weight: 600; }
.doc .muted { color: var(--d-mute); font-size: 0.68rem; }
.doc .row span:last-child { white-space: nowrap; }
.doc .row { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--d-rule); padding: 5px 0; font-size: 0.72rem; }
.doc .row.total { font-weight: 700; border-bottom: 0; border-top: 1.5px solid var(--d-ink); margin-top: 4px; }
.slides { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.slide { aspect-ratio: 4 / 5; max-width: 100%; border-radius: 4px; padding: 10px; display: flex; flex-direction: column; justify-content: space-between; font-size: 0.7rem; line-height: 1.2; }
.slide b { font-size: 0.84rem; letter-spacing: -0.01em; }
.slide.s1 { background: #26302c; color: #f2f2ee; }
.slide.s2 { background: #f2f2ee; color: #26302c; border: 1px solid #d3d6d0; }
.slide.s3 { background: #f2d24b; color: #1c2320; }
.slide .pg { opacity: .7; font-size: 0.64rem; }
.ok { color: var(--pine); font-weight: 700; }

/* Ferramentas */
.toolbox { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--rule); background: var(--surface); }
.toolbox div { padding: 18px; border-left: 1px solid var(--rule); }
.toolbox div:first-child { border-left: 0; }
.toolbox h3 { font-family: var(--serif); font-size: 1.35rem; margin: 6px 0 10px; }
.toolbox ul { list-style: none; margin: 0; padding: 0; font-size: 0.92rem; }
.toolbox li { padding: 5px 0; border-top: 1px dashed var(--rule); }

/* Escritos */
.post { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: end; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); padding: 22px; }
.post h3 { font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.15; margin-top: 8px; }
.post p { color: var(--graphite); margin: 10px 0 0; max-width: 40em; font-size: 0.95rem; }
.post .go { font-family: var(--mono); font-size: 0.8rem; white-space: nowrap; }
.post:hover { border-color: var(--ink); }
.post:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }

/* Contato */
.contact h2 { font-family: var(--serif); font-size: clamp(2.4rem, 5.6vw, 4.2rem); line-height: 1.02; letter-spacing: -0.02em; margin-top: 10px; }
.contact p { max-width: 34em; margin-top: 16px; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; font: inherit; font-weight: 600; font-size: 0.95rem; text-decoration: none; border: 1.5px solid var(--ink); color: var(--ink); background: transparent; }
.btn:hover { background: var(--surface); }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--pine); border-color: var(--pine); color: #fff; }
.addr { font-family: var(--mono); font-size: 0.85rem; color: var(--graphite); margin-top: 16px; user-select: all; }
.foot { border-top: 1px solid var(--rule); padding-block: 22px 32px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Páginas internas (currículo, artigo) */
.page-head { padding-block: clamp(36px, 6vw, 72px) 28px; }
.page-head h1 { font-family: var(--serif); font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.02; letter-spacing: -0.025em; margin-top: 12px; }
.page-head .lede { color: var(--graphite); }
.cv-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; padding-block: 28px; border-top: 1px solid var(--rule); }
.cv-row h2 { font-family: var(--serif); font-size: 1.45rem; }
.cv-list { list-style: none; margin: 0; padding: 0; }
.cv-list li { padding: 0 0 18px; }
.cv-list b { font-weight: 600; }
.cv-list .when { display: block; font-family: var(--mono); font-size: 0.74rem; color: var(--graphite); }
.cv-list p { margin: 4px 0 0; color: var(--graphite); font-size: 0.95rem; }
.skills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.skills li { font-family: var(--mono); font-size: 0.76rem; padding: 4px 10px; border: 1px solid var(--rule); background: var(--surface); }
.article { max-width: 700px; }
.prose { font-family: var(--serif); font-size: 1.22rem; line-height: 1.65; }
.prose h2 { font-family: var(--serif); font-size: 1.8rem; line-height: 1.15; margin: 1.8em 0 0.6em; }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--marker); font-style: italic; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.article-foot { margin-block: 40px 8px; padding-top: 18px; border-top: 1px solid var(--rule); font-size: 0.95rem; }

/* ---------- Telas largas: coluna centralizada e seções em duas colunas ---------- */
@media (min-width: 1200px) {
  :root { --head-w: clamp(220px, 20vw, 300px); --col-gap: clamp(40px, 4.5vw, 88px); }
  /* Hero: apresentação à esquerda, "O que estou fazendo" à direita, números embaixo */
  .hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: var(--col-gap); align-items: end; }
  .hero-grid { grid-column: 1; }
  .now-card { grid-column: 2; margin-top: 0; max-width: none; }
  .hero .stats, .hero .caption { grid-column: 1 / -1; }
  /* Seções: título fixo à esquerda enquanto o conteúdo rola à direita */
  .block { display: grid; grid-template-columns: var(--head-w) minmax(0, 1fr); column-gap: var(--col-gap); align-items: start; }
  .block > * { grid-column: 2; }
  .block > .block-head { grid-column: 1; grid-row: 1 / span 30; position: sticky; top: 32px; margin-bottom: 0; }
  .block-head h2 { font-size: clamp(2.2rem, 2.9vw, 3rem); }
  .block-head p:not(.label) { font-size: 0.97rem; }
  /* Contato: chamada à esquerda, texto e botões à direita */
  .contact > .label { grid-column: 1; grid-row: 1; margin: 0; }
  .contact > h2 { grid-column: 1; grid-row: 1 / span 3; margin-top: 28px; font-size: clamp(2.4rem, 3.4vw, 3.6rem); }
  .contact > h2 + p { margin-top: 0; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .toolbox { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbox div:nth-child(3) { border-left: 0; }
  .toolbox div:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 900px) {
  .side { position: sticky; top: 0; inset: auto; width: auto; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 10px var(--gut); gap: 8px 16px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .id { padding: 0; grid-template-columns: 34px 1fr; gap: 10px; }
  .mark { width: 34px; height: 34px; font-size: 1rem; }
  .id b { font-size: 0.9rem; }
  .where, .side-foot { display: none; }
  .side nav { margin: 0; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .toc { display: flex; gap: 16px; flex-wrap: nowrap; white-space: nowrap; }
  .toc a { padding: 4px 0; font-size: 0.98rem; grid-template-columns: auto auto; gap: 5px; border-left: 0; border-bottom: 2px solid transparent; }
  .toc a.is-on, .toc a[aria-current="page"] { background: transparent; border-bottom-color: var(--ink); }
  .main { margin-left: 0; }
  .hero-grid { grid-template-columns: 1fr; }
  .portrait { width: min(200px, 60%); grid-row: 1; }
  .cards { grid-template-columns: 1fr; }
  .card-wide { grid-template-columns: 1fr; }
  .card-wide .shot-img { border-right: 0; border-bottom: 1px solid var(--rule); aspect-ratio: 16 / 10; }
  .cv-row { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats a:nth-child(3) { border-left: 0; }
  .stats a:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .job-head { grid-template-columns: 44px minmax(0, 1fr); }
  .logo { width: 44px; height: 44px; font-size: 0.9rem; }
  .job-head .when { grid-column: 2; text-align: left; }
  .job-sum, .tags, .sub, .aside-line { margin-left: 0; }
  .more-list li { grid-template-columns: 1fr; gap: 2px; }
  .toolbox { grid-template-columns: 1fr; }
  .toolbox div { border-left: 0; border-top: 1px solid var(--rule); }
  .toolbox div:first-child { border-top: 0; }
  .post { grid-template-columns: 1fr; }
  .now-card { grid-template-columns: 1fr; gap: 6px; }
  .shot td:nth-child(3), .shot th:nth-child(3) { display: none; }
  .doc { width: 100%; }
}
@media print { .side { display: none; } .main { margin-left: 0; } }
