* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #000;
  --fg: #e7e9ea;
  --muted: #8b8f93;
  --hover: #0a0a0a;
  --accent: #1d9bf0;
  --button: #e7e9ea;
  --button-fg: #0f1419;
  --border: #2f3336;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  display: grid;
  max-width: 1300px;
  margin: 0 auto;
}

section {
  min-height: 100vh;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 2.5fr 6fr 3.5fr; /* 3-5-4 */
  gap: 1.5rem;
  padding: 0;
}
 


#section1,
#section3 {
  position: sticky;
  top: 0.75rem;
  height: 100vh;
  align-self: start;
  padding-top: 0.4rem;
}

/* interiors should not create their own page scrollbars */
.sidebar,
.rightbar {
  height: 100%;
  overflow: hidden;
  padding: 0 .5rem;
}

.scroll {
  overflow: visible;
}

/* ===== LEFT / sidebar ===== */
.sidebar {
  height: 100%;
  overflow: auto;
  display: flex;
  flex-direction: column;
  padding: 8px 6px;
}
.brand {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  transition: background 0.15s;
}
.brand:hover {
  background: var(--hover);
}

nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: 2rem;

}
nav ul li {
  align-self: flex-start;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 1rem;
  border-radius: 999px;
  line-height: 1;
  font-size: 20px;
  color: var(--fg);
  text-decoration: none;
  transition: background 0.15s, transform 0.05s;
  width: 100%;
  box-sizing: border-box;
  padding-left: 0.5rem;
}
.nav-item:hover {
  background: var(--hover);
}
.nav-item:active {
  transform: scale(0.98);
}

.icon {
  width: 24px;
  height: 24px;
  display: inline-block;
}
.icon.sm {
  width: 15px;
  height: 15px;
  display: inline-block;
}
/* compact reply actions look */
.actions-sm { padding: 6px 0; }
.actions-sm .action { gap: 6px; padding: 6px 8px; font-size: 13px; }


/* feather uses currentColor */
.actions-sm .icon, .actions-sm .feather { width: 18px; height: 18px; }

 
.badge {
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 6px;
  margin-left: 8px;
}



.post-btn {
  display: block;
  width: 100%;
  background: var(--button);
  color: var(--button-fg);
  border: none;
  border-radius: 999px;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  transition: filter 0.15s, transform 0.05s;
  margin-top: 2rem;
}
.post-btn:hover {
  filter: brightness(0.95);
}
.post-btn:active {
  transform: translateY(1px);
}

/* ===== CENTER ===== */
#section2 {
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  backdrop-filter: saturate(180%) blur(8px);
  background: rgba(0, 0, 0, 0.7);
}
.topbar h2 {
  font-size: 20px;
  font-weight: 800;
}
.topbar .reply-btn {
  padding: 8px 14px;
  border: 1px solid var(--border);
  color: var(--fg);
  background: transparent;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}


/* feed */
.tweet {
  padding: 12px 16px 3px;
  border-bottom: 1px solid var(--border);
}
.tweet .header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #222;
  flex: 0 0 auto;
  img{
    width: 100%;
    border-radius: inherit;
  }
}
.logo {
  width: 48px;
  height: 48px;
  border-radius: 4px;
}
.logo img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.mention {
  color: var(--accent);
  text-decoration: none;
}
.mention:hover {
  text-decoration: underline;
}

.who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 15rem;
}
.name {
  font-weight: 800;
}
.handle {
  color: var(--muted);
  font-size: 14px;
}

.tweet .text {
  font-size: 20px;
  line-height: 1.4;
  margin: 8px 0 12px;
}
.media {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.media img {
  display: block;
  width: 100%;
  height: auto;
}
.link-meta {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.meta.side {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  color: var(--muted);
  font-size: 14px;
  padding: 0 0 12px 0;
  border-bottom: none;
}
.meta b {
  color: var(--fg);
}

.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding:  0;
  
}
.actions button {
  background: none !important;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
    color: rgb(113, 118, 123);

  svg {
    max-height: 1rem;
    color: rgb(113, 118, 123);
  }
}

.actions.actions-sm {
  margin-top: .5rem;
}
.action {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 999px;
}
.action:hover {
  background: #0084d14d !important;
  color: #0084d1 !important;
}
.action:hover svg{
   color: #0084d1 !important;
}

.composer {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.composer input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--fg);
  font-size: 16px;
  outline: none;
}
.composer .reply-pill {
    background-color: rgb(239, 243, 244);
    border-color: rgba(0, 0, 0, 0);  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  color:#000;
  font-weight: 600;
}

.reply {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.reply .body {
  flex: 1;
}
.reply .row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.reply .row .name {
  font-weight: 700;
}
.reply .row .handle {
  color: var(--muted);
  font-size: 14px;
}

/* ===== RIGHT ===== */
.rightbar {
  height: 100%;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* search */
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  margin-bottom: 4px;
}
.search .icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-size: 15px;
}

/* cards */
.card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
}
.card h3 {
  font-size: 20px;
  font-weight: 800;
  margin: 4px 6px 8px;
}

.profile {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
}
.profile .avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #222;
}

.profile .meta {
  flex: 1;
}
.profile .name {
  font-weight: 800;
  color: white;
}
.profile .handle {
  color: var(--muted);
  font-size: 14px;
}

.profile .follow-btn {
  align-self: start;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: #000;
  font-weight: 700;
  cursor: pointer;
}

/* bio under card, full width with indent (matches your inline layout) */
.bio {
  margin-top: 6px;
  color: var(--fg);
  font-size: 14px;
}
.bio-full {
  padding-left: 2rem;
  font-size: 15px;
}

.trend {
  padding: 12px;
}
.trend .label {
  color: var(--muted);
  font-size: 13px;
}
.trend .topic {
  font-weight: 800;
  margin: 2px 0;
}
.trend .posts {
  color: var(--muted);
  font-size: 13px;
}
.card .more {
  color: var(--accent);
  padding: 12px;
  display: inline-block;
  text-decoration: none;
}

/* footer */
.footer {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  padding: 0 6px 30px;
}
.footer a {
  color: var(--muted);
  text-decoration: none;
}
.footer a:hover {
  text-decoration: underline;
}

/* <=1300px: icon-only sidebar */
@media (max-width: 1300px) {
  section {
    grid-template-columns: 80px 7fr 3fr;
    gap: .5rem;
  }

  .nav-item .label {
    display: none !important;
  }
}
@media (max-width: 1000px) {
  section {
    grid-template-columns: 80px 1fr;
    gap: .5rem;
  }
  #section3 {
    display: none !important
  }
  .nav-item .label {
    display: none !important;
  }
}
