:root {
  --page: #f6f6f6;
  --text: #3b3b3b;
  --muted: #9e9e9e;
  --chip: rgba(158, 158, 158, 0.2);
  --card: #ffffff;
  --blue-a: #6db3ff;
  --blue-b: #3b9aff;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  background-color: var(--page);
  background-image: radial-gradient(circle at 1px 1px, rgba(59, 59, 59, 0.08) 1px, transparent 0);
  background-size: 16px 16px;
  background-attachment: fixed;
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0;
}

a,
a:link,
a:visited,
a:hover,
a:active {
  color: inherit !important;
  text-decoration: none !important;
  -webkit-tap-highlight-color: transparent;
  outline-color: #3b9aff;
}

a:focus {
  outline: none;
}

a:focus-visible {
  outline: 2px solid rgba(59, 154, 255, 0.55);
  outline-offset: 4px;
  border-radius: 6px;
}

img {
  display: block;
  max-width: 100%;
}

.page-shell {
  display: grid;
  grid-template-columns: 316px minmax(0, 1000px);
  gap: 22px;
  align-items: start;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px;
}

.sidebar {
  position: sticky;
  top: 32px;
  max-height: calc(100vh - 64px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
}

.profile {
  min-height: 388px;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.profile__head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.profile__avatar {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border-radius: 9px;
  object-fit: cover;
  transition: transform 180ms ease;
}

.profile__avatar:hover {
  transform: scale(1.04);
}

.profile h1,
.profile p {
  margin: 0;
}

.profile h1 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.12;
  color: var(--text);
}

.profile__head p {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.12;
}

.profile__copy {
  display: flex;
  flex-direction: column;
  gap: 0;
  color: #444;
  font-size: 18px;
  font-weight: 500;
  line-height: 22px;
}

.profile > .chips {
  gap: 6px;
  justify-content: flex-start;
  align-items: stretch;
  margin-top: auto;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 10px;
  background: #e4e4e4;
  color: #6a6a6a;
  font-size: 15px;
  line-height: 20px;
  white-space: nowrap;
}

.profile .chips span {
  padding: 4px 8px;
  border-radius: 12px;
  color: #5e5e5e;
  font-weight: 500;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  line-height: 22px;
}

.nav-links a {
  width: fit-content;
}

.nav-links--plain {
  gap: 16px;
}

.nav-links--plain a {
  width: fit-content;
  padding: 0;
  border-radius: 10px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0;
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), color 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-links--plain a::before {
  content: "✱";
  position: static;
  display: inline-flex;
  justify-content: center;
  width: 0;
  height: 16px;
  margin-right: 0;
  overflow: hidden;
  color: #3b9aff;
  font-size: 16px;
  line-height: 16px;
  opacity: 0;
  transform: scale(0.72) rotate(-18deg);
  transition: width 300ms cubic-bezier(0.2, 0.8, 0.2, 1), margin-right 300ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 220ms ease, transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav-links--plain a:hover {
  color: #2d86e8;
}

.nav-links--plain a.is-active::before {
  align-items: center;
  justify-content: center;
  width: 16px;
  margin-right: 8px;
  opacity: 1;
  transform: scale(1) rotate(0);
}

.nav-links a,
.download,
.project-title {
  position: relative;
  transition: transform 120ms ease, color 160ms ease, background-color 160ms ease;
}

.nav-links a::after {
  content: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: #3b9aff;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-links a:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-links:not(.nav-links--plain) a:hover {
  color: #2d86e8 !important;
}

.nav-links--plain a::after {
  display: none;
}

.nav-links--plain a.is-active {
  transform: translateX(8px);
  color: var(--text) !important;
}

.nav-links a:active,
.download:active,
.project-title:active {
  transform: scale(0.98);
}

.download {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 20px;
  line-height: 22px;
}

.download svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-title svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 64px;
  width: min(100%, 1000px);
}

.project {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-height: 590px;
}

.hero-grid--atlas {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 295px 295px;
}

.project-media-slot,
.showcase {
  position: relative;
  overflow: hidden;
  min-height: 0;
  border-radius: var(--radius);
}

.project-media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  height: 590px;
}

.project-media-link {
  color: inherit;
  text-decoration: none;
}

.project-media-stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  min-height: 0;
}

.project-media-slot--cover {
  grid-column: 1 / -1;
}

.project-mobile-cover {
  display: none;
}

.project-media-slot {
  background: #d7d7d7;
  --media-base-x: 0px;
  --media-base-y: 0px;
}

.project-media-slot--flowy {
  background: linear-gradient(127deg, var(--blue-a) 18%, var(--blue-b) 94%);
}

.project-media-slot--flowy-main {
  --media-base-x: 2px;
  --media-base-y: 1px;
}

.project-media-slot--flowy-cover {
  --media-base-x: 0px;
  --media-base-y: 0px;
}

.flowy-cover-mockup {
  position: absolute;
  pointer-events: none;
}

