:root {
  --bg: #0a0a0a;
  --surface: #181818;
  --surface-hover: #1f1f1f;
  --border: #2a2a2a;
  --text: #f3f5f7;
  --muted: #777;
  --accent: #3b9eff;
  --like: #ff3040;
  --sidebar-w: 300px;
  --feed-w: 680px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

svg.filled,
svg .filled {
  fill: currentColor;
}

/* Sidebar */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  padding: 8px 12px;
  overflow-y: auto;
}

.sidebar__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 28px 8px;
}

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

.logo__mark {
  width: 32px;
  height: 32px;
}

.logo__text {
  font-size: 30px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: -1px;
  background: linear-gradient(90deg, var(--text) 40%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--text);
}

.icon-btn:hover {
  background: var(--surface-hover);
}

.icon-btn--round {
  border-radius: 50%;
}

.nav,
.feeds {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 18px;
  transition: background .15s;
}

.nav__item:hover {
  background: var(--surface-hover);
}

.nav__item--active {
  background: #262626;
  font-weight: 600;
}

.nav__item--active svg {
  color: var(--accent);
}

.nav__item--plain {
  padding-left: 12px;
}

.nav__item--split {
  justify-content: space-between;
}

.nav__gap {
  height: 22px;
}

.badge-wrap {
  position: relative;
  display: flex;
}

.dot {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--like);
}

.feeds {
  margin-top: 40px;
}

.feeds__head {
  display: flex;
  justify-content: space-between;
  padding: 6px 12px;
  font-size: 14px;
  color: var(--muted);
}

.feeds__head a:hover {
  color: var(--text);
}

/* Main column */

.main {
  width: var(--feed-w);
  margin: 0 auto;
  padding-bottom: 80px;
}

.feed-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 16px 0 28px;
  background: var(--bg);
}

.feed-header h1 {
  font-size: 20px;
  font-weight: 600;
}

.feed {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  overflow: hidden;
}

.composer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.composer__input {
  flex: 1;
  background: none;
  border: 0;
  outline: 0;
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

.composer__input::placeholder {
  color: var(--muted);
}

.btn {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-weight: 600;
}

.btn:hover {
  background: var(--surface-hover);
}

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--a, #555), var(--b, #222));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

.avatar--me {
  --a: var(--accent);
  --b: #0b3d91;
  font-size: 17px;
}

.follow {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  line-height: 1;
  text-shadow: none;
}

/* Post */

.post {
  display: flex;
  gap: 14px;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--border);
}

.post:last-child {
  border-bottom: 0;
}

.post__body {
  flex: 1;
  min-width: 0;
}

.post__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.post__author {
  font-weight: 600;
}

.post__author:hover {
  text-decoration: underline;
  cursor: pointer;
}

.post__time,
.post__crumb {
  color: var(--muted);
}

.post__topic {
  color: var(--accent);
  font-weight: 600;
}

.post__more {
  margin-left: auto;
  padding: 0 4px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -1px;
}

.post__text {
  font-size: 15.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.post__text + .post__text {
  margin-top: 8px;
}

.post__list {
  margin: 6px 0 8px 20px;
  line-height: 1.5;
}

.translate {
  color: var(--muted);
  cursor: pointer;
}

.feed-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 64px;
  color: var(--muted);
  font-size: 14px;
}

.feed-status button {
  color: var(--accent);
  font-weight: 600;
}

/* Media placeholders */

.gallery {
  display: flex;
  gap: 8px;
  margin: 12px -24px 0 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.gallery::-webkit-scrollbar {
  display: none;
}

.gallery__item,
.media {
  position: relative;
  display: flex;
  align-items: flex-end;
  border-radius: 10px;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 30% 35%, rgba(255, 255, 255, .25), transparent 45%),
    linear-gradient(160deg, var(--a), var(--b));
  overflow: hidden;
}

.gallery__item {
  flex: 0 0 255px;
  height: 340px;
  scroll-snap-align: start;
}

.media {
  height: 300px;
  margin-top: 12px;
}

.gallery__item span,
.media span {
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .55));
}

/* Actions */

.actions {
  display: flex;
  gap: 6px;
  margin: 10px 0 0 -10px;
}

.action {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 14px;
  color: #ccc;
  cursor: pointer;
}

.action svg {
  width: 21px;
  height: 21px;
}

.action:hover {
  background: var(--surface-hover);
}

.action--liked {
  color: var(--like);
}

/* Floating button */

.fab {
  position: fixed;
  right: 28px;
  bottom: 28px;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .5);
  transition: transform .15s;
}

.fab:hover {
  transform: scale(1.06);
}

.fab svg {
  color: var(--accent);
}

@media (max-width: 1100px) {
  .sidebar {
    width: 76px;
  }

  .logo__text,
  .sidebar__top .icon-btn,
  .feeds,
  .nav__item {
    font-size: 0;
  }

  .feeds {
    display: none;
  }

  .main {
    margin-left: 96px;
  }
}

@media (max-width: 760px) {
  .sidebar,
  .fab {
    display: none;
  }

  .main {
    width: 100%;
    margin: 0;
  }

  .feed {
    border-radius: 0;
    border-inline: 0;
  }
}
