/* nickbitzis.com — look carried over from the 2024 Wix site:
   black cells on a light-grey sheet (the 1px gaps are the grid lines),
   Helvetica Light, pill buttons, blue-to-periwinkle tiles, scrolling tickers. */

:root {
  --line: #ececec;
  --bg: #000;
  --ink: #ececec;
  --white: #fff;
  --blue: #1a6aff;      /* header bars, nav pill */
  --blue-hot: #0f24ff;  /* pill hover, active menu item */
  --blue-soft: #5190ff;
  --peri: #acabff;
  --lav: #ebebff;
  --tile-1: #ebebff;
  --tile-2: #a5c6ff;
  --tile-3: #5190ff;
  --orange: #c94001;
  --header-h: 76px;
  --pad: 20px;
  --font: "Helvetica Neue", Helvetica, "Inter Tight", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.03em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; font-weight: 300; }
p + p { margin-top: 1.2em; }
strong, b { font-weight: 500; color: var(--white); }
::selection { background: var(--blue-hot); color: #fff; }

/* ---------- sheet + cells: the grid-line system ---------- */
.sheet {
  background: var(--line);
  display: grid;
  gap: 1px;
  padding: 0 1px 1px;
}
.sheet.thick { gap: 2px; padding: 0 2px 2px; }
.sheet.top { padding-top: 1px; }
.sheet.thick.top { padding-top: 2px; }
.cell { background: var(--bg); position: relative; min-width: 0; }
.cell.pad { padding: var(--pad); }
.cell.pad-lg { padding: clamp(24px, 4vw, 60px); }
.cell.center { display: flex; flex-direction: column; justify-content: center; }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-3-1 { grid-template-columns: 3fr 1fr; }
.cols-5-1 { grid-template-columns: 5fr 1fr; }
.cols-9-5 { grid-template-columns: 9fr 5fr; }
.cols-5-9 { grid-template-columns: 5fr 9fr; }
.span-all { grid-column: 1 / -1; }

.cover { width: 100%; height: 100%; object-fit: cover; }
.media { overflow: hidden; background: #000; }
.media > img, .media > video, .media > iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.media.contain > img { object-fit: contain; padding: 30px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr 97px; gap: 1px;
  padding: 1px; background: var(--line);
  height: var(--header-h);
}
.site-header .brand {
  background: var(--bg); display: flex; align-items: center; padding: 0 var(--pad);
  font-size: 30px; text-decoration: none; letter-spacing: -0.03em;
}
.menu-btn {
  background: var(--bg); border: 0; cursor: pointer; display: grid; place-items: center; padding: 0;
}
.menu-btn svg { width: 34px; height: 34px; fill: var(--line); transition: transform .35s ease, fill .35s ease; }
.menu-btn:hover svg { transform: rotate(90deg); fill: var(--blue); }

/* ---------- slide-in menu ---------- */
.menu-scrim {
  position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 60;
  opacity: 0; pointer-events: none; transition: opacity .4s ease;
}
.menu-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(50vw, 720px); z-index: 70;
  background: var(--bg); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform .5s cubic-bezier(.2,.7,.1,1);
  display: flex; flex-direction: column;
}
.menu-open .menu-scrim { opacity: 1; pointer-events: auto; }
.menu-open .menu-panel { transform: none; }
.menu-top { height: 200px; display: flex; justify-content: flex-end; align-items: flex-start; padding: 22px 28px; border-bottom: 1px solid var(--line); }
.menu-close { background: none; border: 0; cursor: pointer; padding: 0; }
.menu-close svg { width: 30px; height: 30px; stroke: var(--line); transition: transform .35s ease, stroke .35s ease; }
.menu-close:hover svg { transform: rotate(90deg); stroke: var(--blue); }
.menu-panel nav a {
  display: block; text-decoration: none; text-transform: uppercase;
  font-size: clamp(40px, 5.4vw, 78px); line-height: 1.25; padding: 0 12px;
  border-bottom: 1px solid var(--line); transition: color .3s ease, padding-left .3s ease;
}
.menu-panel nav a:hover { color: var(--blue-soft); padding-left: 28px; }   /* hover is the mid blue; the current page is the lighter blue */
.menu-panel nav a.active { color: var(--tile-2); }
.menu-panel nav a.active:hover { color: var(--blue-soft); }

/* ---------- type ---------- */
.display { font-size: clamp(38px, 5.45vw, 78px); line-height: 1; letter-spacing: -0.03em; text-transform: uppercase; }
.h-xl { font-size: clamp(34px, 5.2vw, 75px); line-height: 1.05; text-transform: uppercase; }
.h-lg { font-size: clamp(30px, 3.9vw, 56px); line-height: 1.02; text-transform: uppercase; }
.h-md { font-size: clamp(22px, 1.9vw, 27px); line-height: 1.02; text-transform: uppercase; }
.h-cell { font-size: clamp(34px, 5vw, 72px); line-height: 1.12; text-transform: uppercase; text-align: center; }
.small { font-size: 16px; }
.label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--peri); }
.c-white { color: var(--ink); } .c-lav { color: var(--lav); } .c-peri { color: var(--peri); }
.c-blue { color: var(--blue-soft); } .c-orange { color: var(--orange); }
.bold { font-weight: 500; }
.justify { text-align: justify; hyphens: auto; }

