/* ==================================================================
   Garrett Danielson — Portfolio
   Single stylesheet for the whole (plain HTML) site.
   Sections: 1) Fonts  2) Tokens  3) Reset/base  4) A11y helpers
             5) Split layout (home + testimonials)  6) Project cards
             7) Testimonials  8) Top nav + footer  9) Project pages
            10) Process / Results / Gallery / Feedback / Other projects
            11) Side project page  12) Scroll-reveal animation
   ================================================================== */

/* 1) Fonts — self-hosted Figtree variable (no third-party requests) ---- */
@font-face {
  font-family: 'Figtree Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url('../fonts/figtree-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Figtree Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 300 900;
  src: url('../fonts/figtree-latin-wght-italic.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

/* 2) Tokens ---------------------------------------------------------- */
:root {
  --c-accent: #e97263;
  --c-dark: #28231e;
  --c-dark-2: #322c26;
  --c-project-bg: #363330; /* project-page body background */
  --c-light: #f1f0ee;
  --c-white: #ffffff;
  --c-text: #2b2825;
  --c-text-muted: #6e6862;
  --c-text-on-dark: #f5f2ef;
  --c-text-muted-on-dark: #bdb6af;
  --c-star: #f2b01e;

  --font-sans: 'Figtree Variable', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --sidebar-w: min(40vw, 620px);
  --sidebar-pad-x: clamp(1.5rem, 4vw, 3.5rem);
  --sidebar-pad-y: clamp(1.5rem, 3vw, 2.5rem);
  --container-w: 90rem;
  --container-pad: clamp(1.25rem, 5vw, 4rem);
}

/* 3) Reset + base ---------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  text-wrap: pretty;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  line-height: 1.12;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
}

ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
}

.container {
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* 4) Accessibility helpers ------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  top: -100vh;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--c-dark);
  color: var(--c-text-on-dark);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 6px 6px;
}

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

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

/* Logo: cutouts default to white; contexts on dark set --logo-counter */
.logo .counter {
  fill: var(--logo-counter, #fff);
}

/* Only rotate on real hover devices — on touch, a hover effect makes the
   first tap trigger the animation instead of following the link (double-tap). */
@media (hover: hover) {
  img.logo:hover {
    transform: rotate(-20deg);
    transition: transform .3s ease-in-out;
  }
}

img.logo {
    transition: transform .3s ease-in-out;
}

/* 5) Split layout (home + testimonials) ------------------------------ */
.split .sidebar {
  --logo-counter: var(--c-dark);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  padding: var(--sidebar-pad-y) var(--sidebar-pad-x);
  /* Dark brown is the fallback; the noise texture layers on top of it. */
  background-color: var(--c-dark);
  background-image: url('../images/noise-bg-2.svg');
  background-size: cover;
  background-position: center;
  color: var(--c-text-on-dark);
  overflow-y: auto;
}

.sidebar-top {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.25rem);
}

.brand {
  display: inline-flex;
  border-radius: 50%;
}

/* Reserve the brand-logo's footprint before main.js injects the mark, so the
   nav doesn't reflow ("snap") when the logo appears on each page load.
   Sizes mirror each brand link's data-logo value (36 top nav, 40 sidebar, 44 footer). */
.brand[data-logo='36'] { min-width: 36px; min-height: 36px; }
.brand[data-logo='40'] { min-width: 40px; min-height: 40px; }
.brand[data-logo='44'] { min-width: 44px; min-height: 44px; }

/* Project/side pages: logo + name lockup in the top nav */
.topnav .brand {
  align-items: center;
  gap: 0.6rem;
  border-radius: 8px;
  text-decoration: none;
}

.brand-name {
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

@media (max-width:550px){
  .brand-name{
    display:none;
  }
}

.sidebar nav,
.topnav nav {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.sidebar nav a,
.topnav nav a {
  font-weight: 700;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.sidebar nav a:hover,
.sidebar nav a[aria-current='page'],
.topnav nav a:hover,
.topnav nav a[aria-current='page'] {
  border-bottom-color: var(--c-accent);
}

.sidebar-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 2.5rem;
}

.sidebar-foot {
  margin-top: auto;
}

.split .content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
}

/* Home sidebar intro */
.intro h1 {
  font-size: clamp(2.5rem, 4.5vw, 3.25rem);
  margin-bottom: 0em;
}

.intro .role,
.intro .subtitle {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--c-accent);
  margin-bottom: 0.1em;
}

.intro .location {
  font-weight: 600;
  color: var(--c-text-muted-on-dark);
  margin-bottom: 3em;
}

.intro .subtitle {
  margin-bottom: 1.5em;
}

.intro .bio {
  max-width: 34rem;
  margin-bottom: 2em;
}

.intro .blurb {
  max-width: 30rem;
  margin: 0;
}

.social {
  display: flex;
  gap: 0.85rem;
}

.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--c-text-muted-on-dark);
  border-radius: 50%;
  color: var(--c-text-on-dark);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.social a:hover,
.social a:focus-visible {
  border-color: var(--c-accent);
  color: var(--c-accent);
}

/* Click-to-copy email: wrapper + toast shown below the mail icon */
.mail-copy {
  position: relative;
  display: inline-flex;
}

.copy-toast {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--c-dark);
  background: var(--c-white);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 5;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.side-project {
  margin: 0;
  font-size: 0.95rem;
  color: var(--c-text-muted-on-dark);
}

.side-project a {
  color: var(--c-text-on-dark);
  text-underline-offset: 3px;
}

.side-project a:hover {
  color: var(--c-accent);
}

.portrait {
  width: min(70%, 20rem);
  margin-left: calc(-1 * var(--sidebar-pad-x) + 2rem);
  margin-bottom: calc(-1 * var(--sidebar-pad-y));
}

/* 6) Project cards (homepage) ---------------------------------------- */
/* The feed sits on black so each cover fades in from black as you scroll. */
.projects-feed {
  background: #000;
}

.card {
  position: relative;
  display: block;
  height: clamp(380px, 70vh, 760px);
  overflow: hidden;
  text-decoration: none;
  color: #fff;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card .scrim {
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(20, 16, 12, 0.72), transparent);
  pointer-events: none;
}

