/* =========================================================
   GLOBAL
========================================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  background: #08090b;
  color: #f4f4f0;

  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}


/* =========================================================
   HEADER
========================================================= */

.site-header {
  position: sticky;
  top: 16px;
  z-index: 50;

  width: min(
    calc(100% - 32px),
    1500px
  );

  margin: 16px auto 0;
}

.header-inner {
  min-height: 72px;

  display: flex;
  align-items: center;

  gap: 24px;

  padding: 12px 16px;

  background: rgba(18, 19, 22, .94);

  border: 1px solid #292b30;
  border-radius: 22px;

  box-shadow:
    0 20px 50px rgba(0, 0, 0, .3);

  backdrop-filter: blur(18px);
}


/* =========================================================
   BRAND
========================================================= */

.brand {
  display: flex;
  align-items: center;
  gap: 0px;
  color: #f4f4f0;
  text-decoration: none;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand-text {
  color: #f4f4f0;
  font-weight: 800;
}

.brand-badge {
  display: inline-grid;
  place-items: center;
  margin-left: 2px;
  padding: 4px 12px;
  background: #0066ff;
  color: #ffffff;
  border-radius: 10px;
  font-weight: 800;
}


/* =========================================================
   NAVIGATION
========================================================= */

.main-nav {
  display: flex;
  align-items: center;

  gap: 6px;

  margin-left: 12px;
}

.nav-tab,
.filter-tab {
  border: 0;
  outline: 0;

  background: transparent;
  color: #8d9098;

  padding: 10px 14px;

  border-radius: 999px;

  transition:
    background .2s ease,
    color .2s ease;
}

.nav-tab:hover,
.filter-tab:hover {
  color: white;

  background: #202126;
}

.nav-tab.active,
.filter-tab.active {
  color: white;

  background: #292b31;
}


/* =========================================================
   HEADER ACTIONS
========================================================= */

.header-actions {
  margin-left: auto;

  display: flex;
  align-items: center;

  gap: 10px;

  min-width: 0;
}

.search-box {
  width: 260px;

  display: flex;
  align-items: center;

  gap: 8px;

  padding: 10px 12px;

  border: 1px solid #292b30;
  border-radius: 12px;

  background: #111216;
}

.search-box span {
  color: #777b84;
}

.search-box input {
  width: 100%;

  border: 0;
  outline: 0;

  background: transparent;
  color: white;
}

.search-box input::placeholder {
  color: #666a73;
}

.search-box kbd {
  color: #666a73;
}

.account-button,
.post-button {
  border: 0;

  border-radius: 12px;

  padding: 11px 16px;

  white-space: nowrap;

  transition:
    transform .15s ease,
    background .15s ease;
}

.account-button {
  background: #202126;
  color: white;
}

.account-button:hover {
  background: #292b31;
}

.post-button {
  background: #f4f4f0;
  color: #08090b;

  font-weight: 700;
}

.post-button:hover {
  transform: translateY(-1px);
}


/* =========================================================
   PAGE
========================================================= */

.page {
  width: min(
    calc(100% - 32px),
    1500px
  );

  margin: 0 auto;

  padding: 90px 0 120px;
}


/* =========================================================
   HERO
========================================================= */

.hero {
  display: grid;

  grid-template-columns:
    minmax(0, 1.15fr)
    minmax(360px, .85fr);

  gap: clamp(
    40px,
    8vw,
    140px
  );

  align-items: center;

  padding: 50px 0 100px;
}

.hero-copy {
  min-width: 0;
}

.eyebrow,
.hero-card-top {
  color: #777b84;

  font-size: 11px;

  font-weight: 800;

  letter-spacing: .16em;
}

.hero h1 {
  max-width: 850px;

  margin: 18px 0;

  font-size:
    clamp(
      58px,
      8vw,
      120px
    );

  line-height: .9;

  letter-spacing: -.065em;
}

.hero h1 em {
  color: #777b84;

  font-style: normal;
}

.hero-copy > p {
  max-width: 600px;

  color: #999ca4;

  font-size: 20px;

  line-height: 1.6;
}


/* =========================================================
   HERO CARD
========================================================= */

.hero-card {
  min-height: 360px;

  display: flex;
  flex-direction: column;

  padding: 34px;

  border: 1px solid #2b2d32;
  border-radius: 26px;

  background:
    linear-gradient(
      145deg,
      #1b1d21,
      #101114
    );

  box-shadow:
    0 30px 80px rgba(0, 0, 0, .3);
}

.hero-card h2 {
  margin-top: 60px;

  font-size: 36px;

  line-height: 1.05;
}

.hero-card h2 em {
  color: #777b84;

  font-style: normal;
}

.hero-card p {
  color: #8f929a;

  line-height: 1.6;
}

.hero-card-footer {
  margin-top: auto;

  display: flex;
  justify-content: space-between;

  padding-top: 30px;

  border-top: 1px solid #2a2c31;

  color: #737780;

  font-size: 11px;

  font-weight: 800;

  letter-spacing: .12em;
}


/* =========================================================
   FEED HEADER
========================================================= */

.feed-header {
  display: flex;
  align-items: center;

  gap: 28px;

  margin-bottom: 28px;

  padding-bottom: 18px;

  border-bottom: 1px solid #202126;
}

.feed-label {
  display: flex;
  align-items: center;

  gap: 8px;

  color: #a5a8b0;

  font-size: 14px;

  font-weight: 600;

  white-space: nowrap;
}

.feed-label span {
  color: #666a72;
}

.filter-tabs {
  display: flex;
  align-items: center;

  gap: 6px;

  flex-wrap: wrap;
}


/* =========================================================
   POSTS
========================================================= */

.posts {
  width: min(
    100%,
    920px
  );

  display: flex;
  flex-direction: column;

  gap: 20px;
}


/* =========================================================
   STORY CARD
========================================================= */

.story-card {
  position: relative;

  width: 100%;

  overflow: hidden;

  border: 1px solid #292b30;

  border-radius: 24px;

  background:
    linear-gradient(
      145deg,
      #15171b 0%,
      #101114 100%
    );

  box-shadow:
    0 18px 50px rgba(0, 0, 0, .22);

  transition:
    transform .2s ease,
    border-color .2s ease,
    box-shadow .2s ease;
}

.story-card:hover {
  transform: translateY(-2px);

  border-color: #3a3d43;

  box-shadow:
    0 24px 65px rgba(0, 0, 0, .3);
}


/* =========================================================
   STORY MEDIA FIXES
========================================================= */

.story-media {
  position: relative;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 30px;
  background: 
    radial-gradient(
      circle at 85% 20%,
      rgba(255, 255, 255, .07),
      transparent 35%
    ),
    linear-gradient(
      135deg,
      #202329,
      #111216
    );
  border-bottom: 1px solid #292b30;
}

.story-media-left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.story-card .story-author {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid #34363c;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  color: #c0c3cb;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.story-card .story-author:hover {
  background: #25272d;
  border-color: #484b53;
  color: white;
}


/* COMPANY AVATAR */

.story-company-avatar {
  width: 64px;
  height: 64px;

  flex: 0 0 64px;

  display: grid;
  place-items: center;

  border-radius: 18px;

  background: #f4f4f0;
  color: #090a0c;

  font-size: 25px;

  font-weight: 900;

  box-shadow:
    0 10px 30px rgba(0, 0, 0, .25);
}


/* MEDIA CONTENT */

.story-media-content {
  display: flex;
  flex-direction: column;

  gap: 7px;

  min-width: 0;
}

.story-media-label {
  color: #777b84;

  font-size: 10px;

  font-weight: 900;

  letter-spacing: .17em;
}

.story-media-company {
  max-width: 500px;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  color: white;

  font-size: 24px;

  font-weight: 800;

  letter-spacing: -.03em;
}


/* =========================================================
   ANONYMOUS BADGE
========================================================= */

.story-anonymous {
  margin-left: auto;

  display: flex;
  align-items: center;

  gap: 8px;

  padding: 8px 11px;

  border: 1px solid #34363c;

  border-radius: 999px;

  background: rgba(0, 0, 0, .22);

  color: #8c9098;

  font-size: 10px;

  font-weight: 800;

  letter-spacing: .1em;

  white-space: nowrap;
}

.story-anonymous span {
  width: 6px;
  height: 6px;

  border-radius: 50%;

  background: #777b84;
}


/* =========================================================
   STORY HEADER
========================================================= */

.story-header {
  padding: 28px 30px 0;
}

.story-category {
  display: inline-flex;

  padding: 7px 11px;

  border: 1px solid #303238;

  border-radius: 999px;

  background: #202227;

  color: #a4a7af;

  font-size: 11px;

  font-weight: 800;

  letter-spacing: .04em;
}

.story-company {
  display: block;

  margin-top: 20px;

  padding: 0;

  border: 0;

  background: transparent;

  color: #8d9098;

  font-size: 13px;

  font-weight: 700;

  text-align: left;
}

.story-company:hover {
  color: white;
}

.story-header h2 {
  margin: 7px 0 0;

  color: #f4f4f0;

  font-size:
    clamp(
      30px,
      4vw,
      42px
    );

  line-height: 1;

  letter-spacing: -.045em;
}


/* =========================================================
   STORY BODY
========================================================= */

.story-body {
  padding: 22px 30px 0;

  color: #b0b3ba;

  font-size: 17px;

  line-height: 1.75;

  white-space: pre-wrap;

  overflow-wrap: anywhere;
}


/* =========================================================
   STORY METADATA
========================================================= */

.story-metadata {
  display: flex;
  align-items: center;

  flex-wrap: wrap;

  gap: 9px;

  padding: 22px 30px 26px;

  color: #777b84;

  font-size: 12px;

  font-weight: 600;
}

.story-metadata b {
  color: #45484f;

  font-weight: 400;
}

.story-rating {
  color: #d5d5cf;
}


/* =========================================================
   STORY FOOTER
========================================================= */

.story-footer {
  display: flex;
  align-items: center;

  justify-content: space-between;

  gap: 12px;

  padding: 14px 22px;

  border-top: 1px solid #25272c;

  background: rgba(8, 9, 11, .3);
}

.story-actions,
.story-footer-right {
  display: flex;
  align-items: center;

  gap: 4px;
}


/* =========================================================
   STORY ACTION
========================================================= */

.story-action {
  display: inline-flex;
  align-items: center;

  gap: 7px;

  padding: 9px 12px;

  border: 0;

  border-radius: 10px;

  background: transparent;

  color: #858891;

  font-size: 13px;

  font-weight: 600;

  transition:
    background .15s ease,
    color .15s ease;
}

.story-action:hover {
  background: #202227;

  color: white;
}

.story-action span:first-child {
  font-size: 17px;
}

.story-action.liked {
  color: #ff707b;
}


/* =========================================================
   SHARE
========================================================= */

.story-share {
  padding: 9px 13px;

  border: 1px solid #303238;

  border-radius: 10px;

  background: #191b20;

  color: #a7aab2;

  font-size: 12px;

  font-weight: 700;

  transition:
    background .15s ease,
    color .15s ease,
    border-color .15s ease;
}

.story-share:hover {
  background: #25272d;

  border-color: #41444b;

  color: white;
}


/* =========================================================
   COMMENTS
========================================================= */

.story-comments {
  padding: 20px 30px 25px;

  border-top: 1px solid #25272c;

  background: #0d0f12;
}

.story-comments-title {
  margin-bottom: 15px;

  color: #777b84;

  font-size: 10px;

  font-weight: 900;

  letter-spacing: .16em;
}

.empty-comments {
  margin: 0 0 15px;

  color: #666a72;

  font-size: 13px;
}

.story-comment {
  padding: 13px 0;

  border-bottom: 1px solid #202227;
}

.comment-author {
  margin-bottom: 5px;

  color: #d4d5d8;

  font-size: 12px;

  font-weight: 700;
}

.comment-content {
  color: #92959d;

  font-size: 14px;

  line-height: 1.5;

  overflow-wrap: anywhere;
}


/* =========================================================
   COMMENT INPUT
========================================================= */

.story-comment-input {
  display: flex;

  gap: 8px;

  margin-top: 16px;
}

.story-comment-input input {
  flex: 1;

  min-width: 0;

  padding: 10px 12px;

  border: 1px solid #292b30;

  border-radius: 10px;

  outline: 0;

  background: #15171b;

  color: white;
}

.story-comment-input input:focus {
  border-color: #484b53;
}

.story-comment-input button {
  padding: 10px 15px;

  border: 0;

  border-radius: 10px;

  background: #f4f4f0;

  color: #08090b;

  font-weight: 700;
}


/* =========================================================
   NO RESULTS
========================================================= */

.no-results {
  padding: 70px 30px;

  border: 1px solid #292b30;

  border-radius: 22px;

  background: #111216;

  text-align: center;
}

.no-results h3 {
  margin: 0 0 8px;

  color: #f4f4f0;

  font-size: 24px;
}

.no-results p {
  margin: 0 0 22px;

  color: #777b84;
}

.no-results button {
  padding: 11px 16px;

  border: 0;

  border-radius: 11px;

  background: #f4f4f0;

  color: #08090b;

  font-weight: 700;
}


/* =========================================================
   LOADING
========================================================= */

.loading {
  padding: 60px;

  text-align: center;

  color: #777b84;
}


/* =========================================================
   EMPTY
========================================================= */

.empty {
  padding: 80px 20px;

  text-align: center;

  color: #8c8f97;
}


/* =========================================================
   PROFILE
========================================================= */

.profile-page {
  width: min(
    calc(100% - 32px),
    900px
  );

  margin: 100px auto;
}

.profile-card {
  padding: 40px;

  border: 1px solid #292b30;

  border-radius: 24px;

  background: #111216;

  text-align: center;
}

.profile-avatar {
  width: 90px;
  height: 90px;

  display: grid;
  place-items: center;

  margin: 0 auto 20px;

  border-radius: 50%;

  background: #292b30;

  font-size: 32px;

  font-weight: 800;

  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-stats {
  display: flex;

  justify-content: center;

  gap: 50px;

  margin: 30px 0;
}

.profile-stats div {
  display: flex;
  flex-direction: column;

  gap: 4px;
}

.profile-stats span {
  color: #777b84;

  font-size: 13px;
}


/* =========================================================
   MODALS
========================================================= */

.modal {
  position: fixed;

  inset: 0;

  z-index: 100;

  display: grid;

  place-items: center;

  padding: 20px;

  background: rgba(0, 0, 0, .7);

  backdrop-filter: blur(10px);
}

.modal-card {
  position: relative;

  width: min(
    100%,
    520px
  );

  max-height: calc(100vh - 40px);

  overflow-y: auto;

  padding: 32px;

  border: 1px solid #303238;

  border-radius: 24px;

  background: #111216;

  box-shadow:
    0 30px 100px rgba(0, 0, 0, .5);
}

.modal-card h2 {
  margin: 12px 0;

  font-size: 34px;
}

.modal-card p {
  color: #8c9098;

  line-height: 1.6;
}

.modal-card input,
.modal-card textarea,
.modal-card select {
  width: 100%;

  margin-top: 12px;

  padding: 13px 14px;

  border: 1px solid #2b2d32;

  border-radius: 12px;

  outline: 0;

  background: #090a0d;

  color: white;
}

.modal-card input:focus,
.modal-card textarea:focus,
.modal-card select:focus {
  border-color: #484b53;
}

.modal-card select {
  appearance: auto;
}

.modal-card textarea {
  resize: vertical;
}

.modal-close {
  position: absolute;

  top: 18px;
  right: 18px;

  border: 0;

  background: transparent;

  color: #777b84;

  font-size: 25px;
}

.modal-close:hover {
  color: white;
}

.full {
  width: 100%;

  margin-top: 16px;
}

.text-button {
  width: 100%;

  margin-top: 12px;

  padding: 12px;

  border: 0;

  background: transparent;

  color: #92959d;
}

.text-button:hover {
  color: white;
}


/* =========================================================
   RESPONSIVE — TABLET
========================================================= */

@media (max-width: 1100px) {

  .main-nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-card {
    max-width: 700px;
  }

}


/* =========================================================
   RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 700px) {

  .site-header {
    top: 8px;

    width: calc(100% - 16px);

    margin-top: 8px;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .header-actions {
    width: 100%;
  }

  .search-box {
    flex: 1;

    width: auto;
  }

  .page {
    width: calc(100% - 24px);

    padding-top: 50px;
  }

  .hero {
    padding-top: 20px;

    padding-bottom: 60px;
  }

  .hero h1 {
    font-size: 60px;
  }

  .feed-header {
    align-items: flex-start;

    flex-direction: column;

    gap: 12px;
  }


  /* STORY */

  .posts {
    width: 100%;
  }

  .story-media {
    min-height: 125px;

    padding: 22px;

    gap: 13px;
  }

  .story-company-avatar {
    width: 52px;
    height: 52px;

    flex-basis: 52px;

    border-radius: 15px;

    font-size: 20px;
  }

  .story-media-company {
    max-width: 180px;

    font-size: 19px;
  }

  .story-anonymous {
    display: none;
  }

  .story-header {
    padding: 22px 22px 0;
  }

  .story-header h2 {
    font-size: 32px;
  }

  .story-body {
    padding: 18px 22px 0;

    font-size: 15px;
  }

  .story-metadata {
    padding: 18px 22px 22px;
  }

  .story-footer {
    padding: 12px 15px;
  }

  .story-comments {
    padding: 18px 22px 22px;
  }

  .story-comment-input {
    flex-direction: column;
  }

  .story-comment-input button {
    width: 100%;
  }

}

/* =========================================================
   POST AUTHOR
========================================================= */

.story-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e8e8e5;
}