/* mirrored headline (the reflection on the resume and about blocks) */
.mirror { display: block; transform: scale(-1, -1); color: var(--blue-soft); margin-top: .08em; }
.mirror.peri { color: var(--peri); }

/* ---------- hero ---------- */
.hero-title { padding: 49px var(--pad) 48px; }
.hero-title .lede { margin-top: 28px; max-width: 46ch; font-size: 18px; color: var(--ink); }
.hero-img { min-height: 300px; }

/* ---------- ticker (scrolling bar) ---------- */
.ticker { overflow: hidden; display: flex; align-items: center; height: 115px; white-space: nowrap; }
.ticker.short { height: 110px; }
.ticker-track { display: flex; flex-shrink: 0; gap: 54px; padding-right: 54px; animation: ticker 18s linear infinite; }
.ticker-track span { font-size: 16px; font-weight: 700; letter-spacing: 0; text-transform: uppercase; }
.ticker:hover .ticker-track { animation-play-state: paused; }
a.ticker { text-decoration: none; }
@keyframes ticker { to { transform: translateX(-100%); } }

/* ---------- pills ---------- */
.pill {
  display: flex; align-items: center; justify-content: center; text-align: center;
  border: 1px solid var(--line); border-radius: 999px; text-decoration: none; text-transform: uppercase;
  font-size: clamp(30px, 3.9vw, 56px); min-height: 209px; padding: 20px 40px;
  transition: background .3s ease, color .3s ease;
}
.pill:hover { background: var(--blue-hot); text-decoration: underline; text-underline-offset: .12em; text-decoration-thickness: 2px; }
.pill.sm { font-size: 24px; min-height: 53px; padding: 10px 30px; width: 100%; background: transparent; color: var(--ink); cursor: pointer; font-family: inherit; font-weight: 300; letter-spacing: -0.03em; }
.pill.sm:hover { background: var(--blue-hot); }
.pill.blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.pill.blue:hover { background: var(--blue-hot); border-color: var(--blue-hot); }
.btn {
  display: inline-block; background: var(--blue); color: #fff; border: 2px solid var(--line); text-decoration: none;
  padding: 11px 34px; font-size: 16px; transition: background .3s ease;
}
.btn:hover { background: var(--blue-hot); }
.btn.ghost { background: transparent; border-width: 1px; }
.btn.ghost:hover { background: var(--blue-hot); }

