:root {
  --bg: #f0f2f5;
  --card: #ffffff;
  --text: #050505;
  --muted: #65676b;
  --line: #ced0d4;
  --soft-line: #e4e6eb;
  --blue: #1877f2;
  --blue-dark: #0f5fd2;
  --button: #e4e6eb;
  --shadow: 0 1px 2px rgb(0 0 0 / 10%);
  --radius: 12px;
  --live-cover-ratio: 820 / 312;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

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

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(135deg, rgb(240 242 245 / 96%), rgb(255 255 255 / 96%));
  backdrop-filter: blur(8px);
}

.access-gate[hidden] {
  display: none;
}

.access-card {
  display: grid;
  width: min(420px, 100%);
  gap: 12px;
  padding: 26px;
  border-radius: 18px;
  background: white;
  box-shadow: 0 18px 60px rgb(0 0 0 / 18%);
}

.access-card img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
}

.access-card h1 {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1.1;
}

.access-card p {
  margin: 0;
  color: var(--muted);
}

.access-card label {
  margin-top: 8px;
  color: #1c1e21;
  font-weight: 800;
}

.access-card input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 14px;
  font: inherit;
}

.access-card input:focus {
  border-color: var(--blue);
  outline: 2px solid rgb(24 119 242 / 18%);
}

.access-card .access-error {
  color: #d93025;
  font-weight: 700;
}

.access-card button {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  font-weight: 800;
}

.access-card button:hover,
.access-card button:focus-visible {
  background: var(--blue-dark);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(280px, 520px) minmax(230px, 1fr);
  align-items: center;
  gap: 16px;
  height: 56px;
  padding: 0 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.brand,
.top-actions,
.center-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}

.brand-search {
  min-width: 240px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
}

.center-nav {
  justify-content: center;
  height: 100%;
}

.center-nav a {
  position: relative;
  display: grid;
  min-width: 88px;
  height: 52px;
  place-items: center;
  border-radius: 10px;
  color: var(--muted);
  font-size: 24px;
  font-weight: 700;
}

.center-nav a.active {
  color: var(--blue);
}

.center-nav a.active::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: -2px;
  left: 10px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--blue);
}

.center-nav a:hover,
.center-nav a:focus-visible {
  background: var(--bg);
}

.top-actions a {
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 600;
}

.top-actions {
  justify-content: flex-end;
}

.top-actions a:hover,
.top-actions a:focus-visible {
  background: var(--bg);
  color: var(--text);
}

.page-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.hero {
  background: var(--card);
  border-radius: 0 0 10px 10px;
  box-shadow: var(--shadow);
  overflow: visible;
}

.media-button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  text-align: inherit;
}

.cover {
  position: relative;
  z-index: 1;
  aspect-ratio: var(--live-cover-ratio);
  height: auto;
  min-height: 190px;
  max-height: 420px;
  border-radius: 0 0 10px 10px;
  background: #ddd;
  overflow: hidden;
}

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

.cover::after {
  content: "";
  position: absolute;
  inset: 55% 0 0;
  background: linear-gradient(transparent, rgb(0 0 0 / 35%));
  pointer-events: none;
}

.cover-badge {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  padding: 9px 13px;
  border-radius: 8px;
  background: rgb(255 255 255 / 92%);
  color: #1c1e21;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.profile-row {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 18px;
  padding: 0 28px 18px;
}

.avatar {
  position: relative;
  z-index: 5;
  width: clamp(128px, 17vw, 178px);
  height: clamp(128px, 17vw, 178px);
  margin-top: -56px;
  border: 5px solid white;
  border-radius: 50%;
  background: white;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.avatar img,
.composer img,
.post-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-copy {
  padding-top: 14px;
}

.profile-copy h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.08;
}

.profile-copy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.profile-copy .tagline {
  color: #313338;
  font-weight: 500;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding-bottom: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--button);
  color: #050505;
  font-weight: 700;
  cursor: pointer;
}

.btn.primary {
  background: var(--blue);
  color: white;
}

.btn:hover,
.btn:focus-visible {
  filter: brightness(0.96);
}

.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 28px;
  border-top: 1px solid var(--soft-line);
  overflow-x: auto;
}

.tabs a,
.tabs button {
  min-height: 58px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.tabs a {
  display: inline-flex;
  align-items: center;
}

.tabs a.active {
  position: relative;
  color: var(--blue);
}

.tabs a.active::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 0;
  left: 8px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--blue);
}

