/* ---------- tokens ---------- */
:root {
  --bg: #F5F3F0;
  --card-bg: #F6F4F1;
  --text: #0E0E0E;
  --muted: #7A7A7A;
  --rule: rgba(0, 0, 0, 0.06);

  /* default pastel palette */
  --c-pink: #FCE9F6;
  --c-yellow: #FFFAE4;
  --c-blue: #F0F5FF;
  --c-peach: #FFF1E9;
  --c-mint: #DDF5E7;
  --c-lavender: #F5F1FF;
  --c-red: #FFD5CB;
  --c-teal: #E5F5F3;
}
body[data-palette="pastel"] {
  --c-pink: #FCE9F6;
  --c-yellow: #FFFAE4;
  --c-blue: #F0F5FF;
  --c-peach: #FFF1E9;
  --c-mint: #DDF5E7;
  --c-lavender: #F5F1FF;
  --c-red: #FFD5CB;
  --c-teal: #E5F5F3;
}
body[data-palette="cool"] {
  --c-pink: #D8E4FF;
  --c-yellow: #E2F5DC;
  --c-blue: #C8E8F5;
  --c-peach: #DCE9E7;
  --c-mint: #C9F0E2;
  --c-lavender: #D6D2F2;
  --c-red: #F08A72;
  --c-teal: #B7E4E8;
}
body[data-palette="warm"] {
  --c-pink: #F5C9B8;
  --c-yellow: #F0DDAB;
  --c-blue: #E8D4B5;
  --c-peach: #E8B89B;
  --c-mint: #D6D1A3;
  --c-lavender: #DEB89E;
  --c-red: #D9694F;
  --c-teal: #B9CFC0;
}
body[data-palette="mono"] {
  --c-pink: #DEDEDE;
  --c-yellow: #E5E5E5;
  --c-blue: #D7D7D7;
  --c-peach: #E0E0E0;
  --c-mint: #D9D9D9;
  --c-lavender: #DBDBDB;
  --c-red: #D9D9D9;
  --c-teal: #D6D6D6;
}
body[data-palette="bold"] {
  --c-pink: #FFB3C1;
  --c-yellow: #FFE066;
  --c-blue: #9DC6FF;
  --c-peach: #FFB088;
  --c-mint: #9AE8BF;
  --c-lavender: #C5B0FF;
  --c-red: #FF6B5B;
  --c-teal: #43C6C0;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  zoom: 0.85;
  background:
    radial-gradient(130% 100% at 50% 0%, #FBFAF8 0%, #F6F4F1 55%, #EFECE7 100%)
    fixed,
    var(--bg);
  color: var(--text);
  font-family: 'Outfit', 'Onest', system-ui, -apple-system, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.012em;
  min-height: 100vh;
}

/* ---------- pill nav ---------- */
.pill-nav {
  position: fixed;
  top: 28.2353px;
  left: 50%;
  transform: translateX(-50%);
  height: 51.7647px;
  background-color: #FFFFFF;
  background-image: none;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-radius: 999px;
  padding: 5.8824px;
  display: flex;
  align-items: center;
  gap: 2.3529px;
  border: 0.5px solid rgba(191, 189, 185, 0.38);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 20px -8px rgba(58, 48, 36, 0.12);
  z-index: 100;
}
.pill-nav a {
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 0 18.8235px;
  border-radius: 999px;
  box-sizing: border-box;
  border: 0.5px solid transparent;
  text-decoration: none;
  color: #333333;
  font-weight: 400;
  font-size: 18.8235px;
  line-height: 1;
  transition: background 0.2s, color 0.2s;
}
.pill-nav a:hover { background: rgba(255, 255, 255, 0.6); color: #333333; }
.pill-nav a.active {
  color: #333333;
  font-weight: 500;
  background: #F6F4F1;
  border-color: transparent;
  box-shadow: none;
}

/* ---------- grid ---------- */
.grid {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 110px 24px 40px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.col {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 20px;
}
@media (max-width: 880px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- card base ---------- */
.card {
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.78) 0px, rgba(255, 255, 255, 0) 190px), linear-gradient(340deg, rgba(0, 0, 0, 0.05) 0px, rgba(0, 0, 0, 0) 220px);
  background-repeat: no-repeat, no-repeat;
  background-size: 100% 300px, 100% 340px;
  background-position: top left, bottom right;
  background-color: var(--card-bg);
  border-radius: 34px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.03),
    0 6px 14px -6px rgba(0, 0, 0, 0.055),
    0 18px 36px -18px rgba(0, 0, 0, 0.08);
  transition:
    background-color 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.4s ease;
  isolation: isolate;
  text-decoration: none;
  color: inherit;
  display: block;
}
a.card { cursor: pointer; }
/* hover ONLY for clickable cards (links + clickable tiles) */
a.card:hover {
  border-color: rgba(0, 0, 0, 0.13);
  filter: saturate(1.2);
  background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.4) 0px, rgba(255, 255, 255, 0) 190px), linear-gradient(340deg, rgba(0, 0, 0, 0.05) 0px, rgba(0, 0, 0, 0) 220px);
  background-color: var(--hover-bg, #FFFFFF);
  transform: translateY(-5px);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 12px 22px -8px rgba(0, 0, 0, 0.12),
    0 30px 50px -24px rgba(0, 0, 0, 0.16);
}