/* ---------- featured cards (home) ---------- */
.card { display: flex; flex-direction: column; text-decoration: none; min-height: 760px; }
.card-head { padding: 24px 23px 26px; min-height: 134px; }
.card-media { position: relative; height: 321px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.card-media img, .card-media video { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.1,1), filter .5s ease; }
.card:hover .card-media img, .card:hover .card-media video { transform: scale(1.06); }
.card-num { position: absolute; left: 21px; bottom: 6px; font-size: 56px; line-height: 1; text-shadow: 0 0 18px rgba(0,0,0,.65); }
.card-body { padding: 36px 23px 20px; flex: 1; font-size: 16px; }
.card-body .label { display: block; margin-bottom: 12px; }
.card-foot { padding: 0 23px 22px; font-size: 16px; display: flex; justify-content: space-between; align-items: baseline; }
.card-foot .arrow { transition: transform .3s ease; }
.card:hover .card-foot { color: var(--blue-soft); }
.card:hover .card-foot .arrow { transform: translateX(8px); }

/* ---------- area tiles (portfolio hub) ---------- */
.tile {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: 278px; padding: 30px; color: #000; text-decoration: none; overflow: hidden;
}
.tile.t1 { background: var(--tile-1); } .tile.t2 { background: var(--tile-2); } .tile.t3 { background: var(--tile-3); }
.tile-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity .5s ease, transform 1.2s ease; }
.tile:hover .tile-bg { opacity: .55; transform: none; }
.tile-title { position: relative; font-size: clamp(30px, 3.75vw, 54px); line-height: 1.1; text-transform: uppercase; }
.tile-group { position: relative; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; opacity: .7; }
.tile-count { position: relative; font-size: 16px; margin-top: 14px; opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .4s ease; }
.tile:hover .tile-count { opacity: 1; transform: none; }

/* ---------- area pages ---------- */
.page-title { background: var(--blue); color: #fff; text-align: center; padding: 42px 20px; }
.page-title.black { background: var(--bg); }
.band { height: 199px; overflow: hidden; }
.band.parallax { background-size: cover; background-position: center; background-attachment: fixed; height: 560px; }
.band img { width: 100%; height: 100%; object-fit: cover; }

.project .text { padding: clamp(28px, 3.6vw, 52px); display: flex; flex-direction: column; justify-content: center; }
.project .text h3 { font-size: 18px; font-weight: 500; color: var(--white); text-transform: uppercase; margin-bottom: 20px; letter-spacing: -0.02em; }
.project .text .body { text-align: justify; hyphens: auto; }
.project .media { min-height: 346px; position: relative; }
.project .media img, .project .media video { position: absolute; inset: 0; transition: transform .9s cubic-bezier(.2,.7,.1,1); }
.project .media:hover img, .project .media:hover video { transform: scale(1.04); }
.project .media.contain img { object-fit: contain; }
.project .media .over { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.35); pointer-events: none; }
.facts { margin: 24px 0 0; padding: 0; list-style: none; border-top: 1px solid rgba(236,236,236,.35); font-size: 15px; }
.facts li { display: grid; grid-template-columns: 112px 1fr; gap: 14px; padding: 9px 0; border-bottom: 1px solid rgba(236,236,236,.35); }
.facts .k { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--peri); padding-top: 2px; }
.links { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }

.stat { display: grid; place-items: center; text-align: center; padding: 30px; min-height: 346px; background:
  radial-gradient(120% 90% at 20% 10%, rgba(81,144,255,.28), transparent 60%),
  radial-gradient(90% 80% at 90% 90%, rgba(172,171,255,.22), transparent 60%), #000; }
.stat .n { font-size: clamp(64px, 9vw, 130px); line-height: .9; color: var(--lav); }
.stat .u { font-size: clamp(18px, 2vw, 27px); text-transform: uppercase; margin-top: 12px; color: var(--peri); }

.gallery { display: grid; gap: 2px; background: var(--line); }
.gallery .g { background: #000; position: relative; overflow: hidden; aspect-ratio: var(--ar, 3 / 4); }
.gallery .g img, .gallery .g video { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2,.7,.1,1); }
.gallery .g.contain img { object-fit: contain; padding: 26px; }
.gallery .g:hover img, .gallery .g:hover video { transform: scale(1.05); }
.gallery .g figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; font-size: 14px; line-height: 1.25;
  background: linear-gradient(transparent, rgba(0,0,0,.88)); opacity: 0; transform: translateY(10px); transition: opacity .35s ease, transform .35s ease;
}
.gallery .g:hover figcaption, .gallery .g:focus-within figcaption { opacity: 1; transform: none; }
.gallery .g.title { display: grid; place-items: center; padding: 20px; }
figure { margin: 0; }

