/* Colors, sizes and spacing follow the marclou.com layout (shadcn neutral palette). */
:root {
  --background: #fff;
  --foreground: #0a0a0a;
  --card: #fff;
  --muted: #f5f5f5;
  --muted-foreground: #737373;
  --border: #e5e5e5;
  --primary: #171717;
  --primary-foreground: #fafafa;
  --ring: #a1a1a1;
  --surface-shadow: 0 0 0 1px #0000000f, 0 1px 2px -1px #0000000f, 0 2px 4px 0 #0000000a;
  --surface-shadow-hover: 0 0 0 1px #00000014, 0 1px 2px -1px #00000014, 0 2px 4px 0 #0000000f;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
/* Dark theme: chosen with the toggle (data-theme="dark"),
   or automatic from the device when nothing is chosen. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #0a0a0a;
  --foreground: #fafafa;
  --card: #171717;
  --muted: #262626;
  --muted-foreground: #a1a1a1;
  --border: #ffffff1a;
  --primary: #e5e5e5;
  --primary-foreground: #171717;
  --ring: #737373;
  --surface-shadow: 0 0 0 1px #ffffff14;
  --surface-shadow-hover: 0 0 0 1px #ffffff21;
}
:root[data-theme="light"] { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --background: #0a0a0a;
    --foreground: #fafafa;
    --card: #171717;
    --muted: #262626;
    --muted-foreground: #a1a1a1;
    --border: #ffffff1a;
    --primary: #e5e5e5;
    --primary-foreground: #171717;
    --ring: #737373;
    --surface-shadow: 0 0 0 1px #ffffff14;
    --surface-shadow-hover: 0 0 0 1px #ffffff21;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
b { font-weight: 500; color: var(--foreground); font-variant-numeric: tabular-nums; }
:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent); border-radius: 8px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 50; background: var(--primary); color: var(--primary-foreground); padding: 6px 12px; border-radius: 8px; font-size: 14px; }
.skip:focus { top: 12px; }

.t11 { font-size: 11px; }
.t13 { font-size: 13px; }
.t14 { font-size: 14px; }
.t15 { font-size: 15px; }
.muted { color: var(--muted-foreground); }
.strong { font-weight: 600; letter-spacing: -0.01em; }
.mt2 { margin-top: 8px; }
.mt4 { margin-top: 16px; }
p { text-wrap: pretty; }

.ulink {
  text-decoration: underline;
  text-decoration-color: color-mix(in oklab, var(--foreground) 30%, transparent);
  text-underline-offset: 4px;
  transition: color .15s, text-decoration-color .15s;
}
.ulink:hover { color: var(--foreground); text-decoration-color: var(--foreground); }

/* Entrance animation (same feel as the reference) */
.enter { animation: enter .4s cubic-bezier(.2,0,0,1) both; animation-delay: calc(var(--stagger, 0) * 80ms); }
@keyframes enter { from { opacity: 0; transform: translateY(8px); filter: blur(2px); } }
@media (prefers-reduced-motion: reduce) { .enter { animation: none; } html { scroll-behavior: auto; } }

/* ================= Layout ================= */
.layout {
  flex: 1;
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 64rem) {
  .layout { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 3rem; }
}
@media (min-width: 80rem) {
  .layout { grid-template-columns: 21rem minmax(0, 1fr); gap: 4rem; }
}

/* ================= Profile (left) ================= */
.profile { position: relative; isolation: isolate; padding-top: 32px; }
@media (min-width: 64rem) {
  .profile { position: sticky; top: 0; align-self: start; padding: 56px 0; }
}
.dots {
  position: absolute; left: -20px; right: -20px; top: 0; height: 14rem; z-index: -1; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, color-mix(in oklab, var(--foreground) 14%, transparent) 1px, transparent 0);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(60% 70% at 50% 0, #000 20%, #0000 70%);
  mask-image: radial-gradient(60% 70% at 50% 0, #000 20%, #0000 70%);
}
@media (min-width: 64rem) { .dots { height: 24rem; } }

.profile__head { display: flex; align-items: center; gap: 16px; }
@media (min-width: 64rem) { .profile__head { flex-direction: column; align-items: flex-start; gap: 20px; } }

.profile__avatar {
  width: 56px; height: 56px; flex: none; border-radius: 50%; object-fit: cover;
  outline: 1px solid #0000001a; outline-offset: -1px;
  box-shadow: 0 8px 24px -8px rgb(0 0 0 / .25);
}
@media (min-width: 64rem) { .profile__avatar { width: 80px; height: 80px; } }

.profile h1 { font-size: 1.5rem; line-height: 2rem; font-weight: 600; letter-spacing: -0.025em; }
@media (min-width: 64rem) { .profile h1 { font-size: 1.875rem; line-height: 2.25rem; } }

.contact { margin-top: 16px; }
.contact > p { margin-bottom: 12px; }
.field {
  display: flex; align-items: center; gap: 6px;
  padding: 6px; border-radius: 12px;
  background: var(--background);
  box-shadow: var(--surface-shadow);
  transition: box-shadow .15s;
}
.field:hover { box-shadow: var(--surface-shadow-hover); }
.field__text {
  flex: 1; min-width: 0; padding: 0 10px; height: 36px; line-height: 36px;
  font-size: 15px; color: var(--muted-foreground);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; min-width: 96px; padding: 0 16px; border-radius: 8px;
  background: var(--primary); color: var(--primary-foreground);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background .15s, transform .15s;
}
.field:hover .btn { background: color-mix(in oklab, var(--primary) 80%, transparent); }
.field:active .btn { transform: scale(.96); }

.socials { display: flex; flex-wrap: wrap; align-items: center; column-gap: 20px; margin-top: 16px; }
@media (min-width: 64rem) { .socials { column-gap: 16px; } }
@media (min-width: 80rem) { .socials { column-gap: 24px; } }
.socials a {
  margin: 0 -8px; display: flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 8px; border-radius: 999px;
  font-size: 13px; color: var(--muted-foreground);
  transition: background .15s, color .15s;
}
.socials a:hover { background: var(--muted); color: var(--foreground); }
.socials svg { width: 14px; height: 14px; fill: currentColor; }

/* ================= Content (right) ================= */
.content { min-width: 0; padding: 32px 0 96px; }
@media (min-width: 64rem) { .content { padding-top: 56px; } }

.card {
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--surface-shadow);
}

/* Section header */
.block__head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  margin-bottom: 20px; padding-bottom: 12px;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 40%, transparent);
  font-variant-numeric: tabular-nums;
}
.block__head h2 { font-size: 15px; font-weight: 500; letter-spacing: -0.025em; }