.card .title {
  position: absolute;
  left: clamp(1.25rem, 4vw, 2.5rem);
  bottom: clamp(1rem, 3vw, 2rem);
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.card .title::after {
  content: '';
  display: block;
  width: 0;
  height: 3px;
  margin-top: 0.3rem;
  background: var(--c-accent);
  transition: width 0.3s ease;
}

.card:focus-visible .title::after {
  width: 100%;
}

@media (hover: hover) {
  .card:hover .title::after {
    width: 100%;
  }
}

.card:focus-visible {
  outline-offset: -4px;
}

/* 7) Testimonials ---------------------------------------------------- */
/* All testimonials share one dark background that lightens on hover.
   (The tone-light / tone-white classes in the HTML are now inert.) */
.testimonial {
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--container-pad);
  background-color: #3a342e;
  color: var(--c-white);
  transition: background-color 0.25s ease;
}

.testimonial:hover {
  background-color: #312b26;
}

.testimonial figure {
  max-width: 52rem;
  margin-inline: auto;
}

.testimonial blockquote {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.7;
}

.testimonial blockquote p:last-child {
  margin-bottom: 0;
}

.testimonial figcaption {
  margin-top: 1.25rem;
  font-weight: 600;
  color: var(--c-text-muted-on-dark);
}

.testimonial cite {
  font-style: normal;
  color: var(--c-white);
}

/* 8) Top nav + footer (project + side-project pages) ----------------- */
.topnav {
  --logo-counter: var(--c-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem var(--container-pad);
  background: var(--c-dark);
  background-image: url(../images/noise-bg.svg);
  color: var(--c-text-on-dark);
  font-size: clamp(0.85rem, 4vw, 1.0625rem);
}

.footer {
  --logo-counter: var(--c-dark);
  background: var(--c-dark);
  color: var(--c-text-on-dark);
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--container-pad);
  background-image: url(../images/noise-bg.svg);
}

