:root {
  --brand: #9d1010;
  --brand-dark: #650909;
  --brand-soft: rgba(157, 16, 16, 0.13);
  --ink: #1b1111;
  --muted: #6e5d5d;
  --line: rgba(27, 17, 17, 0.12);
  --bg: #fff8f7;
  --card: #ffffff;
  --dark: #160808;
  --dark-card: rgba(255, 255, 255, 0.08);
  --radius: 24px;
  --shadow: 0 24px 70px rgba(71, 7, 7, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(157, 16, 16, 0.16), transparent 32rem),
    linear-gradient(180deg, #fff7f6 0%, #ffffff 38%, #fff8f7 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.admin-body {
  background: #120606;
  color: #fff;
}

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

img,
iframe {
  max-width: 100%;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1rem, 4vw, 4rem);
  background: rgba(255, 248, 247, 0.84);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.admin-header {
  background: rgba(18, 6, 6, 0.84);
  border-color: rgba(255, 255, 255, 0.12);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(157, 16, 16, 0.25);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.desktop-nav a:hover {
  color: var(--brand);
}

.header-cta,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0.78rem 1.1rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.header-cta,
.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 14px 36px rgba(157, 16, 16, 0.24);
}

.btn.ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.admin-body .btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.btn.subtle {
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid rgba(157, 16, 16, 0.18);
}

.btn.full {
  width: 100%;
}

.header-cta:hover,
.btn:hover {
  transform: translateY(-2px);
}

.section {
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 4vw, 4rem);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(280px, 0.86fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  min-height: calc(100vh - 78px);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.section-head h2,
.contact-card h2,
.login-card h1,
.admin-topbar h1,
.config-warning h1 {
  margin: 0;
  max-width: 920px;
  font-size: clamp(2.4rem, 7vw, 5.9rem);
  line-height: 0.96;
  letter-spacing: -0.08em;
}

.section-head h2,
.contact-card h2 {
  font-size: clamp(2rem, 4.7vw, 4rem);
}

.hero-description,
.section-head p,
.contact-card p,
.login-card p,
.config-warning p {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.8rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 2rem;
  max-width: 720px;
}

.hero-stats div {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.hero-stats strong,
.hero-stats span {
  display: block;
}

.hero-stats strong {
  font-size: 1.25rem;
}

.hero-stats span {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 480px;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 38px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), transparent),
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.24), transparent 24rem),
    linear-gradient(145deg, var(--brand), #4e0505);
  box-shadow: var(--shadow);
  color: #fff;
}

.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.hero-card::before {
  width: 260px;
  height: 260px;
  right: -70px;
  top: -40px;
}

.hero-card::after {
  width: 360px;
  height: 360px;
  left: -140px;
  bottom: -160px;
}

.logo-orbit {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 330px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.logo-orbit img {
  width: min(76%, 360px);
  filter: drop-shadow(0 20px 44px rgba(0, 0, 0, 0.28));
}

.hero-card p,
.hero-card span {
  position: relative;
  z-index: 1;
}

.hero-card p {
  margin: 1.2rem 0 0.25rem;
  font-size: clamp(1.3rem, 3vw, 2.25rem);
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-card span {
  color: rgba(255, 255, 255, 0.74);
}

.strip {
  padding-block: 1rem;
  background: var(--dark);
  color: #fff;
}

.marquee {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.marquee span {
  padding: 0.65rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.84);
  font-weight: 750;
}

.section-head {
  margin-bottom: 2rem;
}

.service-grid,
.portfolio-grid,
.testimonial-grid,
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.service-card,
.portfolio-card,
.testimonial-card,
.process-card,
.contact-card,
.login-card,
.admin-card,
.config-warning {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 50px rgba(71, 7, 7, 0.08);
}

.service-card,
.testimonial-card,
.process-card {
  padding: 1.35rem;
}

.service-card h3,
.portfolio-card h3,
.testimonial-card h3,
.process-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

.service-card p,
.portfolio-card p,
.testimonial-card p,
.process-card p {
  color: var(--muted);
  line-height: 1.7;
}

.service-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 1.1rem;
  color: #fff;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  font-size: 1.5rem;
  font-weight: 900;
}

.service-image {
  width: 100%;
  height: 170px;
  object-fit: cover;
  margin-bottom: 1rem;
  border-radius: 18px;
}

.service-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.service-meta span {
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.86rem;
  font-weight: 800;
}

.mini-link {
  color: var(--brand);
  font-weight: 900;
}

.dark-section {
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(157, 16, 16, 0.48), transparent 28rem),
    linear-gradient(160deg, #1b0707, #070202);
}

.dark-section .section-head p {
  color: rgba(255, 255, 255, 0.72);
}

.portfolio-card {
  overflow: hidden;
  background: var(--dark-card);
  border-color: rgba(255, 255, 255, 0.1);
}

.portfolio-card > div:not(.portfolio-media) {
  padding: 1.25rem;
}

.portfolio-card p {
  color: rgba(255, 255, 255, 0.7);
}

.portfolio-media {
  display: grid;
  place-items: center;
  min-height: 230px;
  background: rgba(255, 255, 255, 0.06);
}

.portfolio-media img,
.portfolio-media iframe {
  width: 100%;
  height: 250px;
  border: 0;
  object-fit: cover;
}

.portfolio-media span {
  color: rgba(255, 255, 255, 0.58);
  font-weight: 900;
}

.process-card span {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1rem;
  border-radius: 14px;
  color: #fff;
  background: var(--brand);
  font-weight: 900;
}

.testimonial-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.testimonial-head img,
.avatar-fallback {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  object-fit: cover;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  font-weight: 900;
}

.testimonial-head p {
  margin: 0;
}

.stars {
  color: var(--brand) !important;
  letter-spacing: 0.1em;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 2rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.6);
}

