:root {
  --bg: #000000;
  --fg: #f5f5f5;
  --muted: rgba(255, 255, 255, 0.7);
  --line: rgba(255, 255, 255, 0.62);
  --surface: rgba(255, 255, 255, 0.04);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.26);
  --transition: 260ms ease;
}

html[data-theme="light"] {
  --bg: #f7f7f5;
  --fg: #111111;
  --muted: rgba(17, 17, 17, 0.72);
  --line: rgba(17, 17, 17, 0.56);
  --surface: rgba(0, 0, 0, 0.03);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  background: var(--bg);
  color: var(--fg);
  transition: background var(--transition), color var(--transition);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  background:
    radial-gradient(circle at top, color-mix(in srgb, var(--fg) 6%, transparent), transparent 42%),
    var(--bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.is-page-transitioning::after {
  opacity: 1;
}

body.menu-open {
  overflow: hidden;
}

a,
button {
  color: inherit;
}

button {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  padding: 26px clamp(32px, 4vw, 58px) 18px;
  background: var(--bg);
  color: var(--fg);
  transition:
    background var(--transition),
    color var(--transition),
    opacity 360ms ease,
    transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

.site-shell[data-theme="light"],
.project-page-shell[data-theme="light"] {
  --bg: #f7f7f5;
  --fg: #111111;
  --muted: rgba(17, 17, 17, 0.72);
  --line: rgba(17, 17, 17, 0.56);
  --surface: rgba(0, 0, 0, 0.03);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.08);
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: #000000;
  color: #ffffff;
  transition: opacity 500ms ease, visibility 500ms ease;
}

.splash-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.skip-intro {
  position: absolute;
  top: 24px;
  right: 24px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: transparent;
  padding: 10px 14px;
  text-transform: lowercase;
  cursor: pointer;
}

.splash-logo {
  text-align: center;
}

.splash-logo p {
  margin: 12px 0 0;
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  font-weight: 500;
}

.logo-image {
  display: block;
  width: auto;
  height: auto;
}

.splash-logo-image {
  width: min(420px, 56vw);
  margin: 0 auto;
}

.header-logo-image {
  width: min(170px, 18vw);
  min-width: 118px;
}

.site-header {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr 64px;
  align-items: start;
  margin-bottom: 28px;
}

.menu-button,
.theme-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.menu-button {
  width: 38px;
  display: grid;
  gap: 7px;
  margin-top: 6px;
  transition: transform 220ms ease, opacity 180ms ease;
}

.menu-button span {
  height: 2px;
  width: 100%;
  background: currentColor;
  display: block;
  transform-origin: center;
  transition: transform 260ms ease, opacity 180ms ease;
}

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

.menu-button:hover span:nth-child(1) {
  transform: translateX(-2px);
}

.menu-button:hover span:nth-child(3) {
  transform: translateX(2px);
}

.theme-toggle {
  justify-self: end;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 8px 10px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition:
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    transform 160ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-1px);
}

.theme-toggle:active {
  transform: translateY(1px);
}

.brand-link {
  justify-self: center;
}

.site-menu {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 18;
  width: min(320px, 78vw);
  padding: 94px 20px 20px;
  transform: translateX(-100%);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.site-menu.is-open {
  transform: translateX(0);
  pointer-events: auto;
}

.menu-panel {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--bg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.menu-panel a {
  padding: 18px 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 420ms ease,
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1),
    background 180ms ease;
}

.menu-panel a:last-child {
  border-bottom: 0;
}

.menu-panel a:nth-child(1) {
  transition-delay: 40ms;
}

.menu-panel a:nth-child(2) {
  transition-delay: 90ms;
}

.menu-panel a:nth-child(3) {
  transition-delay: 140ms;
}

.menu-panel a:nth-child(4) {
  transition-delay: 190ms;
}

.site-menu.is-open .menu-panel a {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-layout {
  display: grid;
  grid-template-columns: minmax(560px, 1fr) minmax(420px, 0.72fr);
  gap: clamp(42px, 3.5vw, 56px);
  align-items: start;
}

.image-field {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(230px, 350px));
  grid-auto-rows: 62px;
  justify-content: center;
  gap: 34px clamp(20px, 1.9vw, 28px);
  height: 100vh;
  overflow: auto;
  padding: 0 10px 32px 10px;
  align-content: start;
  scrollbar-width: none;
  isolation: isolate;
}

.image-field::-webkit-scrollbar {
  display: none;
}

.image-card {
  position: relative;
  overflow: hidden;
  background: #111111;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transform: translate3d(0, 0, 0) scale(1);
  transition:
    transform 560ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 560ms ease,
    border-color 420ms ease,
    opacity 420ms ease;
  border: 1px solid var(--line);
  will-change: transform;
  backface-visibility: hidden;
  opacity: 0.9;
}

.image-card.tall {
  grid-row: span 6;
  min-height: 430px;
}

.image-card.landscape {
  grid-row: span 3;
  min-height: 186px;
}

.image-card.square {
  grid-row: span 4;
  min-height: 248px;
}

.image-card:nth-child(odd) {
  margin-top: 12px;
}

.image-card:nth-child(4n) {
  margin-top: 52px;
}

.image-fill {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.image-fill-media {
  width: 112%;
  height: 112%;
  margin: -6%;
  object-fit: cover;
  display: block;
  animation: imageDrift var(--drift-duration, 16s) ease-in-out infinite;
  animation-delay: var(--drift-delay, 0s);
  transition:
    transform 640ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 460ms ease;
  backface-visibility: hidden;
}

.image-card:hover .image-fill-media,
.image-card.is-active .image-fill-media {
  animation-play-state: paused;
  transform: scale(1.03);
  opacity: 1;
}

.image-card:hover,
.image-card.is-active {
  transform: translate3d(0, -4px, 0) scale(1.012);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.18);
  opacity: 1;
}

.image-card.is-active {
  border-color: rgba(255, 255, 255, 0.68);
  box-shadow: 0 26px 62px rgba(0, 0, 0, 0.22);
}

.reveal-item {
  opacity: 0;
  transform: translate3d(0, 34px, 0);
  transition:
    opacity 700ms ease,
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-item.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.site-shell[data-theme="light"] .image-card.is-active {
  border-color: rgba(17, 17, 17, 0.5);
}

.works-panel {
  scroll-margin-top: 110px;
}

@media (min-width: 1500px) {
  .portfolio-layout {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    grid-template-columns:
      minmax(56px, 1fr)
      minmax(700px, 760px)
      minmax(56px, 1fr)
      minmax(620px, 760px)
      minmax(56px, 1fr);
    gap: 0;
  }

  .image-field {
    grid-column: 2;
  }

  .works-panel {
    grid-column: 4;
  }
}

.works-table {
  overflow: visible;
}

.works-head {
  background: var(--bg);
  box-shadow: 0 1px 0 var(--line);
}

.works-table::-webkit-scrollbar {
  width: 6px;
}

.works-table::-webkit-scrollbar-track {
  background: transparent;
}

.works-table::-webkit-scrollbar-thumb {
  background: var(--line);
}

.works-table,
.project-detail {
  border: 1px solid var(--line);
  transition:
    border-color 260ms ease,
    box-shadow 260ms ease,
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.project-detail {
  margin-top: 20px;
  padding: 20px 18px;
  background: var(--surface);
}

.works-table:hover,
.project-detail:hover {
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.08);
}

.works-head,
.work-row {
  display: grid;
  grid-template-columns: 1fr 86px;
  gap: 16px;
  align-items: center;
  padding: 17px 18px;
  text-decoration: none;
}

.works-head {
  grid-template-columns: 1fr;
  font-size: 0.98rem;
  text-transform: lowercase;
  border-bottom: 1px solid var(--line);
}

.works-list {
  display: grid;
}

.work-row {
  transition:
    background var(--transition),
    color var(--transition),
    padding-inline 240ms ease;
  border-bottom: 0;
}

.work-entry:last-child {
  border-bottom: 0;
}

.work-row:hover,
.work-row.is-active {
  background: var(--surface);
  padding-left: 20px;
}

.work-entry {
  border-bottom: 1px solid var(--line);
}

.work-entry.is-open .work-row {
  background: var(--surface);
}

.work-dropdown {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 220ms ease,
    padding 220ms ease,
    opacity 180ms ease,
    transform 220ms ease;
  opacity: 0;
  padding: 0 16px;
  background: var(--surface);
  transform: translateY(-10px);
}

.work-entry.is-open .work-dropdown {
  max-height: 420px;
  opacity: 1;
  padding: 0 16px 18px;
  transform: translateY(0);
}

.work-dropdown-inner {
  display: grid;
  gap: 10px;
  padding-top: 6px;
}

.work-dropdown .detail-kicker {
  margin-bottom: 0;
}

.work-dropdown .detail-meta {
  margin: 0;
  font-size: 0.92rem;
}

.work-dropdown .detail-copy {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
}

.detail-kicker {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-detail h2 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 2.2vw, 2.4rem);
  line-height: 1;
  text-transform: uppercase;
}

.detail-meta,
.detail-copy,
.info-strip,
.site-footer {
  color: var(--muted);
}

.detail-meta {
  margin: 0 0 14px;
}

.detail-copy {
  margin: 0 0 12px;
  line-height: 1.6;
}

.info-strip,
.site-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.info-strip {
  margin-top: 38px;
}

.site-footer {
  grid-template-columns: repeat(4, auto);
  justify-content: space-between;
  align-items: center;
  gap: 18px 28px;
  margin-top: 24px;
  padding-top: 14px;
  padding-bottom: 0;
  font-size: 0.9rem;
}

.site-footer a {
  text-decoration: none;
}

.admin-footer-link {
  justify-self: end;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.58;
}

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

.project-page-shell {
  min-height: 100vh;
  padding: 26px 20px 18px;
  background: var(--bg);
  color: var(--fg);
  transition:
    background var(--transition),
    color var(--transition),
    opacity 360ms ease,
    transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

body.is-page-transitioning .site-shell,
body.is-page-transitioning .project-page-shell {
  opacity: 0.22;
  transform: translateY(18px) scale(0.995);
}

@keyframes imageDrift {
  0% {
    transform: scale(1.01) translate3d(0, 0, 0);
  }
  50% {
    transform: scale(1.04) translate3d(0, -8px, 0);
  }
  100% {
    transform: scale(1.01) translate3d(0, 0, 0);
  }
}

.project-main {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.project-visual {
  position: sticky;
  top: 50%;
  transform: translateY(-50%);
  align-self: start;
}

.project-hero-card {
  position: relative;
  height: min(76vh, 720px);
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #111111;
  box-shadow: var(--shadow);
  transition:
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 320ms ease,
    border-color 260ms ease;
}

.project-hero-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 68px rgba(0, 0, 0, 0.22);
}

.project-hero-slides {
  position: absolute;
  inset: 0;
}

.project-hero-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 900ms ease, transform 1200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.project-hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.project-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.035);
  transition: transform 1800ms cubic-bezier(0.22, 1, 0.36, 1);
}

.project-hero-slide.is-active img {
  transform: scale(1);
}

.project-hero-overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: grid;
  gap: 16px;
  padding: 26px 24px 22px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
  color: #ffffff;
  z-index: 1;
}

