/* =========================================================================
   DESIGN TOKENS — placeholder values.
   Replace the colors and font-family names below with your own from Figma.
   Everything else in this file reads from these variables, so a palette
   swap only ever touches this block.
   ========================================================================= */
:root {
  /* Neutral placeholder palette. Checked for >= 4.5:1 text contrast:
     --color-text on --color-bg is ~13.2:1, --color-text on --color-bg-alt
     is ~11.8:1, --color-link on --color-bg is ~10.1:1, --color-text-muted
     on --color-bg is ~7:1. Re-check with a contrast tool after swapping
     in your own palette. */
  --color-bg: #ffffff;
  --color-bg-alt: #ffffff;
  --color-text: #333333;
  --color-text-muted: #666666;
  --color-text-muted-alt: #737373; /* 4.7:1 on white (WCAG 1.4.3 needs 4.5:1) */
  --color-link: #3d3a33;
  --color-border: #c9c4b8;
  --color-focus: #1b56c4;

  /* Headings use the display serif, everything else uses the sans. */
  --font-display: "Raleway", Georgia, "Times New Roman", serif;
  --font-body: "Raleway", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --content-width: none;    /* no max width; set e.g. 1500px to cap header, main and footer */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-10: 24rem;

}

/* =========================================================================
   SELF-HOSTED FONTS
   Google Fonts' own stylesheet (fonts.googleapis.com) makes every visitor's
   browser request font files directly from Google, sending their IP
   address to a third-party server before they've agreed to anything —
   which is what a German court (LG München I, 3 O 17493/20, 2022) found
   to be an unlawful transfer of personal data without consent. Hosting
   the same .woff2 files on our own domain removes that third-party
   request entirely: nothing leaves our server, so there is nothing to get
   consent for. `font-display: swap` shows body text in a fallback font
   immediately and swaps in the web font once it loads, instead of leaving
   text invisible while fonts download.
   ========================================================================= */
@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/raleway-400.woff2") format("woff2");
}
@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/raleway-600.woff2") format("woff2");
}

/* =========================================================================
   RESET / BASE
   ========================================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 var(--space-2);
}

h1 {
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.75rem);
}

h2 {
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
}

p {
  margin: 0 0 var(--space-2);
}

a {
  color: var(--color-link);
}

a:not(.gallery__link) {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

/* Images reserve their aspect ratio from the width/height attributes in
   the HTML, so nothing shifts as they load — this scales that fixed box
   down to fit the column instead of overriding it. */
img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Keeps keyboard-focused links from hiding under the sticky header
   when the page scrolls to them (WCAG 2.4.11). Roughly the header height. */
html {
  scroll-padding-top: 9rem;
}

@media (min-width: 40em) {
  html {
    scroll-padding-top: 7rem;
  }
}

/* Small standalone links get enough height to tap easily (WCAG 2.5.8). */
.project__back a,
.not-found a,
.site-footer__meta a {
  display: inline-block;
  padding-block: 0.25rem;
}

/* Visible on every interactive element, keyboard or mouse: an outline we
   draw ourselves rather than the (often near-invisible) browser default,
   never `outline: none` with nothing to replace it. */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================================
   SKIP LINK
   ========================================================================= */
.skip-link {
  position: absolute;
  top: -3rem;
  left: var(--space-2);
  z-index: 100;
  padding: var(--space-1) var(--space-2);
  background: var(--color-text);
  color: var(--color-bg);
  border-radius: 0 0 4px 4px;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
}

/* =========================================================================
   LAYOUT SHELL
   ========================================================================= */


.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-bg);
  width:auto;
  transition: transform 0.25s ease;
}


.site-header--hidden {
  transform: translateY(-100%);
}

.site-header,
main,
.site-footer {
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--space-2);
}

@media (min-width: 40em) {
  .site-header,
  main,
  .site-footer {
    padding-inline: var(--space-4);
  }
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-block: var(--space-3);
  max-width: var(--content-width);
  margin-inline: auto;
}


