:root {
  --bg: #090909;
  --surface: #111111;
  --surface-2: #171717;
  --text: #f5f5f5;
  --muted: #9b9b9b;
  --border: rgba(255, 255, 255, 0.12);
  --avatar-size: 148px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

body {
  display: flex;
  justify-content: center;
}

.profile-page {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: var(--surface);
  overflow-x: hidden;
}

.hero {
  width: 100%;
  height: 220px;
  background: #242424;
  overflow: hidden;
}

.hero-image,
.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar {
  position: relative;
  z-index: 2;
  width: var(--avatar-size);
  height: var(--avatar-size);
  margin: calc(var(--avatar-size) / -2) auto 0;
  border-radius: 50%;
  border: 5px solid var(--surface);
  background: #303030;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.identity {
  text-align: center;
  padding: 8px 12px 0;
}

.profile-name {
  margin: 0;
  font-size: clamp(24px, 7vw, 34px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.profile-description {
  max-width: 360px;
  margin: 12px auto 0;
  padding: 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
}

.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.social-button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--text);
  text-decoration: none;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.social-button:hover,
.social-button:focus-visible {
  transform: translateY(-2px);
  background: #202020;
  border-color: rgba(255, 255, 255, 0.28);
  outline: none;
}

.social-button svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
  stroke: none;
}

.content-space {
  min-height: 420px;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 28px 24px 36px;
}

.content-card {
  position: relative;
  display: block;
  aspect-ratio: 920 / 350;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

.content-card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 35%, rgba(0, 0, 0, 0.8));
  pointer-events: none;
}

.content-card-caption {
  position: absolute;
  z-index: 1;
  left: 20px;
  right: 20px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.content-card-title {
  min-width: 0;
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.content-card-platform {
  display: inline-block;
  width: 18px;
  height: 18px;
  fill: currentColor;
  vertical-align: -3px;
}

.content-card-age {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.content-card:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.content-card:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

.profile-page[hidden] {
  display: none;
}

body.age-gated {
  overflow: hidden;
}

.age-modal {
  position: fixed;
  inset: 0;
  width: calc(100% - 32px);
  max-width: 460px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  margin: auto;
  padding: 30px 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.age-modal::backdrop {
  background: rgba(9, 9, 9, 0.92);
}

.age-modal h2 {
  margin: 0 0 16px;
  font-size: clamp(24px, 6vw, 30px);
  line-height: 1.2;
}

.age-modal p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.age-modal .age-message {
  margin-top: 16px;
  color: #f87171;
}

.age-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 26px;
}

.age-button {
  min-height: 48px;
  padding: 12px 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.age-button-secondary {
  background: var(--surface-2);
  color: var(--text);
}

.age-button-primary {
  background: var(--text);
  color: var(--bg);
}

.age-button:hover {
  filter: brightness(0.9);
}

.age-button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

.age-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (min-width: 560px) {
  body {
    padding: 20px 0;
  }

  .profile-page {
    max-width: 480px;
    min-height: calc(100vh - 40px);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
  }

  .hero {
    height: 230px;
  }
}