.dark-section .empty-state {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
}

.faq-section {
  background: #fff;
}

.faq-list {
  display: grid;
  gap: 0.8rem;
  max-width: 920px;
}

details {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

summary {
  cursor: pointer;
  font-weight: 900;
}

details p {
  color: var(--muted);
  line-height: 1.75;
}

.contact-section {
  padding-top: 2rem;
}

.contact-card {
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem);
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 22rem),
    linear-gradient(135deg, var(--brand), #430404);
}

.contact-card p,
.contact-card .eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

.contact-card .btn.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem clamp(1rem, 4vw, 4rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer a {
  color: var(--brand);
  font-weight: 900;
}

.floating-wa {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: #fff;
  border-radius: 20px;
  background: linear-gradient(135deg, #23b45d, #0b7b39);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.2);
  font-weight: 900;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.is-hidden {
  display: none !important;
}

.admin-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 2rem auto 5rem;
}

.login-card,
.config-warning {
  max-width: 520px;
  margin: 4rem auto;
  padding: 2rem;
  color: var(--ink);
}

.login-card h1,
.config-warning h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.config-warning code,
.guide-card code {
  display: block;
  overflow: auto;
  padding: 0.9rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.08);
}

.admin-section {
  color: #fff;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-topbar h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
}

.admin-topbar p {
  color: rgba(255, 255, 255, 0.68);
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1.5rem 0;
}

.admin-tabs button {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 0.72rem 1rem;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  font-weight: 800;
}

.admin-tabs button.is-active {
  color: #fff;
  background: var(--brand);
}

.admin-panel-section {
  display: none;
}

.admin-panel-section.is-active {
  display: block;
}

.admin-grid {
  display: grid;
  gap: 1rem;
}

.admin-grid.two {
  grid-template-columns: minmax(300px, 0.92fr) minmax(300px, 1.08fr);
}

.admin-card {
  padding: 1.25rem;
  color: var(--ink);
}

.admin-card h2 {
  margin: 0 0 1rem;
  letter-spacing: -0.04em;
}

.admin-form {
  display: grid;
  gap: 0.9rem;
}

.admin-form label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.88rem 0.95rem;
  outline: none;
  background: #fff;
  color: var(--ink);
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
  border-color: rgba(157, 16, 16, 0.5);
  box-shadow: 0 0 0 4px rgba(157, 16, 16, 0.1);
}

.check-row {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.65rem !important;
}

.check-row input {
  width: auto;
}

.form-actions,
.list-head,
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.list-head {
  justify-content: space-between;
  margin-bottom: 1rem;
}

.admin-list {
  display: grid;
  gap: 0.7rem;
}

.admin-item,
.admin-empty {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

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

.admin-item p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.admin-actions button {
  border: 0;
  border-radius: 12px;
  padding: 0.58rem 0.75rem;
  background: var(--brand-soft);
  color: var(--brand);
  cursor: pointer;
  font-weight: 900;
}

.admin-actions button.danger {
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.11);
}

.preview-link a {
  display: inline-block;
  color: var(--brand);
  font-weight: 900;
}

.guide-card p {
  color: var(--muted);
  line-height: 1.7;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
  max-width: min(420px, calc(100vw - 2rem));
  padding: 1rem 1.1rem;
  border-radius: 16px;
  color: #fff;
  background: #111827;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.danger {
  background: #b91c1c;
}

.toast.warning {
  background: #a16207;
}

