/* ==================== GOOGLE FONTS ==================== */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap");

/* ==================== VARIABLES ==================== */
:root {
  /* Layout */
  --header-height: 72px;
  --page-gutter: clamp(16px, 5vw, 80px);
  --section-vspace: clamp(32px, 6vw, 96px);
  /* a bit more top space (like the reference hero) */
  --hero-top: clamp(72px, 14vh, 160px);
  --visual-h: clamp(420px, 48vh, 560px);
  

  /* Colors */
  --hue-color: 250;
  --first-color: hsl(var(--hue-color), 69%, 61%);
  --first-color-second: hsl(var(--hue-color), 69%, 61%);
  --first-color-alt: hsl(var(--hue-color), 57%, 53%);
  --first-color-lighter: hsl(var(--hue-color), 92%, 85%);
  --title-color: hsl(var(--hue-color), 8%, 15%);
  --text-color: hsl(var(--hue-color), 8%, 45%);
  --text-color-light: hsl(var(--hue-color), 8%, 65%);
  --input-color: hsl(var(--hue-color), 70%, 96%);
  --body-color: hsl(var(--hue-color), 60%, 99%);
  --container-color: #fff;
  --scroll-bar-color: hsl(var(--hue-color), 12%, 90%);
  --scroll-thumb-color: hsl(var(--hue-color), 12%, 80%);

  /* Typography */
  --body-font: 'Poppins', sans-serif;
  --big-font-size: 2rem;
  --h1-font-size: 1.5rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1.125rem;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;
  --smaller-font-size: .75rem;

  /* Weights */
  --font-medium: 500;
  --font-semi-bold: 600;

  /* Spacing scale */
  --mb-0-25: .25rem;
  --mb-0-5: .5rem;
  --mb-0-75: .75rem;
  --mb-1: 1rem;
  --mb-1-5: 1.5rem;
  --mb-2: 2rem;
  --mb-2-5: 2.5rem;
  --mb-3: 3rem;

  /* Z-index */
  --z-tooltip: 10;
  --z-fixed: 100;
  --z-modal: 1000;
}

/* Larger type on wide screens */
@media (min-width: 968px) {
  :root {
    --big-font-size: 3rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
    --smaller-font-size: .813rem;
  }
}

/* ==================== BASE ==================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
/* make in-page anchors land below the fixed header */
html { scroll-padding-top: var(--header-height); }

body {
  margin: var(--header-height) 0 0 0;     /* keep content below fixed header */
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background: var(--body-color);
  color: var(--text-color);
}

h1, h2, h3, h4 { color: var(--title-color); font-weight: var(--font-semi-bold); }
.site-menu{ list-style: none; }
/* portfolio tags container */
/* portfolio tags container */
.portfolio__tags{
  list-style: none;
  padding-left: 0;
  margin: 0.6rem 0 0.4rem;
  display: flex;
  flex-wrap: nowrap;         /* stay on one line */
  gap: 0.25rem 0.4rem;       /* tighter gaps so they fit */
  overflow-x: visible;       /* don't grow the card / no scrolling */
}

/* pill-style tag (no hover effect) */
.portfolio__tags .tag{
  --mint-outline: #13c4a3;   /* mint outline color */

  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* smaller padding so three tags fit inside half-width cards */
  padding: 0.32rem 0.8rem;

  border-radius: 999px;
  border: 1.2px solid var(--mint-outline);
  background-color: #ffffff;

  color: #4b5563;            /* requested text color */
  font-size: 0.62rem;        /* smaller font */
  letter-spacing: 0.12em;    /* a bit tighter than before */
  text-transform: uppercase;
  white-space: nowrap;       /* keep each tag itself on one line */
  text-decoration: none;
  line-height: 1;            /* vertical centering */
}
a { text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ==================== LAYOUT HELPERS ==================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}
.section { padding-block: var(--section-vspace); }
.grid { display: grid; gap: 1.5rem; }

.section-title {
  text-align: center;
  margin: 0 0 1.25rem;
}
/* optional supporting text center */
.section-title + p { text-align: center; }

/* ==================== HEADER / NAV ==================== */
.header{
  position: fixed; inset: 0 0 auto 0;
  height: var(--header-height);
  z-index: var(--z-fixed);
  background: var(--body-color);
  box-shadow: 0 1px 10px rgba(0,0,0,.06);
}

.site-nav{
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: var(--page-gutter);
}

/* Left brand: always black, never underlined */
.brand{
  color: var(--title-color) !important;
  font-weight: 700;
  letter-spacing: .2px;
  text-decoration: none;
}

/* Right menu: horizontal row */
.site-menu{
  display: flex; align-items: center;
  gap: clamp(16px, 3.2vw, 48px);
  margin: 0; padding: 0;
}

