:root {
  --bg: #07111f;
  --surface: rgba(12, 28, 48, 0.86);
  --surface-strong: rgba(16, 35, 61, 0.96);
  --surface-soft: rgba(9, 22, 38, 0.78);
  --text: #ecf4ff;
  --muted: #94abc7;
  --accent: #4f8cff;
  --accent-dark: #2f69d8;
  --accent-soft: #78a7ff;
  --line: rgba(146, 177, 220, 0.16);
  --shadow: 0 24px 70px rgba(2, 8, 18, 0.42);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(79, 140, 255, 0.24), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(49, 94, 180, 0.22), transparent 24%),
    radial-gradient(circle at bottom right, rgba(20, 54, 116, 0.28), transparent 34%),
    var(--bg);
  background-attachment: fixed;
}

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

img,
video {
  display: block;
  width: 100%;
}

.page-shell,
.detail-page,
.admin-shell,
.auth-page,
.simple-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

.site-header,
.admin-sidebar,
.admin-content,
.admin-item-card,
.admin-card,
.admin-form,
.service-strip,
.site-footer,
.portfolio-card,
.detail-hero,
.media-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 16px 20px;
  border-radius: 999px;
  margin-bottom: 32px;
  background: rgba(8, 19, 35, 0.88);
}

.brand-mark,
h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
}

.brand-mark {
  font-size: 1.2rem;
  font-weight: 700;
}

.top-nav,
.admin-nav,
.hero-actions,
.admin-item-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.top-nav a,
.admin-nav a {
  color: var(--muted);
}

.top-nav a:hover,
.admin-nav a:hover,
.back-link:hover {
  color: var(--text);
}

.top-nav {
  align-items: center;
  justify-content: flex-end;
}

.top-contact-link {
  font-weight: 600;
}

.top-nav-divider {
  width: 1px;
  height: 24px;
  background: rgba(206, 225, 255, 0.16);
  flex: 0 0 1px;
}

.admin-link {
  font-weight: 700;
}

.hero-section,
.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 48px;
}

.hero-copy,
.hero-panel,
.detail-cover,
.detail-page > section,
.simple-page,
.admin-content,
.admin-sidebar {
  border-radius: var(--radius-lg);
}

.hero-copy,
.hero-panel,
.service-strip,
.site-footer,
.detail-hero,
.media-card,
.admin-card,
.admin-form,
.admin-content,
.admin-sidebar {
  padding: 28px;
}

.hero-copy {
  background: linear-gradient(180deg, rgba(14, 31, 53, 0.98), rgba(6, 14, 25, 0.98));
  border: 1px solid rgba(120, 167, 255, 0.18);
}

.hero-copy h1,
.detail-hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  margin: 0 0 16px;
  line-height: 0.95;
}

.hero-tagline,
.detail-subtitle {
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 14px;
}

.hero-intro,
.detail-description,
.section-heading p,
.card-copy p,
.site-footer p,
.hint {
  color: var(--muted);
  line-height: 1.7;
}

.hero-panel {
  background: transparent;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.hero-image-placeholder,
.hero-portrait {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border-radius: 0;
}

.hero-portrait {
  object-fit: cover;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.28));
}

.hero-image-placeholder {
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px dashed rgba(140, 178, 232, 0.28);
  background: transparent;
  text-align: center;
}

.hero-image-placeholder span {
  color: var(--muted);
  font-weight: 600;
}

.hero-panel p,
.eyebrow,
.item-section {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  font-weight: 600;
}

.button.primary {
  background: var(--accent);
  color: #eff5ff;
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(79, 140, 255, 0.28);
}

.button.primary:hover {
  background: var(--accent-dark);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.button.danger {
  color: #dbe9ff;
  border-color: rgba(120, 167, 255, 0.22);
}

.full-width {
  width: 100%;
}

.portfolio-section {
  margin-bottom: 48px;
}

#my-work .portfolio-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

#company-work .portfolio-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.section-heading {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 20px;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 8px;
}