@media (max-width: 980px) {
  .hero,
  .admin-grid.two {
    grid-template-columns: 1fr;
  }

  .service-grid,
  .portfolio-grid,
  .testimonial-grid,
  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-card {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .desktop-nav {
    display: none;
  }

  .site-header {
    padding: 0.75rem 1rem;
  }

  .brand span {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-cta {
    padding-inline: 0.85rem;
    font-size: 0.9rem;
  }

  .section {
    padding-inline: 1rem;
  }

  .hero {
    min-height: auto;
    padding-top: 3rem;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 17vw, 4.4rem);
  }

  .hero-stats,
  .service-grid,
  .portfolio-grid,
  .testimonial-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .site-footer,
  .admin-topbar,
  .admin-item {
    align-items: stretch;
    flex-direction: column;
  }

  .btn,
  .header-cta {
    width: auto;
  }

  .site-footer {
    text-align: center;
  }
}


.portfolio-media-link {
  position: relative;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  cursor: zoom-in;
}

.portfolio-media-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.62));
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.portfolio-media-link img {
  transition: transform 0.25s ease;
}

.portfolio-media-link:hover::after,
.portfolio-media-link:focus-visible::after {
  opacity: 1;
}

.portfolio-media-link:hover img,
.portfolio-media-link:focus-visible img {
  transform: scale(1.04);
}

.preview-badge {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #170707 !important;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow);
}

.portfolio-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
}

.portfolio-lightbox.is-open {
  display: flex;
}

.portfolio-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
}

.portfolio-lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(960px, 96vw);
  max-height: 92vh;
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  background: rgba(24, 8, 8, 0.92);
  box-shadow: var(--shadow);
}

.portfolio-lightbox-image {
  display: block;
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.portfolio-lightbox-title {
  margin: 0.8rem 0 0;
  color: #fff;
  font-weight: 900;
}

.portfolio-lightbox-close {
  position: absolute;
  top: -0.85rem;
  right: -0.85rem;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: var(--shadow);
}

body.lightbox-open {
  overflow: hidden;
}

/* Mobile + performance upgrade */
.portfolio-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 1.5rem;
  text-align: center;
}

.portfolio-count {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 800;
}

.dark-section .portfolio-actions .btn.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.portfolio-card,
.service-card,
.testimonial-card,
.process-card {
  content-visibility: auto;
  contain-intrinsic-size: 360px;
}

.portfolio-card {
  will-change: transform;
}

/* Admin panel stability fix */
.admin-grid.two {
  align-items: start;
}

.admin-card {
  min-width: 0;
}

.admin-card.admin-form {
  align-self: start;
}

.admin-list {
  max-height: 68vh;
  overflow: auto;
  padding-right: 0.3rem;
  overscroll-behavior: contain;
}

.admin-list.compact-scroll {
  max-height: 62vh;
}

.admin-list::-webkit-scrollbar {
  width: 8px;
}

.admin-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(157, 16, 16, 0.35);
}

.admin-item {
  align-items: center;
  min-width: 0;
}

.admin-item > div:first-child {
  min-width: 0;
}

.admin-item strong,
.admin-item p {
  overflow-wrap: anywhere;
}

.admin-meta {
  margin: -0.35rem 0 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.admin-search {
  width: min(260px, 100%);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.75rem 0.95rem;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-weight: 750;
}

.admin-search:focus {
  border-color: rgba(157, 16, 16, 0.5);
  box-shadow: 0 0 0 4px rgba(157, 16, 16, 0.1);
}

@media (max-width: 720px) {
  body {
    overflow-x: hidden;
  }

  .portfolio-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .portfolio-actions .btn {
    width: 100%;
  }

  .dark-section#portfolio {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .portfolio-grid {
    gap: 0.85rem;
  }

  .portfolio-card {
    border-radius: 20px;
  }

  .portfolio-media {
    min-height: 156px;
  }

  .portfolio-media img,
  .portfolio-media iframe {
    height: 178px;
  }

  .portfolio-card > div:not(.portfolio-media) {
    padding: 1rem;
  }

  .portfolio-card h3 {
    font-size: 1.08rem;
  }

  .portfolio-card p {
    margin-block: 0.45rem;
    line-height: 1.55;
  }

  .preview-badge {
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 0.45rem 0.65rem;
    font-size: 0.72rem;
  }

  .admin-shell {
    width: min(100% - 1rem, 1180px);
    margin: 1rem auto 4rem;
  }

  .admin-topbar h1 {
    font-size: clamp(1.85rem, 12vw, 3rem);
    line-height: 1;
  }

  .admin-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
  }

  .admin-tabs button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .admin-card {
    padding: 1rem;
    border-radius: 20px;
  }

  .admin-list,
  .admin-list.compact-scroll {
    max-height: 430px;
  }

  .admin-item {
    gap: 0.8rem;
  }

  .admin-actions {
    width: 100%;
  }

  .admin-actions button {
    flex: 1 1 110px;
  }

  .portfolio-list-head {
    align-items: stretch;
  }

  .admin-search {
    width: 100%;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
