/* thomasnugent.ca — quiet gallery sibling of the Laser_co system: same type & rules, no graph paper. */
:root {
  --paper: #f7f6f3;
  --ink: #161616;
  --faint: #85847f;
  --rule: #161616;
  --laser: #d9361e;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "SF Mono", Menlo, "Courier New", monospace;
  --gutter: clamp(16px, 3vw, 32px);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--sans); }
img, video { max-width: 100%; display: block; }
a { color: inherit; }

.draft-note { font: 11px var(--mono); color: var(--laser); padding: 6px var(--gutter); border-bottom: 1px solid var(--rule); }

/* ---------- shell: side menu + main ---------- */
.shell { display: grid; grid-template-columns: clamp(300px, 34vw, 470px) minmax(0, 1fr); align-items: start; }
.shell > main { min-width: 0; border-left: 1px solid var(--rule); min-height: 100vh; }
nav.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin; }
.side-head { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; row-gap: 2px; padding: 14px var(--gutter) 11px; border-bottom: 1px solid var(--rule); }
.side-head .tag { font: 11px var(--mono); color: var(--faint); flex: 1 1 auto; }
.side-head .menu-btn { margin-left: auto; }
.side-head .name { font: 700 20px var(--sans); letter-spacing: -.01em; text-decoration: none; }
.menu-btn { display: none; font: 12px var(--mono); background: none; border: 1px solid var(--rule); color: inherit; padding: 3px 9px; cursor: pointer; }
nav.side.open .menu-btn { background: var(--ink); color: var(--paper); }

.works { list-style: none; margin: 0; padding: 0; }
.works li a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 7px var(--gutter);
  border-bottom: 1px solid var(--rule); text-decoration: none; }
.works li a:hover, .works li a:focus-visible, .works li a.on, .works li a[aria-current] { background: var(--ink); color: var(--paper); outline: none; }
.works .t { font-size: 15.5px; line-height: 1.22; }
.works .m { display: block; font: 10.5px/1.3 var(--mono); color: var(--faint); margin-top: 1px; }
.works a:hover .m, .works a.on .m, .works a[aria-current] .m { color: #bbb; }
.works .y { font: 12px var(--mono); }
.works .th { display: none; }
/* double rule: the last work's bottom line + a second line, same weight, small gap = new category */
.dbl { height: 4px; border-bottom: 1px solid var(--rule); }
.pages .t { font-size: 14.5px; }
/* short screens (laptops): drop the grey sub-lines so the whole menu, incl. About / Laser_co, fits */
@media (max-height: 860px) and (min-width: 861px) { .works:not(.pages) .m { display: none; } }

/* ---------- index: live preview ---------- */
.preview { position: sticky; top: 0; height: 100vh; padding: var(--gutter); display: flex; flex-direction: column; }
.preview .frame { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.preview img { max-height: 100%; width: auto; object-fit: contain; }
.preview .cap { font: 11px var(--mono); display: flex; justify-content: space-between; border-top: 1px solid var(--rule); padding-top: 8px; margin-top: 12px; }

/* ---------- text pages (about / contact / laser_co) ---------- */
.page-body { padding: var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gutter); border-bottom: 1px solid var(--rule); }
.page-body > * { min-width: 0; }
.page-body .lede { font-size: 19px; line-height: 1.45; margin: 0 0 1em; max-width: 40ch; }
.page-body p { max-width: 62ch; }
.page-body h2 { font: 700 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--rule); padding-bottom: 5px; margin: 26px 0 10px; }
.page-body h2:first-child { margin-top: 0; }
.page-body figure { margin: 0; }
.page-body figure img { width: 100%; height: auto; }
.page-body figcaption { font: 11px var(--mono); color: var(--faint); margin-top: 6px; }
.page-body.one { grid-template-columns: minmax(0, 1fr); }
.page-body.one > div { max-width: 68ch; }
.facts.plain { border-left: 0; }
.pv-text { flex: 1; min-height: 0; overflow-y: auto; padding: 0; border-bottom: 0; align-content: start; }
.pv-text h1 { font: 700 clamp(30px, 4vw, 52px)/1 var(--sans); letter-spacing: -.025em; margin: 0 0 22px; grid-column: 1 / -1; }
.pv-text { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.pv-text.one { grid-template-columns: minmax(0, 1fr); }
.focus { list-style: none; margin: 0; padding: 0; }
.focus li { display: grid; grid-template-columns: 34px 1fr; border-bottom: 1px solid #d5d4cf; padding: 7px 0; }
.focus li .k { font: 11px var(--mono); color: var(--faint); padding-top: 3px; }
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); padding: var(--gutter); border-bottom: 1px solid var(--rule); }
.strip img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.out { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px var(--gutter); text-decoration: none; font-size: 17px; border-bottom: 1px solid var(--rule); }
.out:hover { background: var(--ink); color: var(--paper); }
.out .lbl { font: 11px var(--mono); }
.tbd { color: var(--laser); font: 12px var(--mono); }