.portfolio-grid,
.media-gallery,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

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

.portfolio-card,
.media-card,
.admin-item-card,
.admin-item-editor {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.portfolio-card {
  position: relative;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.portfolio-card:hover {
  transform: translateY(-3px);
  border-color: rgba(120, 167, 255, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.card-media,
.detail-cover,
.media-card img,
.media-card video {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.placeholder-media {
  background: linear-gradient(180deg, #16365f, #0b1728);
  color: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}

.placeholder-media span {
  font-size: 1.4rem;
  font-weight: 700;
}

.placeholder-media-icon {
  position: relative;
  background: linear-gradient(180deg, #16365f, #0b1728);
  gap: 14px;
}

.card-icon-wrap {
  position: relative;
  z-index: 1;
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(140, 184, 255, 0.16);
}

.card-icon-wrap svg {
  width: 54px;
  height: 54px;
  fill: none;
  stroke: #edf5ff;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.placeholder-media-icon span {
  position: relative;
  z-index: 1;
}

.card-meta {
  margin-top: 10px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-soft);
}

.card-copy {
  padding: 20px;
  background: #0a1524;
}

.card-kicker {
  margin: 0 0 10px;
  color: var(--accent-soft);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.category-card .card-media {
  position: relative;
}

.category-card .card-media::after {
  display: none;
}

.category-card .card-copy h3,
.company-card .card-copy h3 {
  font-size: 1.05rem;
}

.category-card .placeholder-media-icon {
  min-height: 190px;
}

.company-card .placeholder-media-icon {
  min-height: 190px;
}

.category-card {
  border-radius: 22px;
}

.company-card {
  border-radius: 22px;
}

.category-card .card-copy {
  padding: 14px 14px 16px;
}

.company-card .card-copy {
  padding: 14px 14px 16px;
}

.category-card .card-copy h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.category-card .card-copy p {
  font-size: 0.86rem;
  line-height: 1.45;
}

.company-card .card-copy h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.company-card .card-copy p {
  font-size: 0.86rem;
  line-height: 1.45;
}

.category-card .card-kicker {
  margin-bottom: 6px;
  font-size: 0.62rem;
}

.company-card .card-kicker {
  margin-bottom: 6px;
  font-size: 0.62rem;
}

.category-card .card-meta {
  margin-top: 6px;
  font-size: 0.66rem;
}

.category-card .card-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 18px;
}

.company-card .card-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 18px;
}

.category-card .card-icon-wrap svg {
  width: 34px;
  height: 34px;
}

.company-card .card-icon-wrap svg {
  width: 34px;
  height: 34px;
}

.category-card .placeholder-media-icon span {
  font-size: 0.98rem;
}

.company-card .placeholder-media-icon span {
  font-size: 0.98rem;
}

.card-copy h3,
.admin-item-card h3,
.admin-form h2,
.admin-card h1 {
  margin: 0 0 8px;
}

.service-strip,
.site-footer {
  margin-bottom: 32px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(180deg, rgba(13, 29, 50, 0.98), rgba(6, 14, 25, 0.98));
}

.footer-contact,
.hero-panel a {
  font-size: 1.05rem;
  font-weight: 600;
}

.back-link {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--muted);
}

.media-gallery {
  margin-top: 24px;
}

.media-card {
  padding: 16px;
}

.media-card p {
  margin: 12px 0 0;
}

.simple-page {
  min-height: 70vh;
  display: grid;
  place-content: center;
  gap: 14px;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.admin-card,
.admin-form {
  display: grid;
  gap: 14px;
  max-width: 760px;
}

.admin-card,
.admin-form,
.admin-content,
.admin-sidebar,
.admin-item-card,
.media-card,
.detail-hero,
.service-strip {
  background: linear-gradient(180deg, rgba(13, 29, 50, 0.98), rgba(6, 14, 25, 0.98));
}

.admin-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.vertical-nav {
  flex-direction: column;
  align-items: flex-start;
}

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

.compact-card .card-copy {
  min-height: 180px;
}

.top-gap {
  margin-top: 28px;
}

.admin-item-card {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.admin-item-editor {
  padding: 20px;
  margin-bottom: 20px;
  background: linear-gradient(180deg, rgba(13, 29, 50, 0.98), rgba(6, 14, 25, 0.98));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

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

.asset-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.asset-media-frame {
  width: 100%;
  min-height: 260px;
  display: grid;
  place-items: center;
  padding: 14px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #050c16;
  border: 1px solid rgba(136, 173, 223, 0.14);
}

.asset-media {
  width: 100%;
  height: auto;
  max-height: 560px;
  aspect-ratio: auto;
  object-fit: contain;
  background: #050c16;
}

.asset-video {
  min-height: 260px;
}

.asset-image-link {
  display: block;
  width: 100%;
  cursor: zoom-in;
}

.single-asset-grid {
  grid-template-columns: minmax(0, 920px);
  justify-content: center;
}

.asset-copy h3 {
  margin: 0 0 8px;
}

.asset-copy p {
  margin: 0;
}

.asset-link-block {
  min-height: 240px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(17, 38, 66, 0.98), rgba(7, 16, 28, 0.98));
}

.pdf-preview-wrap {
  width: 100%;
  min-height: 420px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #ffffff;
}

.pdf-preview {
  width: 100%;
  height: 420px;
  border: 0;
  background: #ffffff;
}

.asset-actions {
  display: flex;
  justify-content: flex-start;
}

body.lightbox-open {
  overflow: hidden;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
}

.image-lightbox[hidden] {
  display: none;
}

.image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 18, 0.84);
}

.image-lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 1100px);
  max-height: 90vh;
  padding: 18px;
  border-radius: 22px;
  background: rgba(7, 17, 31, 0.98);
  border: 1px solid rgba(136, 173, 223, 0.2);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.image-lightbox-image {
  width: 100%;
  max-height: calc(90vh - 36px);
  object-fit: contain;
  display: block;
  border-radius: 14px;
}

.image-lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.admin-section-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
}

.flash {
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.flash.success {
  background: rgba(79, 140, 255, 0.12);
  color: #d9e9ff;
}

.flash.error {
  background: rgba(255, 255, 255, 0.08);
  color: #f2f7ff;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(136, 173, 223, 0.14);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
}

input::placeholder,
textarea::placeholder {
  color: rgba(148, 171, 199, 0.72);
}

textarea {
  resize: vertical;
}

.media-row,
.checkbox-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.checkbox-row {
  font-weight: 500;
}

.checkbox-row input {
  width: auto;
}

@media (max-width: 900px) {
  .hero-section,
  .detail-hero,
  .admin-shell,
  .portfolio-grid,
  .media-gallery,
  .admin-grid,
  .compact-grid,
  .asset-grid,
  .site-footer {
    grid-template-columns: 1fr;
  }

  #my-work .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #company-work .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-header,
  .admin-section-header,
  .admin-item-card {
    flex-direction: column;
    align-items: flex-start;
  }

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

@media (max-width: 640px) {
  .page-shell,
  .detail-page,
  .admin-shell,
  .auth-page,
  .simple-page {
    padding: 16px;
  }

  .site-header {
    border-radius: 24px;
    top: 8px;
  }

  #my-work .portfolio-grid {
    grid-template-columns: 1fr;
  }

  #company-work .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .hero-copy,
  .hero-panel,
  .service-strip,
  .site-footer,
  .detail-hero,
  .media-card,
  .admin-card,
  .admin-form,
  .admin-content,
  .admin-sidebar {
    padding: 20px;
  }

  .hero-panel {
    display: none;
  }
}