.flowy-cover-mockup--main {
  left: 14%;
  top: 10%;
  width: 39%;
  --flowy-hover-y: -16px;
}

.flowy-cover-mockup--secondary {
  right: 14%;
  top: -35%;
  width: 39%;
  --flowy-hover-y: 16px;
}

.flowy-cover-mockup img {
  width: 100%;
  height: auto;
  min-height: 0;
  object-fit: contain;
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.flowy-cover-mockup.is-hovered img {
  transform: translate3d(0, var(--flowy-hover-y), 0);
}

.project-media-slot--atlas {
  background: #d7d7d7;
}

.project-media-slot--atlas-cover {
  --media-base-x: 0px;
  --media-base-y: 0px;
}

.atlas-cover-mockup {
  position: absolute;
  pointer-events: none;
}

.atlas-cover-mockup--main {
  left: 13%;
  top: 10%;
  width: 40%;
  --atlas-hover-y: -16px;
}

.atlas-cover-mockup--secondary {
  right: 13%;
  top: -35%;
  width: 40%;
  --atlas-hover-y: 16px;
}

.atlas-cover-mockup img {
  width: 100%;
  height: auto;
  min-height: 0;
  object-fit: contain;
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.atlas-cover-mockup.is-hovered img {
  transform: translate3d(0, var(--atlas-hover-y), 0);
}

.project-media-slot--atlas-review {
  display: grid;
  place-items: center;
}

.project-media-slot img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: contain;
  object-position: center center;
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.project-media-slot--atlas-review img {
  width: 72.5%;
  max-width: 358px;
  height: auto;
  min-height: 0;
  max-height: 68%;
}

.project-media-slot {
  transition: filter 180ms ease, box-shadow 180ms ease;
}

.project-media-grid:not(.is-hovered) .project-media-slot img {
  transform: translate3d(var(--media-base-x), var(--media-base-y), 0);
}

.flowly-hover-zone,
.atlas-hover-zone {
  cursor: none;
}

.custom-cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  width: 118px;
  height: 118px;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-160px, -160px, 0) scale(0.86);
  transition: opacity 120ms ease;
  filter: drop-shadow(0 18px 28px rgba(34, 79, 140, 0.22));
  will-change: transform, opacity;
}

.custom-cursor.is-visible {
  opacity: 1;
}

.custom-cursor img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.atlas-cursor {
  width: 86px;
  height: 86px;
}

.project-media-slot--main {
  min-height: 0;
}

.project-media-slot--small {
  min-height: 0;
}

.blue {
  background: linear-gradient(127deg, var(--blue-a) 18%, var(--blue-b) 94%);
}

.gray {
  background: #d7d7d7;
}

.showcase-stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
}

.phone {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 262px;
  aspect-ratio: 262 / 539;
  padding: 14px 12px;
  transform: translate(-50%, -50%);
  border: 4px solid #232323;
  border-radius: 40px;
  background: #111;
  box-shadow: 0 2px 13px rgba(0, 0, 0, 0.16), 5px 8px 24px rgba(75, 81, 93, 0.2);
}

.phone::before {
  content: "";
  position: absolute;
  inset: -2px;
  border: 2px solid #9b9b94;
  border-radius: 42px;
  pointer-events: none;
}

.phone__notch {
  position: absolute;
  left: 50%;
  top: 18px;
  z-index: 2;
  width: 64px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #0a0a0a;
}

.phone img {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  object-fit: cover;
}

.phone--large {
  width: clamp(210px, 26vw, 262px);
}

.phone--cropped {
  top: calc(50% + 164px);
}

.phone--dark {
  top: calc(50% + 24px);
}

.savings-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.savings-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(147deg, rgba(109, 179, 255, 0.65), rgba(3, 125, 254, 0.38));
}

.goal-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 8px;
  width: min(350px, calc(100% - 48px));
  padding: 12px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(25, 32, 48, 0.04);
}

.goal-card + .goal-card {
  margin-top: 0;
}

.goal-card__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #f6f6f6;
  font-size: 28px;
}

.goal-card strong {
  display: block;
  margin-bottom: 8px;
  color: #000;
  font-size: 17px;
  line-height: 22px;
}

.progress {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e2e2;
}

.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6db3ff, #037dfe);
}

.goal-card small {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: rgba(0, 0, 0, 0.4);
  font-size: 14px;
  line-height: 20px;
}

.goal-card b {
  font-weight: 500;
}

.review-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.review {
  width: min(330px, 100%);
  padding: 16px;
  border-radius: 12px;
  background: #222;
  color: #f6f6f6;
}