/* App cards */
.grid2 { display: grid; gap: 16px; }
@media (min-width: 40rem) { .grid2 { grid-template-columns: repeat(2, 1fr); } }

.app { position: relative; display: flex; flex-direction: column; height: 100%; padding: 20px; transition: box-shadow .15s; }
.app:has(a:hover), .app:has(:focus-visible) { box-shadow: var(--surface-shadow-hover); }
.app__top { display: flex; align-items: center; gap: 12px; }
.app h3 { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.025em; }
.app h3 a { display: flex; align-items: center; gap: 4px; }
.app h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.app h3 a span:first-child {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-decoration-color: color-mix(in oklab, var(--foreground) 30%, transparent); text-underline-offset: 4px;
}
.app h3 a:hover span:first-child { text-decoration-line: underline; }
.app h3 a:focus-visible { box-shadow: none; }

.logo {
  flex: none; width: 28px; height: 28px; border-radius: 6px;
  display: grid; place-items: center;
  background: var(--c, #0a0a0a); color: #fff;
  font-size: 14px; font-weight: 600; object-fit: contain;
}
.logo--sm { width: 24px; height: 24px; font-size: 12px; margin-top: 2px; }

.pill {
  flex: none; padding: 2px 8px; border-radius: 999px;
  background: var(--muted); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums;
}
.app__desc {
  margin-top: 8px; font-size: 14px; color: var(--muted-foreground);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.shot {
  position: relative; z-index: 1; margin-top: auto; padding-top: 20px;
}
.shot img {
  width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top;
  border-radius: 10px;
  box-shadow: var(--surface-shadow);
  background: var(--muted);
  transition: transform .2s ease;
}
.app:has(a:hover) .shot img { transform: translateY(-2px); }

/* Mini list */
.grid3 { display: grid; column-gap: 32px; margin-top: 48px; }
@media (min-width: 40rem) { .grid3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 80rem) { .grid3 { grid-template-columns: repeat(3, 1fr); } }
.mini {
  position: relative; display: flex; align-items: flex-start; gap: 12px;
  margin: 0 -12px; padding: 12px; border-radius: 12px;
  transition: background .15s;
}
.mini:hover { background: color-mix(in oklab, var(--muted) 60%, transparent); }
.mini > div { min-width: 0; }
.mini h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 500; letter-spacing: -0.025em; }
.mini h3 a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.mini p {
  margin-top: 2px; font-size: 14px; color: var(--muted-foreground);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tag {
  flex: none; padding: 2px 8px; border-radius: 999px;
  background: var(--muted); color: var(--muted-foreground);
  font-size: 11px; font-weight: 500;
}

/* ================= Footer ================= */
.footer { border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent); }
.footer__inner {
  max-width: 80rem; margin: 0 auto;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.footer__brand { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.footer__avatar { width: 24px; height: 24px; border-radius: 50%; }
.footer__right { display: flex; align-items: center; gap: 16px; }
.footer__icons { display: flex; gap: 4px; }
.footer__icons a {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 999px;
  color: var(--muted-foreground); transition: background .15s, color .15s;
}
.footer__icons a:hover { background: var(--muted); color: var(--foreground); }
.footer__icons svg { width: 14px; height: 14px; fill: currentColor; }
@media (max-width: 40rem) {
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer__tag { flex-basis: 100%; }
  .footer__right { width: 100%; justify-content: space-between; }
  .footer__icons { margin-left: -8px; }
}

#apps { scroll-margin-top: 32px; }
img.logo { background: transparent; }

/* Role line: "Software Engineer | SaaS Builder | AI & Automation" */
.roles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.roles span {
  padding: 2px 8px; border-radius: 999px;
  background: var(--muted); color: var(--foreground);
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
@media (max-width: 63.99rem) {
  .profile__head { align-items: flex-start; }
}

/* ================= Chat widget ================= */
.chat { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 60; }
.chat__fab {
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: var(--primary); color: var(--primary-foreground);
  box-shadow: 0 8px 24px -6px rgb(0 0 0 / .35);
  transition: transform .15s ease;
}
.chat__fab:hover { transform: translateY(-1px); }
.chat__fab:active { transform: scale(.96); }
.chat__fab svg { width: 22px; height: 22px; grid-area: 1 / 1; transition: opacity .15s, transform .2s; }
.chat__fab .i-open { fill: currentColor; }
.chat__fab .i-close { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; opacity: 0; transform: rotate(-45deg); }
.chat.is-open .chat__fab .i-open { opacity: 0; transform: rotate(45deg); }
.chat.is-open .chat__fab .i-close { opacity: 1; transform: none; }

.chat__panel {
  position: absolute; right: 0; bottom: 64px;
  width: 360px; height: min(540px, calc(100dvh - 120px));
  display: flex; flex-direction: column;
  background: var(--card); border-radius: 16px;
  box-shadow: var(--surface-shadow), 0 24px 48px -12px rgb(0 0 0 / .18);
  overflow: hidden;
  transform-origin: bottom right;
  animation: chat-in .2s cubic-bezier(.2,0,0,1);
}
.chat__panel[hidden] { display: none; }
@keyframes chat-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }

.chat__head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 16px; border-bottom: 1px solid var(--border); }
.chat__head img { width: 36px; height: 36px; border-radius: 50%; outline: 1px solid #0000001a; outline-offset: -1px; }
.chat__head div { flex: 1; min-width: 0; }
.chat__head h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.015em; }
.chat__head p { font-size: 12px; color: var(--muted-foreground); display: flex; align-items: center; gap: 6px; }
.online { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.chat__x { width: 32px; height: 32px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; display: grid; place-items: center; color: var(--muted-foreground); }
.chat__x:hover { background: var(--muted); color: var(--foreground); }
.chat__x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.chat__log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.msg {
  max-width: 85%; padding: 8px 12px; border-radius: 16px;
  font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere;
  animation: enter .25s cubic-bezier(.2,0,0,1) both;
}
.msg--bot { align-self: flex-start; background: var(--muted); border-bottom-left-radius: 6px; }
.msg--me { align-self: flex-end; background: var(--primary); color: var(--primary-foreground); border-bottom-right-radius: 6px; }
.msg a { text-decoration: underline; text-underline-offset: 3px; }
.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted-foreground); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

.chat__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.chat__chips:empty { display: none; }
.chat__chips button {
  height: 32px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--background); color: var(--foreground);
  font: inherit; font-size: 13px; transition: background .15s;
}
.chat__chips button:hover { background: var(--muted); }

.chat__form { display: flex; align-items: flex-end; gap: 6px; margin: 0 12px 12px; padding: 6px; border-radius: 12px; background: var(--background); box-shadow: var(--surface-shadow); }
.chat__form:focus-within { box-shadow: var(--surface-shadow-hover), 0 0 0 3px color-mix(in oklab, var(--ring) 25%, transparent); }
.chat__form textarea {
  flex: 1; min-width: 0; resize: none; border: 0; outline: 0; background: transparent; color: var(--foreground);
  font: inherit; font-size: 16px; line-height: 1.4; padding: 7px 8px; max-height: 120px;
}
.chat__form textarea::placeholder { color: var(--muted-foreground); }
.chat__form textarea:focus-visible { box-shadow: none; }
.chat__send { flex: none; width: 36px; height: 36px; border: 0; border-radius: 8px; cursor: pointer; display: grid; place-items: center; background: var(--primary); color: var(--primary-foreground); transition: opacity .15s, transform .15s; }
.chat__send:disabled { opacity: .4; cursor: default; }
.chat__send:active:not(:disabled) { transform: scale(.94); }
.chat__send svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }

