/**
 * Skills / Capabilities — pastel capability cards
 */

.skills {
  background: #faf9f6;
}

.skills-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 768px) {
  .skills-head {
    grid-template-columns: minmax(0, 1fr) 14rem;
    gap: 2rem 2.5rem;
  }
}

.skills-head > div:first-child {
  min-width: 0;
  max-width: 38rem;
}

.skills-note {
  font-family: "Caveat", "Segoe Script", cursive;
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  font-weight: 600;
  line-height: 1.15;
  color: #3a434c;
  max-width: 13.5rem;
  text-align: left;
  transform: rotate(-4deg);
}

@media (min-width: 768px) {
  .skills-note {
    justify-self: end;
    text-align: right;
    margin-top: 1.75rem;
  }
}

.skills-note::after {
  content: "";
  display: block;
  width: 7.5rem;
  height: 10px;
  margin-top: 0.35rem;
  margin-left: auto;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 14' fill='none'%3E%3Cpath d='M3 9c22-5 48 3 70-2 18-4 42-3 64 2' stroke='%2320B99A' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M118 2l4 4M126 1l2 5M132 3l1 4' stroke='%2320B99A' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E")
    right center / contain no-repeat;
}

.skills-grid {
  margin-top: var(--block-gap);
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .skills-grid {
    margin-top: var(--block-gap-md);
  }
}

@media (min-width: 720px) {
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
  }
}

@media (min-width: 1100px) {
  .skills-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.skill-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 42%);
  gap: 0.5rem;
  min-height: 248px;
  border-radius: 1.65rem;
  padding: 1.35rem 1.15rem 1.25rem 1.35rem;
  overflow: hidden;
  isolation: isolate;
  border: 1.5px solid transparent;
  transition:
    transform 0.35s var(--ease-out),
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

/* Glass sheen over the pastel fill only — art stays sharp above it */
.skill-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(
      155deg,
      rgba(255, 255, 255, 0.62) 0%,
      rgba(255, 255, 255, 0.22) 45%,
      rgba(255, 255, 255, 0.08) 100%
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 0 -1px 0 rgba(255, 255, 255, 0.14),
    inset 1px 0 0 rgba(255, 255, 255, 0.35),
    inset -1px 0 0 rgba(255, 255, 255, 0.16);
  transition: opacity 0.35s var(--ease-out);
}

.skill-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    120% 80% at 10% 0%,
    rgba(255, 255, 255, 0.6) 0%,
    rgba(255, 255, 255, 0) 55%
  );
  mix-blend-mode: soft-light;
  transition: opacity 0.35s var(--ease-out);
}

.skill-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 0 1px rgba(16, 24, 32, 0.08),
    0 24px 44px -26px rgba(16, 24, 32, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.skill-card:hover::before,
.skill-card:hover::after {
  opacity: 1;
}

.skill-card--flutter {
  background: #e7f5ef;
}

.skill-card--ios {
  background: #f7ebe3;
}

.skill-card--pay {
  background: #ebe8f6;
}

.skill-card--chat {
  background: #f8e8ee;
}

.skill-card--maps {
  background: #e5f0f8;
}

.skill-card--ai {
  background: #e8f4ee;
}

.skill-card__body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-right: 0.25rem;
  transform: scale(1);
  transform-origin: left top;
  transition: transform 0.35s var(--ease-out);
}

.skill-card:hover .skill-card__body {
  transform: scale(1.045);
}

.skill-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 8px 18px -14px rgba(16, 24, 32, 0.35);
}

.skill-card__icon svg {
  width: 1.55rem;
  height: 1.55rem;
  display: block;
  flex-shrink: 0;
}

.skill-card__icon--flutter svg {
  width: 1.35rem;
  height: 1.35rem;
  /* Optical center — Flutter mark is diagonal-heavy */
  transform: translate(0.5px, -0.5px);
}

.skill-card__title {
  margin-top: 1rem;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--ink);
}

.skill-card__text {
  margin-top: 0.55rem;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--mute);
  max-width: 20rem;
}

.skill-card__link {
  margin-top: auto;
  padding-top: 1.1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.2s ease, gap 0.2s ease;
}

.skill-card__link:hover {
  color: var(--mint-deep);
  gap: 0.45rem;
}

.skill-card__art {
  position: relative;
  z-index: 3;
  align-self: end;
  justify-self: end;
  width: 100%;
  height: 100%;
  min-height: 160px;
  pointer-events: none;
}

/* —— Flutter phones —— */
.art-phones {
  position: absolute;
  right: -0.15rem;
  bottom: -0.15rem;
  width: 118%;
  height: 92%;
}

