:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-muted: #eef3f6;
  --text: #111820;
  --muted: #5f6b76;
  --line: #dce3e8;
  --accent: #00a6d6;
  --accent-dark: #087ea3;
  --danger: #b44b58;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

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

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

.shell {
  display: grid;
  grid-template-columns: 88px minmax(0, 720px);
  justify-content: center;
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  height: 100vh;
  padding: 20px 12px;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.brand {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 800;
}

.rail-link {
  width: 64px;
  padding: 10px 0;
  border-radius: 999px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.rail-link.active {
  background: var(--panel-muted);
  color: var(--text);
}

.main {
  min-width: 0;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.2;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
}

.content {
  min-height: calc(100vh - 72px);
}

.creator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  padding: 18px;
}

.creator-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.creator-cover,
.profile-cover {
  min-height: 132px;
  background: linear-gradient(135deg, #dfe9ef, #b7dce7);
  background-position: center;
  background-size: cover;
}

.creator-body {
  padding: 0 16px 16px;
}

.avatar {
  width: 78px;
  height: 78px;
  border: 4px solid white;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-muted);
}

.creator-card .avatar {
  margin-top: -39px;
}

.name-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.name-row h2,
.name-row h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.verified {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.handle,
.meta,
.muted {
  color: var(--muted);
}

.handle {
  margin: 3px 0 12px;
  font-size: 14px;
}

.about {
  display: -webkit-box;
  margin-bottom: 16px;
  overflow: hidden;
  color: #27313a;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-line;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
}

.stats strong {
  color: var(--text);
}

.profile {
  border-bottom: 1px solid var(--line);
}

.profile-cover {
  height: 220px;
}

.profile-body {
  padding: 0 18px 18px;
}

.profile-avatar-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: -52px;
}

.profile-avatar-row .avatar {
  width: 104px;
  height: 104px;
}

.pill {
  margin-top: 60px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
}

.profile h2 {
  margin: 12px 0 0;
  font-size: 24px;
}

.profile .about {
  display: block;
  margin-top: 14px;
  -webkit-line-clamp: unset;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.tab {
  padding: 14px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.tab.active {
  color: var(--text);
  box-shadow: inset 0 -4px 0 var(--accent);
}

.post {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.post-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-muted);
}

.post-head {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: baseline;
  margin-bottom: 8px;
}

.post-name {
  font-weight: 800;
}

.post-text {
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-line;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.media-grid.single {
  grid-template-columns: 1fr;
}

.media-tile {
  display: grid;
  min-height: 260px;
  background: #0f151a;
}

.media-tile img,
.media-tile video {
  width: 100%;
  height: 100%;
  max-height: 640px;
  object-fit: cover;
}

.media-grid.single .media-tile img,
.media-grid.single .media-tile video {
  object-fit: contain;
  background: #0f151a;
}

.missing-media,
.empty-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.empty-state {
  min-height: 420px;
}

.error {
  color: var(--danger);
}

@media (max-width: 760px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .rail {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    top: auto;
    z-index: 10;
    flex-direction: row;
    justify-content: space-around;
    width: 100%;
    height: 64px;
    padding: 8px 12px;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .brand {
    width: 40px;
    height: 40px;
  }

  .main {
    padding-bottom: 64px;
    border-right: 0;
  }

  .topbar {
    min-height: 64px;
  }

  .creator-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .profile-cover {
    height: 156px;
  }

  .post {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    padding: 14px 12px;
  }

  .post-avatar {
    width: 40px;
    height: 40px;
  }

  .media-tile {
    min-height: 190px;
  }
}