.project-hero-overlay p {
  margin: 0;
  max-width: 36rem;
  line-height: 1.6;
}

.project-hero-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-hero-dot {
  width: 34px;
  height: 4px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.project-hero-dot.is-active {
  background: #ffffff;
  transform: scaleX(1.15);
}

.project-copy-grid {
  display: grid;
  gap: 20px;
}

.project-block {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 20px 18px;
  transition:
    border-color 260ms ease,
    box-shadow 320ms ease,
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    background 260ms ease;
}

.project-block h1,
.project-block h2,
.project-block p {
  margin-top: 0;
}

.project-block h1 {
  margin-bottom: 10px;
  font-size: clamp(2.2rem, 4vw, 4.4rem);
  line-height: 0.98;
  text-transform: uppercase;
}

.project-block h2 {
  margin-bottom: 10px;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-block p:last-child {
  margin-bottom: 0;
}

.project-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.08);
}

.project-meta-list {
  display: grid;
  gap: 12px;
}

.project-meta-line {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.project-meta-line:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.project-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  background: transparent;
  transition:
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    transform 120ms ease,
    opacity 180ms ease;
}

.project-link:hover,
.project-link:focus-visible {
  background: var(--surface);
  transform: translateY(-1px);
}

.project-link:active {
  transform: translateY(1px);
  background: var(--surface);
}

