:root {
  --sidebar-w: 582px;
  --content-gap: 101px; /* gap between sidebar edge and content column */
  --content-w: 950px;
  --gray-bg: #efefef;
  --pill-bg: #d2d2d2;
  --ink: #111111;
  --muted: rgba(0, 0, 0, 0.8);
  --font: 'Plus Jakarta Sans', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: var(--font);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* ---------- Sidebar (fixed, gray) ---------- */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--gray-bg);
  border-radius: 0 24px 24px 0;
  overflow: hidden;
  z-index: 20;
  will-change: width;
  animation: collapseSidebar 0.95s cubic-bezier(0.65, 0, 0.35, 1) 1.5s both;
}

.mobile-splash-filler {
  display: none;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: 445px;
  margin: 0 auto;
  padding: 40px 24px;
  text-align: center;
  overflow-y: auto;
}

.reveal {
  opacity: 0;
  will-change: opacity, transform;
}

.reveal-badge { animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both; }
.reveal-headline { animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both; }
.reveal-tags { animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.85s both; }

.reveal-secondary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  margin-top: 48px;
  /* starts once the sidebar collapse (delay 1.5s + duration 0.95s) is fully settled */
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 2.45s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes collapseSidebar {
  from { width: 100vw; border-radius: 0; }
  to { width: var(--sidebar-w); border-radius: 0 24px 24px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar { animation: none; width: var(--sidebar-w); }
  .reveal, .reveal-secondary { animation: none; opacity: 1; transform: none; }
}

.badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  max-width: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.22));
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.14),
    0 2px 6px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 32px;
  padding: 12px 24px 12px 12px;
}

.avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.badge-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
}

.status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #34c75a;
  opacity: 0.95;
  display: inline-block;
  flex-shrink: 0;
}

.name {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  white-space: nowrap;
}

.headline {
  font-family: var(--font);
  font-weight: 600;
  font-size: 26px;
  line-height: 34px;
  text-align: center;
  margin: 56px 0 0;
}

.tags {
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  color: var(--muted);
  text-align: center;
  margin: 24px 0 0;
}

.stats {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 20px;
  margin: 0;
  white-space: nowrap;
}

.stat {
  font-family: var(--font);
  font-size: 22px;
  font-weight: 600;
  line-height: 28px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.stat-num {
  display: inline-block;
  min-width: 1ch;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
  margin: 0;
}

.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  background: var(--pill-bg);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  box-shadow: 0 2.82px 5.64px rgba(0, 0, 0, 0.25);
  transition: box-shadow 0.3s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-content {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Diagonal, textured color sweep that pushes the flat gray out on hover */
.btn-sweep {
  position: absolute;
  inset: -50% -25%;
  z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      115deg,
      rgba(255, 255, 255, 0.22) 0px,
      rgba(255, 255, 255, 0.22) 2px,
      transparent 2px,
      transparent 9px
    ),
    linear-gradient(115deg, #ffa8d8 0%, #8b93ff 45%, #6fe3c4 100%);
  background-blend-mode: overlay;
  transform: translate3d(-135%, 0, 0) skewX(-14deg);
  transition: transform 0.55s cubic-bezier(0.65, 0, 0.35, 1);
}

.btn:hover .btn-sweep {
  transform: translate3d(0, 0, 0) skewX(-14deg);
}

.btn:hover {
  color: #12121a;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(139, 147, 255, 0.35), 0 2.82px 5.64px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
  .btn-sweep { transition: none; }
}

.icon {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ---------- Content (scrollable, right side) ---------- */

.content {
  margin-left: calc(var(--sidebar-w) + var(--content-gap));
  max-width: var(--content-w);
  min-height: 100vh;
  padding: 104px 0 104px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.project {
  border-radius: 48px;
  background: rgba(0, 0, 0, 0.02);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
}

.project-media img {
  display: block;
  width: 100%;
  height: auto;
}

.project-arcade {
  padding: 40px 54px;
}

.project-arcade .project-media {
  width: 100%;
}

.project-arcade .project-media img {
  border-radius: 20px;
  filter: drop-shadow(0 -8px 4px rgba(0, 0, 0, 0.25)) drop-shadow(0 8px 4px rgba(0, 0, 0, 0.25));
}

.project-kidagogy {
  padding: 75px 83px;
}

.phone-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 32px;
  width: 100%;
  /* Each image takes a share of the row proportional to its aspect ratio, so a
     row of mixed shapes (portrait + landscape) lands on one shared height. The
     max-width caps that height at 520px, the height a 240px-wide phone shot had. */
  max-width: calc(var(--ar-sum, 1.4) * 520px + (var(--n, 3) - 1) * 32px);
  margin-inline: auto;
}

.phone {
  flex: var(--ar, 1) 1 0;
  min-width: 0;
  width: auto;
  height: auto;
  border: 2px solid #ffffff;
  border-radius: 30px;
  filter: drop-shadow(0 8px 4px rgba(0, 0, 0, 0.25));
}

.phone-center {
  border-width: 3px;
}

/* ---------- CMS-added projects (generic, consistent template) ---------- */

.project-generic {
  padding: 48px;
}

.project-generic .project-media img {
  border-radius: 20px;
  filter: drop-shadow(0 -8px 4px rgba(0, 0, 0, 0.25)) drop-shadow(0 8px 4px rgba(0, 0, 0, 0.25));
}

.project-generic-phones {
  padding: 75px 60px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1400px) {
  :root {
    --sidebar-w: 420px;
    --content-gap: 48px;
  }

  .content {
    max-width: calc(100% - var(--sidebar-w) - var(--content-gap) - 48px);
  }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 100%; }

  @keyframes collapseSidebar {
    from { width: 100%; border-radius: 0; }
    to { width: 100%; border-radius: 0; }
  }

  /* The sidebar always stays in normal flow at its natural height on
     mobile, so .content is never mis-positioned and nothing can "jump"
     when the intro finishes. The full-screen-cover illusion instead comes
     from .mobile-splash-filler, a sibling block right below the sidebar
     that starts tall enough to fill the rest of the viewport and animates
     down to 0 — the content behind it appears pushed up from the bottom
     as it shrinks, since it's real document flow, not a repositioned
     overlay. See the inline <script>. */
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-radius: 0;
    animation: none;
  }

  .sidebar-inner {
    height: auto;
    padding: 32px 24px;
  }

  .mobile-splash-filler {
    display: block;
    width: 100%;
    height: 0;
    background: var(--gray-bg);
    overflow: hidden;
  }
}

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .mobile-splash-filler {
    display: none;
  }
}

