:root {
  --ink: #fff8e8;
  --ink-soft: #bab5a8;
  --paper: #050606;
  --paper-deep: #0a0d0c;
  --surface: rgba(12, 16, 15, 0.82);
  --surface-strong: rgba(5, 7, 7, 0.92);
  --line: rgba(216, 255, 64, 0.18);
  --gold: #d8ff40;
  --teal: #00e4d2;
  --coral: #ff5ca8;
  --blue: #86a6ff;
  --shadow-soft: 0 18px 60px rgba(0, 0, 0, 0.34);
  --shadow-hard: 0 28px 90px rgba(0, 0, 0, 0.58);
  --glow-lime: 0 0 22px rgba(216, 255, 64, 0.28), 0 0 54px rgba(216, 255, 64, 0.12);
  --glow-pink: 0 0 22px rgba(255, 92, 168, 0.3), 0 0 58px rgba(255, 92, 168, 0.14);
  --glow-teal: 0 0 22px rgba(0, 228, 210, 0.26), 0 0 58px rgba(0, 228, 210, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --container: min(1180px, calc(100vw - 40px));
  --duration: 180ms;
}

@property --website-border-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    repeating-linear-gradient(0deg, rgba(216, 255, 64, 0.035) 0 1px, transparent 1px 5px),
    linear-gradient(115deg, rgba(216, 255, 64, 0.1), transparent 34%),
    linear-gradient(300deg, rgba(255, 92, 168, 0.13), transparent 38%),
    linear-gradient(180deg, #050606 0%, #08100f 48%, #040505 100%);
  background-attachment: fixed;
  background-size:
    auto,
    100% 100%,
    100% 100%,
    auto;
  font-family:
    "DIN Next Arabic",
    "IBM Plex Sans Arabic",
    "Segoe UI",
    system-ui,
    sans-serif;
  font-weight: 400;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

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

button {
  cursor: pointer;
}

h1,
h2,
h3,
strong {
  font-weight: 400;
}

img {
  display: block;
  max-width: 100%;
}

.ui-icon {
  display: block;
  flex: 0 0 auto;
}

main {
  overflow: clip;
}

.hero {
  position: relative;
  min-height: 88svh;
  padding: 28px 0 82px;
  color: var(--ink);
  background:
    linear-gradient(110deg, rgba(216, 255, 64, 0.06), transparent 28%),
    linear-gradient(250deg, rgba(255, 92, 168, 0.1), transparent 34%),
    #050606;
  isolation: isolate;
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, rgba(5, 6, 6, 0.96) 0%, rgba(5, 6, 6, 0.74) 48%, rgba(5, 6, 6, 0.92) 100%),
    linear-gradient(180deg, rgba(5, 6, 6, 0.18) 0%, rgba(5, 6, 6, 0.92) 100%),
    linear-gradient(135deg, transparent 0 64%, rgba(216, 255, 64, 0.08) 64% 65%, transparent 65%),
    linear-gradient(42deg, transparent 0 72%, rgba(255, 92, 168, 0.1) 72% 73%, transparent 73%);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.hero__poster {
  position: absolute;
  width: clamp(180px, 25vw, 340px);
  aspect-ratio: 2 / 3;
  object-fit: cover;
  opacity: 0.62;
  border: 1px solid rgba(216, 255, 64, 0.22);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hard);
}

.hero__poster--1 {
  top: 12%;
  left: 8%;
  transform: rotate(-7deg);
}

.hero__poster--2 {
  top: 22%;
  left: 26%;
  transform: rotate(5deg);
}

.hero__poster--3 {
  top: 8%;
  left: 45%;
  transform: rotate(11deg);
}

.topbar {
  position: relative;
  z-index: 4;
  display: flex;
  width: var(--container);
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding-top: 4px;
}

.brand {
  display: inline-flex;
  width: clamp(176px, 21vw, 300px);
  align-items: center;
  justify-content: flex-end;
  padding: 0;
  font-weight: 400;
  direction: ltr;
}

.brand__logo {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter:
    drop-shadow(0 12px 28px rgba(0, 0, 0, 0.38))
    drop-shadow(0 0 18px rgba(216, 255, 64, 0.08));
}

.hero__content {
  position: relative;
  z-index: 3;
  width: var(--container);
  max-width: 760px;
  margin: clamp(88px, 16vh, 150px) auto 0;
  margin-right: max(calc((100vw - 1180px) / 2), 20px);
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 400;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(216, 255, 64, 0.32);
}

.hero h1 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(2rem, 4.1vw, 3.75rem);
  font-weight: 400;
  line-height: 1.24;
  letter-spacing: 0;
}

.hero__content > p:not(.eyebrow) {
  max-width: 620px;
  margin: 24px 0 0;
  color: rgba(255, 248, 232, 0.72);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 44px;
}

.button {
  position: relative;
  display: inline-flex;
  min-width: 230px;
  min-height: 62px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 30px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: clamp(1.05rem, 1.25vw, 1.22rem);
  font-weight: 400;
  isolation: isolate;
  transition:
    transform var(--duration) ease,
    box-shadow var(--duration) ease,
    background var(--duration) ease,
    border-color var(--duration) ease;
}

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

.button--primary {
  color: #060706;
  background: var(--gold);
  border-color: rgba(216, 255, 64, 0.86);
  box-shadow: var(--glow-lime);
}

.button--primary:hover,
.button--primary:focus-visible {
  background: #eeff79;
  box-shadow: 0 0 28px rgba(216, 255, 64, 0.42), 0 0 74px rgba(216, 255, 64, 0.18);
}

.button--ghost {
  --website-button-fill: linear-gradient(180deg, rgba(0, 228, 210, 0.08), rgba(5, 7, 7, 0.62));
  --website-border-angle: 0deg;
  overflow: visible;
  color: inherit;
  background:
    var(--website-button-fill) padding-box,
    linear-gradient(rgba(5, 7, 7, 0.86), rgba(5, 7, 7, 0.86)) padding-box,
    conic-gradient(
        from var(--website-border-angle),
        transparent 0deg 24deg,
        rgba(0, 228, 210, 0.08) 40deg,
        rgba(0, 228, 210, 0.96) 62deg,
        rgba(0, 228, 210, 0.08) 88deg,
        transparent 112deg 180deg,
        transparent 190deg,
        rgba(216, 255, 64, 0.08) 216deg,
        rgba(216, 255, 64, 0.98) 240deg,
        rgba(216, 255, 64, 0.08) 268deg,
        transparent 292deg 360deg
      )
      border-box;
  border-color: transparent;
  box-shadow: none;
  animation: trace-button-border 5.8s linear infinite;
}

