/* ==========================================================
   Victor Elliott — site styles
   Brand palette + fonts live in the variables below.
   ========================================================== */
:root {
  /* brand */
  --sage: #586c5f;
  --forest: #2f4339;
  --butter: #ffef88;
  --peach: #ffb988;

  /* roles (light) */
  --bg: #f7f4e1;
  --dots: rgba(47, 67, 57, .13);
  --surface: #ebe7cc;
  --text: var(--forest);
  --muted: var(--sage);
  --line: rgba(47, 67, 57, .3);
  --frame: var(--forest);      /* panel borders */
  --shadow: var(--peach);      /* panel offset shadow */
  --mark: var(--butter);       /* heading highlight */
  --link-underline: var(--peach);

  --font-display: "Fjalla One", "Arial Narrow", Impact, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-note: "Caveat", "Segoe Print", cursive;

  --col: 960px;          /* max width of the centered column (desktop) */
  --gutter: 2rem;        /* side padding (desktop) */
  --gap: 1.25rem;        /* gallery gap */
  --radius: 8px;
  --offset: 6px;         /* panel shadow offset */
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #18231e;
    --dots: rgba(255, 239, 136, .08);
    --surface: #24342c;
    --text: #f3eed2;
    --muted: #b4c4b8;
    --line: rgba(243, 238, 210, .25);
    --frame: var(--butter);
    --shadow: var(--sage);
    --mark: rgba(255, 239, 136, .22);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text);
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;   /* sticky footer */
  font: 1.0625rem/1.65 var(--font-body);
  background-color: var(--bg);
  background-image: radial-gradient(var(--dots) 1.2px, transparent 1.2px);  /* sketchbook dot grid */
  background-size: 24px 24px;
}
img, video, iframe { max-width: 100%; display: block; }
a { color: var(--text); text-decoration-color: var(--link-underline); text-decoration-thickness: .15em; text-underline-offset: .18em; }
a:hover { text-decoration-color: currentColor; }
a:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; border-radius: 2px; }

/* ---------- layout: one centered column ---------- */
.wrap { width: 100%; max-width: var(--col); margin-inline: auto; padding-inline: var(--gutter); }
main { flex: 1 0 auto; padding-block: 3rem 5rem; }
main > section { margin-block: 3.5rem; }
main > section:first-child { margin-top: 0; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--butter); color: var(--forest); padding: .5rem 1rem; z-index: 10; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; margin: 0 0 .6em; letter-spacing: .01em; }
h1 { font-size: clamp(2.4rem, 8vw, 4rem); }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.3rem); width: fit-content; max-width: 100%;
     padding-inline: .2em; margin-left: -.2em;
     background: linear-gradient(transparent 58%, var(--mark) 58%, var(--mark) 92%, transparent 92%); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; max-width: 66ch; }
.meta { font-family: var(--font-note); font-weight: 700; font-size: 1.35rem; line-height: 1.2; color: var(--muted); margin-bottom: .3em; }

/* ---------- header ---------- */
.site-header { background: var(--forest); color: var(--butter); padding-block: 1.5rem 1rem; border-bottom: 4px solid var(--peach); }
.site-header .wrap { display: grid; grid-template-columns: 1fr auto; gap: 1rem 1.5rem; align-items: center; }
.site-header a:focus-visible { outline-color: var(--butter); }
.brand { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-display); font-size: clamp(2rem, 6vw, 2.3rem); letter-spacing: .02em; color: var(--butter); text-decoration: none; }
.brand-role { font-family: var(--font-note); font-weight: 700; font-size: 1.45rem; color: var(--peach); margin-top: .15rem; }

.social { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.social a { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; color: var(--butter); font-size: 1.35rem; text-decoration: none; transition: background-color .15s, color .15s; }
.social a:hover { background: var(--peach); color: var(--forest); }

.nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .25rem .5rem; }
.nav a { color: var(--butter); text-decoration: none; font-weight: 800; padding: .45rem 1rem; border-radius: 999px; }
.nav a:hover { background: rgba(255, 239, 136, .15); }
.nav a[aria-current="page"] { background: var(--butter); color: var(--forest); }

/* ---------- panels (storyboard frames) ---------- */
.profile, .video, .gallery a {
  border-radius: var(--radius);
  box-shadow: var(--offset) var(--offset) 0 var(--shadow);
  background: var(--surface); overflow: hidden;
}

/* ---------- home ---------- */
.hero { display: flex; gap: 3rem; align-items: center; }
.profile { width: 280px; height: 280px; object-fit: cover; flex: none; transform: rotate(-2deg); }
.hero-text { flex: 1; }
.video { aspect-ratio: 16 / 9; }
.video video, .video iframe { width: 100%; height: 100%; border: 0; object-fit: cover; }

/* ---------- about ---------- */
.button { display: inline-block; padding: .7rem 1.3rem; background: var(--butter); color: var(--forest); text-decoration: none; font-weight: 800;
          border: 3px solid var(--frame); border-radius: 999px; box-shadow: 4px 4px 0 var(--shadow); transition: transform .12s, box-shadow .12s; }
