:root {
  --text: #111318;
  --muted: #667085;
  --line: #e5e7eb;
  --panel: #ffffff;
  --soft: #f5f7fb;
  --blue: #0057ff;
  --blue-dark: #0043c7;
  --green: #10815b;
  --rose: #d43f6a;
  --amber: #ba6b00;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: #ffffff;
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 780;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  font-size: 15px;
}

.primary-nav,
.top-actions,
.toolbar-actions,
.category-strip {
  display: flex;
  align-items: center;
}

.primary-nav {
  gap: 2px;
}

.primary-nav a {
  border-radius: 8px;
  padding: 10px 12px;
  color: #4b5563;
  font-size: 14px;
  font-weight: 680;
}

.primary-nav a.active,
.primary-nav a:hover {
  background: #eef3ff;
  color: var(--blue);
}

.search {
  position: relative;
  min-width: 0;
}

.search svg {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: #727985;
}

.search input {
  width: 100%;
  height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  outline: none;
  background: #eef0f4;
  padding: 0 16px 0 42px;
  transition:
    border 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.search input:focus {
  border-color: rgba(0, 87, 255, 0.35);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 87, 255, 0.11);
}

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

.icon-button,
.ghost-button,
.solid-button,
.filter-button,
.chip,
.mini-button,
.round-action {
  border: 0;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: #f0f2f6;
  color: #1f2937;
}

.icon-button svg,
.filter-button svg,
.project-stats svg,
.card-heading svg {
  width: 18px;
  height: 18px;
}

.ghost-button,
.solid-button {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 760;
}

.ghost-button {
  background: transparent;
  color: #1f2937;
}

.solid-button {
  background: var(--blue);
  color: #fff;
}

.solid-button:hover {
  background: var(--blue-dark);
  box-shadow: 0 10px 24px rgba(0, 87, 255, 0.24);
}

.icon-button:hover,
.ghost-button:hover,
.filter-button:hover,
.chip:hover,
.mini-button:hover {
  transform: translateY(-1px);
}

main {
  width: min(1840px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.feed-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1;
  letter-spacing: 0;
}

.toolbar-actions {
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 8px;
  background: #f3f4f6;
  color: #2f3744;
  padding: 0 14px;
  font-weight: 720;
}

.filter-button.is-selected {
  background: #111318;
  color: #fff;
}

.category-strip {
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0 22px;
  scrollbar-width: none;
}

.category-strip::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #3b4350;
  padding: 0 16px;
  font-weight: 720;
}

.chip.active {
  border-color: #111318;
  background: #111318;
  color: #fff;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
  gap: 28px;
}

.gallery {
  column-count: 4;
  column-gap: 22px;
}

.project-card {
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  margin: 0 0 24px;
  vertical-align: top;
}

.project-media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: var(--soft);
  box-shadow: inset 0 0 0 1px rgba(17, 19, 24, 0.04);
}

.project-media img {
  display: block;
  width: 100%;
  aspect-ratio: var(--ratio, 4 / 3);
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 260ms ease, filter 260ms ease;
}

.project-card:hover .project-media img {
  transform: scale(1.035);
  filter: brightness(0.82);
}

.project-overlay {
  position: absolute;
  inset: auto 12px 12px auto;
  display: flex;
  gap: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
  transform: translateY(0);
}

.round-action {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #111318;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.round-action svg {
  width: 17px;
  height: 17px;
}

.project-meta {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
}

.project-meta h2 {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: 0;
}

.project-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

.project-category {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eef3ff;
  color: var(--blue);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 800;
}

.project-stats {
  display: flex;
  gap: 12px;
  margin-top: 9px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.project-stats span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.project-stats svg {
  width: 14px;
  height: 14px;
}

.side-panel {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
}

.personal-card,
.trend-list,
.creator-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
}

.personal-card {
  background:
    linear-gradient(135deg, rgba(0, 87, 255, 0.1), transparent 42%),
    linear-gradient(160deg, rgba(16, 129, 91, 0.1), transparent 58%),
    #fff;
  box-shadow: var(--shadow);
}

.card-heading,
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-heading {
  justify-content: flex-start;
}

.card-heading h2,
.section-title h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0;
}

.card-heading svg {
  color: var(--blue);
}

.personal-card p {
  margin: 12px 0 18px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.55;
}

.wide {
  width: 100%;
}

.section-title {
  margin-bottom: 12px;
}

.section-title a {
  color: var(--blue);
  font-size: 13px;
  font-weight: 760;
}

.trend-list {
  display: grid;
  gap: 4px;
}

.trend-list a {
  display: flex;
  gap: 12px;
  border-radius: 8px;
  padding: 10px 8px;
  color: #1f2937;
  font-size: 14px;
  font-weight: 720;
}

.trend-list a:hover {
  background: #f2f5f9;
}

.trend-list span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.creator-list article {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

.creator-list article + article {
  border-top: 1px solid var(--line);
}

.creator-list img {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: cover;
}

.creator-list strong {
  display: block;
  font-size: 14px;
}

.creator-list span {
  color: var(--muted);
  font-size: 12px;
}

.mini-button {
  min-height: 32px;
  border-radius: 999px;
  background: #eef3ff;
  color: var(--blue);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
}

.empty-state {
  display: grid;
  min-height: 260px;
  place-items: center;
  border: 1px dashed #cfd5df;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: #111318;
  font-size: 18px;
}

@media (max-width: 1280px) {
  .gallery {
    column-count: 3;
  }
}

@media (max-width: 1020px) {
  .topbar {
    grid-template-columns: auto 1fr auto;
  }

  .primary-nav {
    display: none;
  }

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

  .side-panel {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 12px 16px;
  }

  .brand span:last-child,
  .top-actions .ghost-button,
  .top-actions .solid-button {
    display: none;
  }

  .search {
    grid-column: 1 / -1;
    order: 3;
  }

  main {
    padding: 20px 16px 40px;
  }

  .feed-toolbar {
    align-items: start;
    flex-direction: column;
    gap: 16px;
  }

  .gallery {
    column-count: 2;
    column-gap: 14px;
  }

  .project-card {
    margin-bottom: 18px;
  }

  .project-category {
    display: none;
  }

  .side-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 470px) {
  .gallery {
    column-count: 1;
  }

  .toolbar-actions {
    width: 100%;
  }

  .filter-button {
    flex: 1 1 30%;
    justify-content: center;
    padding: 0 10px;
  }
}