.button--ghost:hover,
.button--ghost:focus-visible {
  --website-button-fill: linear-gradient(180deg, rgba(216, 255, 64, 0.1), rgba(5, 7, 7, 0.66));
  border-color: transparent;
  box-shadow: none;
}

@keyframes trace-button-border {
  to {
    --website-border-angle: 1turn;
  }
}

.portfolio-section {
  width: var(--container);
  margin: 0 auto;
  padding: 72px 0 86px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(240px, 0.42fr);
  align-items: end;
  gap: 28px;
  margin-bottom: 34px;
}

.section-heading .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: -16px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  font-weight: 400;
  line-height: 1.02;
}

.section-heading p:not(.eyebrow) {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.8;
}

.loading-note {
  margin: 0 0 18px;
  color: var(--ink-soft);
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -10px 0 28px;
}

.category-filter__button {
  --category-color: var(--gold);
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: var(--ink);
  background: rgba(5, 7, 7, 0.62);
  border: 1px solid color-mix(in srgb, var(--category-color) 42%, transparent);
  border-radius: 999px;
  box-shadow: 0 0 18px color-mix(in srgb, var(--category-color) 18%, transparent);
  font-weight: 400;
  transition:
    transform var(--duration) ease,
    background var(--duration) ease,
    border-color var(--duration) ease,
    color var(--duration) ease,
    box-shadow var(--duration) ease;
}

.category-filter__button:hover,
.category-filter__button:focus-visible,
.category-filter__button.is-active {
  color: #050606;
  background: var(--category-color);
  border-color: var(--category-color);
  box-shadow:
    0 0 24px color-mix(in srgb, var(--category-color) 46%, transparent),
    0 0 68px color-mix(in srgb, var(--category-color) 18%, transparent);
  transform: translateY(-2px);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 28px);
}

.project-card {
  position: relative;
  min-width: 0;
  aspect-ratio: 210 / 297;
  height: auto;
  padding: 0;
  overflow: hidden;
  text-align: start;
  background: #070909;
  border: 1px solid rgba(216, 255, 64, 0.18);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition:
    transform 260ms ease,
    box-shadow 260ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  box-shadow: var(--shadow-hard), var(--glow-teal);
  transform: translateY(-8px);
}

.project-card__cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease;
}

.project-card:hover .project-card__cover,
.project-card:focus-visible .project-card__cover {
  transform: scale(1.04);
}

.project-card__shade {
  position: absolute;
  inset: 42% 0 0;
  background:
    linear-gradient(180deg, transparent, rgba(5, 7, 7, 0.72) 52%, rgba(5, 7, 7, 0.96)),
    linear-gradient(135deg, transparent 0 76%, rgba(216, 255, 64, 0.16) 76% 77%, transparent 77%);
}

.project-card__footer {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  color: var(--ink);
}

.project-card__identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.project-card__identity img {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  object-fit: cover;
  border: 1px solid rgba(216, 255, 64, 0.34);
  border-radius: 16px;
}

.project-card__identity span {
  min-width: 0;
}

.project-card__identity strong {
  display: block;
  overflow: hidden;
  font-size: 1.12rem;
  font-weight: 400;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card__open {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  color: #060706;
  background: var(--gold);
  border-radius: 999px;
  box-shadow: var(--glow-lime);
}

.empty-state {
  padding: 34px;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.empty-state h3 {
  margin: 0 0 8px;
  color: var(--ink);
}

.empty-state p {
  margin: 0;
}

.site-footer {
  position: relative;
  display: flex;
  width: var(--container);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  padding: 34px 0 48px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
  font-weight: 400;
}

.site-footer a {
  color: var(--gold);
  font-weight: 400;
  text-shadow: 0 0 16px rgba(216, 255, 64, 0.28);
}

.site-footer__links {
  display: grid;
  gap: 8px;
}

.footer-admin-link {
  display: inline-flex;
  width: 38px;
  height: 38px;
  min-height: 0;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: rgba(255, 248, 232, 0.34) !important;
  background: rgba(5, 7, 7, 0.12);
  border: 1px solid rgba(255, 248, 232, 0.08);
  border-radius: 999px;
  text-shadow: none !important;
  box-shadow: none;
  opacity: 0.22;
  transition:
    transform var(--duration) ease,
    background var(--duration) ease,
    border-color var(--duration) ease,
    opacity var(--duration) ease;
}

.footer-admin-link span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.footer-admin-link:hover,
.footer-admin-link:focus-visible {
  color: rgba(255, 248, 232, 0.78) !important;
  background: rgba(5, 7, 7, 0.42);
  border-color: rgba(255, 248, 232, 0.2);
  opacity: 0.62;
  transform: translateY(-2px);
}

.footer-admin-link--fixed {
  position: fixed;
  left: 18px;
  right: auto;
  bottom: 18px;
  z-index: 28;
  width: 38px;
  height: 38px;
  color: rgba(255, 248, 232, 0.38) !important;
  background: rgba(5, 7, 7, 0.28);
  border-color: rgba(255, 248, 232, 0.14);
  box-shadow: none;
  opacity: 0.24;
}

.footer-admin-link--fixed:hover,
.footer-admin-link--fixed:focus-visible {
  opacity: 0.68;
}

.floating-contact {
  position: fixed;
  right: 20px;
  bottom: 22px;
  z-index: 30;
  display: grid;
  gap: 10px;
}

.floating-contact__link {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  color: #fff;
  background: transparent !important;
  border: 0;
  border-radius: 999px;
  box-shadow: none !important;
  transition:
    transform var(--duration) ease,
    filter var(--duration) ease;
}

.floating-contact__link:hover,
.floating-contact__link:focus-visible {
  filter: saturate(1.12);
  transform: translateY(-3px);
}

.floating-contact__link--whatsapp {
  background: transparent;
  box-shadow: none;
}

.floating-contact__link--telegram {
  background: transparent;
  box-shadow: none;
}

.floating-contact__whatsapp-icon {
  width: 30px;
  height: 30px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  background: rgba(3, 4, 4, 0.82);
  border: 0;
  backdrop-filter: blur(14px);
}

.lightbox__panel {
  position: relative;
  display: grid;
  width: min(1120px, 100%);
  max-height: min(900px, calc(100svh - 44px));
  overflow: hidden;
  color: var(--ink);
  background: var(--surface-strong);
  border: 1px solid rgba(216, 255, 64, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hard);
}

.lightbox__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.lightbox__title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.lightbox__title > div {
  min-width: 0;
}

.lightbox__title img {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 14px;
}

.lightbox__title h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 400;
}

.lightbox__title p {
  display: -webkit-box;
  overflow: hidden;
  max-width: 680px;
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.lightbox__logo-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  margin-top: 9px;
  padding: 0 13px;
  color: var(--ink);
  background: rgba(5, 7, 7, 0.7);
  border: 1px solid rgba(0, 228, 210, 0.42);
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(0, 228, 210, 0.16);
  font-size: 0.78rem;
  font-weight: 400;
  transition:
    transform var(--duration) ease,
    background var(--duration) ease,
    border-color var(--duration) ease,
    box-shadow var(--duration) ease;
}

.lightbox__logo-button:hover,
.lightbox__logo-button:focus-visible,
.lightbox__logo-button.is-active {
  color: #050606;
  background: var(--gold);
  border-color: rgba(216, 255, 64, 0.86);
  box-shadow: var(--glow-lime);
  transform: translateY(-1px);
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 92, 168, 0.12);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition:
    transform var(--duration) ease,
    background var(--duration) ease;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: rgba(255, 92, 168, 0.22);
  transform: translateY(-2px);
}