.footer .inner {
  max-width: var(--container-w);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.footer nav a {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

@media (hover: hover) {
  .footer nav a:hover {
    border-bottom-color: var(--c-accent);
  }
}

.footer .copyright {
  margin: 0;
  color: var(--c-text-muted-on-dark);
  font-size: 0.9rem;
}

/* 9) Project pages (dark theme) -------------------------------------- */
body.project {
  background: var(--c-project-bg);
  color: var(--c-white);
}

body.project .hero {
  width: 100%;
  max-height: 70vh;
  min-height: 30vh;
  object-fit: cover;
}

body.project main section {
  padding-block: clamp(2rem, 5vw, 3.5rem);
}

/* Rounded bordered container (intro overview + client feedback) */
.panel {
  background: #413d3a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: clamp(1.5rem, 3vw, 2.75rem);
}

/* Intro overview: meta column + The Problem */
.intro-grid {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) 2fr;
  gap: clamp(2rem, 5vw, 4rem);
}

.meta div + div {
  margin-top: 1.5rem;
}

.meta dt {
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--c-white);
  margin-bottom: 0.15rem;
}

.meta dd {
  font-weight: 700;
  font-size: 1.25rem;
}

.problem h2 {
  color: var(--c-accent);
  font-size: clamp(1.6rem, 2.4vw, 2rem);
}

.problem p {
  margin: 0;
  max-width: 46rem;
}

/* 10) Process / Results / Gallery / Feedback / Other projects -------- */
.process h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 1.5rem;
}

.process-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  overflow: hidden;
}

.process-grid .step {
  background: var(--c-project-bg);
  padding: clamp(1.75rem, 3.5vw, 3rem);
  text-align: center;
}

.process-grid .proc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
  margin-bottom: 1rem;
  color: var(--c-white);
  background: rgba(255, 255, 255, 0.07);
  border-radius: 50%;
}

.process-grid .proc-icon-img {
  width: 70px;
  height: 70px;
}

.process-grid h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5em;
}

.process-grid .step p {
  margin: 0;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Results */
.results h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 1.5rem;
}

.results ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 3rem;
  list-style: none;
}

.results li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.results .check {
  flex: 0 0 auto;
  display: flex;
  margin-top: 0.2rem;
  color: var(--c-accent);
}

.check svg {
    height: 32px;
    width: 32px;
    stroke-width: 2;
    stroke-linecap: square;
}

/* Gallery */
.gallery {
  /* Tokens collected here so .flush can zero every gap + corner at once */
  --gallery-gap: clamp(1rem, 2vw, 2.5rem);
  --img-radius: 8px;
  --frame-radius: 12px;
  --frame-img-radius: 4px;
  margin-block: clamp(1.5rem, 4vw, 3rem);
}

.gallery.layout-7.flush img {
    height: 100%;
    object-fit: cover;
}

figure {
  align-content: center;
}

.max-height-60 img{
  max-height: 60vh;
  width: auto !important;
  margin: auto;
}

.gallery h2 {
  margin-bottom: 1.5rem;
}

.gallery .grid {
  display: grid;
  gap: var(--gallery-gap);
}

/* --- Grid arrangements (one per gallery) --------------------------- */
.gallery.layout-full .grid {
  grid-template-columns: 1fr;
}

.gallery.layout-two-up .grid {
  grid-template-columns: repeat(2, 1fr);
}

.gallery.layout-three-up .grid {
  grid-template-columns: repeat(3, 1fr);
}

/* layout-7: two images at a 2/3 + 1/3 split */
.gallery.layout-7 .grid {
  grid-template-columns: 2fr 1fr;
}

/* layout-8: small / large / small — 1/4, 1/2, 1/4 */
.gallery.layout-8 .grid {
  grid-template-columns: 1fr 2fr 1fr;
}