.card .visual.cover-img {
  transition: box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Slightly clearer outer edges on the home-page cards only. */
.home-page .card,
.home-page .contact-tile {
  border-color: rgba(0, 0, 0, 0.115);
}

.home-page a.card:hover {
  border-color: rgba(0, 0, 0, 0.145);
}

.home-page .contact-tile:hover {
  border-color: rgba(0, 0, 0, 0.15);
}


.card[data-color="pink"]     { --hover-bg: var(--c-pink); }
.card[data-color="yellow"]   { --hover-bg: var(--c-yellow); }
.card[data-color="blue"]     { --hover-bg: var(--c-blue); }
.card[data-color="peach"]    { --hover-bg: var(--c-peach); }
.card[data-color="mint"]     { --hover-bg: var(--c-mint); }
.card[data-color="lavender"] { --hover-bg: var(--c-lavender); }
.card[data-color="red"]      { --hover-bg: var(--c-red); }
.card[data-color="teal"]     { --hover-bg: var(--c-teal); }

/* цвет живёт в свечении, а не в заливке: карточка лишь чуть-чуть подкрашивается */
.card[data-color] {
  --glow: color-mix(in srgb, var(--hover-bg) 80%, transparent);
  --glow-soft: color-mix(in srgb, var(--hover-bg) 65%, transparent);
}

/* ---------- card content ---------- */
.card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
}
.card-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 17px;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}
.card-title {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.2;
  margin: 0;
  padding-top: 0.06em;
}
.card-title .t-emoji { vertical-align: -0.16em; font-size: 1em; margin-right: 10px; }
.tag {
  font-size: 15px;
  font-weight: 500;
  color: #888;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}
.card:hover .tag { opacity: 0.7; transform: translateY(0); }

.card-desc {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
}
.card-desc.small { font-size: 20px; line-height: 1.35; }
.home-page .card.project .card-desc {
  position: relative;
  left: -1px;
  width: calc(100% + 2px);
}
@media (min-width: 881px) {
  .home-page .card.project[href="cases/market.html"] .card-desc {
    min-height: 81px;
  }
}

/* ---------- visual placeholder ---------- */
.visual {
  margin: 18px 0;
  border-radius: 18px;
  min-height: 160px;
  position: relative;
  overflow: hidden;
}
.visual.tall { min-height: 260px; }
.visual.striped {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(0, 0, 0, 0.05) 0,
      rgba(0, 0, 0, 0.05) 6px,
      transparent 6px,
      transparent 14px
    ),
    rgba(0, 0, 0, 0.03);
}
.visual-label {
  position: absolute;
  bottom: 12px;
  left: 14px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: #888;
  letter-spacing: 0;
}
.phone-mock {
  position: absolute;
  left: 50%;
  bottom: -20px;
  transform: translateX(-50%);
  width: 140px;
  height: 220px;
  border-radius: 28px 28px 0 0;
  background: rgba(0, 0, 0, 0.06);
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-bottom: none;
}
.phone-mock::before {
  content: '';
  position: absolute;
  top: 10px; left: 50%; transform: translateX(-50%);
  width: 50px; height: 6px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 999px;
}
.browser-mock {
  position: absolute;
  left: 14px; right: 14px; top: 14px; bottom: -18px;
  border-radius: 14px 14px 0 0;
  background: rgba(255, 255, 255, 0.6);
  border: 0.5px solid rgba(0, 0, 0, 0.06);
}
.browser-mock::before {
  content: '';
  position: absolute;
  top: 10px; left: 12px;
  width: 38px; height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.1);
  box-shadow: 12px 0 0 rgba(0,0,0,0.1), 24px 0 0 rgba(0,0,0,0.1);
}

/* ---------- hover stickers ---------- */
.hover-sticker {
  position: absolute;
  opacity: 0;
  transform: translateY(6px) rotate(var(--rot, 0deg)) scale(0.85);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 5;
}
.card:hover .hover-sticker {
  opacity: 1;
  transform: translateY(0) rotate(var(--rot, 0deg)) scale(1);
}
body[data-stickers="off"] .hover-sticker { display: none; }