.project-link.is-busy {
  opacity: 0.72;
  background: var(--surface);
}

.project-link.is-success {
  background: currentColor;
  color: var(--bg);
  border-color: currentColor;
}

.project-list {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
}

.project-list a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  background: transparent;
  transition:
    background 180ms ease,
    transform 180ms ease,
    color 180ms ease;
}

.project-list a:hover,
.project-list a.is-active {
  background: var(--surface);
}

.project-list a:hover {
  transform: translateX(4px);
}

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

.project-gallery figure {
  margin: 0;
  border: 1px solid var(--line);
  background: #111111;
  overflow: hidden;
  transition:
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 280ms ease,
    border-color 260ms ease;
}

.project-gallery figure:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16);
}

.project-gallery img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.project-gallery figure:hover img {
  transform: scale(1.035);
}

.about-main {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.08fr);
  gap: 42px;
  align-items: start;
}

.about-intro {
  display: grid;
  gap: 20px;
}

.about-hero h1 {
  margin-bottom: 16px;
  font-size: clamp(2.5rem, 4.6vw, 5rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.about-content {
  display: grid;
  gap: 20px;
}

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

.about-columns > * {
  transition:
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 260ms ease;
}

.about-columns > *:hover {
  transform: translateY(-2px);
}

.about-list-title {
  margin: 0 0 10px;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.about-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.about-process {
  display: grid;
  gap: 14px;
}

.about-process-step {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 16px;
  align-items: start;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.about-process-step:first-child {
  padding-top: 0;
  border-top: 0;
}

.about-process-step span {
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-process-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.contact-main {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.08fr);
  gap: 42px;
  align-items: start;
}

.contact-intro,
.contact-content {
  display: grid;
  gap: 20px;
}

.contact-hero h1 {
  margin-bottom: 16px;
  font-size: clamp(2.5rem, 4.6vw, 5rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.contact-primary-link {
  min-width: 220px;
}

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

.contact-columns > * {
  transition:
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 260ms ease;
}

.contact-columns > *:hover {
  transform: translateY(-2px);
}

.admin-main {
  display: grid;
  grid-template-columns: minmax(300px, 0.42fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.admin-login-main {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 160px);
}

.admin-login-card {
  width: min(720px, 100%);
}

.admin-sidebar,
.admin-editor {
  display: grid;
  gap: 20px;
}

.admin-sidebar {
  position: sticky;
  top: 20px;
}

.admin-panel h1 {
  margin: 0 0 12px;
  font-size: clamp(2.3rem, 4vw, 4.2rem);
  line-height: 0.96;
  text-transform: uppercase;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.admin-actions-form {
  margin-top: 8px;
}

.admin-actions-compact {
  margin-top: 0;
  justify-content: end;
}

.admin-note {
  margin-top: 18px;
}

.admin-note[data-tone="success"] {
  color: #68d391;
}

.admin-note[data-tone="error"] {
  color: #ff8f8f;
}

.admin-editor-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin: -20px -18px 18px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px);
}

.admin-editor-head h2 {
  margin: 5px 0 0;
}

.has-unsaved-changes .admin-editor-head {
  border-bottom-color: currentColor;
}

.admin-project-search {
  margin-bottom: 14px;
}

.admin-project-list {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  max-height: 52vh;
  overflow: auto;
}

.admin-current-project {
  margin-bottom: 14px;
}

.admin-project-current-card {
  width: 100%;
  appearance: none;
  border: 1px solid currentColor;
  background: currentColor;
  color: var(--bg);
  text-align: left;
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  cursor: pointer;
  transition: transform 120ms ease, opacity 180ms ease;
}

.admin-project-current-card:hover {
  transform: translateX(2px);
}

.admin-project-current-card small {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: color-mix(in srgb, var(--bg) 72%, transparent);
}

.admin-project-current-card strong {
  font-size: 1.05rem;
  line-height: 1.2;
}

.admin-project-item {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    transform 120ms ease;
}

.admin-project-item:last-child {
  border-bottom: 0;
}

.admin-project-item:hover,
.admin-project-item.is-active {
  background: var(--surface);
}

.admin-project-item:hover {
  transform: translateX(2px);
}

.admin-project-item.is-active {
  box-shadow: inset 3px 0 0 currentColor;
  background: currentColor;
  color: var(--bg);
  border-color: currentColor;
}

.admin-project-item.is-active span:first-child {
  font-weight: 600;
}

.admin-project-item.is-active .admin-project-flag,
.admin-project-item.is-active .admin-project-item-local span:first-child::after,
.admin-project-item.is-active .admin-project-flag-active {
  color: color-mix(in srgb, var(--bg) 72%, transparent);
}

.admin-empty-state {
  margin: 0;
  padding: 18px 16px;
  color: var(--muted);
}

.admin-project-item-local span:first-child::after {
  content: " draft";
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  margin-left: 8px;
}

.admin-project-flag {
  display: inline-block;
  margin-left: 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
}

.admin-project-flag-active {
  color: inherit;
}

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

.admin-form-section {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.admin-form-section .detail-kicker {
  margin: 0;
}

.admin-auth-form {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.admin-field {
  display: grid;
  gap: 8px;
}

.admin-field span {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-field input,
.admin-field textarea,
.admin-field select {
  width: 100%;
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  padding: 12px 14px;
  font: inherit;
  resize: vertical;
}

.admin-field input::placeholder,
.admin-field textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

.admin-field input:focus,
.admin-field textarea:focus,
.admin-field select:focus {
  outline: none;
  border-color: currentColor;
}

.admin-field-wide {
  grid-column: 1 / -1;
}

.admin-field-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 30px;
}

.admin-field-checkbox input {
  width: auto;
  margin: 0;
}

.admin-field-checkbox span {
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: inherit;
}

.admin-gallery-editor {
  display: grid;
  gap: 14px;
}

.admin-lead-preview {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
}

.admin-lead-preview.is-empty {
  opacity: 0.72;
}

.admin-lead-preview-frames {
  display: grid;
  gap: 14px;
}

.admin-lead-preview-frame {
  display: grid;
  gap: 8px;
}

.admin-lead-preview-label {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-lead-preview-media {
  position: relative;
  border: 1px solid var(--line);
  background: #111111;
  overflow: hidden;
}

.admin-lead-preview-frame-landscape .admin-lead-preview-media {
  aspect-ratio: 16 / 10;
}

.admin-lead-preview-frame-square .admin-lead-preview-media {
  aspect-ratio: 1 / 1;
}

.admin-lead-preview-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-lead-preview-copy {
  display: grid;
  gap: 10px;
}

.admin-lead-preview-kicker {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-gallery-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.admin-gallery-preview {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  background: #111111;
  overflow: hidden;
}

.admin-gallery-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.admin-gallery-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-gallery-add-tile {
  appearance: none;
  border: 1px dashed var(--line);
  background: transparent;
  color: inherit;
  min-height: 220px;
  padding: 18px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
  cursor: pointer;
}

.admin-gallery-add-tile span {
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-gallery-add-tile small {
  color: var(--muted);
  max-width: 14rem;
  line-height: 1.5;
}

.admin-gallery-add-tile.is-dragging {
  background: var(--surface);
}

.admin-gallery-tile {
  position: relative;
  margin: 0;
  cursor: grab;
}

.admin-gallery-tile.is-dragging {
  opacity: 0.45;
  transform: scale(0.98);
}

.admin-gallery-tile.is-drop-target .admin-gallery-preview {
  border-color: currentColor;
  box-shadow: inset 0 0 0 1px currentColor;
}

.admin-gallery-overlay {
  position: absolute;
  inset: auto 0 0 0;
  display: grid;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.18));
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.admin-gallery-tile:hover .admin-gallery-overlay,
.admin-gallery-tile:focus-within .admin-gallery-overlay {
  opacity: 1;
  transform: translateY(0);
}

.admin-gallery-label {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-gallery-alt-label {
  display: grid;
  gap: 6px;
}

.admin-gallery-alt-label span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-gallery-alt {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.38);
  color: #ffffff;
  padding: 10px 12px;
  font: inherit;
}

.admin-gallery-alt:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.75);
}

.admin-lead-preview-badge,
.admin-gallery-lead-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.68);
  color: #ffffff;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-gallery-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  width: 32px;
  height: 32px;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
}

.admin-gallery-tile:active {
  cursor: grabbing;
}

.admin-panel.is-disabled,
.admin-form.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

@media (max-width: 1240px) {
  .portfolio-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .works-panel {
    position: static;
  }

  .image-field {
    position: static;
    height: auto;
    max-height: none;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    grid-auto-rows: 72px;
  }

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

  .about-main {
    grid-template-columns: 1fr;
  }

  .contact-main {
    grid-template-columns: 1fr;
  }

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

  .admin-sidebar,
  .admin-editor-head {
    position: static;
  }

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

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

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

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

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

  .project-visual {
    position: static;
    transform: none;
  }

  .project-hero-card {
    height: min(78vh, 680px);
    min-height: 480px;
  }
}

@media (max-width: 780px) {
  .site-shell {
    padding-inline: 14px;
  }

  .site-header {
    grid-template-columns: 44px 1fr 54px;
  }

  .theme-toggle {
    font-size: 0.64rem;
    padding: 8px 8px;
  }

  .portfolio-layout {
    gap: 22px;
  }

  .header-logo-image {
    width: 124px;
  }

  .image-field {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 14px;
    padding: 0;
    height: auto;
    overflow: visible;
  }

  .image-card {
    position: relative;
    transform: none;
    min-height: 0;
    margin-top: 0 !important;
    aspect-ratio: 4 / 5;
  }

  .image-card.tall,
  .image-card.landscape,
  .image-card.square,
  .image-card.portrait {
    grid-row: auto;
    min-height: 0;
  }

  .image-card:hover,
  .image-card.is-active {
    transform: translateY(-3px) scale(1.01);
  }

  .works-head,
  .work-row {
    grid-template-columns: 1fr 58px;
    padding: 14px 12px;
    font-size: 0.92rem;
  }

  .work-dropdown {
    padding-inline: 12px;
  }

  .work-entry.is-open .work-dropdown {
    padding: 0 12px 14px;
  }

  .info-strip,
  .site-footer {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .site-footer {
    margin-top: 20px;
    padding-top: 12px;
  }

  .admin-footer-link {
    justify-self: start;
  }

  .project-page-shell {
    padding-inline: 14px;
  }

  .project-main {
    gap: 22px;
  }

  .project-hero-card {
    height: 54vh;
    min-height: 320px;
  }

  .project-hero-overlay {
    padding: 16px;
  }

  .project-hero-dot {
    width: 26px;
  }

  .project-actions {
    flex-direction: column;
  }

  .project-link {
    width: 100%;
  }

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

  .project-gallery img {
    min-height: 200px;
  }

  .about-process-step {
    grid-template-columns: 42px 1fr;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