/* layout-6: two equal images sharing one recolorable background panel */
.gallery.layout-6 .grid {
  grid-template-columns: repeat(2, 1fr);
  padding: clamp(1.5rem, 4vw, 3.5rem);
  background: var(--frame-bg, #e8e8e8);
  border-radius: var(--frame-radius);
}

/* layout-masonry: Pinterest-style columns that pack images of any height */
.gallery.layout-masonry .grid {
  display: block;
  column-count: 3;
  column-gap: var(--gallery-gap);
}

.gallery.layout-masonry .grid > figure {
  break-inside: avoid;
  margin: 0 0 var(--gallery-gap);
}

/* layout-mosaic: five images locked into one perfect rectangle. The big
   image (3rd figure) and the wide image (4th) each span two columns.
   Mobile-first: a plain stack until there's room for the full composition. */
@media (min-width: 701px) {
  .gallery.layout-mosaic .grid {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    grid-template-areas:
      'a b c c'
      'd d c c'
      'd d e e';
    /* Overall shape drives row height — lower the ratio for taller images.
       Override per gallery with style="--mosaic-ratio: 1 / 1". */
    aspect-ratio: var(--mosaic-ratio, 11 / 10);
  }

  .gallery.layout-mosaic figure {
    overflow: hidden;
    border-radius: var(--img-radius);
  }

  .gallery.layout-mosaic figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
  }

  .gallery.layout-mosaic figure:nth-child(1) {
    grid-area: a;
  }
  .gallery.layout-mosaic figure:nth-child(2) {
    grid-area: b;
  }
  .gallery.layout-mosaic figure:nth-child(3) {
    grid-area: c;
  }
  .gallery.layout-mosaic figure:nth-child(4) {
    grid-area: d;
  }
  .gallery.layout-mosaic figure:nth-child(5) {
    grid-area: e;
  }
}

.gallery figure img {
  width: 100%;
  border-radius: var(--img-radius);
}

.gallery figcaption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.72);
}

/* --- Per-figure modifiers (compose with any arrangement) ----------
     .wide    figure spans every column (a full-width row)
     .tall    figure fills its cell height, cropping to cover (a feature)
     .framed  image(s) float centered on a recolorable panel (--frame-bg);
              a .framed figure may hold SEVERAL images to share one panel.
   Recolour a panel per figure or per gallery with style="--frame-bg: #fff". */
.gallery .grid > .wide {
  grid-column: 1 / -1;
}

.gallery .grid > .tall img {
  height: 100%;
  object-fit: cover;
}

.gallery.framed .grid > figure,
.gallery .grid > figure.framed {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--gallery-gap);
  padding: clamp(1.5rem, 4vw, 3.5rem);
  background: var(--frame-bg, #e8e8e8);
  border-radius: var(--frame-radius);
}

.gallery.framed .grid > figure img,
.gallery .grid > figure.framed img {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--frame-img-radius);
}

/* .flush — drop all gaps and rounded corners so images + panels touch */
.gallery.flush {
  --gallery-gap: 0;
  --img-radius: 0;
  --frame-radius: 0;
  --frame-img-radius: 0;
}

.bottom-fade {
  position: relative;
  display: inline-block; /* or block */
}

.bottom-fade::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 15vw; /* how tall the fade is */
  background: linear-gradient(to bottom, transparent, #363330);
  pointer-events: none; /* so the image stays clickable */
}

.bottom-fade img {
  display: block; /* removes inline gap below image */
}
.bottom-cut{
padding-bottom: 0px;
}

/* Bento image grid (3-cell: narrow left col with 2 stacked cells, wide right) */
.bento-grid {
  --bento-gap: clamp(0.75rem, 2vw, 2.5rem);
  --bento-pad: clamp(1rem, 2vw, 1.5rem);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--bento-gap);
}

.bento-col {
  display: flex;
  flex-direction: column;
  gap: var(--bento-gap);
  min-height: 0;
}

.bento-cell {
  border-radius: 5px;
  overflow: hidden;
  background: hsl(30 6% 30% / 1);
  box-shadow: 0 4px 10px #0000002b;
}

/* Top-left: image floats with padding — shows full image, uncropped */
.bento-top {
  padding: var(--bento-pad) var(--bento-pad) 0;
}

.bento-top img {
  display: block;
  width: 100%;
  height: auto;
}

/* Bottom-left: fills remaining column height; image covers + crops */
.bento-bottom {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
}

.bento-bottom img {
  position: absolute;
  inset: 0 var(--bento-pad);
  width: calc(100% - var(--bento-pad) * 2);
  height: 100%;
  object-fit: cover;
}

/* Right cell: intrinsic height drives the whole row */
.bento-main img {
  display: block;
  width: 100%;
  height: auto;
}

/* Client feedback */
.feedback h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 1.5rem;
}

.feedback .stars {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
}

.feedback .stars .filled {
  fill: var(--c-accent);
}

.feedback .stars .empty {
  fill: none;
  stroke: var(--c-accent);
  stroke-width: 1.5;
}

.feedback blockquote {
  margin: 0;
}

.feedback blockquote p {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-style: italic;
  line-height: 1.7;
}

