/* williamcusick.com — rebuilt from the Squarespace design, measured from the live site. */

:root {
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif; /* stands in for Acumin Pro */
  --font-body: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --text: #000;
  --link: rgb(37, 53, 81);
  --bg: #fff;
  --gutter: 3vw;
  --max: 1500px;
  --col-gap: 11px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 300 16px/1.8 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; margin: 0 0 0.6em; }
h2 { font-size: clamp(30px, 2.3vw + 14.5px, 46px); line-height: 1.3; }
h3 { font-size: clamp(26px, 1.4vw + 16px, 36px); line-height: 1.3; }
h4 { font-size: clamp(20px, 0.65vw + 16.7px, 26px); line-height: 1.37; }
p { margin: 0 0 1em; }
.text a { color: var(--link); text-underline-offset: 2px; text-decoration-thickness: 1px; }
.center { text-align: center; }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--gutter);
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
}
.site-title {
  font: 500 clamp(22px, 1.1vw + 17px, 30px)/1.4 var(--font-display);
  text-decoration: none;
}
.site-nav { display: flex; align-items: center; gap: 1.1em; }
.site-nav a {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) no-repeat left bottom / 0 1px;
  transition: background-size 0.3s ease;
  padding: 2px 0;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { background-size: 100% 1px; }
.site-nav a.social, .site-nav a.social:hover { background: none; display: flex; margin-left: 0.4em; }
.menu-toggle { display: none; }

/* ---------- Layout grid (24 columns, like Squarespace's Fluid Engine) ---------- */
main { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 4vw 0; }
.section--tight { padding: 0 0 1vw; }
.fe { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: start; }
.fe > .block { grid-column: var(--col, 1 / -1); }
.fe .text > :last-child { margin-bottom: 0; }

/* ---------- Home portfolio grid ---------- */
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding-top: 0; }
.grid-item { text-decoration: none; display: flex; flex-direction: column; }
.grid-image { aspect-ratio: 1; overflow: hidden; }
.grid-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.grid-item:hover .grid-image img { transform: scale(1.03); }
.grid-title { font-size: clamp(18px, 0.65vw + 16.7px, 24px); text-align: center; margin: 0.45em 0 0; }

/* ---------- Project galleries ---------- */
.gallery { display: grid; gap: 50px; }
.gallery-item { margin: 0; }
.gallery-image { aspect-ratio: 16 / 9; overflow: hidden; background: #f4f4f4; }
.gallery-image a, .gallery-image img { display: block; width: 100%; height: 100%; }
.gallery-image img { object-fit: cover; }
.gallery-item figcaption { font-size: 14px; line-height: 1.6; margin-top: 12px; }

/* ---------- Prev / next pager ---------- */
.pager { display: flex; justify-content: space-between; padding: 4vw 0 2vw; border-top: 1px solid rgba(0, 0, 0, 0.12); margin-top: 4vw; }
.pager-link { display: flex; flex-direction: column; text-decoration: none; }
.pager-link--next { margin-left: auto; text-align: right; }
.pager-label { font-size: 14px; }
.pager-title { font: 500 clamp(24px, 1.4vw + 16px, 36px)/1.3 var(--font-display); }
.pager-link--prev .pager-title::before { content: "‹ "; }
.pager-link--next .pager-title::after { content: " ›"; }

/* ---------- Info ---------- */
.info { row-gap: 32px; }
.info > .image { grid-row: 1; }
.info-bio { grid-row: 2; }
.info-contact { grid-row: 1; margin-top: 95px; }
.info-bio h4 { margin-bottom: 0.9em; }

/* ---------- Footer ---------- */
.site-footer { text-align: center; padding: 6vw var(--gutter) 5vw; }
.site-footer .social { display: inline-flex; margin-bottom: 1.2em; }
.site-footer p { margin: 0; }
.site-footer p a { color: var(--link); text-underline-offset: 2px; }

/* ---------- Scroll reveal (matches the original fade-up / scale-up) ---------- */
.js .reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.js .reveal--scale-up { transform: scale(0.94); }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  :root { --gutter: 6vw; }
  .fe > .block { grid-column: 1 / -1; }
  .info > .image, .info-bio, .info-contact { grid-row: auto; margin-top: 0; }
  .section { padding: 8vw 0; }
  .portfolio-grid { grid-template-columns: 1fr; gap: 32px; }
  .gallery { gap: 36px; }

  .menu-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 7px;
    width: 36px; height: 36px; padding: 0; border: 0; background: none; cursor: pointer;
    position: relative; z-index: 20;
  }
  .menu-toggle span { display: block; height: 1px; background: currentColor; transition: transform 0.3s ease; }
  .menu-open .menu-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-open .menu-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }

  .site-nav {
    position: fixed; inset: 0; z-index: 10; background: var(--bg);
    flex-direction: column; justify-content: center; gap: 0.6em;
    font: 500 30px/1.4 var(--font-display);
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s;
  }
  .menu-open .site-nav { opacity: 1; visibility: visible; }
  .menu-open { overflow: hidden; }
  .site-nav a.social { margin: 0.6em 0 0; }
}
