:root{
  --cream: #FFFBF5;         /* light-yellow-gray */
  --ink: #201E1B;           /* off-black */
  --ink-soft: rgba(32,30,27,0.6);
  --ink-faint: rgba(32,30,27,0.35);

  /* Shared side padding for every .wrap section. It's 0 on purpose: the
     visible 6vw inset comes from the inner paddings (header .wrap,
     .hero-copy, .project-text, .about). The old value,
     clamp(24px, 0, 140px), was invalid CSS (unitless 0 mixed with px), so
     browsers already ignored it and used 0. This keeps the same look.
     For a real fluid gutter, try clamp(24px, 6vw, 140px), but then
     remove the inner 6vw paddings or the inset doubles. */
  --pad: 0px;
}

*{ box-sizing:border-box; }

/* Make the `hidden` attribute win over display:flex rules (used by the
   language switch when a language isn't available yet). */
[hidden]{ display:none !important; }

html,body{
  margin:0;
  background:var(--cream);
  color:var(--ink);
  font-family:'DM Sans', sans-serif;
  -webkit-font-smoothing:antialiased;
  scroll-behavior:smooth;
}

a{ color:inherit; }

a:focus-visible, button:focus-visible{
  outline:2px solid var(--ink);
  outline-offset:3px;
}

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



/* No max-width here on purpose — every section shares the same fluid
   side padding instead of being capped at a fixed container width. */
.wrap{
  padding-left:var(--pad);
  padding-right:var(--pad);
}

/* ---------- HEADER ---------- */
header{
  border-bottom:1px solid var(--ink);
}
header .wrap{
  padding:6vw;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding-top:24px;
  padding-bottom:24px;
}
.logo{
  font-family:'BioRhyme Expanded', serif;
  font-weight:800;
  font-size:16px;
  text-transform:lowercase;
  text-decoration:none;
}
.header-right{
  display:flex;
  align-items:center;
  gap:24px;
  position:relative;
}
.lang-switch{
  display:flex;
  gap:12px;
  font-family:'BioRhyme Expanded', serif;
  font-weight:800;
  font-size:12px;
}
.lang-switch button{
  background:none;
  border:none;
  font-family:inherit;
  font-weight:inherit;
  font-size:inherit;
  color:var(--ink-soft);
  cursor:pointer;
  padding:0;
}
.lang-switch button[aria-current="true"]{ color:var(--ink); }

/* Hidden on desktop entirely — mobile-only language toggle, see JS */
.menu-btn{
  display:none;
  background:none;
  border:none;
  cursor:pointer;
  flex-direction:column;
  gap:5px;
  width:32px;
  height:32px;
  align-items:center;
  justify-content:center;
  padding:0;
}
.menu-btn span{
  display:block;
  width:20px;
  height:2px;
  background:var(--ink);
}

/* ---------- HERO ---------- */
.hero{
  display:flex;
  align-items:stretch;
  border-bottom:1px solid var(--ink);
}
.hero-copy{
  flex:1 1 0;
  border-left:1px solid var(--ink);
  padding:6vw;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:24px;
  padding-top:80px;   /* was 48px — the hero no longer gets height from the */
  padding-bottom:80px;/* square sketch beside it, so it needs its own room */
}
.hero-copy:first-child{ border-left:none; }
/* Full-width hero: keep paragraphs at a readable line length (same cap as
   the About section) while the section itself spans the page. */