.area-nav { display: grid; grid-template-columns: 110px 1fr 110px; align-items: center; padding: 43px 43px; gap: 20px; }
.area-nav .round { width: 66px; height: 66px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; text-decoration: none; font-size: 26px; transition: background .3s ease, transform .3s ease; }
.area-nav .round:hover { background: var(--blue-hot); }
.area-nav .round.prev:hover { transform: translateX(-6px); }
.area-nav .round.next { justify-self: end; }
.area-nav .round.next:hover { transform: translateX(6px); }
.area-nav .pill { min-height: 101px; font-size: clamp(28px, 5.6vw, 82px); max-width: 982px; width: 100%; justify-self: center; }

/* ---------- resume ---------- */
.role .co { padding: 20px; }
.role .co .when { margin-top: 16px; font-size: 16px; color: var(--peri); }
.role .co .title { margin-top: 6px; font-size: 18px; }
.role .what { padding: 26px 20px; font-size: 16px; }
.role .what ul { margin: 0; padding-left: 1.1em; }
.role .what li + li { margin-top: .7em; }
.skills-wrap { background-size: cover; background-position: center; padding: 0 12.5%; }
.skills { background: #000; border-left: 1px solid var(--line); border-right: 1px solid var(--line); padding: 50px clamp(20px, 5vw, 70px); }
.skills dl { margin: 0; display: grid; gap: 34px; }
.skills dt { font-size: clamp(26px, 3vw, 44px); line-height: 1.05; margin-bottom: 10px; }
.skills dd { margin: 0; font-size: 16px; color: var(--ink); max-width: 80ch; }
.edu .gt { color: #b3a369; } .edu .um1 { color: #f47321; } .edu .um2 { color: #6fbf73; } .edu .ib { color: var(--blue-soft); }

/* ---------- contact ---------- */
.form label { display: block; font-size: 16px; text-transform: uppercase; margin: 22px 0 8px; }
.form label:first-child { margin-top: 0; }
.form input, .form textarea {
  width: 100%; background: #000; border: 1px solid var(--line); color: var(--ink); font: inherit; font-size: 16px; padding: 9px 10px; border-radius: 0;
}
.form textarea { min-height: 92px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--blue-soft); outline-offset: 0; }
.form .pill { margin-top: 24px; }
.services { list-style: none; margin: 20px 0 0; padding: 0 0 0 32px; }
.services li { margin-top: 18px; }

/* ---------- about ---------- */
.about-title { padding: 39px 20px; display: flex; flex-direction: column; justify-content: space-between; min-height: 604px; }
.socials { display: flex; justify-content: center; gap: 18px; padding: 23px 20px; flex-wrap: wrap; }
.socials a { width: 61px; height: 61px; border-radius: 50%; display: grid; place-items: center; transition: background .3s ease, transform .3s ease; }
.socials a:hover { background: var(--blue-hot); transform: translateY(-4px); }
.socials svg { width: 34px; height: 34px; }

/* ---------- footer ---------- */
.foot h3 { font-size: 27px; margin-bottom: 32px; }
.foot .cell { padding: 17px 20px 60px; min-height: 300px; font-size: 16px; line-height: 1.6; }
.foot a { text-decoration: none; display: block; width: fit-content; transition: color .25s ease, padding-left .25s ease; }
.foot a:hover { color: var(--blue-soft); padding-left: 8px; }
.copyright { padding: 25px 20px; font-size: 14px; }

/* ---------- scroll-in motion (Wix "float in" and "fade in") ---------- */
.js [data-in] { opacity: 0; transition: opacity 1.2s ease, transform 1.2s cubic-bezier(.2,.7,.1,1); }
.js [data-in="float"] { transform: translateY(60px); }
.js [data-in].in { opacity: 1; transform: none; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  :root { --header-h: 62px; }
  .cols-2, .cols-3, .cols-4, .cols-3-1, .cols-5-1, .cols-9-5, .cols-5-9 { grid-template-columns: 1fr; }
  .cols-4.keep-2, .cols-3.keep-2 { grid-template-columns: 1fr 1fr; }
  .site-header { grid-template-columns: 1fr 70px; }
  .site-header .brand { font-size: 22px; }
  .menu-panel { width: 100vw; border-left: 0; }
  .menu-top { height: 110px; }
  .hero-title { padding: 34px 16px; }
  .hero-img { height: 300px; }
  .pill { min-height: 120px; }
  .card { min-height: 0; }
  .card-head { min-height: 0; }
  .about-title { min-height: 0; gap: 30px; }
  .about-title .mirror-wrap { display: none; }
  .project .media { min-height: 0; aspect-ratio: 4 / 3; }
  .project.flip .media { order: -1; }
  .band.parallax { background-attachment: scroll; height: 260px; }
  .area-nav { grid-template-columns: 56px 1fr 56px; padding: 26px 14px; gap: 10px; }
  .area-nav .round { width: 50px; height: 50px; }
  .area-nav .pill { min-height: 70px; }
  .skills-wrap { padding: 0; }
  .gallery { grid-template-columns: 1fr 1fr !important; }
  .ticker { height: 80px; }
  .foot .cell { min-height: 0; padding-bottom: 30px; }
  .order-first-sm { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .js [data-in] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .band.parallax { background-attachment: scroll; }
}

/* When the animated element is a grid cell, keep its black background in place and animate what is inside it. */
.js .cell[data-in] { opacity: 1; transform: none; }
.js .cell[data-in] > * { opacity: 0; transition: opacity 1.2s ease, transform 1.2s cubic-bezier(.2,.7,.1,1); }
.js .cell[data-in="float"] > * { transform: translateY(60px); }
.js .cell[data-in].in > * { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .cell[data-in] > * { opacity: 1; transform: none; transition: none; } }

/* Media cells take their height from the row, not from the picture's own proportions. */
.cell.media { position: relative; }
.cell.media > img, .cell.media > video, .cell.media > iframe { position: absolute; inset: 0; }
@media (max-width: 900px) {
  .cell.media { min-height: 62vw; }
}


/* ---------- home: three labelled rows of featured work, with shorter cards ---------- */
.row-label { padding: 15px 23px; font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--peri); }
.card { min-height: 0; }
.card-head { height: 104px; min-height: 0; padding: 22px 23px 0; overflow: hidden; }
.card-head h3 { line-height: 1.04; }
.card-body { min-height: 124px; }
.card-media { height: 270px; }
.card-media .stat { min-height: 0; height: 100%; padding: 16px; }
.card-media .stat .n { font-size: clamp(54px, 6.4vw, 92px); }
.card-media .stat .u { font-size: 14px; margin-top: 8px; }
.card-body { padding: 22px 23px 16px; }
.card-body .label { margin-bottom: 8px; }
@media (max-width: 900px) { .card-head { height: 92px; padding: 16px 16px 0; } .card-media { height: 200px; } .card-body { padding: 16px; min-height: 150px; } .card-foot { padding: 0 16px 16px; } }

/* ---------- blog ---------- */
.post .cell { min-height: 300px; }
.post-title { font-size: clamp(26px, 2.9vw, 42px); line-height: 1.06; margin-top: 16px; text-transform: none; }
.post-title a { text-decoration: none; transition: color .3s ease; }
.post-title a:hover { color: var(--blue-soft); }

/* ---------- article pages ---------- */
.article-head, .article { max-width: 760px; margin: 0 auto; }
.article-title { font-size: clamp(32px, 4.6vw, 64px); line-height: 1.04; margin: 18px 0 22px; }
.article-meta { font-size: 16px; color: var(--peri); }
.article-meta a { color: var(--ink); }
.article { font-size: 19px; line-height: 1.6; letter-spacing: -0.015em; font-weight: 300; }
.article p { margin: 0 0 1.25em; }
.article h2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.1; margin: 2em 0 .7em; padding-top: .9em; border-top: 1px solid rgba(236,236,236,.35); }
.article h3, .article h4 { font-size: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--peri); margin: 2.2em 0 .8em; }
.article h4 strong, .article h2 strong, .article h3 strong { font-weight: inherit; color: inherit; }
.article a { color: var(--blue-soft); text-underline-offset: .15em; transition: color .25s ease; }
.article a:hover { color: var(--lav); }
.article ul, .article ol { padding-left: 1.2em; margin: 0 0 1.25em; }
.article li { margin-bottom: .7em; }
.article blockquote { margin: 1.6em 0; padding-left: 20px; border-left: 2px solid var(--orange); color: var(--lav); }