/* default: grey, hover: black; active: black + underline */
.site-menu .nav-link{
  position: relative;
  font-weight: 600;
  color: rgba(17,17,17,.45);
  transition: color .2s ease;
  text-decoration: none;
}
.site-menu .nav-link:hover{ color: var(--title-color); }
.site-menu .nav-link.active{ color: var(--title-color); }

.site-menu .nav-link::after{
  content: "";
  position: absolute; left: 0; right: 0; bottom: -8px;
  height: 2px; border-radius: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .25s ease;
}
.site-menu .nav-link.active::after{ transform: scaleX(1); }

/* Mobile sizing for nav text */
@media (max-width: 640px){
  .site-menu{ gap: 16px; font-size: .95rem; }
  .brand{ font-size: 1rem; }
}

/* ==================== HOME (HERO) ==================== */
.home.section{ padding-top: calc(var(--hero-top) + var(--section-vspace)); }
.home__data{ max-width: 1100px; }
.section__title{
  text-align:center;
  margin:0 0 1.25rem;
}
.section-title, .section-kicker{ text-align: center; }
.section-title{ margin-top: 0; }

/* ==================== PORTFOLIO ==================== */
/* Grid */
.portfolio .container{
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 3vw, 32px);
}

@media (min-width: 768px){
  .portfolio .container{
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* two equal columns */
    gap: 2rem;
  }
}

/* allow cards to shrink inside the grid cell */
.portfolio__content{
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;                 /* <— important so tags can’t force width */
}
.portfolio__data{ padding-top: .25rem; }
.portfolio__title{ font-size: 1.125rem; line-height: 1.25; }
.portfolio__description{ color: var(--text-color); font-size: var(--small-font-size); }

/* Clickable thumbnail box with fixed ratio + rounded corners */
.portfolio__img-link{
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  background: #f5f6f7;
}

/* Image fills and crops */
.portfolio__img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform .35s ease;
  will-change: transform;
}

.portfolio__img--contain { 
  object-fit: contain !important;   /* prevent crop/zoom */
}

/* give the contain area a subtle backdrop so empty bands look clean */
.thumb { 
  background: #f5f6f7; 
}
/* Desktop/Laptop: subtle hover zoom */
@media (hover: hover){
  .portfolio__img-link:hover .portfolio__img{
    transform: scale(1.06);   /* tweak: 1.02–1.06 */
  }
}

/* Larger screens: wider ratio + softer corners */
@media (min-width: 992px){
  .portfolio__img-link{
    aspect-ratio: 16 / 9;
    border-radius: 24px;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .portfolio__img{ transition: none; }
}

/* Mint/turquoise accent for title hover */
:root{
  --mint-color: hsl(168, 68%, 44%);   /* tweak if you want it lighter/darker */
}

.text-mint{
  color: var(--mint-color);              /* or var(--accent-color) if you have one */
}
/* Mint underlined external link that doesn't change after visit */
.ext-link-mint{
  color: var(--mint-color) !important;
  text-decoration: underline;
  text-decoration-color: var(--mint-color);
  text-underline-offset: 3px;
}
.ext-link-mint:visited,
.ext-link-mint:hover,
.ext-link-mint:active,
.prose .ext-link-mint,
.prose .ext-link-mint:visited{
  color: var(--mint-color) !important;   /* keep mint even after click */
}

/* Title link: default same as headings; hover = mint */
.portfolio__title a,
.portfolio__title-link{
  color: var(--title-color);
  text-decoration: none;
  transition: color .2s ease;
}

.portfolio__title a:hover,
.portfolio__title a:focus-visible,
.portfolio__title-link:hover,
.portfolio__title-link:focus-visible{
  color: var(--mint-color);
  outline: none;
}

/* Optional: give keyboard users a subtle focus ring on the title link */
.portfolio__title-link:focus-visible{
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--mint-color) 35%, transparent);
  border-radius: 4px;
}

.portfolio__tags{
  list-style: none;
  padding-left: 0;
  margin: 0.75rem 0;
  display: flex;
  flex-wrap: wrap;              /* <— was nowrap / overflow-x */
  gap: 0.45rem 0.6rem;
}

.portfolio__tags .tag{
  --mint-outline: #13c4a3;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  border: 1.2px solid var(--mint-outline);
  background-color: #ffffff;
  color: #4b5563;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;          /* tag text stays on a single line */
  line-height: 1;
}

/*==================== FOOTER – LET'S TALK ====================*/

.footer {
  background-color: #f3f4f6;                /* light cool gray tint */
  margin-top: clamp(4rem, 8vw, 6rem);
  padding: clamp(3rem, 6vw, 5rem) 0 3rem;
  color: #111827;
}

.footer__inner {
  /* .container already sets max-width + side padding */
}

/* ---------- top row (headline + back to top) ---------- */

.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2.5rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.footer__headline {
  max-width: 640px;
}

.footer__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #4b5563;
}