.lightbox__close {
  color: #fff6f8;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.2), transparent 30%),
    linear-gradient(135deg, rgba(255, 56, 92, 0.62), rgba(82, 0, 18, 0.86));
  border-color: rgba(255, 56, 92, 0.72);
  box-shadow:
    0 0 18px rgba(255, 56, 92, 0.58),
    0 0 46px rgba(255, 56, 92, 0.22),
    inset 0 0 18px rgba(255, 255, 255, 0.08);
}

.lightbox__close:hover,
.lightbox__close:focus-visible {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.26), transparent 32%),
    linear-gradient(135deg, #ff385c, #7c001d);
  border-color: rgba(255, 96, 126, 0.92);
  box-shadow:
    0 0 24px rgba(255, 56, 92, 0.78),
    0 0 64px rgba(255, 56, 92, 0.3),
    inset 0 0 18px rgba(255, 255, 255, 0.12);
}

.lightbox__viewer {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(216, 255, 64, 0.06), transparent 34%),
    #050606;
  touch-action: pan-y;
  user-select: none;
}

.lightbox__viewer img {
  width: auto;
  max-width: 100%;
  height: min(62svh, 620px);
  object-fit: contain;
  border-radius: var(--radius-md);
  -webkit-user-drag: none;
}

.lightbox__arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #060706;
  background: var(--gold);
  border: 0;
  border-radius: 999px;
  transform: translateY(-50%);
  transition:
    opacity var(--duration) ease,
    transform var(--duration) ease;
}

.lightbox__arrow:hover:not(:disabled),
.lightbox__arrow:focus-visible:not(:disabled) {
  transform: translateY(-50%) scale(1.05);
}

.lightbox__arrow:disabled {
  cursor: not-allowed;
  opacity: 0.34;
}

.lightbox__arrow--right {
  right: 28px;
}

.lightbox__arrow--left {
  left: 28px;
}

.lightbox__thumbs {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

.lightbox__thumb {
  position: relative;
  width: 82px;
  height: 74px;
  flex: 0 0 auto;
  padding: 0;
  overflow: hidden;
  background: #050606;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
}

.lightbox__thumb::after {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(3, 4, 4, 0.84));
}

.lightbox__thumb.is-active {
  border-color: var(--gold);
  box-shadow: var(--glow-lime);
}

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

.lightbox__thumb span {
  position: absolute;
  right: 6px;
  bottom: 5px;
  left: 6px;
  z-index: 1;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.66rem;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.84);
  white-space: nowrap;
}

.admin-shell {
  min-height: 100vh;
  padding: 22px 0 64px;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(0, 228, 210, 0.08), transparent 32%),
    linear-gradient(300deg, rgba(255, 92, 168, 0.08), transparent 36%);
}

.admin-shell--gate {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding-inline: 22px;
}

.admin-login-card {
  display: grid;
  width: min(460px, 100%);
  gap: 16px;
  padding: clamp(20px, 4vw, 30px);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hard), var(--glow-lime);
  backdrop-filter: blur(18px);
}

.admin-login-card h1 {
  margin: 0;
  font-size: clamp(1.8rem, 6vw, 2.65rem);
  line-height: 1.1;
}

.admin-login-card p:not(.eyebrow):not(.admin-alert) {
  margin: 8px 0 0;
  color: var(--ink-soft);
}

.admin-login-card label {
  display: grid;
  gap: 8px;
  color: rgba(255, 248, 232, 0.76);
  font-weight: 400;
}

.admin-login-card input {
  height: 50px;
  color: var(--ink);
  background: rgba(2, 4, 4, 0.72);
  border: 1px solid rgba(216, 255, 64, 0.18);
  border-radius: var(--radius-sm);
  outline: none;
  padding: 0 14px;
}

.admin-login-card input:focus {
  border-color: rgba(216, 255, 64, 0.72);
  box-shadow: 0 0 0 4px rgba(216, 255, 64, 0.12), var(--glow-lime);
}

.admin-header {
  display: flex;
  width: var(--container);
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto 18px;
  padding: 16px 0 22px;
  border-bottom: 1px solid var(--line);
}

.admin-header__back {
  display: inline-flex;
  width: max-content;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  color: var(--ink);
  background: rgba(5, 7, 7, 0.56);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition:
    transform var(--duration) ease,
    background var(--duration) ease;
}

.admin-header__back:hover,
.admin-header__back:focus-visible {
  background: rgba(216, 255, 64, 0.12);
  transform: translateY(-2px);
}