/* ---------- portfolio navigation bar, as on the original site: a full-width blue bar with plain chevrons ---------- */
.area-nav { background: var(--blue); color: #fff; grid-template-columns: 66px 1fr 66px; padding: 0 43px; min-height: 182px; gap: 20px; }
.area-nav .nav-title { text-align: center; text-decoration: none; text-transform: uppercase; font-size: clamp(30px, 5.7vw, 82px); line-height: 1; padding: 40px 0; }
.area-nav .nav-title:hover { text-decoration: underline; text-underline-offset: .12em; text-decoration-thickness: 2px; }
.area-nav .round { width: 66px; height: 66px; border: 0; border-radius: 0; background: none; color: #fff; }
.area-nav .round svg { height: 66px; width: auto; }
.area-nav .round:hover { background: none; }
@media (max-width: 900px) { .area-nav { grid-template-columns: 34px 1fr 34px; padding: 0 14px; min-height: 110px; } .area-nav .round { width: 34px; height: 44px; } .area-nav .round svg { height: 40px; } .area-nav .nav-title { padding: 24px 0; } }

/* ---------- tickers: neighbours run in opposite directions; one phrase per pass can carry a colour ---------- */
.ticker.rev .ticker-track { animation-direction: reverse; }
.ticker[data-accent="red"] .hot { color: var(--orange); }
.ticker[data-accent="blue"] .hot { color: var(--blue-soft); }

/* gallery title tiles scale with their column so long titles are never cut off */
.gallery .g.title { container-type: inline-size; overflow: visible; }
.gallery .g.title .h-cell { font-size: clamp(18px, 13cqw, 72px); line-height: 1.08; overflow-wrap: anywhere; }

/* plain galleries: pieces shown whole on black with breathing room, no grid lines (the poster wall) */
.gallery.plain { gap: 0; background: #000; padding: 26px 20px; }
.gallery.plain .g.contain img { padding: 22px 26px; }

/* ---------- resume: sector labels and compact role rows ---------- */
.row-label.sector { font-size: 14px; padding: 20px 20px; }
.compact-roles { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.crole { padding: 22px 20px 26px; font-size: 15px; }
.crole .title { margin-top: 10px; }
.crole .when { color: var(--peri); margin: 4px 0 12px; font-size: 14px; }

/* ---------- collage (glitch art): pieces on light blue, some tall, as on the 2019 site ---------- */
.collage { background: var(--tile-2); padding: clamp(30px, 5vw, 70px) clamp(16px, 12vw, 200px) clamp(30px, 5vw, 80px); }
.collage-title { color: #06103a; text-align: center; font-size: clamp(22px, 2.6vw, 36px); line-height: 1.2; font-style: italic; font-family: Georgia, "Times New Roman", serif; max-width: 22em; margin: 0 auto clamp(24px, 4vw, 56px); letter-spacing: 0; }
.collage-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; grid-auto-flow: dense; gap: 7px; }
.collage-grid .c { aspect-ratio: 1 / 1; overflow: hidden; background: #fff; }
.collage-grid .c.tall { grid-row: span 2; aspect-ratio: auto; }
.collage-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2,.7,.1,1); }
.collage-grid .c:hover img { transform: scale(1.06); }
.gallery .g.note { background: var(--tile-2); color: #06103a; display: flex; align-items: center; padding: 18px; font-size: clamp(13px, 1.25vw, 18px); line-height: 1.3; }
@media (max-width: 900px) { .collage-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- blog: pictures on the index and in articles ---------- */
.post-hero { min-height: 300px; display: block; }
.post-hero img { transition: transform .9s cubic-bezier(.2,.7,.1,1); }
.post-hero:hover img { transform: scale(1.04); }
.post-teaser { margin-top: 18px; font-size: 16px; }
.article-hero { height: clamp(260px, 42vw, 560px); }
.article figure { margin: 2em 0; }
.article figure img { width: 100%; height: auto; display: block; border: 1px solid rgba(236,236,236,.35); }
.article figcaption { font-size: 14px; color: var(--peri); margin-top: 8px; }
.article hr { border: 0; border-top: 1px solid rgba(236,236,236,.35); margin: 2.4em 0; }

/* resume: when the last row of compact cards is short, a circuit panel fills the rest of the row */
.compact-roles { grid-template-columns: repeat(var(--cols, 4), 1fr); }
.crole-fill { background-size: cover; background-position: center; min-height: 120px; display: none; }
.ticker[data-accent="gray"] .hot { color: #a9a9a9; }

/* ---------- nothing may push a page wider than the screen ----------
   Grid columns written as 1fr refuse to shrink below their content (a long word, a web address, a padded picture).
   minmax(0, ...) lets them shrink, and long strings are allowed to break. */
.sheet { grid-template-columns: minmax(0, 1fr); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-3-1 { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); }
.cols-5-1 { grid-template-columns: minmax(0, 5fr) minmax(0, 1fr); }
.cols-9-5 { grid-template-columns: minmax(0, 9fr) minmax(0, 5fr); }
.cols-5-9 { grid-template-columns: minmax(0, 5fr) minmax(0, 9fr); }
.gallery .g, .collage-grid .c, .cell { min-width: 0; }
.article, .article-head, .post-title, .facts li > span, .project .text .body { overflow-wrap: anywhere; }
.article a { word-break: break-word; }
@media (max-width: 900px) {
  .cols-2, .cols-3, .cols-4, .cols-3-1, .cols-5-1, .cols-9-5, .cols-5-9 { grid-template-columns: minmax(0, 1fr); }
  .cols-4.keep-2, .cols-3.keep-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .gallery.plain { padding: 14px 8px; }
  .gallery.plain .g.contain img { padding: 10px 10px; }
  .gallery .g.title .h-cell { font-size: clamp(15px, 11cqw, 40px); overflow-wrap: normal; word-break: normal; hyphens: none; }
  .facts li { grid-template-columns: 96px minmax(0, 1fr); }
}
.about-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr); }
@media (max-width: 900px) { .about-grid { grid-template-columns: minmax(0, 1fr); } }

/* phone and tablet: the About Me photos are portraits, so give them a tall frame and keep faces in view */
@media (max-width: 900px) {
  .about-grid > .media { aspect-ratio: 4 / 5; min-height: 0; }
  .about-grid > .media img { object-position: center 22%; }
  .post .post-hero, .post-hero { aspect-ratio: 16 / 10; min-height: 0; }  /* ".post .cell" sets min-height 300px, which with the ratio forced a 480px width on phones */
}

/* project image shown as a full square (album art) */
.project .media.square { aspect-ratio: 1 / 1; min-height: 0; }

/* project image shown whole on its own background colour (app screenshots) */
.project .media.fit { background: #0b0a14; overflow: hidden; }
.project .media.fit img { object-fit: contain; }