/* big ghost "LET'S TALK" text */
.footer__title {
  margin: 0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: clamp(3.8rem, 11vw, 7rem);
  line-height: 0.9;
  color: rgba(15, 23, 42, 0.06);  
  white-space: nowrap;   /* very light gray */
}

/* BACK TO TOP pill + circle on the right */

.footer__back {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  color: #111827;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease;
}

.footer__back-label {
  margin-top: 0.1rem;
}

.footer__back-circle {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background-color: #3f3f46;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer__back-circle i {
  font-size: 1.2rem;
}

/* hover state – mint */
.footer__back:hover {
  color: #064e3b;                     /* dark mint text */
}

.footer__back:hover .footer__back-circle {
  background-color: var(--mint-color);          /* mint fill (same as buttons) */
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

/* ---------- bottom row (buttons + credits) ---------- */

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

/* pill button row */
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}

/* pill buttons – same vibe as reference */
.footer__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2.1rem;
  border-radius: 999px;                       /* rounded rectangle / pill */
  border: 1px solid #d4d4d8;                 /* light gray outline */
  background-color: #ffffff;
  color: #111827;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.footer__btn:hover {
  background-color: var(--mint-color);
  border-color: #10b981;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

/* credits bottom-right */
.footer__meta {
  text-align: right;
  font-size: 0.9rem;
  color: #4b5563;
}

.footer__meta p {
  margin: 0;
}

/* hide old floating scroll-up button, if present */
.scrollup {
  display: none !important;
}

/* ---------- responsive tweaks ---------- */

@media (max-width: 768px) {
  .footer__top {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer__back {
    align-self: flex-end;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer__meta {
    text-align: left;
    margin-top: 1rem;
  }

  .footer__title {
    font-size: clamp(3rem, 16vw, 4.5rem);
    white-space: normal;  
  }
}


/* ========== Project pager (prev / next) ========== */

.project-pager {
  padding: 3rem 0 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: 3rem;
}

.project-pager__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-pager__next{
  margin-left: auto;
}

.project-pager__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  text-decoration: none;
  color: var(--text-color);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-pager__link i {
  font-size: 1.2rem;
}

.project-pager__link:hover {
  color: var(--mint-color);
}

@media (max-width: 640px) {
  .project-pager__inner {
    flex-direction: row;
    justify-content: space-between;
  }

  .project-pager__link {
    font-size: 0.9rem;
  }
}

/* ==================== Project: TELL-Tool ==================== */
/* ===== PROJECT PAGE ===== */
.project-hero.section{
  /* same generous top spacing as home */
  padding-top: 0;             /* keep the top tight */
  padding-block-start: 0;
  margin-top: 0;  
}

.project-hero + .project-intro{
  margin-top: clamp(24px, 3vw, 48px);
}

.project__title{
  /* match home hero scale/feel */
  font-weight: 700;
  line-height: 1.1;
  font-size: clamp(32px, 6vw, 64px);
  color: var(--title-color);
  max-width: 1100px;
}

.project__lede{
  margin-top: clamp(28px, 3.5vw, 44px);
  max-width: 1000px;
  color: var(--text-color);
  font-size: clamp(16px, 1.3vw, 20px);
  line-height: 1.9;
}

.main{ padding-top: var(--header-height); }
/* --- Project hero banner --- */
.project-hero.section{
  padding-block-start: 0;   /* kill the top padding from .section */
  padding-top: 0;
}

.project-intro.section { 
  padding-top: var(--section-vspace); 
}

.project-hero + .project-intro{
   margin-top: clamp(12px, 1.6vw, 20px);
}

.header{ z-index: var(--z-fixed); }     /* already high, but explicit */
.hero-media{ 
  width: 100%;
  max-width: 100%;
  height: calc(100vh - var(--header-height));
  border-radius: 0;                /* remove rounding so it truly fills */
  margin: 0;  
}
.hero-overlay{
  position: absolute; inset: 0;
  display: grid; place-content: center;
  padding: clamp(24px, 3vw, 40px);
}

.hero-media{ 
  margin: 0 auto clamp(24px, 3vw, 48px);
}

.hero-media{
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  aspect-ratio: 16 / 7;               /* tall-ish hero; tweak as you like */
  border-radius: 24px;
  overflow: hidden;
  background: #111;
  margin-bottom: clamp(10px, 1.2vw, 16px);
}
.hero-media img{
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}

/* Overlay text */
.hero-overlay{
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: clamp(16px, 4vw, 48px);
  /* subtle top/bottom gradient to help legibility */
  background: linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,.20) 35%, rgba(0,0,0,.28));
}
.hero-title{
  color: #fff;
  font-weight: 800;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: .2px;
}
.hero-subtitle{
  margin-top: .6rem;
  color: #fff;
  opacity: .95;
  font-size: clamp(16px, 1.6vw, 22px);
}

/* ===== Project detail: 4×2 meta ===== */
/* 4 columns on desktop, 2 rows (labels row visually paired with values) */
.project-meta{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 3vw, 48px);
  margin-top: clamp(24px, 3vw, 40px);
}

