:root {
  font-family: Helvetica, Arial, sans-serif;
  color-scheme: dark;
  background: #000;
  --admin-border: rgba(255,255,255,.18);
  --admin-muted: rgba(255,255,255,.62);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #000; }
body { font-family: Helvetica, Arial, sans-serif; }

/* Public portfolio */
.portfolio-page { overflow: hidden; background: #000; color: #fff; }
.slideshow {
  position: relative;
  width: 100vw;
  height: 100svh;
  min-height: 100vh;
  overflow: hidden;
  background: #000;
  display: grid;
  place-items: center;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 1.45s ease;
  background: #000;
}
.slide.is-active { opacity: 1; }
.slide img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100vw;
  max-height: 100svh;
  object-fit: contain;
  object-position: center center;
  user-select: none;
  -webkit-user-drag: none;
}

/* Slight dark veil from the reference screenshots. It does not crop or alter image geometry. */
.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.24);
  pointer-events: none;
}

.identity {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(96vw, 1250px);
  text-align: center;
  color: #fff;
  pointer-events: none;
  text-shadow: 0 1px 16px rgba(0,0,0,.08);
}
.identity-name {
  font-size: clamp(44px, 7.35vw, 108px);
  font-weight: 700;
  line-height: .95;
  letter-spacing: .025em;
  white-space: nowrap;
}
.identity-subtitle {
  margin-top: clamp(20px, 2.2vw, 34px);
  font-size: clamp(14px, 1.35vw, 21px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: .50em;
  padding-left: .50em;
  white-space: nowrap;
}

.copyright {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 24px);
  color: rgba(255,255,255,.78);
  font-size: clamp(9px, .72vw, 12px);
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

.empty-state, .portfolio-error {
  position: absolute;
  z-index: 2;
  color: rgba(255,255,255,.42);
  font-size: 12px;
}

@media (max-width: 700px) {
  .identity { width: 98vw; }
  .identity-name {
    font-size: clamp(29px, 9.25vw, 72px);
    letter-spacing: .018em;
  }
  .identity-subtitle {
    margin-top: 20px;
    font-size: clamp(11px, 2.1vw, 16px);
    letter-spacing: .47em;
    padding-left: .47em;
  }
  .copyright { font-size: 10px; }
}

/* Admin only */
.admin-body {
  min-height: 100vh;
  color: #fff;
  background: #0a0a0a;
}
.admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 80px;
}
.admin-card {
  border: 1px solid var(--admin-border);
  background: #111;
  padding: 28px;
  margin-bottom: 22px;
}
.login-card { width: min(520px, 100%); margin: 7vh auto 0; }
.admin-kicker { font-size: 12px; letter-spacing: .26em; font-weight: 700; }
.admin-body h1 { font-size: clamp(32px, 5vw, 60px); margin: 10px 0 12px; line-height: 1; }
.admin-body h2 { margin: 0; font-size: 22px; }
.admin-muted { color: var(--admin-muted); line-height: 1.5; }
.admin-form { display: grid; gap: 16px; margin-top: 26px; }
.admin-form label:not(.drop-zone):not(.admin-check) { display: grid; gap: 8px; font-size: 13px; }
.admin-form input[type="email"], .admin-form input[type="password"] {
  width: 100%; border: 1px solid var(--admin-border); background: #050505; color: #fff;
  font: inherit; padding: 14px 15px; outline: none;
}
.admin-form input:focus { border-color: #fff; }
.admin-button {
  appearance: none; border: 1px solid #fff; background: #fff; color: #000; text-decoration: none;
  font: 700 12px/1 Helvetica, Arial, sans-serif; letter-spacing: .12em; padding: 14px 18px;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.admin-button:disabled { opacity: .45; cursor: not-allowed; }
.admin-button-secondary { background: transparent; color: #fff; border-color: var(--admin-border); }
.admin-status { min-height: 20px; color: var(--admin-muted); font-size: 13px; margin: 0; white-space: pre-line; }
.admin-status.is-error { color: #ff8d8d; }
.admin-status.is-success { color: #b9ffbf; }
.admin-login-help { margin: 14px 0 0; font-size: 12px; }
.admin-bar, .admin-section-heading {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px;
}
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.drop-zone {
  min-height: 210px; border: 1px dashed rgba(255,255,255,.34); display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 24px; cursor: pointer;
}
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop-zone strong { font-size: 18px; }
.drop-zone span { color: var(--admin-muted); font-size: 13px; }
.drop-zone.is-dragging { border-color: #fff; background: #181818; }
.admin-check { display: flex; align-items: flex-start; gap: 10px; color: var(--admin-muted); font-size: 13px; }
.admin-check input { margin-top: 2px; }
.upload-progress { height: 2px; background: rgba(255,255,255,.12); overflow: hidden; }
#upload-progress-bar { height: 100%; width: 0; background: #fff; transition: width .2s ease; }
.admin-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
}
.admin-photo { border: 1px solid var(--admin-border); background: #050505; }
.admin-photo-image { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #000; }
.admin-photo-image img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.admin-photo-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px; }
.admin-photo-name { min-width: 0; font-size: 11px; color: var(--admin-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-delete { border: 0; background: transparent; color: #fff; font: 700 10px Helvetica,Arial,sans-serif; cursor: pointer; letter-spacing: .08em; }

@media (max-width: 850px) { .admin-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 620px) {
  .admin-shell { width: min(100% - 20px, 1180px); padding-top: 20px; }
  .admin-card { padding: 18px; }
  .admin-bar, .admin-section-heading { align-items: stretch; flex-direction: column; }
  .admin-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .admin-actions .admin-button { flex: 1; }
}