.tabs a:hover,
.tabs button:hover,
.tabs a:focus-visible,
.tabs button:focus-visible {
  background: var(--bg);
}

.tabs .more {
  margin-left: auto;
  font-size: 20px;
}

.content {
  display: grid;
  grid-template-columns: 430px minmax(0, 680px);
  justify-content: center;
  gap: 16px;
  padding: 16px 0 40px;
}

.left-column {
  display: grid;
  align-content: start;
  gap: 16px;
  position: sticky;
  top: 72px;
}

.card {
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.photo-card,
.note-card {
  padding: 16px;
}

.intro-card {
  padding: 20px;
}

.card h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.note-card p {
  margin: 0 0 14px;
}

.details-card {
  background: var(--card);
  color: #1c1e21;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.details-card h2 {
  margin: 0 0 14px;
  color: #1c1e21;
  font-size: 25px;
  line-height: 1.15;
}

.details-card h2:not(:first-child) {
  margin-top: 28px;
}

.details-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.details-list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 20px;
  align-items: center;
  color: #1c1e21;
  font-size: 18px;
  font-weight: 500;
}

.details-list li > :last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.details-list a {
  color: #1877f2;
  font-weight: 700;
}

.details-list strong {
  color: #1c1e21;
  font-weight: 800;
}

.line-icon {
  display: inline-grid;
  width: 44px;
  height: 36px;
  place-items: center;
  color: #606770;
}

.line-icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-icon.duo {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 52px;
}

.line-icon.duo svg {
  width: 27px;
  height: 27px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  color: #1c1e21;
}

.info-list a {
  color: #216fdb;
  font-weight: 600;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.card-head h2 {
  margin: 0;
}

.card-head button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 600;
  cursor: pointer;
}

.photo-grid {
  display: grid;
  gap: 4px;
}

.photo-grid.small {
  grid-template-columns: repeat(2, 1fr);
}

.photo-grid button,
.post-media button {
  min-height: 0;
  border: 0;
  background: #ddd;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
}

.photo-grid.small button {
  aspect-ratio: 1;
}

.photo-grid img,
.post-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.photo-grid button:hover img,
.post-media button:hover img,
.photo-grid button:focus-visible img,
.post-media button:focus-visible img {
  transform: scale(1.03);
}

.note-card code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg);
}

.feed {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.composer {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  padding: 12px 16px;
}

.composer img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.composer button {
  border: 0;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  padding: 0 16px;
  text-align: left;
}

.composer > button {
  min-height: 42px;
}

.composer-tools {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--soft-line);
}

.composer-tools button {
  min-height: 38px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  text-align: center;
}

.composer-tools button:hover,
.composer-tools button:focus-visible {
  background: var(--bg);
}

#postList {
  display: grid;
  gap: 16px;
}

.post {
  overflow: visible;
}

.post-header {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  padding: 14px 16px 8px;
}

.post-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--soft-line);
}

.post-title {
  min-width: 0;
}

.post-title strong,
.post-title button {
  font-weight: 800;
}

.post-title button {
  border: 0;
  background: transparent;
  color: #050505;
  cursor: pointer;
  padding: 0;
}

.post-title p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.post-menu {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 22px;
}

.post-menu:hover,
.post-menu:focus-visible {
  background: var(--bg);
}

.post-text {
  padding: 0 16px 12px;
  white-space: pre-line;
}

.see-more {
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-weight: 700;
  padding: 0 0 0 4px;
}

.post-media {
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--soft-line);
  border-bottom: 1px solid var(--soft-line);
  background: var(--soft-line);
}

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

.post-media.single button {
  max-height: 700px;
}

.post-media.single img {
  height: auto;
  max-height: 700px;
  object-fit: contain;
  background: #f7f7f7;
}

.post-media.quad {
  grid-template-columns: repeat(2, 1fr);
}

.post-media.quad button {
  aspect-ratio: 1;
}

.post-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  color: var(--muted);
  font-size: 14px;
}

.reactions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.reaction-icons {
  letter-spacing: -4px;
  filter: drop-shadow(0 1px 1px rgb(0 0 0 / 15%));
}

.post-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin: 0 16px;
  padding: 4px 0;
  border-top: 1px solid var(--soft-line);
}

.post-actions button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.post-actions button:hover,
.post-actions button:focus-visible {
  background: var(--bg);
}

.comment-box {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  padding: 8px 16px 14px;
}

.comment-box img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.comment-box button {
  border: 0;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  padding: 0 14px;
  text-align: left;
}

.site-footer {
  padding: 0 0 32px;
}