.meta-label{
  font-weight: 700;
  font-size: clamp(15px, 1.1vw, 18px);   /* slightly larger than body */
  color: var(--title-color);
  margin-bottom: 8px;
}

.meta-value{
  color: var(--text-color);
  font-size: clamp(14px, 1.05vw, 17px);
  line-height: 1.6;
}

/* Tablet: two columns, items pair vertically (label above value) */
@media (max-width: 900px){
  .project-meta{ grid-template-columns: repeat(2, 1fr); }
}

/* Phone: single column, each item stacks label then value */
@media (max-width: 560px){
  .project-meta{ grid-template-columns: 1fr; }
}

/* ===== Typographic spacing for project pages ===== */
/* Paragraphs: “one line space” between paragraphs */
/* ==================== PROJECT PAGE TYPOGRAPHY & SPACING ==================== */

/* Give each project section its own internal vertical padding */
.project .project-section{
    padding-block: calc(var(--section-vspace) * 0.85);
}

/* Triple the gap *between* consecutive sections */
.project .project-section + .project-section{
  margin-top: clamp(36px, 6vh, 90px);
  padding-top: 0;
  border-top: none;
}

/* Paragraphs: comfy line height + ~1 line of space after */
.project .project-section p{
  line-height: 1.9;
  margin: 0 0 1.15em;
}

/* Headings: larger and double gap before first sentence */
.project .project-section > h2,
.project .project-section > h3{
  line-height: 1.2;
  color: var(--title-color);
  margin: 0 0 clamp(22px, 2.2vw, 34px);   /* “double” gap under heading */
}

/* ---- List fixes (override the global 'ul { list-style: none }') ---- */
.project .project-section ul{
  list-style: disc inside;
  margin: 0 0 1.15em;
  padding-left: 0.5em;                      /* nudge text off the bullet */
}
.project .project-section ol{
  list-style-position: inside;   /* bullet starts inside the text box */
  list-style-type: disc;         /* or decimal for <ol> below */
  padding-left: 0;               /* no extra indent (inside already indents) */
  margin: 0 0 1.15em;            /* same after-space as paragraphs */
}
.project .project-section ol{ list-style-type: decimal; }

.project .project-section li{
  line-height: 1.9;              /* match paragraph line-height */
  margin: 0.35em 0;               /* comfortable gap between list items */
}

/* Project pages: no body offset; header offset handled by <main> */
.project-page { margin-top: 0; }
.project-page .main { padding-top: var(--header-height); }

/* Make sure the hero isn’t adding its own top gap */
.project-page .project-hero.section { padding-top: 0; margin-top: 0; }

/* Optional: if you have any paragraphs not wrapped in .project-section,
   keep them nicely spaced too */
.project p { line-height: 1.85; margin: 0 0 1.1em; }
main.project{ padding-bottom: clamp(80px, 10vh, 160px); }


.project-image{
  display:block; position:relative;
  border-radius:16px; overflow:hidden; background:#f5f6f7;
}
.project-image img{
  width:100%; height:auto; display:block;
  transition: transform .35s ease;
  will-change: transform;
}
.project-image:hover img{ transform: scale(1.03); }
@media (min-width: 992px){ .project-image{ border-radius:24px; } }

/* ---- Tighten hero → lede and match lede → meta ---- */
:root { --block-gap: clamp(8px, 1.2vw, 16px); }

/* Kill the big padding that was pushing the lede down */
.project-intro.section { 
  padding-top: 0;
  padding-bottom: 0;
}

/* Space under the lede equals the same gap */
.project__lede { margin: 0 0 var(--block-gap); }

/* Meta grid starts after the same gap */
.project-meta { margin-top: 0; }

/* If you keep this selector, make sure it doesn't re-add extra space */
.project-hero + .project-intro { margin-top: 0; padding-bottom: 0; }

/* ====== 3-column sketches (80% screen cap, equal heights, no crop) ====== */
.logo-sketches{
  /* cap to 80% of screen and center */
  max-width: 80vw;
  height: min(80vh, 900px);
  margin: clamp(8px, 1.2vw, 16px) auto 0;

  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: clamp(12px, 1.6vw, 24px);
  align-items: stretch;            /* equalize column heights */
}

/* column 1 = stack of two images */
.logo-sketches .col-stack{
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.6vw, 24px);
}