.button:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--shadow); }
.button:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--shadow); }
.button .fa-solid { margin-right: .4em; }
.button:focus-visible { outline-offset: 4px; }
.project { padding-block: 1.5rem; border-top: 2px dashed var(--line); }
.project:last-child { border-bottom: 2px dashed var(--line); }

/* ---------- portfolio ---------- */
.subnav { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 3rem; }
.subnav a { text-decoration: none; font-weight: 800; padding: .4rem 1.1rem; border: 2px solid var(--frame); border-radius: 999px; transition: background-color .15s, color .15s; }
.subnav a:hover { background: var(--butter); color: var(--forest); }
section[id] { scroll-margin-top: 1.5rem; }
.intro { color: var(--muted); }

/* Masonry-style gallery, pure CSS. Keeps each image's own aspect ratio. */
.gallery { list-style: none; margin: 0; padding: 0; columns: 3; column-gap: var(--gap); }
.gallery li { break-inside: avoid; margin: 0 0 var(--gap); }
.gallery a { display: block; transition: transform .15s, box-shadow .15s; }
.gallery a:hover { transform: translate(-2px, -2px); box-shadow: calc(var(--offset) + 2px) calc(var(--offset) + 2px) 0 var(--shadow); }
.gallery img { width: 100%; height: auto; }

/* ---------- contact ---------- */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding-block: 1.1rem; border-top: 2px dashed var(--line); display: flex; align-items: baseline; gap: 1.5rem; font-size: 1.15rem; }
.contact-list li:last-child { border-bottom: 2px dashed var(--line); }
.contact-list .label { width: 9rem; flex: none; font-weight: 800; }
.contact-list .label i { width: 1.4em; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { flex: none; background: var(--forest); color: var(--peach); border-top: 4px solid var(--peach); padding-block: 1.5rem; font-family: var(--font-note); font-weight: 700; font-size: 1.3rem; }

/* ==========================================================
   Mobile: thin out
   ========================================================== */
@media (max-width: 720px) {
  :root { --gutter: 1rem; --gap: .9rem; --offset: 4px; }
  body { font-size: 1rem; }
  main { padding-block: 2rem 3.5rem; }
  main > section { margin-block: 2.5rem; }

  .site-header { padding-block: 1.1rem .8rem; }
  .site-header .wrap { grid-template-columns: 1fr; gap: .6rem; }
  .social { margin-left: -.5rem; }
  .nav a { padding: .4rem .8rem; font-size: .95rem; }

  .hero { flex-direction: column; align-items: flex-start; gap: 1.75rem; }
  .profile { width: 100%; max-width: 260px; height: auto; aspect-ratio: 1; }

  .gallery { columns: 2; }
  .contact-list li { flex-direction: column; gap: .1rem; }
}
@media (max-width: 380px) { .gallery { columns: 1; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* bypass glightbox font removal */
body .glightbox-clean .gslide-title,
body .glightbox-clean .gslide-desc {
  font-family: inherit;
}

/* ---------- error page ---------- */
.error-page { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.error-page h1 { margin-bottom: .3em; }
.error-cat {
  width: min(320px, 70vw); height: auto; margin-bottom: 2rem;
  border: 3px solid var(--frame); border-radius: var(--radius);
  box-shadow: var(--offset) var(--offset) 0 var(--shadow);
  background: var(--surface); transform: rotate(2deg);
}

a.nvf:link, 
a.nvf:visited, 
a.nvf:hover, 
a.nvf:focus, 
a.nvf:active {
  text-decoration: none;
  color: inherit;
}

/* hide vimeo header */
.vp-title { display: none; }

/* ---------- book page ---------- */
.book { display: grid; grid-template-columns: 1fr 300px; gap: 3rem; align-items: start; }
.book-buy { position: sticky; top: 1.5rem; display: flex; flex-direction: column; align-items: center; gap: 1.75rem; }
.book-cover {
  width: 100%; height: auto; aspect-ratio: 1; object-fit: cover;
  border: 3px solid var(--frame); border-radius: var(--radius);
  box-shadow: var(--offset) var(--offset) 0 var(--shadow);
  background: var(--surface); transform: rotate(2deg);
}
.book-buy .button {
  white-space: nowrap;
}

.book-buy .button i {
  transform: translateY(1px);
  padding-right: 2px;
}

.credits { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 2rem; }
.credits li { padding-block: .9rem; border-top: 2px dashed var(--line); display: flex; flex-direction: column; }
.credits strong { font-size: 1.15rem; }
.credits .meta { margin: 0; }

@media (max-width: 720px) {
  .book { grid-template-columns: 1fr; gap: 2rem; }
  .book-buy { order: -1; position: static; }      /* cover and button first on mobile */
  .book-cover { max-width: 280px; }
}