.feed-page {
  min-height: 100vh;
  margin: 0;
  color: #111111;
  background: #fafafa;
}

.ig-profile {
  display: flex;
  width: min(100%, 935px);
  min-height: 100vh;
  margin-inline: auto;
  flex-direction: column;
  background: var(--white);
}

.ig-topbar {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-block-end: 1px solid #dbdbdb;
}

.ig-topbar > svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ig-topbar > svg:last-child circle {
  fill: currentColor;
  stroke: none;
}

.ig-handle {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 16px;
  font-weight: 700;
}

.handle-chevron {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.ig-header {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding: 24px 28px 16px;
}

.ig-avatar {
  display: grid;
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
  overflow: hidden;
  place-items: center;
  border: 1px solid #dbdbdb;
  border-radius: 50%;
  background: var(--mist);
}

.ig-avatar img {
  width: 64%;
  height: 64%;
  object-fit: contain;
}

.ig-account {
  flex: 1;
  min-width: 0;
}

.ig-username {
  font-size: 21px;
  font-weight: 400;
}

.ig-stats {
  margin-block-start: 11px;
  font-size: 15px;
}

.ig-stats strong {
  font-weight: 700;
}

.ig-actions {
  display: flex;
  gap: 8px;
  margin-block-start: 12px;
}

.ig-action {
  min-width: 102px;
  min-height: 44px;
  padding-inline: 18px;
  border: 0;
  border-radius: 8px;
  color: #111111;
  background: #efefef;
  font-family: "Neon", "Einstein", Arial, sans-serif;
  font-size: 14px;
  font-weight: 650;
  opacity: 1;
}

.ig-follow {
  color: var(--paper);
  background: var(--ink);
}

.ig-bio {
  display: grid;
  justify-items: start;
  padding: 0 28px 8px;
  font-size: 14px;
  line-height: 1.45;
}

.ig-bio strong {
  font-weight: 700;
}

.ig-category {
  color: #737373;
}

.ig-bio p {
  margin: 0;
  unicode-bidi: plaintext;
}

.ig-highlights {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 16px 28px 10px;
}

.ig-highlight {
  width: 74px;
  flex: 0 0 auto;
  text-align: center;
}

.highlight-ring {
  width: 66px;
  height: 66px;
  margin: 0 auto 7px;
  overflow: hidden;
  padding: 3px;
  border: 1px solid #dbdbdb;
  border-radius: 50%;
  background: var(--white);
}

.highlight-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.highlight-ring:not(.highlight-mark) img {
  object-position: center 32%;
}

.highlight-mark {
  display: grid;
  place-items: center;
  background: var(--mist);
}

.highlight-mark img {
  width: 64%;
  height: 64%;
  object-fit: contain;
}

.ig-highlight span {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ig-tabs {
  display: flex;
  justify-content: center;
  gap: 64px;
  margin-block-start: 8px;
  border-block-start: 1px solid #dbdbdb;
}

.ig-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-block: 13px;
  border-block-start: 1px solid transparent;
  margin-block-start: -1px;
  color: #737373;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.ig-tab.is-active {
  border-block-start-color: #111111;
  color: #111111;
}

.ig-tab svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  padding-block-end: 48px;
}

.post {
  position: relative;
  display: flex;
  aspect-ratio: 1;
  overflow: hidden;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(14px, 2.2vw, 28px);
  direction: rtl;
}

.post h1,
.post h2 {
  margin: 0;
  font-size: clamp(17px, 2.25vw, 31px);
  font-weight: 480;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.post span,
.post p {
  font-size: clamp(10px, 1.05vw, 13px);
}

.post span {
  font-weight: 650;
}

.post-photo {
  color: var(--paper);
}

.post-photo > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-photo::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(20, 32, 40, 0.78), transparent 60%);
}

.post-photo > div {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 7px;
  margin-block-start: auto;
}

.post-portrait > img { object-position: center 25%; }
.post-clinic > img { object-position: center 48%; }
.post-towel > img { object-position: center 28%; }
.post-paper { border: 1px solid var(--line); background: var(--paper); }
.post-paper > img { width: 38%; align-self: end; }
.post-sage { background: var(--sage); }
.post-sage p { margin: 0; }
.post-ink { color: var(--paper); background: var(--ink); }
.post-ink > img { width: 48%; align-self: center; }
.post-mist { background: var(--mist); }

.focus-lines {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  align-items: end;
  height: 44%;
}

.focus-lines i {
  height: 36%;
  border-radius: 100% 0 100% 0;
  background: var(--stone);
  transform: rotate(calc(var(--n, 0) * 12deg));
}

.focus-lines i:nth-child(2) { height: 58%; }
.focus-lines i:nth-child(3) { height: 82%; background: var(--ink); }
.focus-lines i:nth-child(4) { height: 58%; }

.post-split {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding: 0;
}

.post-split div:nth-child(1) { background: var(--paper); }
.post-split div:nth-child(2) { background: var(--mist); }
.post-split div:nth-child(3) { background: var(--sage); }
.post-split div:nth-child(4) { background: var(--stone); }
.post-split div:nth-child(5) { background: var(--ink); }

.post-split h2 {
  position: absolute;
  inset-inline: 18px;
  inset-block-end: 18px;
  padding: 10px;
  color: var(--paper);
  background: var(--ink);
}

.post-action {
  justify-content: center;
  gap: 18px;
}

.post-action > img {
  width: 100%;
  align-self: auto;
}

.post-link {
  width: max-content;
  padding: 7px 11px;
  border: 1px solid var(--ink);
  border-radius: 999px;
}

@media (max-width: 640px) {
  .ig-header { gap: 20px; padding: 16px; }
  .ig-avatar { width: 78px; height: 78px; }
  .ig-username { font-size: 18px; }
  .ig-bio { padding-inline: 16px; }
  .ig-highlights { gap: 18px; padding-inline: 16px; }
  .ig-tabs { gap: 0; justify-content: space-around; }
  .post { padding: 10px; }
  .post h1,
  .post h2 { font-size: clamp(13px, 4vw, 19px); }
  .post span,
  .post p { font-size: 9px; }
  .post-split h2 { inset-inline: 7px; inset-block-end: 7px; padding: 6px; }
  .post-link { padding: 5px 8px; }
}

@media (max-width: 390px) {
  .ig-action { min-width: 92px; padding-inline: 14px; }
  .ig-actions { gap: 6px; }
}