/* each block (single or stacked) fills its grid cell */
.logo-sketches .sketch{
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 16px;
  overflow: hidden;
  background: #fff;                /* so "contain" has a clean backdrop */
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

/* show ORIGINAL image (no cropping) and scale inside the box */
.logo-sketches .sketch img{
  width: 100%;
  height: 100%;
  object-fit: contain;             /* <-- preserve original aspect ratio */
  display: block;
}

/* Responsive fallbacks */
@media (max-width: 1024px){
  .logo-sketches{ max-width: 90vw; height: min(70vh, 750px); }
}
@media (max-width: 900px){
  .logo-sketches{ grid-template-columns: 1fr 1fr; height: min(65vh, 680px); }
}
@media (max-width: 560px){
  .logo-sketches{ grid-template-columns: 1fr; height: auto; }
  .logo-sketches .sketch{ min-height: 240px; }
}


/* width cap + centering for your figure wrapper */
.w-80 {
  max-width: min(1200px, 80vw);
  margin-left: auto;
  margin-right: auto;
}

/* ====== 3-column sketches (80% screen cap, equalized, no crop) ====== */
.logo-sketches{
  /* cap to 80% of screen and center via .w-80 wrapper */
  margin: clamp(8px, 1.2vw, 16px) auto 0;

  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1fr);
  gap: clamp(12px, 1.6vw, 24px);

  /* give rows real height so items never collapse */
  grid-auto-rows: minmax(220px, 1fr);
  align-items: stretch;
}

/* column 1 = stack of two images (grid is sturdier than flex here) */
.logo-sketches .col-stack{
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: clamp(12px, 1.6vw, 24px);
  min-height: 0; /* allow shrinking without overflow */
}

/* each block (single or stacked) fills its grid cell */
.logo-sketches .sketch{
  min-height: 0;  /* critical so children can shrink */
  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

/* show ORIGINAL image (no cropping) and scale inside the box */
.logo-sketches .sketch img{
  width: 100%;
  height: 100%;
  object-fit: contain;  /* preserve original aspect ratio */
  display: block;
}

/* Responsive fallbacks */
@media (max-width: 1024px){
  .logo-sketches{ grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
}
@media (max-width: 560px){
  .logo-sketches{ grid-template-columns: 1fr; }
  .logo-sketches{ grid-auto-rows: minmax(240px, auto); }
  .logo-sketches .col-stack{
    grid-template-rows: auto auto; /* let the stacked images size naturally */
  }
}

/* Shared utility to cap width at 80% of viewport and center */
.figure-80 { 
  max-width: min(1200px, 80vw);
  margin: var(--block-gap) auto 0;
}

/* Small, subtle caption */
.figure-caption {
  margin: 8px 0 var(--block-gap);
  font-size: clamp(12px, .9vw, 14px);
  color: var(--text-color-light);
  text-align: center;
}

/* 2×2 grid that preserves original image dimensions (no cropping) */
.logo-22 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;                     /* equal row heights */
  gap: clamp(12px, 2vw, 24px);
}

/* Equal-height tiles using an aspect box; images are letterboxed (object-fit: contain) */
.logo-22 .cell {
  aspect-ratio: 16 / 9;                    /* adjust if you want taller tiles */
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f6f7;
  border-radius: 16px;
  padding: clamp(8px, 1.2vw, 16px);
  overflow: hidden;                         /* hide any accidental overflow, we don't crop the image itself */
}

.logo-22 img {
  max-width: 100%;
  max-height: 100%;
  width: auto;                              /* preserve original proportions */
  height: auto;                             /* preserve original proportions */
  object-fit: contain;                      /* never crop */
}

/* Mobile: stack into a single column */
@media (max-width: 680px){
  .logo-22 { grid-template-columns: 1fr; }
}

/* ---- 2×2 logo grid (max 80% viewport width, no cropping) ---- */
.logo-2x2{
  max-width: min(1200px, 80vw);
  margin: var(--block-gap) auto;
}

.logo-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 2vw, 24px);
}

/* cells never crop the image; keep a gentle card bg */
.logo-cell{
  margin: 0;
  padding: clamp(10px, 1.2vw, 16px);
  background: #f3f4f6;
  border-radius: 16px;
  /* give the cell some natural height so images never "disappear" */
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-cell img{
  /* show original dimensions without cropping */
  width: 100%;
  height: auto;            /* key: prevents cropping & vanishing on small screens */
  object-fit: contain;
  display: block;          /* keep this; it removes inline-gap, doesn’t hide images */
}

/* row captions centered between rows */
.row-caption{
  margin: 8px 0 var(--block-gap);
  font-size: clamp(12px, .9vw, 14px);
  color: var(--text-color-light);
  text-align: center;
}

/* Small screens: stack each row to one column so nothing gets squeezed away */
@media (max-width: 900px){
  .logo-row{ grid-template-columns: 1fr; }
  .logo-cell{ min-height: 180px; }
}

/* ---------- Visual 3-column (scoped) ---------- */
/* --- kill .prose figure/figcaption behaviors INSIDE this component --- */
.prose .figure-80.visual-3col :is(figure, figcaption, img, p){
  margin: 0 !important;
}
.figure-80.visual-3col figcaption{
  display: block;  /* neutral baseline before we flex it below */
}

/* container */
.figure-80.visual-3col{
  width: min(80vw, 1400px);
  margin: clamp(16px, 2vw, 28px) auto var(--block-gap, 32px);
}

/* 3 equal columns — force grid on the wrapper */
.figure-80.visual-3col .visual-grid{
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0,1fr)) !important;
  gap: clamp(12px, 1.6vw, 24px);
}