.footer-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--card);
  color: var(--muted);
  box-shadow: var(--shadow);
  font-size: 14px;
}

.footer-card strong {
  color: #1c1e21;
}

.footer-card a {
  color: #1877f2;
  font-weight: 600;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 72%);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(760px, 94vh);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 16px 48px rgb(0 0 0 / 35%);
  overflow: hidden;
}

.modal-header {
  display: grid;
  grid-template-columns: 1fr 40px;
  align-items: center;
  min-height: 58px;
  padding: 0 16px;
  border-bottom: 1px solid var(--soft-line);
}

.modal-header h2 {
  margin: 0;
  text-align: center;
  font-size: 18px;
}

.icon-btn {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--button);
  color: #1c1e21;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.modal-body {
  max-height: calc(min(760px, 94vh) - 58px);
  overflow: auto;
}

.modal-body .post {
  border-radius: 0;
  box-shadow: none;
}

.lightbox {
  padding: 0;
  background: #000;
}

.lightbox .modal-backdrop {
  background: #000;
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 48px 70px 54px;
}

.lightbox figure {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  margin: 0;
}

.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: 4px;
}

.lightbox figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 16px 20px;
  background: linear-gradient(transparent, rgb(0 0 0 / 72%));
  color: white;
  text-align: center;
  font-weight: 600;
}

.close-lightbox {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  background: rgb(255 255 255 / 18%);
  color: white;
}

.nav-btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 16%);
  color: white;
  cursor: pointer;
  font-size: 44px;
  line-height: 1;
  transform: translateY(-50%);
}

.nav-btn:hover,
.nav-btn:focus-visible,
.close-lightbox:hover,
.close-lightbox:focus-visible {
  background: rgb(255 255 255 / 26%);
}

.nav-btn.prev {
  left: 16px;
}

.nav-btn.next {
  right: 16px;
}

@media (max-width: 900px) {
  :root {
    --live-cover-ratio: 820 / 360;
  }

  .topbar {
    grid-template-columns: auto 1fr auto;
  }

  .brand-search {
    display: none;
  }

  .center-nav {
    display: none;
  }

  .content {
    grid-template-columns: 1fr;
    padding-inline: 10px;
  }

  .left-column {
    position: static;
    order: 2;
  }

  .feed {
    order: 1;
  }
}

@media (max-width: 760px) {
  :root {
    --live-cover-ratio: 640 / 360;
  }

  body {
    font-size: 14px;
  }

  .topbar {
    padding: 0 10px;
  }

  .top-actions {
    gap: 2px;
  }

  .top-actions a {
    padding: 10px 8px;
    font-size: 13px;
  }

  .hero {
    border-radius: 0;
  }

  .cover {
    border-radius: 0;
  }

  .profile-row {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 8px;
    padding: 0 14px 14px;
    text-align: center;
  }

  .avatar {
    margin-top: -50px;
  }

  .profile-actions {
    justify-content: center;
    width: 100%;
  }

  .profile-actions .btn {
    flex: 1 1 30%;
  }

  .composer-tools {
    grid-template-columns: 1fr;
  }

  .details-card h2 {
    font-size: 23px;
  }

  .details-list li {
    grid-template-columns: 38px 1fr;
    gap: 14px;
    font-size: 16px;
  }

  .line-icon {
    width: 38px;
  }

  .line-icon svg {
    width: 30px;
    height: 30px;
  }

  .tabs {
    margin: 0 10px;
  }

  .tabs .more {
    margin-left: 0;
  }

  .post-media.single button,
  .post-media.single img {
    max-height: none;
  }

  .modal {
    padding: 0;
  }

  .modal-panel {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }

  .modal-body {
    max-height: calc(100vh - 58px);
  }

  .lightbox-panel {
    padding: 50px 0 58px;
  }

  .nav-btn {
    width: 42px;
    height: 42px;
    background: rgb(0 0 0 / 25%);
    font-size: 34px;
  }

  .nav-btn.prev {
    left: 8px;
  }

  .nav-btn.next {
    right: 8px;
  }
}

@media (max-width: 440px) {
  .top-actions a:nth-child(2) {
    display: none;
  }

  .tabs a[href="#videos"] {
    display: none;
  }

  .cover-badge {
    right: 10px;
    bottom: 10px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .profile-copy h1 {
    font-size: 27px;
  }

  .post-stats {
    align-items: flex-start;
    flex-direction: column;
  }

  .post-actions {
    margin-inline: 8px;
  }
}