:root {
  color-scheme: light;
  --ink: #221713;
  --muted: #7d635b;
  --line: #ecd8cf;
  --paper: #fffaf7;
  --panel: #ffffff;
  --accent: #ee4d2d;
  --accent-dark: #bc321a;
  --sage: #5f7d6b;
  --rose: #d96b7d;
  --sky: #4f7ea8;
  --gold: #b88735;
  --shadow: 0 18px 50px rgba(76, 39, 24, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(238, 77, 45, 0.16), transparent 32rem),
    linear-gradient(135deg, #fff6f0 0%, #f6fbf8 48%, #fff3f5 100%);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.profile {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 18px;
  align-items: center;
  min-height: 34vh;
  padding: 28px 0 18px;
}

.avatar {
  display: grid;
  width: 78px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--accent), #ff8a67);
  box-shadow: var(--shadow);
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(2.4rem, 8vw, 5.7rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.subtitle {
  max-width: 520px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0 16px;
  background: linear-gradient(180deg, rgba(255, 250, 247, 0.96), rgba(255, 250, 247, 0.76));
  backdrop-filter: blur(16px);
}

.tabs {
  display: flex;
  flex: 1 1 auto;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.tabs a {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #5d453d;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  transition: all 180ms ease;
}

.tabs a:hover,
.tabs a:focus-visible {
  border-color: rgba(238, 77, 45, 0.45);
  background: #fff;
  color: var(--accent-dark);
}

.search-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(320px, 42vw);
  border: 1px solid rgba(236, 216, 207, 0.96);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 30px rgba(76, 39, 24, 0.06);
}

.search-icon {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 800;
}

.search-shell input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
  color: var(--ink);
  font: inherit;
}

.search-shell input::placeholder {
  color: #a28a82;
}

.category {
  padding: 30px 0 10px;
}

.category-heading {
  display: flex;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.category-heading span {
  color: var(--accent);
  font-weight: 800;
}

.category-heading h2 {
  font-size: clamp(1.45rem, 4vw, 2.3rem);
  line-height: 1;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 210px));
  justify-content: start;
  gap: 14px;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed rgba(238, 77, 45, 0.42);
  border-radius: 14px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--muted);
  font-weight: 700;
}

.card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid rgba(236, 216, 207, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 30px rgba(76, 39, 24, 0.08);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card:hover,
.card:focus-visible {
  border-color: rgba(238, 77, 45, 0.45);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.photo {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  background: var(--tone, #f6ebe4);
}

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

.photo.fallback::before {
  content: "";
  position: absolute;
  inset: 18%;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px;
}

.photo.fallback strong {
  position: relative;
  width: 60%;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  line-height: 1.15;
  text-align: center;
}

.content {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.tag {
  width: max-content;
  border-radius: 999px;
  padding: 6px 9px;
  background: #fff0eb;
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 800;
}

.title {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}

.hint {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  margin: 0 14px 14px;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.button span {
  font-size: 1.1rem;
}

@media (max-width: 760px) {
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-shell {
    min-width: 100%;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 22px, 420px);
    padding-top: 18px;
  }

  .profile {
    grid-template-columns: 58px 1fr;
    gap: 13px;
    min-height: 28vh;
  }

  .avatar {
    width: 58px;
    border-radius: 18px;
  }

  .grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .card {
    min-height: 286px;
  }

  .content {
    padding: 10px;
  }

  .title {
    font-size: 0.88rem;
  }

  .hint {
    display: none;
  }

  .button {
    min-height: 42px;
    margin: 0 10px 10px;
    padding: 0 10px;
    font-size: 0.84rem;
  }
}