/* each column (your figure.vcell) must be flex, not table/block */
.figure-80.visual-3col .vcell{
  display: flex !important;
  flex-direction: column;
}

/* shared image-block height */
.figure-80.visual-3col .media{
  width: 100%;
  height: var(--visual-h);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* images fill without cropping */
.figure-80.visual-3col .media img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* captions centered & tight spacing (overrides .prose figcaption) */
.figure-80.visual-3col .col-caption{
  margin: 8px 0 var(--block-gap) !important;
  min-height: 0;                 /* remove extra vertical padding */
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center !important;
}

:root{ --visual-h: clamp(420px, 48vh, 560px); }


/* responsive collapse */
@media (max-width: 1024px){
  .figure-80.visual-3col .visual-grid{ grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 640px){
  .figure-80.visual-3col .visual-grid{ grid-template-columns: 1fr !important; }
  :root{ --visual-h: clamp(320px, 44vh, 480px); }
}


/* Figure container: same 80% cap as your other sections */
.figure-80.apps-figure{
  width: min(80vw, 1400px);
  margin: clamp(16px, 2vw, 28px) auto var(--block-gap, 32px);
}

/* 3-col grid, airy gaps */
.apps-grid{
  --gap: clamp(12px, 1.6vw, 24px);
  --app-row-h: clamp(300px, 44vh, 520px); /* SAME height per row for every card */
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

/* Rounded cards like logo-sketches (no visible border) */
.app-card{
  height: var(--app-row-h);          /* keeps all cards same height per row */
  background: #f3f4f6;
  border-radius: 24px;               /* rounded rectangle */
  padding: clamp(10px, 1.2vw, 16px); /* breathing room so images never kiss edge */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;                  /* keeps rounded corners clean */
}

/* Image behaves like the content itself; no crop, no zoom-in */
.app-card img{
  width: 100%;
  height: 100%;
  object-fit: contain;               /* full artwork preserved */
  display: block;
}

/* Make extra-wide assets occupy two columns on desktop/tablet */
.app-card.span-2{ grid-column: span 2; }

/* Responsive steps */
@media (max-width: 1024px){
  .apps-grid{ grid-template-columns: repeat(2, 1fr); }
  .app-card.span-2{ grid-column: span 2; } /* still spans entire row */
}
@media (max-width: 640px){
  .apps-grid{
    grid-template-columns: 1fr;
    --app-row-h: clamp(240px, 48vh, 460px); /* keep rows balanced on mobile */
  }
  .app-card.span-2{ grid-column: span 1; }
}

/* Full-bleed tiles for Applications grid */
.apps-grid .app-card{
  border-radius: 24px;
  padding: 0;                 /* remove inner gutter so image can touch edges */
  overflow: hidden;           /* clip to rounded corners */
  background: transparent;    /* no gray card bg since image fills tile */
}

.apps-grid .app-card img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;          /* fill tile; allow zoom/crop as needed */
  object-position: center;
}

.apps-grid .app-card.span-2{
  background: #f3f4f6;   /* soft backdrop for the empty bands */
  padding: 0;            /* keep edges clean */
  overflow: hidden;      /* preserve rounded corners */
}

.apps-grid .app-card.span-2 img{
  object-fit: contain;   /* show whole image */
  background: transparent;
}

/* If you ever want a specific tile NOT to crop, add class 'contain' to that app-card */
.apps-grid .app-card.contain img{ object-fit: contain; background:#f3f4f6; }

/* Deliverables link: same color as body text, mint on hover */
.project-section .prose ul li a.nav-link{
  color: inherit;             /* match other list items */
  font-weight: inherit;
  text-transform: none;
  letter-spacing: normal;
  padding: 0;
  border-bottom: none;
}

.project-section .prose ul li a.nav-link:hover{
  color: #13c4a3;             /* mint hover */
}

/* Project deliverable links: normal text color, mint on hover */
.project-section .prose ul li a.nav-link,
.project-section .prose ul li a.ext-link-mint {
  color: inherit;            /* same as surrounding text */
  font-weight: inherit;
  text-transform: none;
  letter-spacing: normal;
  padding: 0;
  border-bottom: none;
}

/* Hover state: mint */
.project-section .prose ul li a.nav-link:hover,
.project-section .prose ul li a.ext-link-mint:hover {
  color: #13c4a3;            /* mint */
}

/* ==================== Project: UU Arts ==================== */
/* ---- 2-up tiles: no crop, keep original aspect, rounded ---- */

.two-up-figure{
  max-width: min(1200px, 80vw);
  margin: var(--block-gap) auto;
}

/* 2 columns; rows auto-size to the tallest item in that row */
.two-up-grid{
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
  align-items: stretch;      /* grid items fill row height */
}

/* Each tile stretches to the row height; acts as a rounded frame */
.two-up-tile{
  display: flex;             /* center the image inside */
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;              /* stretch to the grid row height */
  border-radius: 16px;
  overflow: hidden;          /* clean rounded corners */
  background: none;          /* no card bg */
  line-height: 0;            /* remove inline image gap */
}

/* Image keeps original aspect; no crop; touches left/right edges */
.two-up-tile > img{
  width: 100%;
  height: auto;              /* preserve aspect ratio */
  object-fit: contain;       /* never crop */
  object-position: center;
  display: block;
}

/* Caption */
.two-up-figure .figure-caption{
  margin: 8px 0 var(--block-gap);
  text-align: center;
  color: var(--text-color-light);
  font-size: clamp(12px, .9vw, 14px);
}

/* Stack on small screens */
@media (max-width: 680px){
  .two-up-grid{ grid-template-columns: 1fr; }
}

/* Kill any inherited prose/figure spacing inside this component */
.prose .two-up-figure :is(figure, figcaption, img){ margin: 0 !important; }


/* Kill any prose defaults inside this figure */
.single-tile-figure,
.single-tile {
  aspect-ratio: auto !important;
  height: auto !important;
}

/* Container: just a rounded frame that clips the image edges */
.single-tile{
  display:block;
  padding:0;
  background:none;
  border-radius:24px;
  overflow:hidden;       /* clip to rounded corners */
  line-height:0;         /* kill inline image gap */
}

/* Strong, scoped reset to beat any global "cover" rules */
.single-tile > img{
  display:block;
  width:100% !important;
  height:auto !important;              /* preserve original aspect */
  object-fit: contain !important;      /* never crop */
  object-position:center !important;
  border-radius:0;                     /* corners come from the wrapper */
}

/* In case .prose adds margins around figure/img/caption */
.prose .single-tile-figure :is(img, figure, figcaption){
  margin:0 !important;
}
.single-tile-figure .figure-caption{
  margin:8px 0 var(--block-gap,16px) !important;
  text-align:center;
}

/* ==================== Project: Turbo ==================== */
/* ===== 2-col: equal height, no crop, rounded; widths may differ ===== */
.two-col-fit-figure{
  max-width: min(1200px, 80vw);
  margin: var(--block-gap) auto;
}

/* shared height for both tiles (tweak as needed) */
:root{ --pair-h: clamp(300px, 46vh, 560px); }

.two-col-fit{
  --gap: clamp(12px, 2vw, 24px);
  display: flex;
  gap: var(--gap);
  align-items: center;     /* vertical centering while they size */
}

/* the tile is a rounded “frame” that clips the image’s corners */
.pair-tile{
  height: var(--pair-h);          /* <-- equal height */
  max-width: calc(50% - var(--gap)/2);   /* prevent overflow; widths may differ */
  border-radius: 16px;
  overflow: hidden;
  background: #fff;               /* optional subtle card bg */
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* image fills vertically, keeps aspect ratio; no cropping */
.pair-tile > img{
  height: 100%;
  width: auto;                    /* width derives from aspect ratio */
  object-fit: contain;            /* never crop */
  display: block;
}

/* stack on small screens */
@media (max-width: 760px){
  .two-col-fit{ flex-direction: column; }
  .pair-tile{ max-width: 100%; }
}

/* ====== 5-up tiles: no crop, keep original aspect, rounded ====== */

.five-up-figure{
  max-width: min(1200px, 90vw);
  margin: var(--block-gap) auto;
}

/* 5 columns; row height driven by tallest image */
.five-up-grid{
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 24px);
  align-items: stretch;   /* all tiles share row height */
  grid-auto-rows: auto;   /* row height = tallest item */
}

/* Each tile is a rounded frame */
.five-up-tile{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  line-height: 0;         /* remove inline img gap */
}

/* Image keeps original aspect; never cropped */
.five-up-tile > img{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;    /* preserve aspect ratio */
  object-position: center;
  display: block;
}

/* Responsive: collapse columns on small screens (optional) */
@media (max-width: 900px){
  .five-up-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 600px){
  .five-up-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 420px){
  .five-up-grid{
    grid-template-columns: 1fr;
  }
}

/* === 3-col same-height, no-crop, rounded === */
:root{ --fit-h: clamp(260px, 38vh, 420px); }   /* tweak tile height */

.figure-80.three-col-fit-figure{
  max-width: min(1300px, 90vw);
  margin: var(--block-gap) auto;
}

.three-col-fit{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 28px);
  align-items: stretch;                      /* equal tile heights in row */
}

.fit-tile{
  height: var(--fit-h);
  border-radius: 16px;
  overflow: hidden;                          /* clean rounded edges */
  background: #fff;                          /* letterbox color */
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;                            /* kill inline-img gap */
}

/* Keep original aspect; never crop */
.fit-tile > img{
  max-height: 100% !important;
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  object-position: center;
  display: block;
}

/* Responsive: 2 columns on tablets, 1 on phones */
@media (max-width: 980px){
  .three-col-fit{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px){
  .three-col-fit{ grid-template-columns: 1fr; }
  :root{ --fit-h: clamp(220px, 36vh, 360px); }
}


.video-wrapper{
  position: relative;
  /* pick whatever aspect ratio you want; this is 16:9 */
  padding-top: 56.25%;
  border-radius: 16px;
  overflow: hidden; /* rounded corners clip the video */
}

/* iframe fills the frame */
.video-wrapper iframe{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ========== 2-up paired tiles – same height, no crop, no empty space ========== */

.paired-figure{
  margin: var(--block-gap) auto;
  text-align: center;            /* keeps caption centered */
}

/* shrink-to-fit row that’s just as wide as its images */
.paired-grid{
  display: inline-flex;
  gap: clamp(12px, 2vw, 24px);
  align-items: flex-start;
}

/* override inline flex="1"/"2" so width comes only from aspect ratio */
.paired-tile{
  margin: 0;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  line-height: 0;
  flex: 0 0 auto !important;     /* important beats inline flex values */
}

/* KEY PART:
   – same height for both images in the row
   – width auto → preserves original aspect ratio
   – tile exactly matches the image → no crop, no empty space
*/
.paired-figure .paired-tile > img{
  display: block;
  height: clamp(260px, 40vw, 420px);  /* shared row height, responsive */
  width: auto;
}

/* Mobile: stack and just use full width */
@media (max-width: 700px){
  .paired-grid{
    display: block;
  }
  .paired-tile + .paired-tile{
    margin-top: clamp(12px, 2vw, 24px);
  }
  .paired-figure .paired-tile > img{
    width: 100%;
    height: auto;
  }
}

/* --- 2v3 stacks: same width as persona figure, auto height, no crop --- */

/* small gap between tiles */
:root{
  --stack-gap: clamp(10px, 1.2vw, 16px);
}

/* same width + horizontal position as other figure-80 figures */
.figure-80.stacks-2v3-figure{
  max-width: min(1200px, 80vw);   /* matches .figure-80 & .two-col-fit-figure */
  width: 100%;
  margin: var(--block-gap) auto;  /* same vertical spacing as persona figure */
}

/* two columns; height is auto (no fixed vh height) */
.stacks-2v3{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;  /* left column slightly wider, like before */
  column-gap: var(--stack-gap);
  align-items: flex-start;
}

/* each column is a vertical stack of images */
.stacks-2v3 .stack{
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap);
}

/* rounded tiles; height driven by image aspect ratio */
.stacks-2v3 .stack-tile{
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  line-height: 0;
}

/* images scale down, keep ratio, never crop */
.stacks-2v3-figure .stack-tile > img{
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* responsive: stack columns on small screens */
@media (max-width: 720px){
  .stacks-2v3{
    grid-template-columns: 1fr;
  }
}
/* ===== About page hero: text + photo side-by-side ===== */
.about-grid{
  display: grid; /* already set by .grid, but safe to repeat */
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
  column-gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

/* photo on the right */
.about__hero-img{
  justify-self: end;
}

/* keep photo small, same visual weight as text column */
.about__hero-img img{
  max-width: 360px;
  width: 100%;
  height: auto;
  border-radius: 24px;
  display: block;
}

/* Mobile: stack text above image again */
@media (max-width: 900px){
  .about-grid{
    grid-template-columns: 1fr;
    row-gap: 2.5rem;
  }
  .about__hero-img{
    justify-self: center;
  }
}
/* smooth scroll for in-page anchors */
html {
  scroll-behavior: smooth;
}

/* ---------- HEADER NAV ---------- */

.site-menu {
  list-style: none;
  display: flex;
  gap: 3rem;                 /* adjust spacing between items if you like */
  align-items: center;
  margin: 0;
  padding: 0;
}

.site-menu .nav-link {
  position: relative;
  color: #6b7280;            /* grey */
  text-decoration: none;
  font-weight: 500;
  padding-bottom: 0.2rem;
  transition: color 0.25s ease;
}

/* single underline that animates in */
.site-menu .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.4rem;
  width: 0;
  height: 2px;
  background-color: #111827; /* black */
  transition: width 0.25s ease;
}

/* active state: black text + full-width underline */
.site-menu .nav-link.active {
  color: #111827;
}

.site-menu .nav-link.active::after {
  width: 100%;
}
/* (keeps your earlier rules for columns/tiles/heights as-is) */

/* ==================== MEDIA-QUERY SLOTS ==================== */
/* For small devices  : @media (max-width: 640px){ ... }   */
/* For medium devices : @media (min-width: 768px){ ... }   */
/* For large devices  : @media (min-width: 992px){ ... }   */