/* ---------- project page ---------- */
.proj-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-bottom: 1px solid var(--rule); }
.proj-head > * { padding: 22px var(--gutter); min-width: 0; }
.proj-head h1 { font: 700 clamp(30px, 5vw, 60px)/1 var(--sans); letter-spacing: -.025em; margin: 0; }
.proj-head .yr { font: 13px var(--mono); margin-top: 10px; display: block; }
.facts { border-left: 1px solid var(--rule); margin: 0; display: grid; grid-template-columns: max-content 1fr; }
.facts dt { font: 700 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 6px 14px 6px 0; border-bottom: 1px solid #d5d4cf; }
.facts dd { margin: 0; padding: 5px 0; border-bottom: 1px solid #d5d4cf; }
.video { border-bottom: 1px solid var(--rule); padding: var(--gutter); background: #0d0d0d; }
.video video { width: 100%; max-height: 80vh; margin: 0 auto; background: #000; }
.video .cap { font: 11px var(--mono); color: #aaa; margin-top: 8px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.seq { padding: var(--gutter); display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); }
.seq figure { margin: 0; }
.seq figure.w12 { grid-column: span 12; }
.seq figure.w6 { grid-column: span 6; }
.seq figure.w4 { grid-column: span 4; }
.seq figure img { width: 100%; height: auto; }
.seq figcaption { font: 11px var(--mono); color: var(--faint); margin-top: 6px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--rule); }
.pager a { padding: 16px var(--gutter); text-decoration: none; font-size: 15px; }
.pager a + a { border-left: 1px solid var(--rule); text-align: right; }
.pager a:hover { background: var(--ink); color: var(--paper); }
.pager .lbl { display: block; font: 10px var(--mono); color: var(--faint); }

.site-foot { border-top: 1px solid var(--rule); padding: 14px var(--gutter); font: 12px var(--mono); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }


/* ---------- Cargo text (copied formatting: b / i / links / lists / small) ---------- */
.proj-head h1.long { font-size: clamp(26px, 2.9vw, 40px); line-height: 1.05; }
.proj-head .sub { display: block; font: 700 clamp(18px, 2.2vw, 26px)/1.1 var(--sans); margin-top: 6px; }
.info { font-size: 15px; line-height: 1.55; }
.proj-head > .info { border-left: 1px solid var(--rule); }
.proj-head.wide { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.info a { text-decoration: underline; text-underline-offset: 2px; }
.info a:hover { color: var(--laser); }
.info small { font-size: 12.5px; line-height: 1.6; display: inline-block; }
.info ul { margin: 0 0 .4em; padding-left: 1.2em; }
.info ul ul { margin: .2em 0; list-style: circle; }
.video.multi { display: grid; gap: var(--gutter); }
.vid { margin: 0 auto; width: 100%; }
.vid .ratio { width: 100%; max-height: 80vh; margin: 0 auto; background: #000; position: relative; }
.vid iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vid figcaption { font: 11px var(--mono); color: #aaa; margin-top: 8px; }
.vid figcaption a { color: inherit; }
.vid-ph { display: flex; align-items: center; justify-content: center; border: 1px dashed #555; }
.vid-ph span { font: 12px var(--mono); color: var(--laser); padding: 12px; text-align: center; }
.seq figure.solo { grid-column: 4 / span 6; }
.entries { border-top: 1px solid var(--rule); padding: var(--gutter); }
.entries h2 { font: 700 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; margin: 0 0 14px; }
.entry { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gutter); padding: 14px 0; border-top: 1px solid #d5d4cf; }
.entry .media { display: grid; gap: 12px; }
.entry .media img { width: 100%; height: auto; }
.entry .vid figcaption { color: var(--faint); }
.essay { border-top: 1px solid var(--rule); padding: calc(var(--gutter) * 1.5) var(--gutter); display: grid; grid-template-columns: 3fr 7fr 2fr; }
.essay .info { grid-column: 2; }
.cont { border-top: 1px solid var(--rule); padding: 14px var(--gutter); }
.pager > span + a, .pager > a + span { border-left: 1px solid var(--rule); }

/* ---------- Cargo layouts: images at Cargo's sizes, not full-bleed ---------- */
.cargo-layout { padding: calc(var(--gutter) * 1.5) var(--gutter); display: flex; flex-direction: column; gap: calc(var(--gutter) * 2); }
.cg { max-width: 100%; }
.cg.center { align-self: center; }
.cg.left { align-self: flex-start; }
.cg.right { align-self: flex-end; }
.cg > img { display: block; margin: 0 auto; max-height: 85vh; object-fit: contain; }
.collage { position: relative; width: 100%; }
.collage img { position: absolute; height: auto; }
.cgrid { display: grid; align-items: start; }
.cgrid img, .justify img { width: 100%; height: auto; }
.justify { display: flex; align-items: flex-start; }
.justify img { min-width: 0; }
.free { display: flex; flex-direction: column; align-items: center; gap: calc(var(--gutter) * 1.5); }
.free img { height: auto; }

/* ---------- work page: floating title + description (review 2026-10-12) ----------
   .proj-float sticks to the top of the viewport; its height is just the title, so content starts under the title,
   and the description box hangs below it over the content without pushing anything sideways.
   Both are see-through; the description lets clicks pass through to videos underneath (links stay clickable). */
.proj-float { position: sticky; top: 0; z-index: 20; }
.proj-head.title-only { grid-template-columns: 1fr; background: rgba(247, 246, 243, .55); }
.proj-head.title-only > div { padding-bottom: 10px; }
.info-box { position: absolute; top: 100%; left: 0; width: 33.333%; min-width: 240px; max-height: calc(100vh - 180px); overflow: auto;
  border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 18px var(--gutter) 22px;
  background: rgba(247, 246, 243, .55); pointer-events: none; }
.info-box a, .info-box .info-tab { pointer-events: auto; }
.info-tab { display: block; margin: -8px 0 10px auto; font: 10px var(--mono); letter-spacing: .04em; background: var(--paper); color: var(--ink); border: 1px solid var(--rule); padding: 3px 8px; cursor: pointer; }
.info-tab:hover { background: var(--ink); color: var(--paper); }
.info-box.folded { width: auto; min-width: 0; padding: 8px var(--gutter); background: transparent; border-right: 0; border-bottom: 0; }
.info-box.folded .info { display: none; }
.info-box.folded .info-tab { margin: 0; }
.proj-main { min-width: 0; }
.proj-main > .video { border-bottom: 0; }
.proj-main > .entries { border-top: 0; }
.proj-main > * + .entries { border-top: 1px solid var(--rule); }

/* every image fits on screen; .cg blocks get a max-width from build_portfolio.py so Cargo arrangements scale as a unit */
.cargo-layout { padding-top: calc(var(--gutter) * 2); padding-bottom: calc(var(--gutter) * 2); }
.cg { width: 100%; }
.entry .media img { max-height: calc(100vh - 220px); width: auto; max-width: 100%; }
.proj-main img { cursor: zoom-in; }
#lb { position: fixed; inset: 0; z-index: 9000; background: rgba(12, 12, 12, .94); display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
#lb[hidden] { display: none; }
#lb img { max-width: calc(100vw - 80px); max-height: calc(100vh - 80px); object-fit: contain; box-shadow: 0 0 0 1px #333; }
#lb .lb-cap { position: fixed; left: 20px; bottom: 14px; font: 11px var(--mono); color: #aaa; }
#lb button { position: fixed; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #ddd; font: 28px var(--mono); padding: 20px; cursor: pointer; }
#lb button:hover { color: var(--laser); }
#lb .lb-prev { left: 4px; } #lb .lb-next { right: 4px; }
#lb .lb-close { top: 30px; right: 4px; transform: none; font-size: 20px; }

/* text pages (About / Contact, Laser_co) use the same floating title + 1/3 description box; other text sits right of the box */
.text-page .proj-main { padding: calc(var(--gutter) * 1.5) var(--gutter) calc(var(--gutter) * 2) calc(33.333% + var(--gutter) * 2); }
.text-page .proj-main > section { max-width: 68ch; margin-bottom: calc(var(--gutter) * 1.5); }
.text-page .proj-main h2 { font: 700 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid var(--rule); padding-bottom: 5px; margin: 0 0 10px; }
.text-page .info .lede { font-size: 19px; line-height: 1.45; margin: 0 0 .8em; }
.text-page .info p { margin: 0 0 .8em; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .shell > main { border-left: 0; min-height: 0; }
  nav.side { position: sticky; height: auto; max-height: 100vh; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--rule); }
  .side-head { border-bottom: 0; }
  nav.side.open .side-head { border-bottom: 1px solid var(--rule); }
  .menu-btn { display: inline-block; }
  #side-lists { display: none; }
  nav.side.open #side-lists { display: block; }
  nav.side.home { position: static; max-height: none; }
  nav.side.home .menu-btn { display: none; }
  .preview { display: none; }
  .works li a { grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; }
  .works .th { display: block; width: 72px; height: 72px; object-fit: cover; }
  .proj-head, .page-body { grid-template-columns: 1fr; }
  .facts { border-left: 0; border-top: 1px solid var(--rule); }
  .seq figure.w6, .seq figure.w4 { grid-column: span 12; }
  .strip { grid-template-columns: 1fr 1fr; }
  .proj-head.wide, .entry, .essay, .proj-body { grid-template-columns: 1fr; }
  .proj-float { position: static; }
  .text-page .proj-main { padding-left: var(--gutter); }
  .info-box { position: static; width: auto; max-height: none; border-right: 0; pointer-events: auto; background: none; }
  .info-tab { display: none; }
  .info-box.folded .info { display: block; }
  .essay .info { grid-column: 1; }
  .proj-head > .info { border-left: 0; border-top: 1px solid var(--rule); }
  .seq figure.solo { grid-column: span 12; }
  .cg { width: 100% !important; }
  .collage { aspect-ratio: auto !important; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .collage img { position: static; width: 100% !important; }
  .works.pages li a { grid-template-columns: minmax(0, 1fr); }
  .works.pages .th { display: none; }
}
