:root {
  --bg: #fff;
  --text: #000;
  --muted: #555;
  --light: hsl(40 8% 93%);
  --accent: hsl(24 37% 81%);
  --gutter: 6vw;
  --max: 1400px;
  --base-size: 15px;

  --font-heading: "Archivo Black", "Arial Black", Impact, sans-serif;
  --font-body: "Figtree", "Proxima Nova", "Helvetica Neue", Arial, sans-serif;

  --h1: 4rem;
  --h2: 2.8rem;
  --h3: 2.2rem;
  --h4: 1.6rem;
  --text-large: 1.5rem;
  --text-normal: 1.2rem;
  --text-small: 1rem;

  /* arrow icon used by the Previous / Next links */
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16M14 6l6 6-6 6'/%3E%3C/svg%3E");
}

/* Squarespace scales text down on portrait phones; same formula here */
@media (max-width: 767px) and (orientation: portrait) {
  :root {
    --u: calc(.012 * min(100vh, 900px));
    --h1: calc(3 * var(--u) + 1rem);
    --h2: calc(1.8 * var(--u) + 1rem);
    --h3: calc(1.2 * var(--u) + 1rem);
    --h4: calc(.6 * var(--u) + 1rem);
    --text-large: calc(.5 * var(--u) + 1rem);
    --text-normal: calc(.2 * var(--u) + 1rem);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: var(--base-size); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-normal);
  line-height: 1.8;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
/* height:auto lets the width/height attributes reserve space without stretching */
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 500; line-height: 1.4; letter-spacing: 0; margin: 0 0 1.5rem; }
p { margin: 0 0 1.25rem; }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.8vw var(--gutter);
  line-height: 1;
}
/* Name size: change 1.8rem */
.site-title { font-family: var(--font-heading); font-size: 1.8rem; text-decoration: none; }
/* Menu size: change the font-size here and the icon size below */
.site-header nav ul { display: flex; align-items: center; gap: 2.4rem; }
.site-header nav a { font-size: 1.3rem; text-decoration: none; display: inline-flex; padding-bottom: 3px; border-bottom: 2px solid transparent; }
.site-header nav a:hover,
.site-header nav a[aria-current="page"] { border-bottom-color: currentColor; }
.site-header nav svg { width: 28px; height: 28px; }

/* ---------- Home: cover photo tiles ---------- */
main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 80px;
  row-gap: 75px;
  padding: 2rem 0 5rem;
}
.tile { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--light); color: var(--text); text-decoration: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.1); transition: background .3s ease; }
.tile:hover::after, .tile:focus-visible::after { background: rgba(255,255,255,.45); }
.tile:hover img { transform: scale(1.03); }
.tile-title {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem; text-align: center;
  font-family: var(--font-heading); font-size: calc(var(--h4) * 1.3); line-height: 1.25;
}

/* ---------- About, Contact ---------- */
.about, .contact { text-align: center; padding: 1rem 0 5rem; }
.about h1, .contact h1, .project h1 { font-size: var(--h2); }
.about-title { max-width: 58.33%; margin: 0 auto 2.5rem; }
.about-photo { width: 41.67%; margin: 0 auto 3rem; }
.about-photo img { width: 100%; height: auto; background: var(--light); }
.about-text { max-width: 58.33%; margin: 0 auto; }
.contact { padding-top: 3rem; padding-bottom: 6rem; }
.contact-text { max-width: 50%; margin: 0 auto; }
.contact-social { display: flex; justify-content: center; margin-top: 1.25rem; }
.contact-social a { display: inline-flex; padding: 4px; }

/* ---------- Project pages ---------- */
/* Change --gallery-width to make the photos bigger or smaller
   (if you change it, update GALLERY_SIZES in build.js to match) */
.project { --gallery-width: 1200px; max-width: var(--gallery-width); margin: 0 auto; padding: 1rem 0 4rem; }
.project-intro { margin: -.75rem 0 2.5rem; }

/* Gallery: two columns, every photo shown in full (no cropping).
   Photos flow down the left column, then the right. */
.gallery { display: block; column-count: 2; column-gap: 32px; }
.gallery figure { margin: 0 0 32px; break-inside: avoid; background: var(--light); }
.gallery a { display: block; }
.gallery img { width: 100%; height: auto; }
/* Name a file like DSCF1234-wide.jpg to make it span both columns */
.gallery figure.wide { column-span: all; }

/* ---------- Previous / Next ---------- */
.pager { display: flex; justify-content: space-between; gap: 2rem; margin-top: 5rem; line-height: 1.3; }
.pager a { display: flex; align-items: center; gap: 1.1rem; text-decoration: none; max-width: 45%; }
.pager .next { margin-left: auto; text-align: right; }

/* hide the "Previous" / "Next" word visually, keep it for screen readers */
.pager a span {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.pager a strong { font-family: var(--font-heading); font-weight: 500; font-size: calc(var(--h4) * 1.1); }
.pager a:hover strong { text-decoration: underline; }

/* the arrow (change 40px to resize) */
.pager a::before, .pager a::after {
  width: 40px; height: 40px; flex-shrink: 0; background: currentColor;
  -webkit-mask: var(--arrow) center / contain no-repeat;
          mask: var(--arrow) center / contain no-repeat;
  transition: transform .2s ease;
}
/* previous: arrow on the left, pointing left */
.pager .prev::before { content: ""; transform: scaleX(-1); }
.pager .prev:hover::before { transform: scaleX(-1) translateX(4px); }
/* next: arrow on the right, pointing right */
.pager .next::after { content: ""; }
.pager .next:hover::after { transform: translateX(4px); }

/* ---------- Footer ---------- */
.site-footer {
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
  padding: 3rem var(--gutter) 4rem;
  font-size: var(--text-small);
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Mobile ---------- */
@media only screen and (pointer: coarse) and (max-width: 1024px), screen and (max-width: 799px) {
  .site-header { padding: 6vw var(--gutter); }
}
@media (max-width: 767px) {
  .about-title, .about-text, .contact-text { max-width: 100%; }
  .about-photo { width: 75%; }
  .site-header { flex-wrap: wrap; row-gap: 1rem; }
  .site-title { font-size: 1.6rem; }
  .site-header nav a { font-size: 1.1rem; }
  .site-header nav ul { gap: 1.2rem; }
  .site-header nav svg { width: 24px; height: 24px; }
  .grid { grid-template-columns: 1fr; row-gap: 40px; }
  .gallery { column-gap: 12px; }
  .gallery figure { margin-bottom: 12px; }
  .pager a { max-width: 48%; gap: .6rem; }
  .pager a::before, .pager a::after { width: 26px; height: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .tile img, .tile::after, .pager a::before, .pager a::after { transition: none; }
  .tile:hover img { transform: none; }
}