/* Shared portfolio chrome: fonts, header, footer, buttons and links.
   Loaded on every page that extends _portfolio.html.j2. */
@font-face {
  /* EXCEPTION: registers the custom font family — approved 2026-10-02 */
  font-family: 'JG Acadia';
  src: url('../assets/fonts/jg-acadia/JGAcadia-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  /* EXCEPTION: registers the custom font family — approved 2026-10-02 */
  font-family: 'JG Acadia';
  src: url('../assets/fonts/jg-acadia/JGAcadia-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  text-rendering: auto;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

a,button {
  -webkit-tap-highlight-color: var(--clear);
}

a:focus-visible,button:focus-visible,summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 6px;
}

::selection {
  background: var(--selection-paper);
  color: var(--selection-ink);
}

.wrap {
  /* The page frame: the viewport less two gutters (72px at the 1080
     reference, 20px on phones), up to --frame (design/tokens.json). */
  width: min(var(--frame), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

/* The foundation's radii, remapped to the brief: square panels, 3px controls. */
.portfolio-home {
  --r-1: var(--radius-control);
  --r-2: var(--radius-card);
  --r-3: var(--radius-card);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 28px;
}

.identity {
  /* 44px tap target via padding pulled back by margin: layout height stays
     at the logo's 26px, as designed. */
  padding-block: 9px;
  margin-block: -9px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
}

.monogram {
  display: block;
  height: 26px;
  width: auto;
}

.site-header nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
}

.site-header nav a {
  /* 44px tap target without changing the 82px header the design specifies. */
  padding-block: 12px;
  margin-block: -12px;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--clear);
  text-underline-offset: 6px;
}

.site-header nav a:hover {
  text-decoration-color: var(--ink);
}

.site-header nav .nav-short {
  display: none;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  padding: .6rem 1rem;
  background: var(--ink);
  color: var(--white);
  z-index: 5;
}

.skip-link:focus {
  top: 1rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: var(--fs-meta);
  line-height: normal;
  font-weight: 500;
  margin: 0 0 var(--space-xs);
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 20px;
  background: var(--accent);
  color: var(--white);
  font-size: var(--fs-small);
  line-height: normal;
  font-weight: 500;
  border: 0;
  border-radius: var(--radius-control);
  transition: background .2s;
}

.button:hover {
  background: var(--accent-hover);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-size: var(--fs-small);
  font-weight: 400;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 3px;
}

.text-link:hover {
  color: var(--ink);
  text-decoration-thickness: 2px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: var(--space-m);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: var(--fs-meta);
  color: var(--faint);
}

.site-footer p,.site-footer>a:last-child {
  margin: 0;
  color: var(--faint);
}

.site-footer>a:last-child:hover,.site-footer p a:hover {
  color: var(--ink);
}

.site-footer p a {
  color: inherit;
}

.site-footer .monogram {
  height: 26px;
}

/* The homepage's tinted contact band already closes the page above it. */
main:has(> .contact-section:last-child) + .site-footer {
  border-top: 0;
}

.site-footer .identity {
  font-size: 13px;
  color: var(--ink);
}


@media(max-width:700px) {
  .site-header {
    padding-block: 20px;
    gap: 12px;
  }
  .site-header .identity {
    gap: 8px;
    font-size: 13px;
  }
  .monogram {
    height: 22px;
  }
  .site-header nav {
    gap: 16px;
    font-size: 12px;
  }
  .site-header nav .nav-long {
    display: none;
  }
  .site-header nav .nav-short {
    display: inline;
  }
  .eyebrow {
    margin-bottom: var(--space-xs);
  }
  /* Phones: logo and name, then "© 2026 Justin Gregoire · jtgregoire.com". */
  .site-footer {
    display: grid;
    grid-template-columns: auto 1fr;
    justify-content: start;
    gap: 8px 0;
    padding-block: 24px;
  }
  .site-footer .identity {
    grid-column: 1 / -1;
    gap: 8px;
    font-size: 12px;
  }
  .site-footer>a:last-child::before {
    content: "·";
    margin: 0 6px;
  }
  .site-footer .monogram {
    height: 22px;
  }
}

@media(max-width:380px) {
  .site-header .identity>span:last-child {
    display: none;
  }
}

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