.story-author-avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: #111;
  color: #fff;

  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;

  text-transform: uppercase;
}

.story-author-info {
  min-width: 0;

  display: flex;
  flex-direction: column;
  gap: 2px;
}

.story-author-name {
  margin: 0;

  color: #111;

  font-size: 14px;
  font-weight: 700;

  line-height: 1.2;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.story-author-username {
  margin: 0;

  color: #777;

  font-size: 12px;
  font-weight: 500;

  line-height: 1.2;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.story-author-link {
  display: inline-flex;
  align-items: center;

  width: fit-content;

  text-decoration: none;

  color: inherit;

  cursor: pointer;
}

.story-author-link:hover .story-author-name {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.story-author-right {
  margin-left: auto;

  display: flex;
  align-items: center;
  gap: 8px;
}

.story-author-follow {
  border: 1px solid #d8d8d4;
  background: #fff;

  color: #111;

  padding: 7px 12px;

  border-radius: 999px;

  font-size: 12px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.story-author-follow:hover {
  background: #111;
  color: #fff;
  border-color: #111;
}

.story-author-follow.following {
  background: #111;
  color: #fff;
  border-color: #111;
}

.story-author-badge {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  width: 15px;
  height: 15px;

  margin-left: 4px;

  border-radius: 50%;

  background: #111;
  color: #fff;

  font-size: 9px;
  font-weight: 800;

  vertical-align: middle;
}

.story-author-avatar span {
  display: block;

  line-height: 1;
}

.story-author-container {
  margin-left: auto;
  display: flex;
  align-items: center;
}