*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: Inter, "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #ffffff;
  color: #0a0a0a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  animation: fadeIn 0.8s ease-out forwards;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.header {
  text-align: center;
  width: 100%;
  padding: 1.5rem 1rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar-wrap {
  position: relative;
  height: 12rem;
  width: auto;
  aspect-ratio: 16 / 9;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  margin-bottom: 0.75rem;
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.name {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: #0a0a0a;
}

@media (min-width: 768px) {
  .name {
    font-size: 2.25rem;
  }
}

.bio {
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #0a0a0a;
}

.links {
  width: 100%;
  max-width: 48rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.media-card {
  position: relative;
  display: block;
  width: 100%;
  max-width: 24rem;
  overflow: hidden;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  cursor: pointer;
}

.media-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  color: #000;
}

.media-badge svg {
  width: 1.5rem;
  height: 1.5rem;
}

.media-ratio {
  position: relative;
  width: 100%;
  padding-bottom: 75%;
  background: #f4f4f5;
}

.media-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.5s ease;
}

.media-card:hover .media-img {
  transform: scale(1.05);
}

.media-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.8), rgb(0 0 0 / 0.3), transparent);
  pointer-events: none;
}

.media-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.75rem;
  z-index: 20;
  padding: 0 0.625rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.media-footer h4 {
  max-width: 100%;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.375;
  text-align: center;
  margin-bottom: 0.75rem;
  word-break: break-word;
}

.media-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  width: 100%;
  min-width: 0;
  padding: 0.5rem 0.625rem;
  border-radius: 9999px;
  background: #fff;
  color: #000;
  font-size: 0.875rem;
  font-weight: 500;
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.media-cta span {
  min-width: 0;
  text-align: center;
  line-height: 1.375;
  word-break: break-word;
}

.media-card:hover .media-cta {
  opacity: 0.9;
  transform: translateY(-0.25rem);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.pill {
  position: relative;
  display: inline-flex;
  width: 100%;
  max-width: 350px;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  border-radius: 9999px;
  background: #000;
  color: #fff;
  font-weight: 500;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pill:hover {
  transform: translateY(-0.25rem);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.15);
}

.pill-icon {
  position: absolute;
  left: 1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0a0a;
}

.pill-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.pill-label {
  text-align: center;
  width: 100%;
}

@media (min-width: 240px) {
  .media-footer {
    bottom: 1rem;
    padding: 0 0.75rem;
  }

  .media-footer h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
  }

  .media-cta {
    padding: 0.625rem 0.75rem;
  }

  .media-cta span {
    font-size: 1rem;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .page,
  .media-img,
  .media-cta,
  .pill {
    animation: none;
    transition: none;
  }
}

/* In-app browser escape gate */
html.ext-gate-open,
html.ext-gate-open body {
  overflow: hidden;
  height: 100%;
}

.ext-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ext-gate__card {
  width: 100%;
  max-width: 22rem;
  text-align: center;
}

.ext-gate__eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #71717a;
  margin-bottom: 0.75rem;
}

.ext-gate__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.ext-gate__text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #52525b;
  margin-bottom: 1.5rem;
}

.ext-gate__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 16rem;
  padding: 1rem 1.25rem;
  border-radius: 9999px;
  background: #000;
  color: #fff !important;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.ext-gate__btn:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.ext-gate__hint {
  margin-top: 1rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #a1a1aa;
  max-width: 18rem;
  margin-left: auto;
  margin-right: auto;
}