.sticker-pill {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sticker-flag {
  width: 24px; height: 16px;
  border-radius: 3px;
  display: inline-block;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.flag-th {
  background: linear-gradient(to bottom,
    #ED1C24 0% 17%,
    #fff 17% 33%,
    #241D4F 33% 67%,
    #fff 67% 83%,
    #ED1C24 83% 100%);
}
.sticker-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--dot, #FF6B6B);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.sticker-square {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--sq, #444);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.12);
}

/* ---------- hero ---------- */
.card.hero { padding: 32px 28px; }
.card.hero .bio {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.018em;
  margin: 0;
}
.card.hero .name-mark {
  font-weight: 700;
}
.card.hero .accent {
  background: linear-gradient(transparent 60%, rgba(255, 224, 102, 0.55) 60%);
  padding: 0 2px;
}
.card.hero .wave {
  display: inline-block;
  font-size: 22px;
  transform: translateY(-2px);
  margin-right: 4px;
}

/* ---------- photo card ---------- */
.photo-card {
  padding: 0;
  aspect-ratio: 1 / 1.1;
  overflow: hidden;
}
.photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.photo-card:hover .photo-img { transform: scale(1.04); }

/* ---------- focus card list ---------- */
.focus-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.focus-card .card-title {
  font-size: 20px;
  font-weight: 700;
}
.focus-list li {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.012em;
  padding-left: 22px;
  position: relative;
}
.focus-list li::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #111;
}
.focus-list b { font-weight: 700; }

/* ---------- contact card ---------- */
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.contact-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: var(--text);
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: background 0.2s, transform 0.2s;
}
.contact-list li a:hover {
  background: #fff;
  transform: translateX(2px);
}
.contact-list .arrow {
  font-size: 16px;
  color: #888;
  transition: transform 0.2s, color 0.2s;
}
.contact-list li a:hover .arrow {
  color: #111;
  transform: translate(2px, -2px);
}

