:root {
  --header-height: 75px;
  --header-height-mobile: 132px;
  --bg: #080808;
  --panel: #111111;
  --panel-strong: #181818;
  --text: #f7f3ef;
  --muted: #b8aaa1;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #ff3b1f;
  --accent-2: #f6b44b;
  --danger: #ff5d6c;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: rgba(52, 52, 52, 0.64) rgba(8, 8, 8, 0.08);
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(8, 8, 8, 0.08);
}

::-webkit-scrollbar-thumb {
  border: 3px solid rgba(8, 8, 8, 0.92);
  border-radius: 999px;
  background: rgba(54, 54, 54, 0.62);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(120, 120, 120, 0.7);
}

::-webkit-scrollbar-button {
  width: 0;
  height: 0;
  display: none;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-top: var(--header-height);
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", Arial, sans-serif;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(8, 8, 8, 0.96), rgba(8, 8, 8, 0.78) 44%, rgba(8, 8, 8, 0.94)),
    url("assets/avatar.png") center / cover no-repeat;
  filter: saturate(0.92);
}

body::after {
  content: none;
}

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

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

button {
  cursor: pointer;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.34);
}

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

.header-inner {
  width: 100%;
  min-height: 74px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand {
  width: max-content;
  max-width: 100%;
  border: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text);
  background: transparent;
}

.brand__avatar-button {
  position: relative;
  width: 54px;
  height: 54px;
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: inherit;
}

.brand__avatar-button::before {
  content: none;
}

.brand__avatar-button::after {
  content: none;
}

.brand__avatar {
  width: 50px;
  height: 50px;
  position: relative;
  z-index: 1;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(142, 30, 22, 0.72);
  box-shadow: 0 0 18px rgba(120, 24, 18, 0.22);
}

.brand__name {
  border: 0;
  padding: 0;
  color: var(--text);
  background: transparent;
  font-size: 1.05rem;
  font-weight: 800;
}

.main-nav,
.lang-switch,
.owner-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

.main-nav {
  justify-self: start;
}