.feedback figcaption {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
}

.feedback cite {
  font-style: normal;
}

/* Other projects */
.other-projects {
  --logo-counter: var(--c-dark);
  background: var(--c-dark);
  background-image: url(../images/noise-bg.svg);
  color: var(--c-text-on-dark);
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--container-pad) clamp(1.5rem, 4vw, 3rem);
  text-align: center;
}

.other-projects ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
  max-width: var(--container-w);
  margin: 2rem auto 0;
  list-style: none;
}

.other-projects a {
  display: block;
  text-decoration: none;
  font-weight: 600;
}

.other-projects img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  margin-bottom: 0.75rem;
  border-radius: 8px;
  transition: opacity 0.25s ease;
}

.other-projects a:focus-visible img {
  opacity: 0.85;
}

@media (hover: hover) {
  .other-projects a:hover img {
    opacity: 0.85;
  }
}

.other-projects a span {
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.other-projects a:focus-visible span {
  border-bottom-color: var(--c-accent);
}

@media (hover: hover) {
  .other-projects a:hover span {
    border-bottom-color: var(--c-accent);
  }
}

/* 11) Side-project page (Reclaim The Realm) -------------------------- */
.side-hero {
  position: relative;
  text-align: center;
  padding: clamp(3rem, 9vw, 7rem) var(--container-pad);
}

.side-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin-bottom: 0.2em;
}

.side-hero .tagline {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--c-accent);
  font-weight: 700;
}

.about p {
  max-width: 46rem;
}

.about p:last-child {
  margin-bottom: 0;
}

/* Contact page (uses the split layout; content sits in the right column) */
.contact {
  padding: clamp(3rem, 10vw, 6rem) var(--container-pad);
}

.contact h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  color: var(--c-text-muted);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.contact-methods {
  list-style: none;
  display: grid;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.contact .email-link {
  font-size: clamp(1.6rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--c-text);
  text-underline-offset: 4px;
}

.contact .email-link:hover,
.contact .email-link:focus-visible {
  color: var(--c-accent);
  text-decoration: underline;
}

.contact .contact-secondary {
  font-size: 1.2rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.contact .contact-secondary:hover,
.contact .contact-secondary:focus-visible {
  color: var(--c-accent);
  border-bottom-color: var(--c-accent);
}

.contact .contact-note {
  margin: 0;
  color: var(--c-text-muted);
}

@media (min-width: 900px) {
  .split .content .contact {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* 12) 404 ------------------------------------------------------------ */
.notfound {
  padding-block: clamp(4rem, 12vw, 8rem);
  text-align: center;
}

.notfound a {
  color: var(--c-accent);
  font-weight: 600;
}

/* 13) Scroll-reveal animation ---------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  .card:focus-visible img {
    transform: scale(1.03);
  }

  @media (hover: hover) {
    .card:hover img {
      transform: scale(1.03);
    }
  }

  .social a:hover {
    transform: translateY(-2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* 14) Responsive ----------------------------------------------------- */
@media (max-width: 899px) {
  .split .sidebar {
    position: static;
    width: auto;
    overflow: visible;
  }

  /* Masonry drops to two columns on tablet */
  .gallery.layout-masonry .grid {
    column-count: 2;
  }

  .sidebar-body {
    justify-content: flex-start;
    padding-block: 3rem;
  }

  .split .content {
    margin-left: 0;
    min-height: 0;
  }

  .portrait {
    width: min(60%, 16rem);
    margin-left: auto;
    margin-right: auto;
  }

  .intro-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .process-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .results ul,
  .gallery.layout-two-up .grid,
  .gallery.layout-three-up .grid,
  .gallery.layout-6 .grid,
  .gallery.layout-7 .grid,
  .gallery.layout-8 .grid,
  .other-projects ul {
    grid-template-columns: 1fr;
  }

  @media (max-width: 700px) {
    .card{
      height: clamp(380px, 60vh, 760px);
    }
  }

  /* A feature image stops cropping to fill once the grid is one column */
  .gallery .grid > .tall img {
    height: auto;
    object-fit: unset;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-bottom {
    flex: none;
    position: static;
  }

  .bento-bottom img {
    position: static;
    inset: unset;
    width: 100%;
    height: auto;
    object-fit: unset;
  }
}
