/* ---------- Title fonts (files in the Font folder) ---------- */
@font-face { font-family: "Nohemi"; src: url("../Font/Nohemi-Light.ttf") format("truetype"); font-weight: 300 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Nohemi"; src: url("../Font/Nohemi-SemiBold.ttf") format("truetype"); font-weight: 500 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Aalto Display"; src: url("../Font/Aalto-Display.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Aalto Alternatives"; src: url("../Font/Aalto-Alternatives.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Lemon Wide"; src: url("../Font/Lemon-Wide.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Lemon"; src: url("../Font/Lemon-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }

/* ---------- Tokens: change fonts & colors here ---------- */
:root {
  --font: "Nohemi", "Bricolage Grotesque", system-ui, sans-serif;   /* text = Nohemi Light, subtitles/labels = Nohemi SemiBold */
  --font-title: "Nohemi", "Bricolage Grotesque", system-ui, sans-serif;   /* all titles: Nohemi, bold */
  --font-title-2: "Nohemi", "Bricolage Grotesque", system-ui, sans-serif;   /* smaller titles (also Nohemi) */

  --bg: #F3F4F9;
  --surface: #FFFFFF;
  --ink: #121432;
  --brand: #121432;        /* buttons, selected chips, charts, footer and call-to-action blocks */
  --nav-bg: rgba(255, 255, 255, 0.88);
  --muted: #5E6285;
  --line: #DFE1EC;

  --radius-chip: 6px;
  --radius-card: 18px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font); font-synthesis: none;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

/* ---------- Top bar: menu left, name in the middle ---------- */
.bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 var(--gutter);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 16px rgba(18, 20, 50, 0.08);
}
.nav {
  display: flex;
  gap: 28px;
}
.nav a {
  position: relative;
  padding: 4px 0;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s;
}
.nav a::after {
  /* the mark under the active item */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transition: transform 0.25s;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current] { color: var(--ink); }
.nav a[aria-current]::after { transform: scaleX(1); }

/* name, middle of the bar (links back to the landing page) */
.brand {
  position: absolute;
  left: 50%;
  top: 50%;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -30%);
  transition: opacity 0.3s, transform 0.3s;
}
.brand.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}
@media (max-width: 720px) {
  /* not enough room in the middle next to the menu: the name moves right */
  .bar { height: 54px; }
  .nav { gap: 18px; }
  .nav a { font-size: 15px; }
  .brand { left: auto; right: var(--gutter); font-size: 16px; transform: translateY(-30%); }
  .brand.is-visible { transform: translateY(-50%); }
}
@media (prefers-reduced-motion: reduce) { .brand, .nav a::after { transition: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
}
#dots {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}
.hero.bee-mode,
.hero.bee-mode #dots { cursor: none; }
.hero h1 {
  /* Real text for screen readers & search engines; the dots draw it visually */
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.hero-foot {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  pointer-events: none;
  z-index: 2;
}
.hero-foot > * { pointer-events: auto; }
.hero-foot { transition: transform .9s var(--ease), opacity .9s var(--ease); }
.hero-foot.is-wait { transform: translateX(45vw); opacity: 0; }
.intro {
  /* greeting sits top left, just under the bar */
  position: absolute;
  top: 88px;
  left: var(--gutter);
  z-index: 2;
  margin: 0;
  max-width: 52ch;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.35;
}
.intro span { display: block; color: var(--muted); }

.legend { max-width: 420px; margin-left: auto; }
.legend p span { display: block; }
.legend p {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--muted);
}
.legend-bar {
  display: flex;
  gap: 3px;
  height: 14px;
}
.legend-bar button {
  border: 0;
  padding: 0;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}
.legend-bar button:hover,
.legend-bar button:focus-visible { transform: scaleY(1.6); }
.legend-bar.is-hovering button:not(.is-on) { opacity: 0.25; }
.legend-name {
  display: block;
  min-height: 1.5em;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  z-index: 2;
  transition: opacity .35s ease, transform .35s var(--ease), box-shadow .25s, background .2s, color .2s;
}
.scroll-cue:hover { background: var(--brand); color: #fff; box-shadow: var(--shadow-lg); }
.scroll-cue svg { animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
/* gone as soon as scrolling starts */
.scroll-cue.is-gone { opacity: 0; transform: translate(-50%, 10px); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .scroll-cue svg { animation: none; } }

/* ---------- Work ---------- */
.work {
  max-width: var(--max);
  margin: 0 auto;
  padding: 96px var(--gutter) 120px;
}
.work-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 32px;
  margin-bottom: 28px;
}
.work-head h2 {
  margin: 0;
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.count {
  margin: 0;
  color: var(--muted);
}

.filters {
  position: relative;
  width: fit-content;      /* only the button + panel count as "inside" */
  margin-bottom: 36px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px 8px 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chip:hover { border-color: var(--brand); }
.chip .sq {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--c);
  flex: none;
}
.chip .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] {
  background: var(--c);
  border-color: var(--c);
  color: #fff;
}
.chip[aria-pressed="true"] .sq { background: #fff; }
.chip[aria-pressed="true"] .n { color: rgba(255,255,255,0.8); }
.chip.clear { padding-left: 14px; }
.chip.clear[hidden] { display: none; }

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 72px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.card[hidden] { display: none; }
.card {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
.card-text { display: flex; flex-direction: column; align-items: flex-start; }
.card-text .meta { margin: 0 0 8px; }
.card .card-text h3 { font-size: clamp(26px, 3vw, 36px); line-height: 1.1; letter-spacing: -0.01em; }
.card-text h3 a { color: inherit; text-decoration: none; }
.card .tags { margin: 16px 0 0; padding: 0; flex-wrap: wrap; }
.blurb { margin: 18px 0 0; font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 44ch; }
.more {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 26px; padding: 12px 22px;
  border: 1px solid var(--brand); border-radius: 999px;
  color: var(--brand); font-weight: 600; font-size: 15px; text-decoration: none;
  transition: background .2s, color .2s;
}
.more span {
  width: 8px; height: 8px; border-top: 2px solid currentColor; border-right: 2px solid currentColor;
  transform: rotate(45deg); transition: transform .2s;
}
.more:hover, .more:focus-visible { background: var(--brand); color: #fff; }
.more:hover span { transform: translateX(3px) rotate(45deg); }
@media (max-width: 800px) {
  .grid { gap: 56px; }
  .card { grid-template-columns: 1fr; gap: 20px; }
}
.cover {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}
.slides {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.slides::-webkit-scrollbar { display: none; }
.slide {
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: start;
  display: block;
}
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide svg { display: block; }

/* arrows + dots */
.car-btn {
  position: absolute;
  top: 50%;
  width: 36px; height: 36px;
  margin-top: -18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 10px rgba(18, 20, 50, 0.25);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}
.car-btn.prev { left: 10px; }
.car-btn.next { right: 10px; }
.car-btn::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 9px; height: 9px;
  border-top: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
}
.car-btn.next::before { transform: translate(-65%, -50%) rotate(45deg); }
.car-btn.prev::before { transform: translate(-35%, -50%) rotate(-135deg); }
.cover:hover .car-btn, .car-btn:focus-visible { opacity: 1; }
@media (hover: none) { .car-btn { opacity: 1; } }
.car-dots {
  position: absolute;
  left: 50%; bottom: 10px;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(18, 20, 50, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.car-dots button {
  position: relative;
  width: 8px; height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.car-dots button::after { content: ""; position: absolute; inset: -6px; }  /* bigger tap area */
.car-dots button[aria-current] { background: #fff; transform: scale(1.25); }
.card.single .car-btn, .card.single .car-dots { display: none; }
.award { z-index: 2; pointer-events: none; }

.card h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
}
.meta {
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--muted);
}
.tags {
  display: flex;
  gap: 4px;
  padding-top: 4px;
  flex: none;
}
.tags i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--c);
}
.award {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 600;
  background: var(--surface);
  border-radius: 8px;
}

/* ---------- Inner pages (About / Contact) ---------- */
.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 96px var(--gutter) 120px;
}
.page h1 {
  margin: 0 0 32px;
  font-size: clamp(44px, 7vw, 88px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.lead {
  font-size: clamp(21px, 2.4vw, 28px);
  line-height: 1.3;
  max-width: 32ch;
  margin: 0 0 40px;
}
.page p { max-width: 62ch; }
.cv { margin-top: 64px; }
.cv h2 { font-size: 22px; margin: 48px 0 12px; }
.cv ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.cv li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.cv time { color: var(--muted); font-variant-numeric: tabular-nums; }

.form { display: grid; gap: 16px; max-width: 560px; margin-top: 32px; }
.form label { display: grid; gap: 6px; font-weight: 500; font-size: 15px; }
.form input, .form textarea {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
}
.form textarea { min-height: 160px; resize: vertical; }
.form button {
  justify-self: start;
  font: inherit;
  font-weight: 600;
  padding: 12px 22px;
  border: 0;
  border-radius: 12px;
  background: var(--brand);
  color: var(--surface);
  cursor: pointer;
}
.form[hidden], .sent[hidden] { display: none; }
.sent {
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.links { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 0; padding: 0; list-style: none; }
.links a { text-decoration: none; }
.links .chip .sq { --c: var(--ink); }

/* ---------- Footer ---------- */
.foot {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px var(--gutter);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
  .hero-foot { flex-direction: column; align-items: flex-start; bottom: 24px; }
  .intro { top: 76px; }
  .legend { width: 100%; max-width: none; margin-left: 0; }
  .scroll-cue { display: none; }
  .cv li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Project pages ---------- */
.project {
  max-width: 1100px;
  margin: 0 auto;
  padding: 110px var(--gutter) 100px;
}
.back {
  display: inline-block;
  margin-bottom: 28px;
  font-size: 15px;
  color: var(--muted);
  text-decoration: none;
}
.back::before { content: "\2190\00a0"; }
.back:hover { color: var(--ink); }
.project h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 92px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.project .meta { margin: 14px 0 18px; font-size: 18px; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 40px; padding: 0; list-style: none; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 8px;
  font-size: 14px;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.tag .sq { width: 12px; height: 12px; border-radius: 4px; background: var(--c); }

.intro-text { max-width: 68ch; margin-bottom: 56px; }
.intro-text p { margin: 0 0 1em; font-size: clamp(18px, 1.6vw, 20px); line-height: 1.6; }

.project h2 {
  margin: 72px 0 16px;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.project h3 {
  margin: 56px 0 4px;
  font-size: clamp(20px, 2.4vw, 26px);
  letter-spacing: -0.01em;
}
.prose { max-width: 64ch; margin: 24px 0; white-space: pre-line; }
.project .links { margin: 24px 0 0; }

.gallery { display: grid; gap: 24px; margin: 40px 0; align-items: start; }
.gallery.cols-2 { grid-template-columns: repeat(2, 1fr); }
.gallery.cols-3 { grid-template-columns: repeat(3, 1fr); }
.gallery.cols-4 { grid-template-columns: repeat(4, 1fr); }
.gallery figure { margin: 0; }
.gallery img, .gallery video {
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
  background: var(--surface);
}
.gallery figure[hidden] { display: none; }
.gallery figcaption {
  margin-top: 10px;
  max-width: 56ch;
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
}
@media (max-width: 720px) {
  .project { padding-top: 96px; }
  .gallery.cols-2, .gallery.cols-3, .gallery.cols-4 { grid-template-columns: 1fr; }
}

/* ---------- Filter dropdown ---------- */
.dd-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.dd-btn:hover, .dd-btn[aria-expanded="true"] { border-color: var(--brand); }
.dd-label { color: var(--muted); }
.dd-value { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.dd-value i { width: 12px; height: 12px; border-radius: 4px; background: var(--c); }
.dd-value i:last-of-type { margin-right: 6px; }
.dd-caret {
  width: 7px; height: 7px;
  margin: -3px 2px 0 2px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.dd-btn[aria-expanded="true"] .dd-caret { transform: rotate(-135deg); margin-top: 3px; }

.dd-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  width: 320px;
  max-width: calc(100vw - 2 * var(--gutter));
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(18, 20, 50, 0.16);
}
.dd-panel[hidden] { display: none; }
.dd-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }  /* no gap to fall through */
.dd-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.dd-item:hover { background: var(--bg); }
.dd-item:focus-within { outline: 2px solid var(--ink); outline-offset: -2px; }
.dd-item input { position: absolute; opacity: 0; pointer-events: none; }
.dd-item .sq {
  position: relative;
  width: 18px; height: 18px;
  border-radius: 5px;
  background: var(--c);
  flex: none;
}
.dd-item input:checked + .sq::after {
  content: "";
  position: absolute;
  left: 6px; top: 2px;
  width: 4px; height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}
.dd-item .name { flex: 1; font-weight: 500; }
.dd-item .n { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Names on the small squares of a card ---------- */
/* the name is one floating label (js/work.js), centred above the square you hover / tap, and the square is marked */
.tags i { position: relative; cursor: default; transition: transform .15s var(--ease, ease), box-shadow .15s; }
.tags i.is-on { transform: translateY(-2px) scale(1.18); box-shadow: 0 0 0 2px var(--surface, #fff), 0 0 0 4px var(--c); }
.tag-tip {
  position: fixed; left: 0; top: 0; z-index: 60; padding: 5px 10px;
  font-size: 13px; font-weight: 600; line-height: 1.3; white-space: nowrap;
  color: #fff; background: var(--brand); border-radius: 8px;
  opacity: 0; transform: translateY(3px); pointer-events: none; transition: opacity .12s, transform .12s;
}
.tag-tip.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .tags i, .tag-tip { transition: none; } }

/* ---------- Tabs (Thesis / Project documentation) ---------- */
.tablist { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 8px; }
.tablist button {
  padding: 10px 18px;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.tablist button:hover { border-color: var(--brand); }
.tablist button[aria-selected="true"] { color: #fff; background: var(--brand); border-color: var(--brand); }
[role="tabpanel"][hidden] { display: none; }

/* =====================================================================
   DESIGN LAYER: shadows, motion, small UX details
===================================================================== */
:root {
  --shadow-sm: 0 1px 2px rgba(18, 20, 50,.06), 0 2px 8px rgba(18, 20, 50,.05);
  --shadow-md: 0 2px 4px rgba(18, 20, 50,.05), 0 12px 28px rgba(18, 20, 50,.10);
  --shadow-lg: 0 4px 8px rgba(18, 20, 50,.06), 0 28px 60px rgba(18, 20, 50,.18);
  --ease: cubic-bezier(.2,.8,.2,1);
}
::selection { background: var(--brand); color: #fff; }

/* reading / scroll progress on the project page */
.progress {
  position: fixed; top: 0; left: 0; z-index: 60; height: 3px; width: 100%;
  background: linear-gradient(90deg, #FF5C4D, #FFB627, #6CBF3F, #00B8A9, #3D5AFE, #9B5DE5, #FF70A6);
  transform-origin: 0 50%; transform: scaleX(0); pointer-events: none;
}

/* work cards: soft shadow, lift and slow zoom on hover */
.cover {
  border: 0;
  box-shadow: var(--shadow-md);
  transition: box-shadow .4s var(--ease), transform .4s var(--ease);
}
.card:hover .cover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.slide img { transition: transform 1.2s var(--ease); }
.card:hover .slide img { transform: scale(1.035); }
.car-btn { box-shadow: 0 4px 14px rgba(18, 20, 50,.25); transition: opacity .2s, transform .2s var(--ease); }
.car-btn:hover { transform: scale(1.08); }
.award { box-shadow: var(--shadow-sm); }
.card .tags i { box-shadow: 0 1px 3px rgba(18, 20, 50,.2); }

/* buttons */
.more { box-shadow: var(--shadow-sm); background: var(--surface); }
.more:hover, .more:focus-visible { box-shadow: var(--shadow-md); }
.dd-btn { box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .2s; }
.dd-btn:hover, .dd-btn[aria-expanded="true"] { box-shadow: var(--shadow-md); }
.dd-panel { box-shadow: var(--shadow-lg); animation: pop .18s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.dd-item { transition: background .15s; }
.dd-item:hover { background: var(--bg); }

/* project page */
.gallery img, .gallery video { box-shadow: var(--shadow-md); cursor: zoom-in; transition: box-shadow .35s var(--ease), transform .35s var(--ease); }
.gallery video { cursor: auto; }
.gallery img:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.tag { box-shadow: var(--shadow-sm); }
.back { display: inline-block; transition: transform .2s var(--ease), color .15s; }
.back:hover { transform: translateX(-4px); }
.tablist { padding: 5px; width: fit-content; background: var(--surface); border-radius: 999px; box-shadow: var(--shadow-sm); gap: 4px; }
.tablist button { border-color: transparent; transition: background .2s, color .2s, box-shadow .2s; }
.tablist button[aria-selected="true"] { box-shadow: 0 4px 12px rgba(18, 20, 50,.3); }
.links .chip { box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s var(--ease); }
.links .chip:hover { box-shadow: var(--shadow-md); }

/* reveal on scroll (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* lightbox */
.lb {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 4vh 4vw;
  background: rgba(20,22,48,.86); backdrop-filter: blur(6px);
  animation: fade .25s ease;
}
@keyframes fade { from { opacity: 0; } }
.lb[hidden] { display: none; }
.lb figure { margin: 0; max-width: 100%; max-height: 100%; display: grid; gap: 12px; justify-items: center; }
.lb img { max-width: 92vw; max-height: 80vh; width: auto; border-radius: 12px; box-shadow: var(--shadow-lg); cursor: default; }
.lb figcaption { color: #fff; font-size: 15px; max-width: 70ch; text-align: center; opacity: .9; }
.lb button {
  position: absolute; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff; font-size: 24px; cursor: pointer; transition: background .2s;
}
.lb button:hover { background: rgba(255,255,255,.28); }
.lb .x { top: 18px; right: 18px; }
.lb .p { left: 18px; top: 50%; margin-top: -24px; }
.lb .n { right: 18px; top: 50%; margin-top: -24px; }
@media (max-width: 720px) { .lb .p, .lb .n { top: auto; bottom: 18px; margin: 0; } }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .cover, .gallery img, .slide img { transition: none; }
}

/* work-page slideshows: arrows and dots only on desktop, so scrolling the page
   with the mouse over a picture never moves the picture (swiping stays on touch screens) */
.slides { overflow-y: hidden; }
@media (hover: hover) and (pointer: fine) {
  .slides { overflow-x: hidden; }
}

/* each slide clips its own picture, so the hover zoom can't spill over the neighbouring slide */
.slide { overflow: hidden; }
.slide img { transform-origin: center; }

/* ---------- Floating round buttons ---------- */
.fabs {
  position: fixed; right: var(--gutter); bottom: 24px; z-index: 60;
  display: flex; gap: 12px; align-items: center;
  pointer-events: none; /* the empty wrapper must not block what is underneath (legend) */
}
.fab {
  pointer-events: auto;
  width: 52px; height: 52px; display: grid; place-items: center; padding: 0;
  color: var(--ink); background: var(--surface);
  border: 0; border-radius: 50%; cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), opacity .3s, background .2s, color .2s;
}
.fab:hover { box-shadow: var(--shadow-lg); background: var(--brand); color: #fff; }
.fab:active { transform: translateY(0) scale(.96); }
.fab-top { opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none; }
.fabs.has-top .fab-top { opacity: 1; transform: none; pointer-events: auto; }
@media (max-width: 720px) { .fab { width: 46px; height: 46px; } .fabs { bottom: 16px; } }
@media (prefers-reduced-motion: reduce) { .fab { transition: none; } }

/* credits at the end of a project page: quiet and small */
.prose.small { max-width: 64ch; margin: 0 0 14px; font-size: 13px; line-height: 1.5; color: #868AA5; }
.tabs + .prose.small { margin-top: 64px; }

/* work rows slide in from the sides: keep the page from getting a sideways scrollbar */
.work { overflow-x: clip; }

/* no arrow buttons: click the left / right half of a picture, or a dot */
.car-btn { display: none !important; }
.card:not(.single) .cover[data-side="left"] { cursor: w-resize; }
.card:not(.single) .cover[data-side="right"] { cursor: e-resize; }
.card:not(.single) .cover .car-dots, .card:not(.single) .cover .car-dots button { cursor: pointer; }

/* =====================================================================
   TITLE FONTS: Nohemi (bold) for all titles.
===================================================================== */
.work-head h2, .page h1, .project h1, .about h1, .project h2, .about h2 {
  font-family: var(--font-title); font-weight: 700; font-synthesis: none;
}
.card .card-text h3, .project h3{
  font-family: var(--font-title-2); font-weight: 700; font-synthesis: none;
}
.work-head h2 { font-size: clamp(56px, 10vw, 150px); letter-spacing: 0.005em; line-height: .9; }
.page h1 { font-size: clamp(52px, 10vw, 150px); letter-spacing: 0.005em; line-height: .9; }
.project h1 { font-size: clamp(40px, 9vw, 128px); letter-spacing: 0.005em; line-height: .95; overflow-wrap: anywhere; }
.project h2 { font-size: clamp(32px, 4.4vw, 56px); letter-spacing: 0.005em; line-height: 1; }
.project h3 { font-size: clamp(24px, 2.8vw, 34px); letter-spacing: 0.005em; }
.card .card-text h3 { font-size: clamp(34px, 4.4vw, 60px); letter-spacing: 0.005em; line-height: 1; }

/* filter + sort side by side */
.controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; margin-bottom: 36px; }
.controls .filters { margin-bottom: 0; }
.sort-dd .dd-panel { width: 220px; }

/* project page: bold first sentence, boxed thank-you note */
.intro-text strong { font-weight: 600; }
.prose.box { max-width: 64ch; padding: 20px 24px; background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow-md); }

/* project page: text as wide as the pictures; blue boxes with white text */
.intro-text, .prose, .prose.small, .gallery figcaption { max-width: none; }
.panel { margin: 56px 0; padding: clamp(24px, 3.5vw, 44px); color: var(--ink); background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow-md); }
.panel .prose { margin: 0 0 1em; }
.panel .prose:last-child { margin-bottom: 0; }
.panel .links { margin: 28px 0 0; }
.panel .chip { background: var(--bg); }

.gallery figcaption { white-space: pre-line; }
