 :root {
    --li-blue: #0a66c2;
    --li-blue-dark: #004182;
    --li-blue-light: #e8f0fe;
    --bg: #f3f2ef;
    --card: #ffffff;
    --border: #e0ddd8;
    --text-primary: #191919;
    --text-secondary: #666360;
    --text-muted: #999795;
    --green: #057642;
    --shadow: 0 0 0 1px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.06);
    --shadow-hover: 0 0 0 1px rgba(0,0,0,.1), 0 4px 12px rgba(0,0,0,.12);
  }

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

  body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
  }

  /* NAVBAR */
  nav {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
  }

  .nav-inner {
    max-width: 1128px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 52px;
    gap: 8px;
  }

  .logo {
    margin-right: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
  }

  .search-box {
    display: flex;
    align-items: center;
    background: #eef3f8;
    border-radius: 4px;
    padding: 6px 12px;
    gap: 8px;
    flex: 0 1 280px;
  }
  .search-box svg { color: var(--text-secondary); flex-shrink: 0; }
  .search-box input {
    border: none; background: transparent; outline: none;
    font-size: 14px; font-family: inherit; color: var(--text-primary);
    width: 100%;
  }

  .nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
  }

  .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: background .15s;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 11px;
    min-width: 60px;
  }
  .nav-item:hover { background: rgba(0,0,0,.04); color: var(--text-primary); }
  .nav-item.active { color: var(--text-primary); }
  .nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0; right: 0;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px 2px 0 0;
  }
  .nav-icon { font-size: 20px; margin-bottom: 2px; }

  .badge {
    position: absolute;
    top: 4px; right: 10px;
    background: #e34e2e;
    color: white;
    font-size: 10px;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
  }

  .nav-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
    margin: 0 8px;
  }

  .btn-premium {
    font-size: 12px;
    font-weight: 600;
    color: #915907;
    border: 1px solid #915907;
    border-radius: 16px;
    padding: 5px 12px;
    cursor: pointer;
    background: transparent;
    font-family: inherit;
    white-space: nowrap;
    transition: background .15s;
  }
  .btn-premium:hover { background: #fff7ed; }

  /* LAYOUT */
  .main {
    max-width: 1128px;
    margin: 24px auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 225px 1fr 300px;
    gap: 24px;
    align-items: start;
  }

  /* CARD */
  .card {
    background: var(--card);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow .2s;
  }
  .card:hover { box-shadow: var(--shadow-hover); }

  /* LEFT SIDEBAR */
  .profile-card .cover {
    height: 56px;
    background: linear-gradient(135deg, #0a66c2 0%, #004182 50%, #0e76a8 100%);
    position: relative;
  }

  .profile-card .avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    border: 3px solid white;
    position: absolute;
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%);
    object-fit: cover;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: white;
    overflow: hidden;
  }

  .profile-info {
    padding: 44px 16px 16px;
    text-align: center;
    border-bottom: 1px solid var(--border);
  }
  .profile-info .name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
  }
  .profile-info .headline {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 8px;
    text-decoration: none;
  }

  .profile-stats {
    padding: 8px 16px;
    border-bottom: 1px solid var(--border);
  }
  .stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    cursor: pointer;
    border-radius: 4px;
    padding: 6px 4px;
    transition: background .15s;
  }
  .stat-row:hover { background: var(--bg); }
  .stat-label { font-size: 12px; color: var(--text-secondary); }
  .stat-value { font-size: 13px; font-weight: 600; color: var(--li-blue); }

  .profile-extras {
    padding: 12px 16px;
  }
  .extra-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color .15s;
  }
  .extra-item:hover { color: var(--text-primary); }
  .extra-icon { font-size: 16px; }

  /* FEED */
  .post-composer {
    padding: 12px 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid var(--border);
  }

  .mini-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    border: 2px solid var(--border);
  }

  .composer-btn {
    flex: 1;
    border: 1.5px solid var(--border);
    border-radius: 35px;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background .15s, border-color .15s;
  }
  .composer-btn:hover { background: var(--bg); border-color: #b0b0b0; }

  .composer-actions {
    display: flex;
    padding: 4px 8px 8px;
    gap: 4px;
  }
  .action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 4px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: inherit;
    transition: background .15s;
  }
  .action-btn:hover { background: var(--bg); color: var(--text-primary); }

  /* POST */
  .post { border-bottom: 8px solid var(--bg); }
  .post:last-child { border-bottom: none; }

  .post-header {
    display: flex;
    gap: 10px;
    padding: 12px 16px 8px;
    align-items: flex-start;
  }

  .post-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: white;
    cursor: pointer;
  }

  .post-meta { flex: 1; }
  .post-author {
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-primary);
  }
  .post-author:hover { color: var(--li-blue); text-decoration: underline; }
  .post-tagline { font-size: 12px; color: var(--text-secondary); margin: 1px 0; }
  .post-time { font-size: 12px; color: var(--text-muted); }

  .post-follow-btn {
    border: none;
    background: transparent;
    color: var(--li-blue);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background .15s;
    white-space: nowrap;
  }
  .post-follow-btn:hover { background: var(--li-blue-light); }

  .post-content {
    padding: 0 16px 12px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
  }
  .post-content strong { font-weight: 600; }
  .post-content .hashtag { color: var(--li-blue); cursor: pointer; }
  .post-content .hashtag:hover { text-decoration: underline; }

  .post-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
  }

  .post-reactions {
    display: flex;
    justify-content: space-between;
    padding: 6px 16px;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 8px;
  }

  .reaction-icons { display: flex; gap: 2px; }
  .reaction-icon {
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 1.5px solid white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    margin-left: -4px;
  }
  .r-like { background: #0a66c2; }
  .r-love { background: #e34e2e; }
  .r-insightful { background: #f5a623; }

  .post-actions {
    display: flex;
    border-top: 1px solid var(--border);
    margin: 0 8px;
  }
  .post-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 0;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: inherit;
    cursor: pointer;
    border-radius: 4px;
    transition: background .15s, color .15s;
  }
  .post-action-btn:hover { background: var(--bg); color: var(--text-primary); }

  /* RIGHT SIDEBAR */
  .news-card .card-header,
  .ads-card .card-header {
    padding: 12px 16px 4px;
    font-size: 15px;
    font-weight: 600;
  }

  .news-item {
    display: flex;
    gap: 8px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background .15s;
    align-items: flex-start;
  }
  .news-item:hover { background: var(--bg); }
  .news-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--text-primary);
    flex-shrink: 0;
    margin-top: 6px;
  }
  .news-text { font-size: 13px; font-weight: 500; line-height: 1.4; }
  .news-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

  .show-more {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .show-more:hover { color: var(--text-primary); }

  .ad-card-inner {
    padding: 12px 16px;
    text-align: center;
  }
  .ad-img {
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, #11998e, #38ef7d);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 8px;
  }
  .ad-text { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
  .ad-sub { font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }
  .btn-ad {
    border: 1.5px solid var(--text-secondary);
    border-radius: 16px;
    padding: 6px 20px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    background: transparent;
    transition: background .15s;
  }
  .btn-ad:hover { background: var(--bg); }

  /* STICKY SIDEBAR */
  .sidebar-sticky { position: sticky; top: 70px; display: flex; flex-direction: column; gap: 8px; }

  /* CONNECTIONS SECTION */
  .connections-card .card-header {
    padding: 12px 16px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .connections-title { font-size: 15px; font-weight: 600; }
  .connections-link { font-size: 13px; font-weight: 600; color: var(--text-secondary); cursor: pointer; }
  .connections-link:hover { color: var(--li-blue); text-decoration: underline; }

  .connection-item {
    display: flex;
    gap: 10px;
    padding: 8px 16px;
    align-items: center;
    cursor: pointer;
    transition: background .15s;
  }
  .connection-item:hover { background: var(--bg); }
  .conn-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
  }
  .conn-info { flex: 1; min-width: 0; }
  .conn-name { font-size: 13px; font-weight: 500; }
  .conn-title { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .btn-connect {
    border: 1.5px solid var(--li-blue);
    border-radius: 16px;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    background: transparent;
    color: var(--li-blue);
    transition: background .15s;
    white-space: nowrap;
  }
  .btn-connect:hover { background: var(--li-blue-light); }

  /* TRENDING SECTION */
  .feed-sort {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 8px 16px;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
  }
  .feed-sort:hover { color: var(--text-primary); }

  @media (max-width: 900px) {
    .main { grid-template-columns: 1fr; }
    .left-sidebar, .right-sidebar { display: none; }
  }

  /* ANIMATIONS */
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .card { animation: fadeIn .3s ease both; }
  .card:nth-child(2) { animation-delay: .05s; }
  .card:nth-child(3) { animation-delay: .1s; }

  .post { animation: fadeIn .3s ease both; }
  .post:nth-child(2) { animation-delay: .07s; }
  .post:nth-child(3) { animation-delay: .14s; }