@media (max-width: 30rem) {
  .chat { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); }
  .chat.is-open .chat__fab { display: none; }
  .chat__panel { position: fixed; inset: auto 0 0 0; width: 100%; height: min(88dvh, 640px); border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom); }
}
@media (prefers-reduced-motion: reduce) { .chat__panel, .msg { animation: none; } }

/* ================= Brand-color social icons ================= */
.socials .ico, .socials .ico-img { width: 16px; height: 16px; }
.footer__icons .ico, .footer__icons .ico-img { width: 16px; height: 16px; }
.ico-img { border-radius: 50%; display: block; }
.socials a .ico path[fill="currentColor"], .footer__icons a .ico path[fill="currentColor"] { fill: var(--foreground); }
.footer__icons a { color: var(--foreground); }

/* ================= Category ribbon on app cards ================= */
.ribbon {
  position: relative; flex: none;
  margin-right: -26px;           /* hang past the card edge (20px padding + 6px) */
  padding: 4px 14px 4px 16px;
  background: var(--foreground); color: var(--background);
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  line-height: 1.3; white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 8px 50%);
}
/* the fold that tucks behind the card */
.app__top { position: relative; }
.app__top::after {
  content: ""; position: absolute; right: -26px; top: calc(50% + 11px);
  border-top: 6px solid color-mix(in oklab, var(--foreground) 60%, var(--background));
  border-right: 6px solid transparent;
}