/* ---------- about link card ---------- */
.about-card { display: block; }
.about-card .about-arrow {
  position: absolute;
  right: 28px;
  bottom: 24px;
  font-size: 24px;
  color: #555;
  transition: transform 0.3s ease;
}
.about-card:hover .about-arrow { transform: translate(4px, -4px); color: #000; }

/* ---------- icon palette ---------- */
.icon-R { background: #E94B3C; }
.icon-W { background: #2D6CDF; }
.icon-T { background: #E94B7B; }
.icon-L { background: #FF7A29; }
.icon-F { background: #1FA86A; }
.icon-A { background: #6E5BFF; }
.icon-C { background: #111; font-size: 18px; }
.icon-mb { background: #2D6CDF; }
.icon-ec { background: #6E5BFF; }
.icon-mk { background: #E94B7B; }
.icon-lb { background: #FF7A29; }
.icon-ad { background: #1FA86A; }
.icon-ai { background: #CA653E; font-size: 18px; }

/* ---------- emoji-style card icon (no colored bg) ---------- */
.card-icon-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", system-ui, sans-serif;
}

/* ---------- ME card (combined photo + intro) ---------- */
.me-combo {
  padding: 28px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.me-combo .me-photo {
  border-radius: 16px;
  overflow: hidden;
  background: #eee;
  aspect-ratio: 4 / 3.6;
  width: calc(100% + 0.4px);
  position: relative;
  left: -0.2px;
  top: -0.2px;
  margin: 0 0 22px;
}
.me-combo .me-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.me-combo:hover .me-photo img { transform: scale(1.04); }
.me-combo .me-intro {
  width: calc(100% + 2.4px);
  left: -1.2px;
  padding: 0;
  position: relative;
}
.me-combo .bio {
  font-size: 20px;
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0;
  padding-right: 0;
  color: var(--text);
}
.me-combo .wave {
  display: inline-block;
  font-size: 22px;
  margin-right: 4px;
}
.me-combo .name-mark { font-weight: 700; }
.me-combo .accent {
  font-weight: 700;
}
.me-combo .me-arrow {
  position: absolute;
  right: 10px;
  bottom: 0;
  font-size: 22px;
  color: #555;
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s;
}
.me-combo:hover .me-arrow {
  opacity: 1;
  transform: translate(0, 0);
  color: #000;
}

/* legacy me-card (kept for backwards compat) */
.me-card {
  padding: 14px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.me-photo {
  border-radius: 18px;
  overflow: hidden;
  background: #eee;
  aspect-ratio: 1 / 1.05;
  margin-bottom: 18px;
}
.me-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.me-card:hover .me-photo img { transform: scale(1.04); }
.me-info { padding: 0 12px 14px; }
.me-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.018em;
  margin: 0 0 8px;
  color: var(--text);
}
.me-bio {
  font-size: 16px;
  line-height: 1.4;
  color: #444;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.005em;
}
.me-arrow {
  position: absolute;
  right: 22px;
  bottom: 18px;
  font-size: 22px;
  color: #555;
  transition: transform 0.3s ease, color 0.3s;
  opacity: 0;
  transform: translate(-4px, 4px);
}
.me-card:hover .me-arrow { opacity: 1; transform: translate(0, 0); color: #000; }

/* ---------- Contact card (dark accent) ---------- */
.contact-card-dark {
  background: #182621;
  color: #fff;
  padding: 26px 28px 22px;
  --hover-bg: #1f3329;
}
.contact-card-dark:hover { box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18); }
.contact-head { margin-bottom: 16px; }
.contact-eyebrow {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
}
.contact-heading {
  font-size: 26px;
  font-weight: 700;
  margin: 4px 0 0;
  letter-spacing: -0.018em;
  color: #fff;
}
.contact-list-dark {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.contact-list-dark li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: background 0.2s, transform 0.2s;
  background: rgba(255, 255, 255, 0.05);
}
.contact-list-dark li a:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(2px);
}
.contact-list-dark .arrow {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  transition: transform 0.2s, color 0.2s;
}
.contact-list-dark li a:hover .arrow { color: #fff; transform: translate(2px, -2px); }

/* ---------- cover art (Notion-style thumbnails) ---------- */
.visual.cover-art {
  margin: 18px 0;
  border-radius: 18px;
  min-height: 200px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.cover-content {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
}
.cover-content.cover-text-only { padding: 24px; }
.cover-glyph {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.cover-label {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0E0E0E;
  white-space: nowrap;
}
.cover-wordmark {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #0E0E0E;
  white-space: nowrap;
}
.cover-wordmark .wm-accent { color: #3674F2; font-weight: 700; }

.cover-gray     { background: #E5E5E5; }
.cover-gray .cover-glyph { color: #2A2A2A; }

.cover-lavender { background: #DDD3F5; }
.cover-lavender .cover-glyph { color: #6E5BAA; }

.cover-cream    { background: #F1E5D6; }
.cover-cream .cover-glyph-claude { color: #CA653E; stroke-width: 2.2; }

.cover-white {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

/* ---------- contact tiles (square row) ---------- */
.contacts-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  max-width: 100%;
  gap: 14px;
}
.contact-tile {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.7) 0px, rgba(255, 255, 255, 0) 95px), linear-gradient(340deg, rgba(0, 0, 0, 0.055) 0px, rgba(0, 0, 0, 0) 115px);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.03),
    0 6px 14px -6px rgba(0, 0, 0, 0.055),
    0 18px 36px -18px rgba(0, 0, 0, 0.08);
  background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.78) 0px, rgba(255, 255, 255, 0) 190px), linear-gradient(340deg, rgba(0, 0, 0, 0.05) 0px, rgba(0, 0, 0, 0) 220px);
  background-color: var(--card-bg);
  border-radius: 24px;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  color: var(--text);
  transition:
    background-color 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}
.contact-tile:hover {
  transform: translateY(-3px);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 12px 22px -8px rgba(0, 0, 0, 0.12),
    0 30px 50px -24px rgba(0, 0, 0, 0.16);
  background-color: #fff;
  border-color: rgba(0, 0, 0, 0.14);
}
.contact-tile img {
  width: 30px;
  height: 30px;
  display: block;
}
.contact-tile .cv-glyph {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 23px;
  line-height: 1;
}
.contact-tile-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #555;
  transition: color 0.2s;
}
.contact-tile:hover .contact-tile-label { color: #000; }

/* ---------- contact modal ---------- */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.contact-modal.open { display: flex; }
.contact-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: cm-fade 0.25s ease;
}
.contact-modal-panel {
  position: relative;
  width: min(560px, 100%);
  background:
    radial-gradient(130% 90% at 50% 0%, #F7F4F0 0%, #F1EDE7 55%, #ECE7E0 100%) fixed,
    #ECE7E0;
  border-radius: 28px;
  padding: 40px 40px 36px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  animation: cm-pop 0.3s cubic-bezier(0.34, 1.4, 0.5, 1);
}
@keyframes cm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cm-pop {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.contact-modal-close {
  position: absolute;
  top: 22px;
  right: 24px;
  background: none;
  border: none;
  font-size: 30px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
  padding: 0;
}
.contact-modal-close:hover { color: #111; transform: scale(1.1); }
.contact-modal-eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #999;
}
.contact-modal-title {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.026em;
  margin: 6px 0 28px;
  line-height: 1.05;
}
.contact-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.contact-modal-tile {
  position: relative;
  background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.78) 0px, rgba(255, 255, 255, 0) 190px), linear-gradient(340deg, rgba(0, 0, 0, 0.05) 0px, rgba(0, 0, 0, 0) 220px);
  background-repeat: no-repeat, no-repeat;
  background-size: 100% 300px, 100% 340px;
  background-position: top left, bottom right;
  background-color: var(--card-bg);
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.03),
    0 6px 14px -6px rgba(0, 0, 0, 0.055),
    0 18px 36px -18px rgba(0, 0, 0, 0.08);
  border-radius: 24px;
  padding: 24px 22px 22px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
}
.contact-modal-tile:hover {
  transform: translateY(-3px);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 12px 22px -8px rgba(0, 0, 0, 0.12),
    0 30px 50px -24px rgba(0, 0, 0, 0.16);
  background-color: #fff;
  border-color: rgba(0, 0, 0, 0.15);
}
.contact-modal-tile img,
.contact-modal-tile .cm-glyph {
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
}
.contact-modal-tile .cm-glyph {
  display: grid;
  place-items: center;
  font-size: 32px;
  line-height: 1;
}
.cm-label {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.cm-sub {
  font-size: 13px;
  color: #888;
  letter-spacing: -0.005em;
  word-break: break-all;
}
.cm-newtab {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 16px;
  color: #bbb;
  transition: color 0.2s, transform 0.2s;
}
.contact-modal-tile:hover .cm-newtab {
  color: #111;
  transform: translate(2px, -2px);
}
.cm-download { transform: none; }
.contact-modal-tile:hover .cm-download {
  transform: translateY(2px);
}
@media (max-width: 480px) {
  .contact-modal-grid { grid-template-columns: 1fr; }
  .contact-modal-panel { padding: 32px 24px 28px; }
  .contact-modal-title { font-size: 30px; }
}

/* ---------- cover image (project covers) ---------- */
.card.project .visual.cover-img:first-child { margin-top: 0; }
.visual.cover-img {
  margin: 18px 0;
  border-radius: 16px;
  overflow: hidden;
  display: block;
  background: #FFFFFF;
  border: 0.5px solid rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
}
.visual.cover-img img {
  width: 100%;
  height: auto;
  display: block;
}
/* per-card height variations for bento variety */
.visual.cover-img.tall {
  aspect-ratio: 4 / 5;
}
.visual.cover-img.tall img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.visual.cover-img.wide {
  aspect-ratio: 21 / 9;
}
.visual.cover-img.wide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* inline emoji inside card titles */
.t-emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", system-ui, sans-serif;
  font-size: 0.92em;
  margin-right: 2px;
}

/* labeling cover that should not be cropped */
.visual.cover-img.cover-padded {
  aspect-ratio: auto;
}
.visual.cover-img.cover-padded img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ---------- footer ---------- */
footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 36px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  color: var(--muted);
}
footer .links { display: flex; gap: 28px; }
footer .links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
footer .links a:hover { color: var(--text); }

/* ---------- tweaks panel ---------- */
.tweaks {
  position: fixed;
  bottom: 32px;
  left: 32px;
  width: 280px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  z-index: 200;
  display: none;
  font-size: 13px;
}
.tweaks.open { display: block; }
.tweaks-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.tweaks-title { font-weight: 600; font-size: 14px; }
.tweaks-close {
  cursor: pointer;
  background: none;
  border: none;
  font-size: 18px;
  color: #999;
  padding: 0;
  line-height: 1;
}
.tweaks-section { margin-bottom: 14px; }
.tweaks-label {
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.palette-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.palette-chip {
  cursor: pointer;
  border-radius: 10px;
  border: 2px solid transparent;
  padding: 4px;
  transition: border-color 0.2s;
}
.palette-chip.active { border-color: #111; }
.palette-swatches {
  height: 36px;
  border-radius: 6px;
  display: flex;
  overflow: hidden;
}
.palette-swatches > div { flex: 1; }
.palette-name {
  font-size: 10px;
  text-align: center;
  margin-top: 4px;
  color: #555;
  text-transform: capitalize;
}
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}
.toggle {
  width: 36px; height: 20px;
  background: #ddd;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle.on { background: #111; }
.toggle::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle.on::after { transform: translateX(16px); }

/* ---------- Case study page ---------- */
.case-page {
  max-width: 880px;
  margin: 0 auto;
  padding: 130px 28px 80px;
}
.case-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 32px;
  padding: 10px 20px;
  border-radius: 999px;
  background: #182621;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.case-back:hover { background: #1f3329; transform: translateX(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.12); }

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.case-meta .chip-meta {
  font-size: 18px;
  font-weight: 500;
  color: #555;
  background: rgba(0, 0, 0, 0.04);
  padding: 8px 16px;
  border-radius: 999px;
  letter-spacing: -0.005em;
}

.case-page h1 {
  font-size: 58px;
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.05;
  margin: 0 0 28px;
}
.case-overview {
  font-size: 20px;
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: #2a2a2a;
  margin: 0 0 16px;
  font-weight: 500;
}

.case-info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin: 32px 0 48px;
  padding: 20px 24px;
  background: var(--card-bg);
  border-radius: 18px;
}
.case-info-row .item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.case-info-row .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  font-weight: 600;
}
.case-info-row .value {
  font-size: 18px;
  font-weight: 600;
  color: #0E0E0E;
}
.case-info-row .value a { color: #0E0E0E; text-decoration: underline; text-decoration-color: rgba(0,0,0,0.2); }
.case-info-row .value a:hover { text-decoration-color: #0E0E0E; }

.case-section { margin-bottom: 48px; }
.case-section h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.024em;
  margin: 0 0 20px;
  line-height: 1.15;
}
.case-section h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 34px 0 14px;
  line-height: 1.2;
}
.case-section h4 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #888;
  margin: 24px 0 8px;
}
.case-section p {
  font-size: 20px;
  line-height: 1.5;
  letter-spacing: -0.012em;
  color: #1a1a1a;
  margin: 0 0 16px;
}
.case-section ul,
.case-section ol {
  margin: 0 0 16px;
  padding-left: 22px;
}
.case-section ul li,
.case-section ol li {
  font-size: 20px;
  line-height: 1.5;
  letter-spacing: -0.012em;
  color: #1a1a1a;
  margin-bottom: 8px;
}
.case-section b, .case-section strong { font-weight: 700; }
.case-section em { font-style: italic; color: #555; }

.case-fig {
  margin: 28px 0;
  border-radius: 16px;
  overflow: hidden;
  background: #F0F0F0;
  border: 1px solid rgba(0, 0, 0, 0.04);
}
.case-fig img {
  width: 100%;
  height: auto;
  display: block;
}
.case-fig figcaption {
  font-size: 13px;
  color: #777;
  padding: 12px 16px;
  background: #F8F8F8;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  font-family: 'JetBrains Mono', monospace;
}

.case-decision {
  margin: 28px 0;
  padding: 24px 26px;
  background: var(--card-bg);
  border-radius: 18px;
}
.case-decision h4 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #555;
  margin: 16px 0 6px;
}
.case-decision h4:first-child { margin-top: 0; }
.case-decision p { font-size: 17px; margin-bottom: 8px; }
.case-decision ul li,
.case-decision ol li { font-size: 17px; }

.case-callout {
  margin: 40px 0;
  padding: 28px 30px;
  background: linear-gradient(135deg, #FFF6E0 0%, #FFE9D5 100%);
  border-radius: 22px;
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: -0.008em;
  color: #2a2a2a;
}
.case-callout .flag {
  font-size: 24px;
  display: block;
  margin-bottom: 10px;
}
.case-callout p { margin: 0 0 12px; font-size: inherit; }
.case-callout p:last-child { margin-bottom: 0; }
.case-callout ul { padding-left: 22px; margin: 0; }
.case-callout li { font-size: 17px; margin-bottom: 6px; }

.case-next {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 32px;
  background: #182621;
  color: #fff;
  border-radius: 22px;
  margin-top: 48px;
  text-decoration: none;
  transition: transform 0.2s;
  flex-wrap: wrap;
  gap: 16px;
}
.case-next:hover { transform: translateY(-2px); }
.case-next .ctx {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
}
.case-next .next-title {
  font-size: 24px;
  font-weight: 700;
  margin-top: 4px;
  letter-spacing: -0.018em;
}
.case-next .arrow {
  font-size: 28px;
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 720px) {
  .case-page h1 { font-size: 36px; }
  .case-section h2 { font-size: 22px; }
  .case-overview { font-size: 18px; }
  .case-section p, .case-section ul li, .case-section ol li { font-size: 16px; }
}

.case-fig-placeholder {
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    135deg,
    rgba(0,0,0,0.04) 0,
    rgba(0,0,0,0.04) 8px,
    transparent 8px,
    transparent 18px
  ), #F4F4F4;
}
.case-fig-placeholder figcaption {
  position: static;
  background: transparent;
  border: none;
  font-size: 14px;
  color: #999;
  text-align: center;
  padding: 0 20px;
}

/* placeholder cover box on index cards */
.cover-placeholder-box {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    135deg,
    rgba(0,0,0,0.05) 0,
    rgba(0,0,0,0.05) 8px,
    transparent 8px,
    transparent 18px
  ), rgba(0,0,0,0.02);
}
.cover-placeholder-label {
  font-size: 14px;
  font-weight: 500;
  color: #999;
}

/* ---------- About page ---------- */
.about-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 130px 28px 80px;
}
.about-page h1 {
  font-size: 58px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0 0 40px;
}
.about-top {
  display: block;
  margin-bottom: 64px;
}
.about-top .photo-wrap {
  float: right;
  width: 300px;
  margin: 4px 0 18px 40px;
  border-radius: 24px;
  overflow: hidden;
  background: #eee;
  aspect-ratio: 4 / 5;
  shape-outside: margin-box;
}
.about-top .photo-wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.about-top .intro p {
  font-size: 22px;
  line-height: 1.45;
  margin: 0 0 22px;
  letter-spacing: -0.015em;
  color: #1a1a1a;
}
.about-top .intro p:last-child { margin-bottom: 0; }
@media (max-width: 720px) {
  .about-page h1 { font-size: 44px; }
  .about-top .photo-wrap { float: none; width: 100%; max-width: 300px; margin: 0 0 24px; aspect-ratio: 1 / 1; }
}

.about-section {
  margin-bottom: 56px;
}
.about-section h2 {
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #888;
  margin: 0 0 22px;
}
.about-section .body {
  font-size: 22px;
  line-height: 1.45;
  letter-spacing: -0.012em;
  color: #1a1a1a;
}
.about-section .body p { margin: 0 0 18px; }
.about-section .body p:last-child { margin-bottom: 0; }

.focus-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.toolbox-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.focus-grid.toolbox-grid .chip {
  text-align: center;
  padding: 20px 16px;
  min-width: 0;
}
.focus-grid .chip {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.03),
    0 6px 14px -6px rgba(0, 0, 0, 0.055);
  border-radius: 16px;
  padding: 20px 24px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.012em;
  white-space: nowrap;
}
.focus-grid .chip:nth-child(6n+0):hover { background: var(--c-mint); }
@media (max-width: 560px) {
  .focus-grid { grid-template-columns: 1fr; }
  .focus-grid.toolbox-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- key competencies (3 columns of bullets) ---------- */
.competencies-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 24px;
}
.comp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.comp-list li {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.35;
  color: #1a1a1a;
  position: relative;
  padding-left: 14px;
}
.comp-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  top: 0;
  color: #1a1a1a;
  font-size: 18px;
  line-height: 1.35;
}
@media (max-width: 720px) {
  .competencies-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .competencies-grid { grid-template-columns: 1fr; gap: 18px; }
}

.about-cta {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 36px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.about-cta h3 {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.018em;
}
.cta-icons {
  display: flex;
  gap: 12px;
}
.cta-icon-tile {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #fff;
  display: grid;
  place-items: center;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.cta-icon-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}
.cta-icon-tile img {
  width: 32px;
  height: 32px;
  display: block;
}
.cta-cv-glyph {
  font-size: 30px;
  line-height: 1;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
}

/* ================= MOBILE (≤ 600px, target 402px+) ================= */
@media (max-width: 600px) {
  /* nav fits small screens */
  .pill-nav {
    top: 16.4706px;
    width: fit-content;
    max-width: calc(100% - 24px);
    justify-content: center;
  }

  /* grid → single column, tighter padding */
  .grid {
    padding: 84.2353px 16px 64px;
    gap: 16px;
  }
  .col { gap: 16px; min-width: 0; }

  .card { padding: 20px; border-radius: 26px; min-width: 0; }
  .card-title { font-size: 23px; overflow-wrap: anywhere; }
  .card-desc { font-size: 22px; overflow-wrap: anywhere; }
  .card-desc.small { font-size: 19px; overflow-wrap: anywhere; }
  .card-icon-emoji { width: 30px; height: 30px; font-size: 25px; }

  .me-combo { padding: 22px; }
  .me-combo .bio { font-size: 20px; padding-right: 0; }
  .me-combo .me-photo {
    width: calc(100% + 4px);
    left: -2px;
    top: -2px;
    margin-bottom: 15.4px;
  }

  .focus-card .card-title,
  .focus-list li { font-size: 19px; }

  /* contacts: 4 tiles stay in a row but compact */
  .contacts-row { gap: 8px; }
  .contact-tile { border-radius: 16px; gap: 4px; }
  .contact-tile img, .contact-tile .cv-glyph { width: 26px; height: 26px; }
  .contact-tile .cv-glyph { font-size: 20px; }
  .contact-tile-label { font-size: 11px; }

  /* footer stacks */
  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px 40px;
  }
  footer .links { gap: 22px; }

  /* about page */
  .about-page { padding: 96px 18px 64px; }
  .about-page h1 { font-size: 40px; }
  .about-top { grid-template-columns: 1fr; gap: 24px; }
  .about-top .photo-wrap { float: none; width: 100%; max-width: 280px; margin: 0 0 20px; aspect-ratio: 1 / 1; }
  .about-top .intro p { font-size: 20px; }
  .about-section .body { font-size: 19px; }
  .focus-grid:not(.toolbox-grid) { grid-template-columns: 1fr; }
  .focus-grid.toolbox-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .competencies-grid { grid-template-columns: 1fr; gap: 18px; }
  .comp-list li { font-size: 19px; }
  .focus-grid.toolbox-grid .chip { padding: 16px 12px; font-size: 18px; }
  .focus-grid .chip {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 18px;
    padding: 18px 20px;
  }
  .about-cta { padding: 28px 0; }
  .about-cta h3 { font-size: 24px; }

  /* case pages */
  .case-page { padding: 96px 18px 64px; }
  .case-page h1 { font-size: 38px; }
  .case-overview { font-size: 20px; }
  .case-section h2 { font-size: 26px; }
  .case-section h3 { font-size: 20px; }
  .case-section p, .case-section ul li, .case-section ol li { font-size: 18px; }
  .case-info-row { gap: 18px 24px; padding: 18px 20px; }
  .case-next { padding: 22px 24px; }
  .case-next .next-title { font-size: 20px; }

  /* tweaks panel doesn't overflow */
  .tweaks { left: 12px; right: 12px; bottom: 12px; width: auto; }
}

@media (max-width: 360px) {
  .pill-nav a {
    padding-left: 14px;
    padding-right: 14px;
    font-size: 17px;
  }

  .contact-modal-panel {
    width: calc(100% - 20px);
    padding: 18px;
  }

  .contact-modal-grid { gap: 10px; }
  .contact-modal-tile { min-width: 0; padding: 14px 8px; }
  .cm-sub { overflow-wrap: anywhere; }
}

/* key numbers: thick colored underline */
.stat-chip {
  white-space: nowrap;
  --ul: #FFD84A;
  font-weight: 600;
  padding: 0 2px 4px;
  background-image: linear-gradient(var(--ul), var(--ul));
  background-repeat: no-repeat;
  background-size: 100% 5px;
  background-position: 0 100%;
}
.card[data-color="lavender"] .stat-chip { --ul: rgba(180, 154, 255, 0.82); }
.card[href="cases/panorama.html"] .stat-chip { --ul: rgba(183, 80, 209, 0.42); }
.card[data-color="yellow"] .stat-chip   { --ul: rgba(255, 216, 74, 0.82); }
.card[data-color="peach"] .stat-chip    { --ul: rgba(255, 176, 122, 0.82); }
.card[data-color="blue"] .stat-chip     { --ul: rgba(127, 193, 255, 0.82); }
.card[data-color="pink"] .stat-chip     { --ul: rgba(255, 159, 192, 0.82); }
.card[data-color="teal"] .stat-chip     { --ul: rgba(79, 211, 204, 0.82); }
.card[data-color="mint"] .stat-chip     { --ul: rgba(127, 230, 180, 0.82); }
.card[data-color="red"] .stat-chip      { --ul: rgba(255, 138, 114, 0.82); }

/* The edge belongs to the white canvas, not to differently-sized images. */
.card .visual.cover-img > img { outline: none; }

/* non-clickable card reads flat: no gradient, no lift */
.card.focus-card {
  background-image: none;
  background-color: #F6F4F1;
  border-color: rgba(0, 0, 0, 0.06);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.03),
    0 6px 14px -6px rgba(0, 0, 0, 0.055);
}
.card.focus-card .chip {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(0, 0, 0, 0.05);
}

/* type pill: always-on Web / Mobile / Audit label, aligned across cards */
.card.project { position: relative; }
.type-pill {
  position: absolute;
  top: 18px;
  right: 18px;
  transform: none;
  z-index: 5;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.type-pill-row {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 5;
  display: flex;
  gap: 4px;
}
.type-pill-row .type-pill { position: static; top: auto; right: auto; }

/* about: labelled facts under the intro */
.about-facts {
  margin: 26px 0 30px;
}
.about-facts .fact {
  margin: 0 0 22px;
}
.about-facts .fact:last-child {
  margin-bottom: 0;
}
.about-facts .fact h4 {
  margin: 0 0 4px;
  font-size: 22px;
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: -0.014em;
}
.about-facts .fact p {
  margin: 0;
}

/* about page reads on plain white */
body.about-white { background: #FFFFFF; }

/* about page: tiles get the warm card tint so they read on white */
body.about-white .focus-grid .chip,
body.about-white .cta-icon-tile {
  background: #F6F4F1;
  border-color: rgba(0, 0, 0, 0.06);
}

/* ---------- final home visual: selected contrast version ---------- */
body {
  background:
    radial-gradient(130% 90% at 50% 0%, #F7F4F0 0%, #F1EDE7 55%, #ECE7E0 100%) fixed,
    #ECE7E0;
}

.grid { gap: 24px; }
.col { gap: 24px; }

.card,
.contact-tile,
.contact-modal-tile {
  background-color: #FAF8F4;
  border-color: rgba(0, 0, 0, 0.11);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 8px 16px -7px rgba(58, 48, 36, 0.1),
    0 22px 42px -20px rgba(58, 48, 36, 0.16);
}

.card {
  background-image:
    linear-gradient(160deg, rgba(255, 255, 255, 0.60) 0, rgba(255, 255, 255, 0) 190px),
    linear-gradient(340deg, rgba(0, 0, 0, 0.05) 0, rgba(0, 0, 0, 0) 220px);
}

.card.focus-card { background-color: #F6F4F1; }

.contact-modal-tile {
  border-color: rgba(0, 0, 0, 0.115);
}

.card .visual.cover-img {
  min-height: 0;
  border: 0.5px solid rgba(0, 0, 0, 0.16);
}

/* Home project previews: visually extend the white canvas by 3px
   without changing card dimensions or the text block below. */
.home-page .card.project .visual.cover-img {
  border: 0.5px solid transparent;
  overflow: visible;
  box-shadow: none;
  background: transparent;
}
.home-page .card.project .visual.cover-img > img {
  visibility: hidden;
}
.home-page .card.project .visual.cover-img::after {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: 1;
  pointer-events: none;
  background-color: #FFFFFF;
  background-image: var(--home-cover);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  border: 0.5px solid rgba(0, 0, 0, 0.13);
  border-radius: 17px;
  box-sizing: border-box;
}

.card .visual.cover-img > img { outline: none; }

body.about-white { background: #FFFFFF; }

/* Keep the entire mobile home page on one 16px vertical rhythm. This stays
   after the final desktop spacing overrides above. */
@media (max-width: 600px) {
  .grid,
  .col { gap: 16px; }
}