.admin-header h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.65rem);
  line-height: 1.15;
}

.admin-header p:not(.eyebrow) {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.admin-layout {
  display: grid;
  width: var(--container);
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.48fr);
  align-items: start;
  gap: 22px;
  margin: 0 auto;
}

.admin-form,
.admin-side {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
}

.admin-form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.admin-side {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 16px;
  padding: 18px;
}

.admin-form__bar,
.admin-side__header,
.gallery-uploader__header,
.admin-form__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-form__bar h2,
.admin-side__header h2,
.gallery-uploader__header h3 {
  margin: 0;
  line-height: 1.25;
}

.admin-form__bar h2 {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.admin-side__header h2,
.gallery-uploader__header h3 {
  font-size: clamp(1.12rem, 1.8vw, 1.45rem);
}

.admin-form__bar .eyebrow,
.admin-side__header .eyebrow,
.gallery-uploader__header .eyebrow {
  margin-bottom: 6px;
}

.admin-secondary-button,
.admin-save-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 400;
  line-height: 1.35;
  transition:
    transform var(--duration) ease,
    background var(--duration) ease,
    border-color var(--duration) ease;
}

.admin-secondary-button {
  color: var(--ink);
  background: rgba(5, 7, 7, 0.48);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.admin-secondary-button:hover,
.admin-secondary-button:focus-visible {
  background: rgba(216, 255, 64, 0.12);
  transform: translateY(-2px);
}

.admin-upload-button {
  display: inline-flex !important;
  width: max-content;
  min-width: 0;
  min-height: 44px;
  flex-direction: row !important;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: #041010 !important;
  background:
    linear-gradient(180deg, rgba(0, 228, 210, 0.96), rgba(0, 180, 168, 0.86)),
    #00e4d2;
  border-color: rgba(0, 228, 210, 0.78);
  box-shadow: 0 0 22px rgba(0, 228, 210, 0.2);
  white-space: nowrap;
}

.admin-upload-button svg {
  flex: 0 0 auto;
}

.admin-upload-button:hover,
.admin-upload-button:focus-visible {
  background:
    linear-gradient(180deg, rgba(46, 255, 240, 0.98), rgba(0, 203, 190, 0.92)),
    #2efff0;
  border-color: rgba(46, 255, 240, 0.96);
  box-shadow: 0 0 28px rgba(0, 228, 210, 0.28);
}

.admin-save-button {
  color: #050606;
  background: var(--gold);
  border: 1px solid rgba(216, 255, 64, 0.86);
  box-shadow: var(--glow-lime);
}

.admin-save-button:hover,
.admin-save-button:focus-visible {
  background: #eeff79;
  transform: translateY(-2px);
}

.admin-save-button:disabled {
  cursor: wait;
  opacity: 0.78;
  transform: none;
}

.admin-alert {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-weight: 400;
}

.admin-alert--success {
  color: #cffff0;
  background: rgba(0, 228, 126, 0.12);
  border: 1px solid rgba(0, 228, 126, 0.28);
}

.admin-alert--error {
  color: #ffd7e7;
  background: rgba(255, 92, 168, 0.12);
  border: 1px solid rgba(255, 92, 168, 0.28);
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(120px, 0.42fr);
  gap: 14px;
}

.admin-form label {
  display: grid;
  gap: 8px;
  color: rgba(255, 248, 232, 0.74);
  font-weight: 400;
}

.admin-form input,
.admin-form textarea,
.admin-form select,
.category-editor input,
.password-editor input,
.category-name-input {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: rgba(2, 4, 4, 0.72);
  border: 1px solid rgba(216, 255, 64, 0.18);
  border-radius: var(--radius-sm);
  outline: none;
  transition:
    border-color var(--duration) ease,
    box-shadow var(--duration) ease,
    background var(--duration) ease;
}

.admin-form input,
.admin-form select,
.category-editor input,
.password-editor input,
.category-name-input {
  height: 48px;
  padding: 0 14px;
}

.admin-form select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--gold) 50%) calc(14px) 50% / 8px 8px no-repeat,
    rgba(2, 4, 4, 0.72);
}

.admin-form textarea {
  resize: vertical;
  padding: 12px 14px;
  line-height: 1.7;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus,
.category-editor input:focus,
.password-editor input:focus,
.category-name-input:focus {
  background: rgba(5, 8, 8, 0.96);
  border-color: rgba(216, 255, 64, 0.72);
  box-shadow: 0 0 0 4px rgba(216, 255, 64, 0.12), var(--glow-lime);
}

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

.image-upload {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
  padding: 14px;
  background: rgba(5, 7, 7, 0.46);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition:
    border-color var(--duration) ease,
    background var(--duration) ease,
    box-shadow var(--duration) ease,
    transform var(--duration) ease;
}

.image-upload.is-dragging,
.gallery-uploader.is-dragging {
  background: rgba(0, 228, 210, 0.08);
  border-color: rgba(0, 228, 210, 0.72);
  box-shadow: 0 0 0 4px rgba(0, 228, 210, 0.1), 0 0 28px rgba(0, 228, 210, 0.14);
  transform: translateY(-2px);
}

.image-upload img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  background: #050606;
  border-radius: var(--radius-sm);
}

.image-upload > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.image-upload__text {
  display: grid;
  gap: 4px;
}

.image-upload h3 {
  min-width: 0;
  margin: 0;
  line-height: 1.3;
}

.image-upload__text p,
.gallery-uploader__header p:not(.eyebrow) {
  margin: 0;
  color: rgba(255, 248, 232, 0.52);
  font-size: 0.88rem;
  line-height: 1.5;
}

.upload-grid .image-upload:nth-child(2) img {
  object-fit: contain;
  padding: 18px;
}

.image-upload input,
.gallery-uploader input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.gallery-uploader {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: rgba(5, 7, 7, 0.48);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition:
    border-color var(--duration) ease,
    background var(--duration) ease,
    box-shadow var(--duration) ease,
    transform var(--duration) ease;
}

.gallery-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 12px;
}

.gallery-preview__item {
  position: relative;
  aspect-ratio: 4 / 3;
  min-height: 116px;
  height: auto;
  overflow: hidden;
  background: #050606;
  border-radius: var(--radius-sm);
}

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