@media (max-width: 900px) {

  /* Heavy blur is expensive on mobile GPUs and can cause scroll jank.
     Sizes are also trimmed so the name badge always fits on one line. */
  .badge {
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    gap: 10px;
    padding: 8px 16px 8px 8px;
  }

  .avatar {
    width: 38px;
    height: 38px;
  }

  .status {
    font-size: 11px;
    gap: 5px;
  }

  .name {
    font-size: 14px;
  }

  .headline {
    font-size: 24px;
    line-height: 32px;
    margin-top: 40px;
  }

  .tags {
    margin-top: 22px;
  }

  .reveal-secondary {
    margin-top: 40px;
    gap: 28px;
    width: 100%;
  }

  .stats {
    gap: 16px;
  }

  .stat {
    font-size: 20px;
    line-height: 26px;
  }

  /* Stacked CTAs, each sized to fit its own content (not stretched) */
  .actions {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .btn {
    width: auto;
    height: auto;
    padding: 13px 20px;
    font-size: 15px;
  }

  /* Content flows edge-to-edge with generous vertical breathing room */
  .content {
    margin-left: 0;
    max-width: 100%;
    padding: 48px 10px;
    gap: 36px;
  }

  .project {
    border-radius: 22px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  .project-arcade,
  .project-generic {
    padding: 14px;
  }

  .project-arcade .project-media img,
  .project-generic .project-media img {
    border-radius: 14px;
  }

  .project-kidagogy,
  .project-generic-phones {
    padding: 28px 14px;
  }

  .phone-row {
    gap: 10px;
    max-width: calc(var(--ar-sum, 1.4) * 208px + (var(--n, 3) - 1) * 10px);
  }

  .phone {
    border-radius: 20px;
  }
}

@media (max-width: 380px) {
  .badge {
    padding: 7px 14px 7px 7px;
    gap: 8px;
  }

  .avatar {
    width: 34px;
    height: 34px;
  }

  .status {
    font-size: 10px;
  }

  .name {
    font-size: 12px;
  }

  .headline {
    font-size: 21px;
    line-height: 28px;
  }

  .stats {
    gap: 12px;
  }

  .stat {
    font-size: 18px;
  }

  .phone-row {
    gap: 8px;
  }

  .phone {
    max-width: 82px;
  }
}