.art-phone {
  position: absolute;
  width: 58%;
  aspect-ratio: 9 / 17;
  border-radius: 1rem;
  background: #fff;
  border: 2px solid rgba(16, 24, 32, 0.08);
  box-shadow: 0 16px 28px -18px rgba(16, 24, 32, 0.35);
  overflow: hidden;
  padding: 0.55rem 0.45rem;
}

.art-phone--back {
  right: 28%;
  bottom: 8%;
  transform: rotate(-8deg);
  opacity: 0.95;
}

.art-phone--front {
  right: 2%;
  bottom: 0;
  transform: rotate(6deg);
}

.art-phone__bar {
  height: 5px;
  width: 34%;
  margin: 0 auto 0.45rem;
  border-radius: 999px;
  background: rgba(16, 24, 32, 0.1);
}

.art-phone__line {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: rgba(16, 24, 32, 0.08);
  margin-bottom: 0.35rem;
}

.art-phone__line:nth-child(2) { width: 72%; }
.art-phone__line:nth-child(3) { width: 54%; background: rgba(32, 185, 154, 0.35); }
.art-phone__chart {
  margin-top: 0.55rem;
  height: 42%;
  border-radius: 0.55rem;
  background:
    linear-gradient(180deg, transparent 40%, rgba(32, 185, 154, 0.18) 40%),
    radial-gradient(circle at 20% 70%, #20b99a 0 3px, transparent 4px),
    radial-gradient(circle at 45% 45%, #20b99a 0 3px, transparent 4px),
    radial-gradient(circle at 70% 55%, #20b99a 0 3px, transparent 4px),
    #f3f6f5;
}

/* —— iOS device —— */
.art-ios {
  position: absolute;
  right: 4%;
  bottom: 2%;
  width: 72%;
  aspect-ratio: 10 / 18;
  border-radius: 1.15rem;
  background: linear-gradient(160deg, #2a2f36, #15191f);
  border: 2px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 30px -16px rgba(16, 24, 32, 0.45);
  transform: rotate(12deg);
  padding: 0.7rem 0.55rem;
  overflow: hidden;
}

.art-ios__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.art-ios__grid i {
  aspect-ratio: 1;
  border-radius: 0.45rem;
  background: #4b9fff;
}

.art-ios__grid i:nth-child(2) { background: #ff6b6b; }
.art-ios__grid i:nth-child(3) { background: #34c759; }
.art-ios__grid i:nth-child(4) { background: #ffcc00; }
.art-ios__grid i:nth-child(5) { background: #af52de; }
.art-ios__grid i:nth-child(6) { background: #5ac8fa; }
.art-ios__grid i:nth-child(7) { background: #ff9500; }
.art-ios__grid i:nth-child(8) { background: #ff2d55; }
.art-ios__grid i:nth-child(9) { background: #64d2ff; }

/* —— Payments —— */
.art-pay {
  position: absolute;
  inset: auto 0 0 auto;
  width: 100%;
  height: 100%;
}

.art-pay__card {
  position: absolute;
  right: -8%;
  bottom: 18%;
  width: 78%;
  aspect-ratio: 1.6;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, #7b6cf0, #5b4fd1);
  transform: rotate(-18deg);
  box-shadow: 0 16px 28px -16px rgba(91, 79, 209, 0.55);
  opacity: 0.9;
}

.art-pay__chip {
  position: absolute;
  left: 14%;
  top: 38%;
  width: 18%;
  height: 22%;
  border-radius: 0.25rem;
  background: rgba(255, 220, 140, 0.85);
}

.art-pay__list {
  position: absolute;
  right: 2%;
  bottom: 4%;
  width: 88%;
  border-radius: 0.95rem;
  background: #fff;
  padding: 0.65rem 0.7rem;
  box-shadow: 0 14px 28px -18px rgba(16, 24, 32, 0.4);
}

.art-pay__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink);
  padding: 0.28rem 0;
}

.art-pay__row + .art-pay__row {
  border-top: 1px solid rgba(16, 24, 32, 0.06);
}

.art-pay__check {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--mint);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  line-height: 1;
}

/* —— Chat / realtime —— */
.art-chat {
  position: absolute;
  inset: 0;
}

.art-chat__bell {
  position: absolute;
  right: 8%;
  top: 12%;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 0.9rem;
  background: #ff4d6d;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 22px -12px rgba(255, 77, 109, 0.7);
  transform: rotate(8deg);
}

.art-chat__bell svg {
  width: 1.55rem;
  height: 1.55rem;
  display: block;
}

.art-chat__bubble {
  position: absolute;
  right: 4%;
  max-width: 92%;
  border-radius: 1rem;
  padding: 0.55rem 0.7rem;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  box-shadow: 0 12px 22px -16px rgba(16, 24, 32, 0.35);
}

.art-chat__bubble--a {
  bottom: 38%;
  background: #fff;
  color: var(--ink);
  border-bottom-right-radius: 0.3rem;
}

.art-chat__bubble--b {
  bottom: 8%;
  right: 10%;
  background: var(--ink);
  color: #fff;
  border-bottom-left-radius: 0.3rem;
}

/* —— Maps —— */
.art-map {
  position: absolute;
  right: -4%;
  bottom: -4%;
  width: 108%;
  height: 92%;
  border-radius: 1.1rem 0 1.1rem 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent 40%),
    linear-gradient(180deg, #d7e7f4 0%, #c5dbeb 100%);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(16, 24, 32, 0.04);
}

.art-map__road {
  position: absolute;
  left: 12%;
  top: 28%;
  width: 78%;
  height: 8px;
  border-radius: 999px;
  background: #8eb6d8;
  transform: rotate(-18deg);
}

.art-map__route {
  position: absolute;
  left: 18%;
  top: 42%;
  width: 62%;
  height: 4px;
  border-radius: 999px;
  background: #2f80ed;
  transform: rotate(14deg);
  box-shadow: 0 0 0 4px rgba(47, 128, 237, 0.15);
}

.art-map__pin {
  position: absolute;
  left: 58%;
  top: 34%;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #2f80ed;
  box-shadow: 0 0 0 6px rgba(47, 128, 237, 0.2);
}

.art-map__eta {
  position: absolute;
  left: 10%;
  bottom: 10%;
  background: #fff;
  border-radius: 0.85rem;
  padding: 0.5rem 0.7rem;
  box-shadow: 0 12px 22px -16px rgba(16, 24, 32, 0.4);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
}

.art-map__eta span {
  display: block;
  margin-top: 0.1rem;
  font-size: 10px;
  font-weight: 500;
  color: var(--mute);
}

/* —— AI tiles —— */
.art-ai {
  position: absolute;
  inset: 8% 0 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  align-content: center;
  justify-items: end;
  padding-right: 0.15rem;
}

.art-ai__tile {
  width: 3.35rem;
  height: 3.35rem;
  border-radius: 0.95rem;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 22px -16px rgba(16, 24, 32, 0.35);
}

.art-ai__tile:nth-child(1) { transform: translateY(0.4rem) rotate(-6deg); }
.art-ai__tile:nth-child(2) { transform: translateY(-0.35rem) rotate(8deg); }
.art-ai__tile:nth-child(3) { transform: translateY(0.15rem) rotate(5deg); }
.art-ai__tile:nth-child(4) { transform: translateY(-0.2rem) rotate(-8deg); }

.art-ai__tile svg {
  width: 1.7rem;
  height: 1.7rem;
  display: block;
}

/* Phones / small tablets: art below copy so text stays readable */
@media (max-width: 767px) {
  .skill-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 0.15rem;
    padding: 1.25rem 1.15rem 1.35rem;
  }

  .skill-card__body {
    position: relative;
    z-index: 2;
    padding-right: 0;
    max-width: none;
    width: 100%;
  }

  .skill-card__text {
    max-width: none;
  }

  .skill-card__art {
    position: relative;
    z-index: 1;
    width: 7.5rem;
    max-width: 42%;
    min-height: 0;
    height: 5.75rem;
    margin: 0.5rem 0.15rem 0 auto;
    overflow: visible;
    flex-shrink: 0;
  }

  .art-phones {
    width: 100%;
    height: 100%;
    right: 0;
    bottom: 0;
  }

  .art-phone {
    width: 48%;
  }

  .art-phone--back {
    right: 32%;
    bottom: 4%;
  }

  .art-phone--front {
    right: 4%;
    bottom: 0;
  }

  .art-ios {
    width: 42%;
    right: 8%;
    bottom: 2%;
    transform: rotate(10deg);
  }

  .art-map {
    width: 92%;
    height: 92%;
    right: 2%;
    bottom: 2%;
  }

  .art-pay__card {
    width: 70%;
    right: 2%;
    bottom: 12%;
  }

  .art-ai {
    inset: 4% 2% 2% auto;
    width: 90%;
    gap: 0.35rem;
  }

  .art-ai__tile {
    width: 2.15rem;
    height: 2.15rem;
  }

  .art-chat__bell {
    width: 2rem;
    height: 2rem;
    top: 4%;
    right: 10%;
  }

  .art-chat__bubble {
    font-size: 8.5px;
    padding: 0.4rem 0.5rem;
    max-width: 88%;
  }

  .skill-card__link {
    padding-top: 0.85rem;
  }
}

@media (max-width: 419px) {
  .skill-card__art {
    width: 6.5rem;
    height: 5.1rem;
    max-width: 46%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skill-card {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .skill-card::before,
  .skill-card::after,
  .skill-card__body {
    transition: opacity 0.2s ease;
  }

  .skill-card:hover,
  .skill-card:hover .skill-card__body {
    transform: none;
  }
}