.site-nav__brand {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 2.15rem;
  text-decoration: none;
}

.site-nav__links {
  display: flex;
  gap: var(--space-3);
}

.site-nav__links a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  text-decoration: none;
  font-weight: 400;
}

.site-nav__links a[aria-current="page"] {
  text-decoration: none;
  text-underline-offset: 0.2em;
  color: var(--color-text-muted-alt);
}

main {
  padding-block: var(--space-3) var(--space-5);
  min-height: 50vh;
}

.site-footer {
  
  color: var(--color-text-muted);
  font-size: 0.9rem;
  padding-bottom: var(--space-3);

}

.site-footer__privacy {
  
  text-align: center;
}

.site-footer__meta {

  text-align: center;
}

/* Brand name with the tagline stacked underneath. */
.site-nav__brand-group {
  display: flex;
  flex-direction: column;
}

.site-nav__tagline {
  margin: 0;
  color: var(--color-text-muted-alt);
}


/* =========================================================================
   GALLERY (home page)
   ========================================================================= */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: var(--space-5);
  column-gap: var(--space-4);
}

@media (min-width: 36em) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64em) {
  .gallery {
    grid-template-columns: repeat(6, 1fr);   /* 6 invisible columns to divide up */
  }

  .gallery__item {
    grid-column: span 2;       /* default: 3 cards per row */
  }

  /* Wide cards use the ratio from the project's galleryRatio, or 3:2. */
  .gallery__item--wide .gallery__image-frame {
    aspect-ratio: var(--card-ratio, 3 / 2);
    
  }


  .gallery__item--wide {
    grid-column: span 3;       /* 2 cards per row */
  }

  .gallery__item--full {
    grid-column: span 6;       /* 1 card, full width — for a hero/feature piece */
  }
}

.gallery__image-frame {
  display: block;
  overflow: hidden;          /* clips the zoomed image at the card edge */
  border-radius: 2px;
  background: var(--color-bg-alt);
}

.gallery__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery__link:hover .gallery__image,
.gallery__link:focus-visible .gallery__image {
  transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
  .gallery__image,
  .site-header,
  .skip-link {
    transition: none;
  }
}
.gallery__link {
  display: block;
  /* Comfortably over the 24x24px minimum touch-target size, with the gap
     above giving spacing from every neighbouring card. */
  padding: var(--space-1);
  margin: calc(var(--space-1) * -1);
  text-decoration: none;
  color: inherit;
}

.gallery__image {
  background: var(--color-bg-alt);
}

.gallery__caption {
  display: block;
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
  text-align: center;
}

.gallery__title {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
}

.gallery__meta {
  display: block;
  margin-top: 0.25rem; 
  color: var(--color-text-muted-alt);
  font-size: 0.9rem;
}

/* =========================================================================
   PROJECT PAGE
   ========================================================================= */

/* No extra gap after the last thing on a project page */
.project > :last-child,
.project__prose > :last-child {
  margin-bottom: 0;
}

.project__back {
  margin-bottom: var(--space-3);
}

/* Previous / next project links at the end of a project page. */
.project__pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.project__pager a {
  display: inline-block;
  padding-block: 0.25rem;
}

.project__pager-next {
  margin-left: auto;
  text-align: right;
}

.project__header {
  margin-bottom: var(--space-4);
}

.project__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin: var(--space-2) 0;
  padding: 0;
}

.project__facts div {
  margin: 0;
}

.project__facts dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.project__facts dd {
  margin: 0;
  font-weight: 600;
}

.project__brief {
  max-width: 40rem;
  font-size: 1.15rem;
  color: var(--color-text-muted);
}

.project__prose > :not(figure) {
  max-width: 40rem;
}

.project__prose {
  margin-bottom: var(--space-10);
}
.project__image {
  margin: var(--space-5) 0 var(--space-5);
}

.project__image img {
  width: auto;
  max-width: 100%;
  max-height: 90vh;
  max-height: 90svh;
  border-radius: 2px;
  background: var(--color-bg-alt);
  
}