.hero-copy .body{ max-width:719px; }
.consultancy-info{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.hero-copy .eyebrow,
.hero-copy .subhead{
  font-family:'DM Sans', sans-serif;
  font-weight:400;
  font-size:28px;
  line-height:1.22;
  letter-spacing:-0.56px;
  margin:0;
}
.hero-copy h1{
  font-family:'BioRhyme Expanded', serif;
  font-weight:800;
  font-size:32px;
  line-height:40px;
  margin:0;
}
.hero-copy .body p{
  font-size:16px;
  line-height:1.22;
  letter-spacing:-0.48px;
  margin:0 0 10px;
}
.hero-copy .body p:last-child{ margin-bottom:0; }
.hero-cta{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:var(--ink);
  color:var(--cream);
  border:none;
  font-family:'BioRhyme Expanded', serif;
  font-weight:400;
  font-size:16px;
  letter-spacing:-0.48px;
  padding:8px 24px;
  cursor:pointer;
  width:fit-content;
  text-decoration:none;
}
.hero-cta:hover{ opacity:0.88; }
.hero-cta .arrow{ width:24px; height:24px; }

.hero-visual{
  flex:1 1 0;
  position:relative;
  aspect-ratio:1/1;
  /* background:repeating-conic-gradient(rgba(32,30,27,0.06) 0% 25%, transparent 0% 50%) 50% / 24px 24px; */
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.hero-visual::after{
  /* content:"p5.js sketch container — reserved for future creative-coding piece"; */
  font-family:'DM Mono', monospace;
  font-size:12px;
  color:var(--ink-faint);
  text-align:center;
  max-width:60%;
}
#hero-sketch-mount{ position:absolute; inset:0; }


.filter-tabs{
  display:flex;
  overflow-x:auto;
  scrollbar-width:none;
  border-bottom:1px solid var(--ink);
}
/* To hide the filter bar (e.g. on desktop only), toggle this instead of
   removing the element from index.html — deleting it will break the JS,
   see the render() guard in script.js for why. */
.filter-tabs.is-hidden{ display:none; }
.filter-tabs::-webkit-scrollbar{ display:none; }
.filter-tabs button{
  font-family:'BioRhyme Expanded', serif;
  font-weight:700;
  font-size:16px;
  letter-spacing:-0.48px;
  padding:16px;
  border:none;
  border-right:1px solid var(--ink);
  background:none;
  color:var(--ink);
  white-space:nowrap;
  cursor:pointer;
}
.filter-tabs button[data-active="true"]{
  background:var(--ink);
  color:var(--cream);
}

.project-row{
  display:flex;
  overflow-x:auto;
  scrollbar-width:thin;
  border-top:1px solid var(--ink);
}

/* ---------- PROJECT CARD ---------- */
.project-card{
  flex:0 0 524px; /* was 616px — ~15% narrower so 4 fit per row */
  max-width:524px;
  display:flex;
  flex-direction:column;
  text-decoration:none;
  color:inherit;
  border-right:1px solid var(--ink);
  background:var(--cream);
}
.project-cover{
  position:relative;
  width:100%;
  aspect-ratio:615/310;
  background:
    repeating-conic-gradient(rgba(32,30,27,0.06) 0% 25%, transparent 0% 50%) 50% / 20px 20px;
}
.cover-image{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.stickers{
  position:absolute;
  top:8px;
  left:8px;
  right:8px;
  display:flex;
  justify-content:flex-end;
  gap:4px;
}
.sticker{ 
  width:130px; 
  height:auto; 
  display:block; 
}
.sticker:hover{
  transform:scale(1.04);
  transition:transform 0.3s ease;
}

.project-text{
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  gap:24px;
  min-height:252px;
  max-height:300px;
  padding:40px;
  flex:1;
}
.project-copy{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.project-meta{
  font-family:'DM Sans', sans-serif;
  font-style:italic;
  font-size:14px;
  line-height:1.04;
  margin:0;
}
.project-title{
  font-family:'BioRhyme Expanded', serif;
  font-weight:800;
  font-size:26px;   /* was 32px — fits the narrower cards better */
  line-height:32px;
  margin:0;
}
.project-desc{
  font-family:'DM Sans', sans-serif;
  font-size:20px;
  line-height:1.04;
  margin:0;
}
.view-project{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:var(--ink);
  color:var(--cream);
  font-family:'BioRhyme Expanded', serif;
  font-weight:400;
  font-size:16px;
  letter-spacing:-0.48px;
  padding:8px 24px;
  width:fit-content;
  border:none;
}
.view-project .arrow{ width:24px; height:24px; }

/* Empty-state when a filter has no matching projects */
.empty-state{
  padding:64px 0;
  font-family:'DM Sans', sans-serif;
  font-style:italic;
  color:var(--ink-soft);
  border-top:1px solid var(--ink);
}

/* ---------- ABOUT / FOOTER ---------- */
.about{
  border-top:1px solid var(--ink);
  padding-top:80px;
  padding:6vw;
  padding-bottom:80px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.about .body,
.about h2,
.about .project-meta{
  max-width:719px;
}
.about h2{
  font-family:'BioRhyme Expanded', serif;
  font-weight:800;
  font-size:32px;
  line-height:40px;
  margin:0;
}
.about .body p{
  font-size:16px;
  line-height:1.22;
  letter-spacing:-0.48px;
  margin:0 0 10px;
}
.about .body p:last-child{ margin-bottom:0; }

footer{
  padding-top:24px;
  padding-bottom:24px;
  font-family:'DM Mono', monospace;
  font-size:12px;
  color:var(--ink-faint);
}

/* Real sticker artwork is now loaded as <img> — no in-code font styling needed */

/* Filter bar hidden on desktop for now, shown again on mobile below —
   toggle by removing this rule (or add .is-hidden manually if you want
   it hidden on mobile too). */
@media (min-width: 861px){
  .filter-tabs{ display:none; }
}

/* ---------- MOBILE ---------- */
@media (max-width: 860px){
  .logo{ font-size:12px; line-height:1.3; }

  /* Language switch becomes a toggled dropdown behind the hamburger */
  .menu-btn{ display:flex; }
  .lang-switch{
    display:none;
    position:absolute;
    top:calc(100% + 12px);
    right:0;
    background:var(--cream);
    border:1px solid var(--ink);
    padding:12px 16px;
    flex-direction:column;
    gap:10px;
    z-index:10;
  }
  .header-right.open .lang-switch{ display:flex; }

  .hero{ flex-direction:column; }
  .hero-copy{
    order:1;
    border-left:none; /* was a stray divider left over from the desktop frame */
    padding-top:48px;
    padding-bottom:24px;
    gap:8px;
  }
  .hero-copy .eyebrow,
  .hero-copy .subhead{ font-size:24px; }

  /* Fix: flex:1 1 0 inside a column-direction parent collapses to 0 height
     with no definite container height to grow into — this is why the
     sketch placeholder was disappearing on mobile. */
  .hero-visual{
    order:2;
    flex:none;
    width:100%;
  }

  .filter-tabs button{ font-size:14px; padding:16px; }

  .project-row{
    display:block;
    overflow:visible;
  }
  .project-card{
    flex:none;
    max-width:none;
    width:100%;
    border-right:none;
    border-bottom:1px solid var(--ink);
  }
  .project-text{
    min-height:auto;
    max-height:none;
  }
  .project-title{ font-size:24px; line-height:1.25; }
}