* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #111;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
}

.shell {
  width: min(540px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.profile {
  text-align: center;
  margin-bottom: 26px;
}

.avatar {
  width: 125px;
  height: 125px;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #222;
  border: 1px solid #444;
  font-size: 26px;
  font-weight: 800;
}

.profile h1 {
  margin: 14px 0 12px;
  font-size: 28px;
}

.profile p {
  margin: 0;
  color: #aaa;
  font-size: 16px;
}

.cards {
  display: grid;
  gap: 14px;
  width: 100%;
}

.card {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border-radius: 18px;
  background: #222;
  color: #fff;
  text-decoration: none;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.card img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
}

/* No gradient or dark bottom overlay. */
.image-card::after {
  content: none;
}

/* Title is centered against the CARD, not the image or viewport. */
.card span {
  position: relative;
  z-index: 1;

  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 0 auto;
  padding: 8px 16px;

  background: rgba(0, 0, 0, 0.55);
  border-radius: 0;

  text-align: center;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;

  text-shadow: 0 1px 4px rgba(0,0,0,.9);
  overflow-wrap: anywhere;
}

.card:hover {
  transform: translateY(-1px);
}

footer {
  text-align: center;
  margin-top: 28px;
}

footer a {
  color: #777;
  font-size: 12px;
  text-decoration: none;
}

@media (max-width: 600px) {
  .shell {
    width: calc(100% - 24px);
    padding-top: 22px;
  }

  .cards {
    gap: 12px;
  }

  .card {
    border-radius: 16px;
  }

  .card span {
    width: fit-content;
    max-width: calc(100% - 28px);
    padding: 8px 16px;
    font-size: 20px;
  }
}

/* Profile avatar image support — does not alter card styling */
.avatar {
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  border-radius: 50%;
}