.project__image figcaption {
  margin-top: var(--space-1);
  color: var(--color-text-muted);
  font-size: 0.9rem;
}



/* =========================================================================
   ABOUT PAGE
   ========================================================================= */

.about {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  max-width: 1500px;
  margin-inline: auto;
}

@media (min-width: 36em) {
  .about {
    grid-template-columns: auto 1fr;
  }
}

.about__headshot {
  width: auto;
  max-width: 100%;
  max-height: 80vh;
  max-height: 80svh;
  margin-bottom: var(--space-3);
}

.about__section {
  max-width: 100%;
  margin-bottom: var(--space-4);
  margin-top: var(--space-5);
}


.about__skills {
  display: flex;
  flex-wrap: wrap;
  
}

.about__skills li {
  padding: var(--space-1) var(--space-2);
  background: var(--color-bg-alt);
  border-radius: 999px;
  font-size: 0.9rem;
}

.about__mailto {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.about__social {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.about__social a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}



/* =========================================================================
   404 PAGE
   ========================================================================= */
.not-found {
  display: grid;
  gap: var(--space-4);
  align-items: center;
  padding-block: var(--space-4);
}

.not-found__image {
  width: auto;
  max-width: 100%;
  max-height: 60vh;
  max-height: 60svh;
}

@media (min-width: 40em) {
  .not-found {
    grid-template-columns: auto 1fr;
  }
}

/* =========================================================================
   PRIVACY PAGE
   ========================================================================= */
.legal ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: var(--space-2);
}

.legal h2 {
  margin-top: var(--space-4);
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.legal th,
.legal td {
  padding: var(--space-1);
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

/* =========================================================================
   COOKIE CONSENT
   Only rendered when site.gaId is set. Accept and Reject are styled the
   same on purpose: GDPR guidance says refusing must be as easy as accepting.
   ========================================================================= */
.site-footer__cookies {
  padding: 0.25rem 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--color-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  cursor: pointer;
}

.cookie-banner {
  position: fixed;
  z-index: 50;
  inset-inline: var(--space-2);
  bottom: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-bg);
  color: var(--color-text);
  border-radius: 4px;
  box-shadow: 0 4px 24px rgb(0 0 0 / 0.12);
}

@media (min-width: 48em) {
  .cookie-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
  }
}
.cookie-banner__content {

}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner__title {
  margin: 0 0 var(--space-1);
  font-size: 1.1rem;
}

.cookie-banner__text {
  margin: 0;
  font-size: 0.95rem;
}

.cookie-banner__actions {
  display: flex;
  gap: var(--space-2);
}

.cookie-banner__button {
  flex: 1;
  min-height: 44px;
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--color-text);
  border-radius: 2px;
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.cookie-banner__button:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

/* =========================================================================
   Hamburger menu (phones)
   ========================================================================= */

.site-nav__toggle {
  display: none;
}

@media (max-width: 39.99em) {
  .site-nav__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
    position: relative;
    z-index: 2;
  }

  .site-nav__brand-group {
    position: relative;
    z-index: 2;
  }

  .site-nav__icon-close,
  .site-nav__toggle[aria-expanded="true"] .site-nav__icon-open {
    display: none;
  }

  .site-nav__toggle[aria-expanded="true"] .site-nav__icon-close {
    display: block;
  }

  .site-nav__links {
    display: none;
  }

  .site-nav__toggle[aria-expanded="true"] + .site-nav__links {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: var(--space-4);
    position: fixed;
    inset: 0;
    z-index: 1;
    padding: var(--space-4) var(--space-2);
    background: var(--color-bg);
    font-size: 1.75rem;
    
  }

  body.menu-open {
    overflow: hidden;
  }
}

/* About page, phones: less space between photo and text */
@media (max-width: 35.99em) {
  .about__headshot {
    margin-bottom: 0;
  }

  .about__section:first-child {
    margin-top: 0;
  }
}

/* About: the page's h1 keeps the size of the other section headings. */
.about__title {
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
}