.gallery-preview__item button {
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #fff;
  background: rgba(255, 92, 168, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.gallery-uploader__empty,
.admin-muted {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.switch-control {
  display: inline-flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px !important;
}

.switch-control input {
  width: 20px;
  height: 20px;
  accent-color: var(--gold);
}

.category-manager {
  display: grid;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.category-editor,
.password-editor {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: rgba(5, 7, 7, 0.46);
  border: 1px solid rgba(216, 255, 64, 0.14);
  border-radius: var(--radius-md);
}

.category-editor label,
.password-editor label {
  display: grid;
  gap: 8px;
  color: rgba(255, 248, 232, 0.74);
  font-weight: 400;
}

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

.category-manager-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 48px 36px 36px;
  gap: 9px;
  align-items: center;
  padding: 10px;
  background: rgba(5, 7, 7, 0.56);
  border: 1px solid rgba(216, 255, 64, 0.14);
  border-radius: var(--radius-md);
}

.category-manager-row.is-dirty {
  border-color: rgba(216, 255, 64, 0.34);
  box-shadow: inset 0 0 0 1px rgba(216, 255, 64, 0.06);
}

.category-swatch {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  box-shadow: 0 0 18px currentColor;
}

.category-color-input {
  width: 48px !important;
  height: 42px !important;
  padding: 4px !important;
  cursor: pointer;
}

.category-manager-row button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--ink);
  background: rgba(5, 7, 7, 0.52);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition:
    transform var(--duration) ease,
    background var(--duration) ease,
    opacity var(--duration) ease;
}

.category-save-button {
  color: #050606 !important;
  background: var(--gold) !important;
  border-color: rgba(216, 255, 64, 0.74) !important;
}

.category-manager-row button:hover:not(:disabled),
.category-manager-row button:focus-visible:not(:disabled) {
  background: rgba(255, 92, 168, 0.18);
  transform: translateY(-2px);
}

.category-manager-row button:disabled {
  cursor: not-allowed;
  opacity: 0.28;
}

.spin-icon {
  animation: spin-icon 0.8s linear infinite;
}

@keyframes spin-icon {
  to {
    transform: rotate(360deg);
  }
}

.project-manager-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.admin-projects-section {
  display: grid;
  width: var(--container);
  gap: 18px;
  margin: 22px auto 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
}

.admin-projects-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.admin-projects-toolbar h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.25;
}

.admin-projects-controls {
  display: flex;
  align-items: end;
  gap: 10px;
}

.admin-projects-controls label {
  display: grid;
  min-width: 190px;
  gap: 8px;
  color: rgba(255, 248, 232, 0.74);
  font-weight: 400;
}

.admin-projects-controls select {
  height: 42px;
  min-width: 0;
  color: var(--ink);
  background:
    linear-gradient(45deg, transparent 50%, var(--gold) 50%) calc(14px) 50% / 8px 8px no-repeat,
    rgba(2, 4, 4, 0.72);
  border: 1px solid rgba(216, 255, 64, 0.18);
  border-radius: 999px;
  outline: none;
  padding: 0 16px;
  appearance: none;
}

.admin-project-card {
  display: grid;
  overflow: hidden;
  background: rgba(5, 7, 7, 0.56);
  border: 1px solid rgba(216, 255, 64, 0.15);
  border-radius: var(--radius-md);
  transition:
    transform var(--duration) ease,
    border-color var(--duration) ease,
    box-shadow var(--duration) ease;
}

.admin-project-card:hover,
.admin-project-card:focus-within {
  border-color: rgba(216, 255, 64, 0.34);
  box-shadow: 0 0 24px rgba(216, 255, 64, 0.08);
  transform: translateY(-2px);
}

.admin-project-card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  min-height: 230px;
  overflow: hidden;
  background: rgba(2, 4, 4, 0.82);
}

.admin-project-card__cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-project-card__logo {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 48px;
  height: 48px;
  object-fit: contain;
  padding: 6px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  backdrop-filter: blur(10px);
}

.admin-project-card__status {
  position: absolute;
  top: 12px;
  left: 12px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  color: #ffd7e7;
  background: rgba(255, 92, 168, 0.16);
  border: 1px solid rgba(255, 92, 168, 0.34);
  border-radius: 999px;
  font-size: 0.82rem;
}

.admin-project-card__status.is-published {
  color: #dffff4;
  background: rgba(0, 228, 126, 0.14);
  border-color: rgba(0, 228, 126, 0.3);
}

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

.admin-project-card h3 {
  overflow: hidden;
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-project-card p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.admin-project-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-project-card__meta span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  color: rgba(255, 248, 232, 0.78);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font-size: 0.82rem;
}

.admin-project-card__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.admin-project-card__actions button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink);
  background: rgba(5, 7, 7, 0.52);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.86rem;
  transition:
    transform var(--duration) ease,
    background var(--duration) ease,
    border-color var(--duration) ease;
}

.admin-project-card__actions button:hover,
.admin-project-card__actions button:focus-visible {
  background: rgba(216, 255, 64, 0.1);
  border-color: rgba(216, 255, 64, 0.28);
  transform: translateY(-2px);
}

.manager-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: rgba(5, 7, 7, 0.56);
  border: 1px solid rgba(216, 255, 64, 0.14);
  border-radius: var(--radius-md);
}