.main-nav a,
.owner-tabs button {
  position: relative;
  z-index: 0;
  flex: 0 0 auto;
  min-width: max-content;
  min-height: 42px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  font-size: 0.94rem;
  font-weight: 700;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.main-nav a::before,
.owner-tabs button::before {
  content: "";
  position: absolute;
  inset: 5px 2px;
  z-index: -1;
  border-radius: 7px;
  background: transparent;
  transform: skewX(-10deg) scaleX(0.9);
  opacity: 0;
  transition: opacity 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.main-nav a:hover,
.owner-tabs button:hover {
  color: var(--text);
  background: transparent;
  box-shadow: none;
}

.main-nav a:hover::before,
.owner-tabs button:hover::before {
  opacity: 1;
  background: rgba(255, 91, 73, 0.15);
  box-shadow: 0 0 20px rgba(255, 91, 73, 0.12);
  transform: skewX(-10deg) scaleX(1);
}

.main-nav a.is-active,
.owner-tabs button.is-active {
  color: #ff604b;
  background: transparent;
  box-shadow: none;
}

.main-nav a.is-active::before,
.owner-tabs button.is-active::before {
  opacity: 1;
  background: rgba(255, 82, 61, 0.23);
  box-shadow: 0 0 26px rgba(255, 82, 61, 0.2);
  transform: skewX(-10deg) scaleX(1);
}

.lang-switch {
  position: relative;
  grid-column: 3;
  justify-self: end;
  width: 58px;
  margin-left: auto;
  display: block;
}

.lang-switch__button {
  width: 58px;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0 7px 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  color: rgba(247, 243, 239, 0.78);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  outline: none;
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.lang-switch__button svg {
  width: 13px;
  height: 13px;
  opacity: 0.72;
  transition: transform 180ms ease, opacity 180ms ease;
}

.lang-switch__button:hover,
.lang-switch__button[aria-expanded="true"] {
  color: var(--text);
  border-color: rgba(255, 82, 61, 0.34);
  background: linear-gradient(180deg, rgba(255, 82, 61, 0.14), rgba(255, 82, 61, 0.045));
  box-shadow: 0 0 14px rgba(255, 59, 31, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.lang-switch__button[aria-expanded="true"] svg {
  opacity: 1;
  transform: rotate(180deg);
}

.lang-switch__menu {
  position: absolute;
  top: calc(100% - 2px);
  right: 4px;
  z-index: 35;
  width: 50px;
  display: grid;
  gap: 2px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top-color: rgba(255, 82, 61, 0.18);
  border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.98), rgba(10, 10, 10, 0.96));
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.44), 0 0 14px rgba(255, 59, 31, 0.07);
  backdrop-filter: blur(14px);
  transform-origin: top center;
  animation: language-drop 150ms ease-out;
}

.lang-switch__menu button {
  position: relative;
  z-index: 1;
  min-height: 24px;
  border: 0;
  border-radius: 5px;
  padding: 0 5px;
  color: var(--muted);
  background: transparent;
  font-size: 0.72rem;
  font-weight: 800;
}

.lang-switch__menu button:hover,
.lang-switch__menu button.is-active {
  color: var(--text);
  background: rgba(255, 82, 61, 0.15);
}

@keyframes language-drop {
  from {
    opacity: 0;
    transform: translateY(-4px) scaleY(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

.page {
  display: none;
  min-height: calc(100vh - 75px);
  padding: 64px 0 80px;
}

.page--active {
  display: block;
}

.hero-page {
  position: relative;
  min-height: calc(100vh - 75px);
  display: none;
  align-items: center;
  overflow: hidden;
}

.hero-page.page--active {
  display: grid;
  align-items: center;
}

.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 8, 8, 0.98) 0%, rgba(8, 8, 8, 0.7) 42%, rgba(8, 8, 8, 0.9) 100%),
    linear-gradient(0deg, rgba(8, 8, 8, 1), transparent 34%);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 36%;
  opacity: 0.74;
}

.hero-content {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
  align-self: start;
  width: min(690px, 100%);
  padding: 70px 0 90px;
}

.home-featured {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
  align-self: start;
  justify-self: end;
  width: min(440px, 100%);
  margin-top: 70px;
}

.home-overview {
  display: grid;
  gap: 14px;
  width: min(610px, 100%);
  margin-top: 0;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.home-stats span,
.home-latest,
.social-link {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 0 24px rgba(255, 59, 31, 0.035);
}

.home-stats span {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
}

.home-stats strong {
  font-size: 1.35rem;
}

.home-stats small,
.home-latest span,
.home-latest small {
  color: var(--muted);
}

.home-latest {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.home-latest button {
  width: 100%;
  border: 0;
  padding: 0;
  display: grid;
  gap: 3px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-link {
  min-height: 40px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 800;
}

.social-link svg {
  width: 17px;
  height: 17px;
}

.social-link:hover,
.home-latest button:hover {
  color: #ff604b;
}

.home-featured h2 {
  margin-bottom: 14px;
  font-size: 1.1rem;
  line-height: 1.1;
}

.featured-grid {
  display: grid;
  gap: 10px;
}

.featured-grid .project-card {
  min-height: 0;
  grid-template-columns: 128px 1fr;
}

.featured-grid .project-card__image {
  aspect-ratio: auto;
  min-height: 128px;
}

.featured-grid .project-card__body {
  gap: 10px;
  padding: 14px;
}

.featured-grid .project-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.featured-grid .project-card__actions {
  display: none;
}

h1,
h2,
h3,
p,
small {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(4.4rem, 15vw, 10rem);
  line-height: 0.86;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.25rem;
}

.hero-text,
.section-heading p,
.about-copy p {
  color: var(--muted);
  line-height: 1.75;
}

.hero-text {
  width: min(610px, 100%);
  margin: 28px 0 0;
  font-size: 1.1rem;
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button,
.icon-button {
  border: 0;
  border-radius: 8px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button {
  padding: 0 18px;
}

.button svg,
.icon-button svg,
.search svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.button--primary {
  background: var(--accent);
  box-shadow: 0 18px 34px rgba(255, 59, 31, 0.28);
}

.button--ghost,
.icon-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.button--project-open {
  min-height: 40px;
  border: 1px solid rgba(255, 82, 61, 0.22);
  padding: 0 13px;
  color: var(--text);
  background: rgba(255, 82, 61, 0.075);
  box-shadow: 0 0 18px rgba(255, 82, 61, 0.07);
}

.button--project-open:hover {
  border-color: rgba(255, 82, 61, 0.42);
  background: rgba(255, 82, 61, 0.12);
}

.button:hover,
.icon-button:hover {
  transform: translateY(-2px);
}

.content-page {
  padding-top: 64px;
}

.section-heading {
  width: min(760px, 100%);
  margin-bottom: 28px;
}

.toolbar {
  position: sticky;
  top: calc(var(--header-height) + 12px);
  z-index: 10;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0;
  padding: 10px 0;
  background: linear-gradient(180deg, rgba(8, 8, 8, 0.94), rgba(8, 8, 8, 0.76));
  backdrop-filter: blur(14px);
}

.search {
  flex: 1;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  background-clip: padding-box;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.search input,
.project-form input,
.project-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  background-clip: padding-box;
  color: var(--text);
  outline: none;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

input[type="file"]::file-selector-button {
  min-height: 34px;
  margin-right: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
}

input[type="file"]::file-selector-button:hover {
  background: rgba(255, 59, 31, 0.16);
}

.search input {
  border: 0;
  background: transparent;
  min-width: 0;
}

.category-switch {
  position: relative;
  flex: 0 0 min(240px, 36%);
}

.category-switch__button {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  background-clip: padding-box;
  outline: none;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.category-switch__button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-switch__button svg {
  width: 17px;
  height: 17px;
  margin-right: 4px;
  color: var(--muted);
  transition: transform 180ms ease, color 180ms ease;
}

.category-switch__button:hover,
.category-switch__button[aria-expanded="true"] {
  border-color: rgba(255, 82, 61, 0.34);
  background: rgba(255, 82, 61, 0.08);
  box-shadow: 0 0 18px rgba(255, 82, 61, 0.08);
}

.category-switch__button[aria-expanded="true"] svg {
  color: var(--text);
  transform: rotate(180deg);
}

.category-switch__menu {
  position: absolute;
  top: 100%;
  left: 4px;
  right: 4px;
  z-index: 1;
  display: grid;
  gap: 4px;
  max-height: 245px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: rgba(13, 13, 13, 0.97);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.44), 0 0 14px rgba(255, 59, 31, 0.08);
  backdrop-filter: blur(14px);
  animation: language-drop 150ms ease-out;
}

.category-switch__menu button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  text-align: left;
}

.category-switch__menu button:hover,
.category-switch__menu button.is-active {
  color: var(--text);
  background: rgba(255, 82, 61, 0.14);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  display: grid;
  min-height: 410px;
  background: rgba(17, 17, 17, 0.86);
  border: 1px solid var(--line);
  overflow: hidden;
}

.project-card__image {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--panel-strong);
  overflow: hidden;
}

.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-card__body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.project-card__category {
  width: max-content;
  max-width: 100%;
  padding: 6px 10px;
  color: rgba(247, 243, 239, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(10, 10, 10, 0.72);
  font-size: 0.78rem;
  font-weight: 800;
  overflow-wrap: anywhere;
  backdrop-filter: blur(10px);
}

.project-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.project-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  align-self: end;
}

.empty-state {
  color: var(--muted);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(260px, 390px) 1fr;
  gap: 28px;
  align-items: stretch;
}

.about-portrait,
.about-copy,
.project-form,
.data-tools,
.owner-list__item {
  border: 1px solid var(--line);
  background: rgba(17, 17, 17, 0.84);
  box-shadow: var(--shadow);
}

.about-portrait {
  min-height: 420px;
  overflow: hidden;
}

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

.about-copy {
  padding: 28px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.stats-row span {
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.stats-row strong {
  color: var(--text);
  font-size: 1.45rem;
}

.stats-row small {
  color: var(--muted);
}

.project-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.project-form input,
.project-form textarea {
  min-height: 48px;
  padding: 12px;
}

.project-form textarea {
  resize: vertical;
}

.owner-dashboard {
  display: grid;
  gap: 16px;
}

.owner-add-button {
  display: grid;
  place-items: center;
  min-height: 410px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.035);
  color: var(--accent-2);
  padding: 0;
}

.owner-add-button svg {
  width: 26px;
  height: 26px;
}

.owner-add-button:hover {
  border-color: rgba(255, 59, 31, 0.34);
  background: rgba(255, 59, 31, 0.08);
}

.owner-tabs {
  width: max-content;
  max-width: 100%;
  flex-wrap: wrap;
  overflow: visible;
}

.owner-panel {
  display: none;
}

.owner-panel.is-active {
  display: grid;
  gap: 16px;
}

.owner-featured-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.featured-picker {
  min-height: 96px;
  border: 1px solid var(--line);
  padding: 10px;
  display: grid;
  grid-template-columns: 86px 1fr auto;
  align-items: center;
  gap: 12px;
  color: var(--text);
  background: rgba(17, 17, 17, 0.84);
  text-align: left;
}

.featured-picker img {
  width: 86px;
  height: 72px;
  object-fit: cover;
}

.featured-picker span {
  display: grid;
  gap: 4px;
}

.featured-picker small {
  color: var(--muted);
}

.featured-picker svg {
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.featured-picker:hover,
.featured-picker.is-selected {
  border-color: rgba(255, 82, 61, 0.36);
  background: rgba(255, 82, 61, 0.1);
}

.featured-picker.is-selected svg {
  color: #ff604b;
}

.project-form {
  padding: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid__wide {
  grid-column: 1 / -1;
}

.data-tools {
  display: flex;
  gap: 10px;
  padding: 12px;
  width: max-content;
}

.icon-button {
  width: 46px;
  height: 46px;
  padding: 0;
}

.owner-add-button {
  width: 100%;
  height: auto;
  min-width: 0;
}

.icon-button input {
  display: none;
}

.icon-button--danger {
  color: var(--danger);
}

.owner-list {
  display: grid;
  gap: 10px;
}

.owner-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
}

.owner-list__item p {
  margin: 4px 0 0;
  color: var(--muted);
}

.owner-code-dialog,
.project-editor-dialog,
.project-dialog {
  width: min(900px, calc(100% - 26px));
  max-height: min(820px, calc(100vh - 26px));
  border: 1px solid var(--line);
  padding: 0;
  color: var(--text);
  background: #101010;
  box-shadow: var(--shadow);
}

.owner-code-dialog {
  width: min(312px, calc(100% - 28px));
}

.owner-code-dialog[open] {
  display: grid;
  place-items: stretch;
}

.owner-code-box {
  display: grid;
  gap: 6px;
  padding: 14px 18px 16px;
}

.owner-code-box h3 {
  margin: 0;
}

.owner-code-box p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.owner-code-box label {
  display: grid;
  gap: 13px;
  color: var(--muted);
  font-weight: 700;
}

.owner-code-box label span {
  color: rgba(247, 243, 239, 0.88);
  transform: translateY(-3px);
}

.owner-code-box input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  padding: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  outline: none;
}

.owner-code-box input:focus,
.search:focus-within,
.category-switch__button:focus,
.project-form input:focus,
.project-form textarea:focus {
  border-color: rgba(255, 59, 31, 0.7);
  background: rgba(255, 59, 31, 0.055);
  box-shadow: 0 0 22px rgba(255, 82, 61, 0.13);
}

.owner-code-error {
  min-height: 0;
  margin: 0;
  color: var(--danger);
  font-weight: 700;
}

.owner-code-error:empty {
  display: none;
}

.owner-code-box #unlockOwner {
  margin-top: 8px;
}

.owner-code-dialog::backdrop,
.project-editor-dialog::backdrop,
.project-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.dialog-close {
  position: absolute;
  top: 6px;
  right: 7px;
  z-index: 2;
  width: 28px;
  height: 28px;
  min-height: 28px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.48);
  box-shadow: none;
}

.owner-code-dialog .dialog-close {
  top: 10px;
  right: 12px;
  width: 24px;
  height: 24px;
  min-height: 24px;
  border-radius: 8px;
  color: rgba(247, 243, 239, 0.88);
}

.owner-code-dialog .dialog-close svg {
  width: 15px;
  height: 15px;
}

.dialog-close:hover {
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  transform: none;
}

.owner-code-dialog .dialog-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}

.project-editor-dialog {
  width: min(780px, calc(100% - 26px));
}

.project-editor-dialog .project-form {
  box-shadow: none;
  border: 0;
  background: transparent;
}

.project-form h3 {
  margin: 0 0 14px;
}

.context-menu {
  position: fixed;
  z-index: 50;
  min-width: 150px;
  border: 1px solid var(--line);
  padding: 6px;
  background: rgba(14, 14, 14, 0.96);
  box-shadow: var(--shadow);
}

.context-menu button {
  width: 100%;
  min-height: 38px;
  border: 0;
  padding: 0 10px;
  display: flex;
  align-items: center;
  color: var(--text);
  background: transparent;
  font-weight: 700;
  text-align: left;
}

.context-menu button:hover {
  background: rgba(255, 59, 31, 0.16);
}

.dialog-body {
  display: grid;
  gap: 20px;
  padding: 24px;
}

.dialog-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dialog-gallery img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--line);
}

@media (max-width: 820px) {
  body {
    padding-top: 132px;
  }

  .site-shell {
    width: min(1180px, calc(100% - 22px));
  }

  .header-inner {
    min-height: 0;
    padding: 10px 14px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand lang"
      "nav nav";
    align-items: center;
    row-gap: 10px;
  }

  .brand {
    grid-area: brand;
  }

  .lang-switch {
    grid-area: lang;
  }

  .main-nav {
    grid-area: nav;
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .page,
  .content-page {
    min-height: auto;
    padding: 38px 0 58px;
  }

  .hero-content {
    padding: 38px 0 24px;
  }

  .home-featured {
    grid-area: auto;
    justify-self: start;
    width: 100%;
    margin: 0 0 48px;
  }

  .home-stats {
    grid-template-columns: 1fr;
  }

  .featured-grid .project-card {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .about-layout,
  .owner-list__item {
    display: grid;
  }

  .section-heading,
  .toolbar,
  .search,
  .category-switch {
    width: 100%;
    min-width: 0;
  }

  .toolbar {
    top: calc(var(--header-height-mobile) + 10px);
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .category-switch {
    flex-basis: auto;
  }

  .category-switch__button {
    width: 100%;
  }

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

  .about-layout,
  .form-grid,
  .stats-row,
  .owner-featured-grid {
    grid-template-columns: 1fr;
  }

  .about-portrait {
    min-height: 300px;
  }

  .dialog-gallery {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 821px) and (max-width: 1080px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
