:root {
  --bg-0: #0f0f23;
  --bg-1: #1a1a3e;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.7);
  --dim: rgba(255, 255, 255, 0.6);
  --accent-1: #7c86ff;
  --accent-2: #c27aff;
  --accent-3: #fb64b6;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  min-height: 100%;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: linear-gradient(103deg, #0f0f23 0%, #1a1a3e 50%, #0f0f23 100%);
}

.container {
  width: min(1240px, calc(100% - 64px));
  margin: 0 auto;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(15, 15, 35, 0.82);
  border-bottom: 0.8px solid rgba(255, 255, 255, 0.1);
}

.nav-inner {
  height: 68px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  margin: 0;
  font-size: 14px;
  letter-spacing: 1.4px;
  font-weight: 300;
}

.nav-links {
  display: flex;
  gap: 48px;
}

.nav-links a {
  display: inline-block;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.35px;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.6);
}

.nav-links .active {
  color: var(--accent-1);
}

.projects-page {
  position: relative;
  overflow: hidden;
  padding: 128px 0 96px;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.ambient-a {
  width: 500px;
  height: 500px;
  left: 35%;
  top: 0;
  background: rgba(97, 95, 255, 0.2);
  filter: blur(120px);
}

.ambient-b {
  width: 600px;
  height: 600px;
  left: 28%;
  top: -114px;
  background: rgba(173, 70, 255, 0.2);
  filter: blur(120px);
}

.ambient-c {
  width: 400px;
  height: 400px;
  left: 38%;
  top: 365px;
  background: rgba(246, 51, 154, 0.1);
  filter: blur(100px);
}

.intro,
.purpose-card,
.project-list {
  position: relative;
  z-index: 1;
}

.intro {
  text-align: center;
}

.intro h1 {
  margin: 0;
  display: inline-block;
  padding-bottom: 0.12em;
  font-size: clamp(50px, 9vw, 72px);
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -1.8px;
  background: linear-gradient(90deg, #7c86ff 0%, #c27aff 50%, #fb64b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.intro p {
  margin: 21px auto 0;
  max-width: 875px;
  font-size: 20px;
  line-height: 32px;
  color: rgba(255, 255, 255, 0.6);
}

.purpose-card {
  margin-top: 80px;
  border-radius: 24px;
  overflow: hidden;
}

.purpose-glow {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: linear-gradient(164deg, rgba(97, 95, 255, 0.2), rgba(173, 70, 255, 0.1), rgba(246, 51, 154, 0.2));
  filter: blur(24px);
}

.purpose-inner {
  position: relative;
  min-height: 319px;
  border: 0.8px solid rgba(124, 134, 255, 0.3);
  border-radius: 24px;
  padding: 48px;
  background: linear-gradient(164deg, rgba(97, 95, 255, 0.1), rgba(173, 70, 255, 0.1));
}

.purpose-inner h2 {
  margin: 0;
  font-size: 36px;
  font-weight: 300;
}

.purpose-inner h2 span {
  background: linear-gradient(90deg, #7c86ff 0%, #c27aff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.purpose-inner p {
  margin: 20px 0 0;
  font-size: 18px;
  line-height: 29px;
  color: var(--muted);
}

.pill-row {
  margin-top: 32px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8.8px 16.8px;
  border-radius: 999px;
  border: 0.8px solid rgba(124, 134, 255, 0.2);
  background: rgba(97, 95, 255, 0.1);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(90deg, #7c86ff, #c27aff);
}

.pill-pink {
  border-color: rgba(194, 122, 255, 0.2);
  background: rgba(173, 70, 255, 0.1);
}

.pill-pink::before {
  background: linear-gradient(90deg, #c27aff, #fb64b6);
}

.pill-rose {
  border-color: rgba(251, 100, 182, 0.2);
  background: rgba(246, 51, 154, 0.1);
}

.pill-rose::before {
  background: linear-gradient(90deg, #fb64b6, #7c86ff);
}

.project-list {
  padding-top: 96px;
  display: grid;
  gap: 92px;
}

.project-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.project-row.reverse .project-image-card {
  order: 2;
}

.project-row.reverse .project-copy {
  order: 1;
}

.project-image-card {
  position: relative;
  height: 552px;
  border-radius: 24px;
  overflow: hidden;
  border: 0.8px solid rgba(124, 134, 255, 0.2);
  background: linear-gradient(134deg, rgba(97, 95, 255, 0.1), rgba(173, 70, 255, 0.05), rgba(246, 51, 154, 0.1));
  padding: 24.8px;
}

.project-image-card::before {
  content: "";
  position: absolute;
  inset: 24.8px;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(97, 95, 255, 0.1);
  pointer-events: none;
}

.mockup-stage {
  position: absolute;
  inset: 24.8px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mockup-stage > img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

/* Phone mockups (02 & 04) */
.project-image-card.phone .mockup-stage {
  z-index: 1;
  isolation: isolate;
}

.project-image-card.phone::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(220px, 42%);
  height: min(420px, 72%);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(97, 95, 255, 0.28) 0%,
    rgba(173, 70, 255, 0.1) 50%,
    transparent 68%
  );
  pointer-events: none;
  z-index: 0;
}

.phone-mockup {
  position: relative;
  z-index: 2;
  display: block;
  width: auto;
  height: auto;
  max-width: min(240px, 48%);
  max-height: min(439px, 78%);
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
  background: transparent;
}

.num {
  position: absolute;
  left: 32px;
  top: 32px;
  z-index: 2;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 0.8px solid rgba(124, 134, 255, 0.4);
  background: linear-gradient(135deg, rgba(97, 95, 255, 0.3), rgba(173, 70, 255, 0.3));
  box-shadow: 0 10px 15px rgba(97, 95, 255, 0.2), 0 4px 6px rgba(97, 95, 255, 0.2);
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  color: #b6b2ff;
}

.project-copy {
  display: flex;
  flex-direction: column;
}

.project-type {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8.8px 16.8px;
  border-radius: 999px;
  border: 0.8px solid rgba(124, 134, 255, 0.3);
  background: linear-gradient(90deg, rgba(97, 95, 255, 0.2), rgba(173, 70, 255, 0.2));
  color: #a3b3ff;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
}

.project-type::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7c86ff;
  opacity: 0.5;
}

.project-copy h3 {
  margin: 14px 0 0;
  font-size: clamp(34px, 5vw, 44px);
  line-height: 1.08;
  letter-spacing: -1.2px;
  font-weight: 300;
  background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.project-copy p {
  margin: 24px 0 0;
  font-size: 18px;
  line-height: 29px;
  color: var(--muted);
}

.tags {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags span {
  padding: 8px 16px;
  border-radius: 999px;
  border: 0.8px solid rgba(124, 134, 255, 0.2);
  background: rgba(97, 95, 255, 0.1);
  color: rgba(163, 179, 255, 0.8);
  font-size: 14px;
}

.case-btn {
  margin-top: 24px;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13.6px 25.6px;
  border: 1.6px solid rgba(124, 134, 255, 0.3);
  border-radius: 999px;
  color: #a3b3ff;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
}

.case-btn img {
  width: 16px;
  height: 16px;
}

.footer {
  position: relative;
  z-index: 1;
  border-top: 0.8px solid rgba(255, 255, 255, 0.05);
  padding: 64px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

.footer-branding {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
}

.footer-brand {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0.6px;
  font-weight: 300;
  text-align: center;
  background: linear-gradient(90deg, #7c86ff, #c27aff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer-sub {
  margin: 8px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
}

.footer-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-row > a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
}

.socials {
  display: flex;
  gap: 16px;
  opacity: 0.6;
}

.socials a {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0.8px solid rgba(124, 134, 255, 0.2);
  display: grid;
  place-items: center;
}

.socials img {
  width: 24px;
  height: 24px;
}

@media (max-width: 1140px) {
  .project-row,
  .project-row.reverse {
    grid-template-columns: 1fr;
  }

  .project-row.reverse .project-image-card,
  .project-row.reverse .project-copy {
    order: unset;
  }

  .project-image-card {
    max-width: 620px;
    width: 100%;
    justify-self: center;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(1240px, calc(100% - 32px));
  }

  .nav-links {
    gap: 20px;
  }

  .purpose-inner {
    padding: 32px 20px;
  }

  .project-image-card {
    height: 420px;
  }

  .mockup-stage {
    inset: 20px;
  }

  .phone-mockup {
    max-width: min(200px, 56%);
    max-height: min(340px, 72%);
  }


  .project-copy h3 {
    font-size: 34px;
  }

  .project-copy p {
    font-size: 16px;
    line-height: 1.55;
  }

  .footer-row {
    flex-direction: column;
    gap: 20px;
  }
}
