/* trabuc.co — inside pages (Work, projects, About). The homepage has its own sheet (home.css).
   Sizes follow the viewport, as on the Cargo site: 1482px wide = 15.8px body, 81.8px h1. */
@font-face { font-family: 'Mercure Transcript'; src: url('../fonts/mercure-transcript-1.002.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
:root {
  --u: calc(100vw / 1482);
  /* the grid every page shares, taken from the homepage (1728px wide = 1 unit per px): the name sits
     40 units in, the nav ends 32 units from the right; content runs between the same two lines */
  --U: calc(100vw / 1728);
  --ml: max(16px, calc(40 * var(--U)));
  --mr: max(16px, calc(32 * var(--U)));
  --pad: var(--ml);
  /* Everything on the inside pages is set in Mercure (the uploaded webfont); the project metadata (<small>)
     in Mercure Transcript, its monospaced cut; HB Goblet is the sans. */
  --text: 'Mercure', Georgia, 'Times New Roman', serif;
  --display: var(--text);
  --mono: 'Mercure Transcript', ui-monospace, 'SF Mono', Menlo, monospace;
  --sans: 'HB Goblet', 'Favorit', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --ink: #232323;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg, #fff); color: #414141; font: 400 max(14px, calc(15.8 * var(--u)))/1.1 var(--text); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img, video, iframe { display: block; max-width: 100%; }

/* the header: exactly the homepage's (same place, size, type, and the same difference blend over pictures) */
.site-head { position: fixed; z-index: 10; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center;
  padding: max(14px, calc(22 * var(--U))) var(--mr) 0 var(--ml); font: 400 clamp(15px, calc(18 * var(--U)), 22px)/1.17 var(--text);
  color: #fff; mix-blend-mode: difference; pointer-events: none; }
.site-head a { pointer-events: auto; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: max(14px, calc(20 * var(--U))); }
.site-nav a[aria-current] { opacity: .5; }
.site-nav .ig { display: inline-flex; font-size: 1.15em; line-height: 1; transform: translateY(.12em); }
.site-name:hover, .site-nav a:not(.ig):hover { text-decoration: underline; text-decoration-thickness: from-font; }
.site-nav .ig:hover { opacity: .6; }

.page { padding: calc(61 * var(--u)) 0 calc(80 * var(--u)); }
.row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: calc(50 * var(--u)); padding: 0 var(--mr) 0 var(--ml); }
.col { grid-column: span var(--span, 12); min-width: 0; padding-bottom: calc(25 * var(--u)); }
.col > :first-child { margin-top: 0; }
.col p { margin: 0 0 1.1em; }
.col a { color: #000; }
.col p a::after, .col small a::after { content: ' \2192'; }          /* the arrow Cargo put after text links */
.col a:hover { opacity: .6; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; color: var(--ink); }
h1 { font-size: max(40px, calc(81.8 * var(--u))); line-height: 1; letter-spacing: -.04em; }
h2 { font-size: max(28px, calc(45.9 * var(--u))); line-height: 1; letter-spacing: -.03em; margin-bottom: .45em; }
h3 { font-size: max(18px, calc(24 * var(--u))); line-height: 1.1; }
small { display: block; font: 400 max(11px, calc(13.2 * var(--u)))/1.5 var(--mono); color: var(--ink); white-space: pre-wrap; }
hr { border: 0; border-top: 1px solid currentColor; margin: 1em 0; opacity: .2; }
.media { margin: 0; }
.media img, .media video, .media iframe { width: 100%; height: auto; border: 0; }
.media.embed iframe, .media.clip video { height: 100%; object-fit: cover; }
figcaption { padding-top: .5em; font-size: .9em; }
/* the picture at the top of a project: the one the homepage image flies into */
.row.is-hero .col:first-child > .media:first-child { view-transition-name: aatc-hero; }
@media (prefers-reduced-motion: reduce) { .row.is-hero .col:first-child > .media:first-child { view-transition-name: none; } }

/* Work: four across, the title appears under the picture on hover; hovering flips through the project */
.thumbs { list-style: none; margin: 0; padding: 0 calc(var(--mr) - 18 * var(--u)) 0 calc(var(--ml) - 18 * var(--u)); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.page.work { padding-top: calc(42 * var(--u)); }
.thumb a { display: block; padding: 0 calc(18 * var(--u)) calc(37 * var(--u)); position: relative; }
.thumb-img { display: block; aspect-ratio: 337 / 189; overflow: hidden; background: #f1f0ed; }
.thumb-img img { width: 100%; height: 100%; object-fit: cover; }
.thumb-title { position: absolute; left: calc(18 * var(--u)); right: calc(18 * var(--u)); bottom: calc(10 * var(--u)); font: 400 max(12px, calc(14.4 * var(--u)))/1.3 var(--sans); color: #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .16s ease; }
@media (hover: hover) and (pointer: fine) { .thumb a:hover .thumb-title { opacity: 1; } }
.thumb a:focus-visible .thumb-title { opacity: 1; }

/* a page with a dark background: light type */
body.dark { color: #e6e6e6; --ink: #f5f5f5; }
body.dark .col a { color: #fff; }

@media (max-width: 1099px) { .thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  body { font-size: 16px; line-height: 1.2; }
  .page { padding-top: 64px; }
  .row { display: block; }
  .col { padding-bottom: 20px; }
  .thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 8px; }
  .thumb a { padding: 0 8px 34px; }
  .thumb-title { left: 8px; right: 8px; bottom: 10px; opacity: 1; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