/* ================= Role tags (price-tag shape) ================= */
.roles span {
  position: relative;
  padding: 3px 10px 3px 18px;
  border-radius: 0;
  background: var(--muted); color: var(--foreground);
  font-size: 12px; font-weight: 500;
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 8px 100%, 0 50%);
}
.roles span::before {
  content: ""; position: absolute; left: 8px; top: 50%;
  width: 4px; height: 4px; margin-top: -2px; border-radius: 50%;
  background: var(--background);
}
.ribbon--new { background: #16a34a; color: #fff; }
.app:has(.ribbon--new) .app__top::after { border-top-color: #0f6b31; }

/* ================= Visitor count ================= */
.visits { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.visits[hidden] { display: none; }
.live { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #22c55e; animation: ping 1.6s cubic-bezier(0,0,.2,1) infinite; }
@keyframes ping { 75%, 100% { transform: scale(2.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .live::after { animation: none; } }

/* dim the page behind the chat sheet on phones */
@media (max-width: 30rem) {
  .chat.is-open::before { content: ""; position: fixed; inset: 0; background: rgb(0 0 0 / .35); animation: fade .2s ease; }
  .chat.is-open .chat__panel { z-index: 1; }
}
@keyframes fade { from { opacity: 0; } }

/* ================= "All projects" link + "Check more projects" card ================= */
.block__head h2 { display: flex; align-items: baseline; gap: 8px; }
.block__head .count { font-weight: 400; letter-spacing: 0; }
.head-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 14px; color: var(--muted-foreground);
  transition: color .15s;
}
.head-link:hover { color: var(--foreground); }
.head-link svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.head-link:hover svg { transform: translate(1px, -1px); }

.more {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 24px;
  margin-top: 16px; padding: 20px;
  transition: box-shadow .15s;
}
.more:hover { box-shadow: var(--surface-shadow-hover); }
.more h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.025em; }
.more p { margin-top: 4px; font-size: 14px; color: var(--muted-foreground); max-width: 60ch; }
.more__cta {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 8px;
  background: var(--primary); color: var(--primary-foreground);
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background .15s;
}
.more:hover .more__cta { background: color-mix(in oklab, var(--primary) 85%, transparent); }
.more__cta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.more:hover .more__cta svg { transform: translateX(2px); }
@media (max-width: 40rem) {
  .more { flex-direction: column; align-items: stretch; }
  .more__cta { justify-content: center; }
}

/* keep the floating chat button from covering footer text */
.footer__inner { padding-right: 88px; }
@media (max-width: 40rem) {
  .footer__inner { padding-right: 20px; padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
}

/* ================= Revenue (from /admin) ================= */
.app__mrr {
  display: flex; align-items: baseline; gap: 2px;
  margin-top: 10px; font-size: 13px; color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}
.app__mrr b { font-size: 15px; font-weight: 600; color: var(--foreground); letter-spacing: -0.01em; }
.app__mrr::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: #22c55e;
  align-self: center; margin-right: 6px;
}
.block__head { position: relative; }
.mrr-total {
  margin-left: auto; margin-right: 16px;
  font-size: 14px; font-weight: 500; color: var(--foreground); font-variant-numeric: tabular-nums;
}
.mrr-total[hidden] { display: none; }
@media (max-width: 40rem) { .mrr-total { order: 3; flex-basis: 100%; margin: 0; } }

/* ================= Revenue summary card ================= */
.stats { padding: 0; margin-bottom: 40px; background: none; border: 0; border-radius: 0; box-shadow: none; }
.stats[hidden] { display: none; }
.stats dl { display: flex; flex-wrap: wrap; margin: 0; }
.stats dl > div { flex: 1 1 0; min-width: 140px; padding: 4px 20px 4px 0; }
.stats dl > div[hidden] { display: none; }
/* divider only between visible figures */
.stats dl > div:not([hidden]) ~ div:not([hidden]) { padding-left: 20px; border-left: 1px solid var(--border); }
.stats dt { font-size: 13px; color: var(--muted-foreground); }
.stats dd {
  margin: 2px 0 0; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums; color: var(--foreground);
}
.stats dd span { font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--muted-foreground); }
.stats__note { margin-top: 10px; font-size: 12px; color: var(--muted-foreground); }
.stats__note:empty { display: none; }
@media (max-width: 40rem) {
  .stats dl { flex-direction: column; gap: 12px; }
  .stats dl > div { padding: 0; }
  .stats dl > div:not([hidden]) ~ div:not([hidden]) { padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--border); }
}

/* live + total visitors on one line */
.visits { flex-wrap: wrap; column-gap: 6px; }
.visits__sep { color: var(--muted-foreground); opacity: .6; }
.visits [hidden] { display: none; }

/* ================= Theme toggle ================= */
.theme-toggle {
  position: absolute; top: 32px; right: 0; z-index: 2;
  width: 36px; height: 36px; border-radius: 999px; border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: var(--card); color: var(--foreground);
  box-shadow: var(--surface-shadow);
  transition: box-shadow .15s, transform .15s;
}
.theme-toggle:hover { box-shadow: var(--surface-shadow-hover); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle svg { width: 18px; height: 18px; grid-area: 1 / 1; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: opacity .2s, transform .3s; }
.theme-toggle .i-sun { opacity: 0; transform: rotate(-90deg) scale(.6); }
.theme-toggle[data-mode="dark"] .i-moon { opacity: 0; transform: rotate(90deg) scale(.6); }
.theme-toggle[data-mode="dark"] .i-sun { opacity: 1; transform: none; }
@media (min-width: 64rem) { .theme-toggle { top: 56px; } }
@media (max-width: 63.99rem) { .profile__head { padding-right: 44px; } }

/* dark-mode touch-ups */
:root[data-theme="dark"] .profile__avatar, :root[data-theme="dark"] .chat__head img { outline-color: #ffffff1f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .profile__avatar { outline-color: #ffffff1f; } }

/* ================= Screenshot preview on hover (mouse devices only) =================
   Touch screens can't hover, so there the screenshot stays inside the card. */
@media (hover: hover) and (pointer: fine) {
  .app { overflow: visible; }
  .app .shot {
    position: absolute; left: -8px; right: -8px; top: calc(100% + 10px);
    z-index: 30; margin: 0; padding: 0;
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateY(-6px) scale(.98); transform-origin: top center;
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
  }
  .app.flip .shot { top: auto; bottom: calc(100% + 10px); transform-origin: bottom center; transform: translateY(6px) scale(.98); }
  .app .shot img {
    border-radius: 12px;
    box-shadow: var(--surface-shadow), 0 24px 48px -12px rgb(0 0 0 / .28);
    transform: none !important;
  }
  .app:has(h3 a:hover) .shot, .app:has(h3 a:focus-visible) .shot {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity .18s ease, transform .18s ease, visibility 0s;
  }
  .app:has(h3 a:hover), .app:has(h3 a:focus-visible) { z-index: 31; position: relative; }
  .grid2 > li { position: relative; }
  .grid2 > li:has(h3 a:hover), .grid2 > li:has(h3 a:focus-visible) { z-index: 31; }
}

/* =====================================================================
   App list v2: open rows instead of boxed cards (no border/radius/bg)
   ===================================================================== */
.grid2 { column-gap: 48px; row-gap: 0; border-bottom: 1px solid var(--border); }
.grid2 > li { border-top: 1px solid var(--border); }
.grid2 .app.card,
.grid2 .app.card:has(a:hover),
.grid2 .app.card:has(:focus-visible) {
  background: none; box-shadow: none; border-radius: 0;
  padding: 22px 0 24px;
}
/* only the name is the link (no full-row overlay) */
.grid2 .app h3 { flex: 0 1 auto; margin-right: auto; }
.grid2 .app h3 a::after { content: none; }
.grid2 .app h3 a { cursor: pointer; }

/* bigger logo, lifts on hover */
.grid2 .app .logo { width: 36px; height: 36px; border-radius: 9px; transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.grid2 .app:has(h3 a:hover) .logo { transform: translateY(-2px) rotate(-4deg); }

/* name: underline grows + arrow slides in */
.grid2 .app h3 { font-size: 17px; }
.grid2 .app h3 a span:first-child {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .3s cubic-bezier(.2,.8,.2,1);
  padding-bottom: 1px;
}
.grid2 .app h3 a:hover span:first-child,
.grid2 .app h3 a:focus-visible span:first-child { background-size: 100% 1px; }
.grid2 .app h3 a::before {
  content: "↗"; order: 2; font-size: 14px; color: var(--muted-foreground);
  opacity: 0; transform: translate(-4px, 4px);
  transition: opacity .2s, transform .25s cubic-bezier(.2,.8,.2,1);
}
.grid2 .app h3 a:hover::before,
.grid2 .app h3 a:focus-visible::before { opacity: 1; transform: none; }

/* category tag: notched label sitting in the row (no fold, no overhang) */
.grid2 .ribbon { margin-right: 0; padding: 3px 10px 3px 14px; font-size: 10.5px; }
.grid2 .app__top::after { display: none; }

/* "Check more projects" as an open row */
.more.card { background: none; box-shadow: none; border-radius: 0; margin-top: 0; padding: 28px 0 4px; }
.more:hover { box-shadow: none; }
.more h3 { font-size: 17px; }

/* =====================================================================
   Motion
   ===================================================================== */
/* scroll reveal (class added by JS, so content is visible without JS) */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity .6s cubic-bezier(.2,.8,.2,1), transform .6s cubic-bezier(.2,.8,.2,1);
  transition-delay: calc(var(--i, 0) * 70ms);
}
/* hover preview grows in from a smaller size */
@media (hover: hover) and (pointer: fine) {
  .grid2 .app .shot { transform: translateY(-8px) scale(.94); }
  .grid2 .app.flip .shot { transform: translateY(8px) scale(.94); }
  .grid2 .app:has(h3 a:hover) .shot, .grid2 .app:has(h3 a:focus-visible) .shot { transform: none; transition-duration: .25s; }
}
/* revenue line pulses once when it appears */
.app__mrr::before { animation: mrr-pop .6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes mrr-pop { 0% { transform: scale(0); } 60% { transform: scale(1.5); } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
  .grid2 .app .logo, .grid2 .app h3 a::before, .grid2 .app h3 a span:first-child { transition: none; }
  .app__mrr::before { animation: none; }
}

/* no double line under the header */
.grid2 > li:first-child { border-top: 0; }
@media (min-width: 40rem) { .grid2 > li:nth-child(2) { border-top: 0; } }

/* Role tags: clearly readable in light and dark */
.roles span {
  background: color-mix(in oklab, var(--foreground) 12%, var(--background));
  color: var(--foreground);
  font-weight: 600;
}
.roles span::before { background: var(--background); }

/* ================= FilRadio "Listen live" ================= */
.listen {
  position: relative; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 12px; height: 32px; padding: 0 14px 0 10px; max-width: 100%;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--primary); color: var(--primary-foreground);
  font: inherit; font-size: 13px; font-weight: 500;
  transition: transform .15s, background .15s;
}
.listen[hidden] { display: none; }
.listen:hover { transform: translateY(-1px); }
.listen:active { transform: scale(.96); }
.listen__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listen__icon { width: 0; height: 0; border-left: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; margin-left: 4px; }
/* playing: animated equaliser bars instead of the play triangle */
.listen.is-playing .listen__icon {
  width: 12px; height: 10px; border: 0; margin-left: 2px;
  background:
    linear-gradient(currentColor, currentColor) 0 100% / 3px 40% no-repeat,
    linear-gradient(currentColor, currentColor) 50% 100% / 3px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 100% 100% / 3px 60% no-repeat;
  animation: eq 0.9s ease-in-out infinite alternate;
}
@keyframes eq {
  0%   { background-size: 3px 40%, 3px 100%, 3px 60%; }
  50%  { background-size: 3px 100%, 3px 50%, 3px 80%; }
  100% { background-size: 3px 60%, 3px 80%, 3px 30%; }
}
@media (prefers-reduced-motion: reduce) { .listen.is-playing .listen__icon { animation: none; } }

/* ================= "ZENDZ" wordmark behind the profile picture ================= */
.cover-word {
  position: absolute; z-index: -1; left: -6px; top: 18px;
  font-size: clamp(5rem, 22vw, 8.5rem); font-weight: 800; line-height: .9; letter-spacing: -0.06em;
  white-space: nowrap; pointer-events: none; user-select: none;
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in oklab, var(--foreground) 16%, transparent);
  background: linear-gradient(180deg, color-mix(in oklab, var(--foreground) 9%, transparent), transparent 85%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-mask-image: linear-gradient(180deg, #000 35%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 35%, transparent 100%);
  animation: cover-in 1s cubic-bezier(.2,.8,.2,1) both .1s;
}
@keyframes cover-in { from { opacity: 0; transform: translateY(10px); letter-spacing: -0.02em; } }
/* sized to stay inside the profile column (17rem / 21rem wide) */
@media (min-width: 64rem) { .cover-word { top: 34px; font-size: 4.6rem; } }
@media (min-width: 80rem) { .cover-word { font-size: 5.7rem; } }
@media (max-width: 63.99rem) { .cover-word { top: 8px; left: auto; right: 40px; font-size: clamp(4rem, 20vw, 6rem); } }
/* keep the avatar crisp above the wordmark */
.profile__avatar { position: relative; background: #fff; }
@media (prefers-reduced-motion: reduce) { .cover-word { animation: none; } }

/* ================= ZENDZ wordmark animation =================
   Each letter carries its own outline + fill so it can move:
   a slow staggered float (wave) and a light band sweeping through. */
.cover-word {
  display: flex;
  -webkit-text-stroke: 0; background: none; color: inherit;
}
.cover-word span {
  display: inline-block;
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in oklab, var(--foreground) 18%, transparent);
  background:
    linear-gradient(105deg,
      transparent 0 38%,
      color-mix(in oklab, var(--foreground) 22%, transparent) 50%,
      transparent 62% 100%) 120% 0 / 300% 100% no-repeat,
    linear-gradient(180deg, color-mix(in oklab, var(--foreground) 9%, transparent), transparent 85%);
  -webkit-background-clip: text; background-clip: text;
  animation:
    zendz-float 6s ease-in-out infinite,
    zendz-shine 7s cubic-bezier(.45,0,.2,1) infinite;
  animation-delay: calc(var(--i) * -0.45s), calc(var(--i) * 0.12s + 1.2s);
}
@keyframes zendz-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
@keyframes zendz-shine {
  0%       { background-position: 120% 0, 0 0; }
  35%, 100% { background-position: -20% 0, 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cover-word span { animation: none; }
}

/* ================= Day/night switch (replaces the sun/moon icon) ================= */
.theme-toggle {
  width: 58px; height: 30px; padding: 0; border-radius: 999px;
  background: transparent; box-shadow: none; display: block;
}
.theme-toggle:hover { box-shadow: none; }
.tt-track {
  position: relative; display: block; width: 100%; height: 100%; border-radius: inherit; overflow: hidden;
  background: linear-gradient(180deg, #e8eef7, #dbe4f0);
  box-shadow: inset 0 0 0 1px #0000000f, inset 0 1px 3px #0000001a;
  transition: background .45s ease;
}
.tt-stars {
  position: absolute; inset: 0; opacity: 0; transform: translateY(6px);
  background:
    radial-gradient(1.2px 1.2px at 10px 9px, #fff 99%, transparent),
    radial-gradient(1px 1px at 18px 20px, #fff 99%, transparent),
    radial-gradient(1.4px 1.4px at 25px 8px, #fff 99%, transparent),
    radial-gradient(1px 1px at 8px 19px, #ffffffb3 99%, transparent),
    radial-gradient(1px 1px at 30px 16px, #ffffffb3 99%, transparent);
  transition: opacity .45s ease, transform .45s ease;
}
.tt-knob {
  position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffd36b, #f59e0b);
  box-shadow: 0 0 0 4px #f59e0b26, 0 0 12px #f59e0b66, 0 1px 2px #0003;
  transition: transform .5s cubic-bezier(.65,-0.2,.25,1.3), background .45s ease, box-shadow .45s ease;
}
/* dark: knob slides right and becomes a crescent moon, stars appear */
.theme-toggle[data-mode="dark"] .tt-track { background: linear-gradient(180deg, #111827, #1e293b); box-shadow: inset 0 0 0 1px #ffffff1a, inset 0 1px 3px #0006; }
.theme-toggle[data-mode="dark"] .tt-stars { opacity: 1; transform: none; animation: tt-twinkle 2.4s ease-in-out infinite; }
.theme-toggle[data-mode="dark"] .tt-knob {
  transform: translateX(28px) rotate(-30deg);
  background: transparent;
  box-shadow: inset -7px -2px 0 0 #e5e7eb, 0 0 10px #e5e7eb33;
}
.theme-toggle:hover .tt-knob { filter: brightness(1.06); }
.theme-toggle:active .tt-knob { width: 26px; }
.theme-toggle[data-mode="dark"]:active .tt-knob { transform: translateX(24px) rotate(-30deg); }
.theme-toggle:focus-visible { box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent); }
@keyframes tt-twinkle { 50% { opacity: .55; } }
@media (max-width: 63.99rem) { .profile__head { padding-right: 66px; } }
@media (prefers-reduced-motion: reduce) {
  .tt-knob, .tt-track, .tt-stars { transition: none; }
  .theme-toggle[data-mode="dark"] .tt-stars { animation: none; }
}

/* ================= Slow fade when switching light/dark ================= */
/* Chrome, Edge, Safari: whole-page cross-fade */
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .9s; animation-timing-function: cubic-bezier(.4,0,.2,1); }
/* the switch animates live on top instead of being cross-faded */
.theme-toggle { view-transition-name: theme-switch; }
::view-transition-old(theme-switch) { display: none; }
::view-transition-new(theme-switch) { animation: none; }
/* Other browsers: ease every colour change */
.theme-anim, .theme-anim *:not(.tt-track):not(.tt-knob):not(.tt-stars),
.theme-anim *::before, .theme-anim *::after {
  transition: background-color .85s ease, color .85s ease, border-color .85s ease,
              box-shadow .85s ease, fill .85s ease, stroke .85s ease, -webkit-text-stroke-color .85s ease !important;
}

/* ================= FilRadio mini player (no box) ================= */
.player {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px; max-width: 100%;
}
.player[hidden] { display: none; }
.player__play {
  flex: none; position: relative; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: var(--primary); color: var(--primary-foreground);
  box-shadow: 0 6px 16px -6px rgb(0 0 0 / .45);
  transition: transform .15s ease;
}
.player__play:hover { transform: scale(1.06); }
.player__play:active { transform: scale(.94); }
.player__play svg { grid-area: 1 / 1; width: 18px; height: 18px; fill: currentColor; transition: opacity .2s, transform .25s cubic-bezier(.2,.8,.2,1); }
.player__play .pp-play { transform: translateX(1px); }
.player__play .pp-pause { opacity: 0; transform: scale(.5); }
.player.is-playing .pp-play { opacity: 0; transform: scale(.5); }
.player.is-playing .pp-pause { opacity: 1; transform: none; }
/* pulsing ring while live */
.player.is-playing .player__play::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid #22c55e; animation: pp-ring 1.8s ease-out infinite;
}
@keyframes pp-ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.5); opacity: 0; } }

.player__meta { min-width: 0; flex: 0 1 auto; display: flex; flex-direction: column; line-height: 1.25; }
.player__title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.player__sub { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__live {
  display: none; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #16a34a;
}
.player__live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #22c55e; animation: tt-twinkle 1.2s ease-in-out infinite; }
.player.is-playing .player__live { display: inline-flex; }

/* waveform: faint and still when idle, dancing when playing */
.player__wave { flex: 1; min-width: 40px; height: 26px; display: flex; align-items: center; gap: 2px; overflow: hidden; }
.player__wave i {
  flex: 1 0 2px; max-width: 3px; height: var(--h); border-radius: 2px;
  background: color-mix(in oklab, var(--foreground) 22%, transparent);
  transform: scaleY(.35); transform-origin: center;
  transition: transform .4s ease, background .4s ease;
}
.player.is-playing .player__wave i {
  background: var(--foreground);
  animation: pp-wave 1s ease-in-out infinite alternate;
  animation-delay: var(--d);
}
@keyframes pp-wave { from { transform: scaleY(.25); } to { transform: scaleY(1); } }

.player__open {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px;
  border: 0; border-radius: 8px; background: transparent; cursor: pointer;
  color: var(--muted-foreground); font: inherit; font-size: 13px; font-weight: 500;
  transition: color .15s, background .15s;
}
.player__open:hover { color: var(--foreground); background: var(--muted); }
.player__open svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 30rem) {
  .player__open span { display: none; }
  .player__title { max-width: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  .player.is-playing .player__wave i, .player.is-playing .player__play::after, .player__live::before { animation: none; }
  .player.is-playing .player__wave i { transform: scaleY(.7); }
}