.review__top {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.review__top img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.review__top strong {
  display: block;
  font-size: 14px;
}

.review__top span {
  color: #9e9e9e;
  font-size: 12px;
}

.review__top b {
  color: #baff5a;
  font-size: 14px;
}

.review h2 {
  margin: 0 0 6px;
  color: #ceff45;
  font-size: 17px;
  line-height: 1.2;
}

.review p {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.portrait-card {
  display: flex;
  align-items: end;
  justify-content: center;
}

.portrait-card img {
  width: 76%;
  height: 92%;
  object-fit: cover;
  object-position: center 28%;
  border-radius: 10px;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.project-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 28px;
}

.project-title span:last-child {
  color: #8a8a8a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chips--small {
  flex-wrap: nowrap;
  gap: 8px;
}

.chips--small span {
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 12px;
  color: #5e5e5e !important;
  font-weight: 500;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 8px;
  scroll-margin-top: 32px;
}

.case-card {
  margin: 0;
  position: relative;
  overflow: hidden;
  min-height: 531px;
  border-radius: var(--radius);
  background: #ddd;
}

.case-card--tall {
  min-height: 531px;
}

.case-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-chip {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  max-width: calc(100% - 28px);
  padding: 4px 10px;
  border-radius: 10px;
  background: rgba(228, 228, 228, 0.92);
  color: #444444;
  font-size: 15px;
  line-height: 20px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.case-card:hover .case-chip {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .page-shell {
    grid-template-columns: 280px minmax(0, 1fr);
    padding: 20px;
  }

  .profile__head p,
  .profile h1 {
    font-size: 18px;
  }

  .hero-grid,
  .hero-grid--atlas {
    min-height: 520px;
  }

  .project-media-grid {
    height: 520px;
  }
}

@media (max-width: 900px) {
  .page-shell {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 760px;
  }

  .sidebar {
    position: static;
    width: 100%;
    max-height: none;
    overflow: visible;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content {
    width: 100%;
  }

  .profile {
    grid-column: 1 / -1;
    min-height: 0;
    gap: 28px;
  }

  .profile__head {
    margin-bottom: 0;
  }

  .download {
    align-items: center;
  }
}

@media (max-width: 680px) {
  body {
    background-attachment: scroll;
    font-size: 16px;
  }

  .page-shell {
    gap: 12px;
    padding: 10px;
  }

  .sidebar {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .card {
    border-radius: 10px;
  }

  .profile {
    gap: 18px;
    padding: 16px;
  }

  .profile__head p,
  .profile h1 {
    font-size: 17px;
  }

  .profile__avatar {
    transition: none;
  }

  .profile__avatar:hover {
    transform: none;
  }

  .profile__copy {
    font-size: 16px;
    line-height: 20px;
  }

  .profile > .chips {
    margin-top: 0;
  }

  .chips {
    gap: 6px;
  }

  .chips span {
    min-height: 26px;
    padding: 3px 8px;
    font-size: 14px;
    line-height: 20px;
  }

  .nav-links {
    gap: 12px;
    padding: 16px;
    font-size: 16px;
    line-height: 22px;
  }

  .nav-links--plain a.is-active {
    transform: none;
  }

  .nav-links--plain a.is-active::before {
    width: 0;
    margin-right: 0;
    opacity: 0;
  }

  .download {
    padding: 16px;
    font-size: 16px;
  }

  .content {
    gap: 36px;
  }

  .hero-grid,
  .hero-grid--atlas {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    min-height: 0;
  }

  .project-media-grid {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .project-media-stack {
    grid-template-rows: auto;
  }

  .project-media-slot--main,
  .project-media-slot--small {
    min-height: auto;
    aspect-ratio: 494 / 291;
  }

  .project-media-slot--main {
    aspect-ratio: 494 / 590;
  }

  .project-media-slot--cover {
    min-height: auto;
    aspect-ratio: 996 / 589;
    border-radius: 10px;
  }

  .project-mobile-cover {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .flowy-cover-mockup,
  .atlas-cover-mockup {
    display: none;
  }

  .flowly-hover-zone,
  .atlas-hover-zone {
    cursor: auto;
  }

  .custom-cursor {
    display: none;
  }

  .project-media-slot img,
  .project-media-grid:hover .project-media-slot img {
    transform: none;
    transition: none;
  }

  .showcase,
  .showcase-stack {
    min-height: 360px;
  }

  .showcase-stack {
    grid-template-rows: 1fr 1fr;
  }

  .phone--large {
    width: 220px;
  }

  .phone--cropped {
    top: calc(50% + 110px);
  }

  .goal-card {
    width: calc(100% - 28px);
    grid-template-columns: 48px 1fr;
  }

  .goal-card__icon {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }

  .goal-card small {
    flex-direction: column;
    gap: 0;
  }

  .project-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .project-title {
    display: block;
    font-size: 16px;
    line-height: 24px;
  }

  .project-title svg {
    display: none;
  }

  .project-title span {
    display: inline;
  }

  .project-title span:last-child {
    white-space: normal;
  }

  .chips--small {
    flex-wrap: wrap;
    gap: 6px;
  }

  .case-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .case-card,
  .case-card--tall {
    min-height: auto;
    aspect-ratio: 494 / 531;
  }

  .case-card--tall {
    aspect-ratio: 494 / 531;
  }

  .case-chip {
    display: none;
  }

}