.manager-row > img {
  width: 76px;
  height: 96px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.manager-row__body {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.manager-row h3 {
  overflow: hidden;
  margin: 0;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manager-row p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.manager-row__actions {
  display: flex;
  gap: 8px;
}

.manager-row__actions button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--ink);
  background: rgba(5, 7, 7, 0.52);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition:
    transform var(--duration) ease,
    background var(--duration) ease;
}

.manager-row__actions button:hover,
.manager-row__actions button:focus-visible {
  background: rgba(0, 228, 210, 0.12);
  transform: translateY(-2px);
}

@media (max-width: 920px) {
  :root {
    --container: min(100vw - 48px, 760px);
  }

  .hero {
    min-height: 86svh;
  }

  .hero__poster--1 {
    top: 22%;
    left: -12%;
  }

  .hero__poster--2 {
    top: 10%;
    left: 23%;
  }

  .hero__poster--3 {
    top: 30%;
    left: 62%;
  }

  .hero__content {
    margin-right: auto;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .section-heading .eyebrow {
    margin-bottom: 0;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-side {
    position: static;
  }
}

@media (max-width: 640px) {
  :root {
    --container: min(100vw - 44px, 420px);
  }

  .hero {
    min-height: auto;
    padding-top: 24px;
    padding-bottom: 86px;
  }

  .topbar {
    align-items: flex-start;
    padding-top: 0;
  }

  .brand {
    width: min(164px, 52vw);
  }

  .hero__content {
    margin-top: 72px;
    max-width: 100%;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 8.4vw, 2.65rem);
    line-height: 1.38;
    max-width: 100%;
  }

  .hero__content > p:not(.eyebrow) {
    margin-top: 22px;
    font-size: 1rem;
    line-height: 1.9;
  }

  .eyebrow {
    margin-bottom: 18px;
    font-size: 0.76rem;
  }

  .hero__actions {
    display: grid;
    gap: 16px;
    margin-top: 38px;
  }

  .button {
    width: 100%;
    min-height: 54px;
    min-width: 0;
    padding: 0 18px;
    font-size: 1rem;
  }

  .portfolio-section {
    padding-top: 64px;
    padding-bottom: 76px;
  }

  .section-heading {
    margin-bottom: 26px;
  }

  .section-heading h2 {
    font-size: clamp(2rem, 10vw, 3rem);
    line-height: 1.18;
  }

  .section-heading p:not(.eyebrow) {
    line-height: 1.9;
  }

  .category-filter {
    flex-wrap: nowrap;
    gap: 9px;
    width: 100%;
    margin-right: 0;
    margin-bottom: 22px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 0 0 4px;
    scrollbar-width: none;
  }

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

  .category-filter__button {
    min-height: 40px;
    flex: 0 0 auto;
    padding: 0 14px;
    font-size: 0.86rem;
  }

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

  .project-card {
    width: 100%;
    justify-self: center;
    min-height: 0;
    border-radius: 16px;
  }

  .project-card__footer {
    right: 10px;
    bottom: 10px;
    left: 10px;
    gap: 7px;
  }

  .project-card__identity {
    gap: 7px;
  }

  .project-card__identity img {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .project-card__identity strong {
    font-size: 0.78rem;
    line-height: 1.2;
  }

  .project-card__open {
    width: 30px;
    height: 30px;
  }

  .project-card__open svg {
    width: 16px;
    height: 16px;
  }

  .site-footer {
    display: grid;
    min-height: 180px;
    gap: 18px;
    place-items: start center;
    padding-top: 32px;
    padding-bottom: 24px;
    text-align: center;
  }

  .footer-admin-link {
    position: absolute;
    bottom: 34px;
    left: 0;
    width: 34px;
    height: 34px;
    min-height: 0;
    padding: 0;
    color: rgba(255, 248, 232, 0.24) !important;
    background: rgba(5, 7, 7, 0.1);
    border-color: rgba(255, 248, 232, 0.07);
    box-shadow: none;
    font-size: 0.82rem;
    opacity: 0.18;
  }

  .footer-admin-link:hover,
  .footer-admin-link:focus-visible {
    opacity: 0.58;
  }

  .floating-contact {
    right: 18px;
    left: auto;
    bottom: calc(18px + env(safe-area-inset-bottom));
    grid-template-columns: 50px;
    gap: 10px;
  }

  .floating-contact__link {
    width: 50px;
    height: 50px;
  }

  .lightbox {
    padding: 10px;
  }

  .lightbox__panel {
    max-height: calc(100svh - 20px);
    border-radius: var(--radius-md);
  }

  .lightbox__header {
    padding: 12px;
  }

  .lightbox__title p {
    display: none;
  }

  .lightbox__viewer {
    padding: 10px;
  }

  .lightbox__viewer img {
    height: 54svh;
  }

  .lightbox__arrow {
    width: 40px;
    height: 40px;
  }

  .lightbox__arrow--right {
    right: 16px;
  }

  .lightbox__arrow--left {
    left: 16px;
  }

  .admin-shell {
    padding-top: 14px;
  }

  .admin-header {
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 18px;
  }

  .admin-header h1 {
    font-size: clamp(1.65rem, 8vw, 2.35rem);
  }

  .admin-header p:not(.eyebrow) {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .admin-form,
  .admin-side {
    padding: 14px;
    border-radius: var(--radius-md);
  }

  .admin-form__bar,
  .admin-side__header,
  .admin-projects-toolbar,
  .gallery-uploader__header,
  .admin-form__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-projects-section {
    padding: 14px;
    border-radius: var(--radius-md);
  }

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

  .admin-projects-controls label {
    min-width: 0;
  }

  .project-manager-list {
    grid-template-columns: 1fr;
  }

  .admin-project-card__media {
    min-height: 260px;
  }

  .form-grid,
  .upload-grid {
    grid-template-columns: 1fr;
  }

  .image-upload {
    gap: 12px;
  }

  .image-upload > div {
    grid-template-columns: 1fr;
  }

  .category-manager-row {
    grid-template-columns: 16px minmax(0, 1fr) 46px 34px 34px;
    gap: 8px;
    padding: 9px;
  }

  .image-upload img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .admin-secondary-button,
  .admin-save-button {
    width: 100%;
  }

  .admin-upload-button {
    width: max-content;
    min-width: 0;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* PHP compatibility layer */
.project-card__open {
  font-size: 1.35rem;
  line-height: 1;
}

.floating-contact__link span {
  font-size: 1.55rem;
  line-height: 1;
}

.floating-contact__link img {
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__close {
  font-size: 1.8rem;
}

.login-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card,
.admin-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
}

.login-card {
  display: grid;
  width: min(520px, 100%);
  gap: 16px;
  padding: clamp(22px, 4vw, 34px);
}

.admin-body {
  min-height: 100vh;
}

.admin-shell {
  display: grid;
  width: var(--container);
  gap: 22px;
  margin: 0 auto;
}

.admin-hero,
.admin-card {
  padding: 22px;
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.admin-hero h1,
.admin-card h2 {
  margin: 0;
}

.admin-hero p:not(.eyebrow) {
  color: var(--ink-soft);
}

.admin-hero__actions,
.admin-card__head,
.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  color: var(--ink);
  background: rgba(5, 7, 7, 0.48);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.btn--primary,
.btn--save {
  color: #050606;
  background: var(--gold);
  border-color: rgba(216, 255, 64, 0.86);
  box-shadow: var(--glow-lime);
}

.btn--danger {
  color: #ffd7e7;
  background: rgba(255, 92, 168, 0.12);
  border-color: rgba(255, 92, 168, 0.3);
}

.btn--full {
  width: 100%;
}

.notice {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 228, 126, 0.28);
  color: #cffff0;
  background: rgba(0, 228, 126, 0.12);
}

.notice--error {
  color: #ffd7e7;
  background: rgba(255, 92, 168, 0.12);
  border-color: rgba(255, 92, 168, 0.28);
}

.project-form {
  display: grid;
  gap: 16px;
}

.field,
.switch {
  display: grid;
  gap: 8px;
  color: rgba(255, 248, 232, 0.74);
}

.field input,
.field select,
.category-form input,
.category-row input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  color: var(--ink);
  background: rgba(2, 4, 4, 0.72);
  border: 1px solid rgba(216, 255, 64, 0.18);
  border-radius: var(--radius-sm);
  outline: none;
}

.upload-box,
.gallery-uploader {
  display: grid;
  gap: 14px;
  padding: 14px;
  background: rgba(5, 7, 7, 0.46);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.upload-box input,
.gallery-uploader input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.upload-button {
  display: inline-flex;
  width: max-content;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  color: #041010;
  background: linear-gradient(180deg, rgba(0, 228, 210, 0.96), rgba(0, 180, 168, 0.86)), #00e4d2;
  border: 1px solid rgba(0, 228, 210, 0.78);
  border-radius: 999px;
  box-shadow: 0 0 22px rgba(0, 228, 210, 0.2);
}

.upload-button strong {
  font-weight: 400;
}

.upload-box img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.drop-zone.is-dragging {
  background: rgba(0, 228, 210, 0.08);
  border-color: rgba(0, 228, 210, 0.72);
  box-shadow: 0 0 0 4px rgba(0, 228, 210, 0.1), 0 0 28px rgba(0, 228, 210, 0.14);
}

.image-list,
.admin-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.image-chip {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
}

.image-chip img,
.admin-project-card > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-chip button {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 32px;
  height: 32px;
  color: #fff;
  background: rgba(255, 92, 168, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.admin-project-card {
  display: grid;
  gap: 12px;
  overflow: hidden;
  padding: 14px;
  background: rgba(5, 7, 7, 0.56);
  border: 1px solid rgba(216, 255, 64, 0.15);
  border-radius: var(--radius-md);
}

.admin-project-card > img {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-sm);
}

.category-form,
.category-row {
  display: grid;
  grid-template-columns: 1fr 64px auto;
  align-items: center;
  gap: 10px;
}

.category-row {
  grid-template-columns: 18px 1fr 90px 64px auto auto;
  margin-top: 10px;
}

.category-dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--dot);
  box-shadow: 0 0 18px var(--dot);
}

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.22);
  border-top-color: #050606;
  border-radius: 999px;
  animation: spin-icon 0.8s linear infinite;
}

.is-loading .spinner {
  display: block;
}

@media (max-width: 640px) {
  .admin-hero,
  .admin-card__head,
  .card-actions,
  .category-form,
  .category-row {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* Admin polish */
.admin-shell {
  padding-top: 28px;
  padding-bottom: 70px;
}

.admin-hero {
  padding: clamp(22px, 3vw, 34px);
  background:
    linear-gradient(120deg, rgba(216, 255, 64, 0.07), transparent 36%),
    rgba(5, 7, 7, 0.42);
  border: 1px solid rgba(216, 255, 64, 0.14);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.admin-card {
  width: min(100%, 1120px);
  margin-inline: auto;
  padding: clamp(22px, 3vw, 34px);
}

.admin-card__head {
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(216, 255, 64, 0.12);
}

.project-form {
  gap: 22px;
}

.project-form .form-grid {
  grid-template-columns: minmax(280px, 1.35fr) minmax(230px, 0.9fr) minmax(130px, 0.38fr);
  align-items: end;
  padding: 18px;
  background: rgba(2, 4, 4, 0.22);
  border: 1px solid rgba(216, 255, 64, 0.1);
  border-radius: var(--radius-md);
}

.project-form .switch {
  grid-column: 1 / -1;
  width: max-content;
  min-height: 46px;
  grid-template-columns: auto auto;
  align-items: center;
  padding: 0 16px;
  background: rgba(5, 7, 7, 0.42);
  border: 1px solid rgba(216, 255, 64, 0.14);
  border-radius: 999px;
}

.project-form .switch input {
  width: 20px;
  height: 20px;
  accent-color: var(--gold);
}

.field input:focus,
.field select:focus,
.category-form input:focus,
.category-row input:focus {
  background: rgba(5, 8, 8, 0.96);
  border-color: rgba(216, 255, 64, 0.72);
  box-shadow: 0 0 0 4px rgba(216, 255, 64, 0.12), var(--glow-lime);
}

.upload-grid {
  align-items: stretch;
}

.upload-box,
.gallery-uploader {
  gap: 16px;
  padding: 18px;
}

.upload-box {
  min-height: 220px;
  grid-template-columns: minmax(0, 1fr) minmax(126px, 180px);
  grid-template-rows: auto auto 1fr;
  align-items: center;
}

.upload-box__label {
  grid-column: 1 / -1;
  color: var(--ink);
  font-size: 1.08rem;
}

.upload-button {
  max-width: 100%;
  justify-self: start;
  white-space: nowrap;
}

.upload-box img {
  grid-column: 2;
  grid-row: 1 / span 3;
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.26);
}

.upload-preview--empty {
  grid-column: 2;
  grid-row: 1 / span 3;
  display: grid;
  width: 100%;
  height: 160px;
  place-items: center;
  color: rgba(255, 248, 232, 0.42);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent),
    rgba(0, 0, 0, 0.26);
  border: 1px dashed rgba(216, 255, 64, 0.18);
  border-radius: var(--radius-sm);
}

.upload-status {
  align-self: start;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.55;
}

.drop-zone.has-file {
  border-color: rgba(0, 228, 210, 0.62);
  box-shadow: inset 0 0 0 1px rgba(0, 228, 210, 0.08), 0 0 22px rgba(0, 228, 210, 0.12);
}

.upload-grid .upload-box:nth-child(1) img {
  object-fit: contain;
  padding: 10px;
}

.gallery-uploader {
  min-height: 144px;
  align-items: center;
  justify-items: center;
  text-align: center;
  background:
    linear-gradient(90deg, rgba(0, 228, 210, 0.04), transparent 48%),
    rgba(5, 7, 7, 0.46);
}

.gallery-uploader small {
  color: var(--ink-soft);
  line-height: 1.7;
}

.pending-gallery-preview {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 10px;
}

.pending-gallery-preview:empty {
  display: none;
}

.pending-gallery-preview__item,
.pending-gallery-preview__more {
  overflow: hidden;
  aspect-ratio: 1 / 0.82;
  border: 1px solid rgba(0, 228, 210, 0.24);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.36);
}

.pending-gallery-preview__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pending-gallery-preview__more {
  display: grid;
  place-items: center;
  color: var(--gold);
  font-size: 1.1rem;
}

.btn--save {
  width: 100%;
  min-height: 58px;
  margin-top: 4px;
  font-size: 1.12rem;
}

.category-form,
.category-list,
.settings-form {
  width: min(100%, 760px);
}

.settings-form {
  display: grid;
  gap: 14px;
}

@media (max-width: 920px) {
  .project-form .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .project-form .form-grid .field:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .admin-hero {
    padding: 18px;
  }

  .project-form .form-grid {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .project-form .switch,
  .upload-button {
    width: 100%;
  }

  .upload-box {
    grid-template-columns: 1fr;
  }

  .upload-box img {
    grid-column: auto;
    grid-row: auto;
    height: 180px;
  }

  .upload-preview--empty {
    grid-column: auto;
    grid-row: auto;
    height: 180px;
  }
}

/* Interactive admin states */
.btn,
.upload-button,
.category-row,
.admin-project-card,
.image-chip button {
  transition:
    transform var(--duration) ease,
    border-color var(--duration) ease,
    background var(--duration) ease,
    color var(--duration) ease,
    box-shadow var(--duration) ease,
    filter var(--duration) ease;
}

.btn,
.upload-button,
.image-chip button {
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  color: var(--ink);
  background: rgba(216, 255, 64, 0.1);
  border-color: rgba(216, 255, 64, 0.36);
  box-shadow: 0 0 22px rgba(216, 255, 64, 0.12);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.985);
  filter: brightness(0.92);
}

.btn--primary:hover,
.btn--primary:focus-visible,
.btn--save:hover,
.btn--save:focus-visible {
  color: #050606;
  background: #eeff79;
  border-color: rgba(238, 255, 121, 0.96);
  box-shadow:
    0 0 28px rgba(216, 255, 64, 0.42),
    0 0 74px rgba(216, 255, 64, 0.18);
}

.btn--danger:hover,
.btn--danger:focus-visible,
.image-chip button:hover,
.image-chip button:focus-visible {
  color: #fff;
  background: rgba(255, 92, 168, 0.28);
  border-color: rgba(255, 92, 168, 0.64);
  box-shadow: var(--glow-pink);
}

.upload-button:hover,
.upload-button:focus-visible {
  background:
    linear-gradient(180deg, rgba(46, 255, 240, 0.98), rgba(0, 203, 190, 0.92)),
    #2efff0;
  border-color: rgba(46, 255, 240, 0.96);
  box-shadow:
    0 0 24px rgba(0, 228, 210, 0.28),
    0 0 54px rgba(0, 228, 210, 0.12);
  transform: translateY(-1px);
}

.upload-button:active {
  transform: translateY(0) scale(0.985);
}

.admin-project-card:hover,
.admin-project-card:focus-within,
.category-row:hover,
.category-row:focus-within {
  border-color: rgba(216, 255, 64, 0.34);
  box-shadow: 0 0 24px rgba(216, 255, 64, 0.08);
  transform: translateY(-2px);
}

.field input:hover,
.field select:hover,
.category-form input:hover,
.category-row input:hover {
  border-color: rgba(216, 255, 64, 0.36);
  background: rgba(5, 8, 8, 0.82);
}

.switch:hover,
.switch:focus-within {
  border-color: rgba(216, 255, 64, 0.36);
  box-shadow: 0 0 18px rgba(216, 255, 64, 0.1);
}

.btn:focus-visible,
.upload-button:focus-visible,
.image-chip button:focus-visible {
  outline: 2px solid rgba(216, 255, 64, 0.58);
  outline-offset: 3px;
}

.is-loading,
.btn:disabled {
  cursor: wait;
  opacity: 0.76;
  transform: none !important;
}

/* Footer contact layout */
.site-footer {
  display: grid;
  justify-content: center;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.footer-contact {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.footer-contact__link {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  transition:
    transform var(--duration) ease,
    filter var(--duration) ease;
}

.footer-contact__link:hover,
.footer-contact__link:focus-visible {
  transform: translateY(-2px) scale(1.04);
  filter: saturate(1.12);
}

.footer-contact__link:active {
  transform: translateY(0) scale(0.98);
}

.footer-contact__link img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.footer-admin-link--footer {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  width: auto;
  height: 36px;
  min-height: 36px;
  gap: 8px;
  padding: 0 14px;
  color: rgba(255, 248, 232, 0.52) !important;
  background: rgba(5, 7, 7, 0.22);
  border-color: rgba(255, 248, 232, 0.12);
  opacity: 0.42;
}

.footer-admin-link--footer span {
  position: static;
  width: auto;
  height: auto;
  clip: auto;
  clip-path: none;
  overflow: visible;
  white-space: nowrap;
}

.footer-admin-link--footer:hover,
.footer-admin-link--footer:focus-visible {
  opacity: 0.72;
}

/* Mobile pinch zoom in lightbox */
.lightbox__viewer {
  touch-action: none;
  overflow: hidden;
}

.lightbox__viewer img {
  transform-origin: center;
  transition: transform 120ms ease;
  cursor: zoom-in;
  will-change: transform;
}

.lightbox__viewer img.is-zoomed {
  cursor: grab;
  transition: none;
}

.lightbox__viewer img.is-zoomed:active {
  cursor: grabbing;
}
