@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #0b0a09;
  --bg2:     #141210;
  --bg3:     #1a1916;
  --bg4:     #222019;
  --border:  #2a2722;
  --border2: #38342c;
  --text:    #ece8e0;
  --muted:   #7d7870;
  --dim:     #4a4640;
  --accent:  #b8a88e;
  --accent2: #cebfa6;
  --accent-glow: rgba(184, 168, 142, 0.18);
  --accent-subtle: rgba(184, 168, 142, 0.08);
  --gradient: linear-gradient(135deg, #a89878 0%, #c8b898 100%);
  --radius:  6px;
  --nav-h:   64px;
}

html {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; }

/* ── NAV ──────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(11,10,9,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  z-index: 200;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
}
.nav-logo em { color: var(--accent); font-style: normal; }
.nav-logo svg { flex-shrink: 0; }

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-links .nav-admin a { color: var(--dim); font-size: 11px; }
.nav-links .nav-admin a:hover { color: var(--muted); }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.nav-burger span {
  width: 22px; height: 2px;
  background: var(--muted);
  border-radius: 2px;
  transition: .2s;
}

/* ── TYPOGRAPHY ───────────────────────────────────── */
.label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

h1, h2, h3 { line-height: 1.08; font-weight: 700; }
h2 { font-size: clamp(26px, 3.8vw, 46px); }
h3 { font-size: 16px; font-weight: 600; }
p  { line-height: 1.75; color: var(--muted); }

/* ── BUTTONS ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s;
  border: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient);
  color: #fff;
}
.btn-primary:hover { background: linear-gradient(135deg, #988868 0%, #b8a888 100%); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border2);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border2); }

.btn-danger {
  background: rgba(180,50,50,0.15);
  color: #e05c5c;
  border: 1px solid rgba(180,50,50,0.25);
}
.btn-danger:hover { background: rgba(180,50,50,0.25); }

/* ── PROJECT CARDS ────────────────────────────────── */
.card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border2);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.card-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg4);
}
.card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.card:hover .card-img img { transform: scale(1.04); }

.card-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dim);
}
.card-placeholder svg { opacity: .4; }

.type-badge {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(12,11,10,0.8);
  backdrop-filter: blur(6px);
  color: var(--accent);
  border: 1px solid rgba(184,168,142,0.3);
}

.status-badge {
  position: absolute;
  top: 12px; right: 12px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
}
.status-badge.completed {
  background: rgba(40,150,80,0.2);
  color: #5dba7e;
  border: 1px solid rgba(40,150,80,0.3);
}
.status-badge.in-progress {
  background: rgba(184,168,142,0.12);
  color: var(--accent);
  border: 1px solid rgba(184,168,142,0.25);
}

.card-body {
  padding: 18px 20px 20px;
}
.card-body h3 {
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--text);
}
.card-meta {
  font-size: 12px;
  color: var(--dim);
  font-weight: 500;
  letter-spacing: 0.04em;
}

/* ── SECTION WRAPPER ──────────────────────────────── */
.section {
  padding: 100px 48px;
  max-width: 1240px;
  margin: 0 auto;
}
.section-full {
  padding: 100px 48px;
}

/* ── FOOTER ───────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 48px 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 36px;
}
.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-tagline { font-size: 12.5px; color: var(--dim); line-height: 1.7; max-width: 220px; }
.footer-col-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 12px;
}
.footer-contact { display: flex; flex-direction: column; gap: 7px; }
.footer-contact p,
.footer-contact a {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
  text-decoration: none;
  transition: color .15s;
}
.footer-contact a:hover { color: var(--accent); }
.footer-legal { display: flex; flex-direction: column; gap: 10px; }
.footer-legal a {
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}
.footer-legal a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom p { font-size: 11.5px; color: var(--dim); }
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--dim);
  text-transform: uppercase;
  text-decoration: none;
}
.footer-logo em { color: var(--accent); font-style: normal; }
.footer-logo svg { flex-shrink: 0; }

/* ── LIGHTBOX ─────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 500;
  backdrop-filter: blur(8px);
}
.lightbox.open { display: flex; flex-direction: column; }

.lb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.lb-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lb-title h3 { font-size: 18px; }
.lb-close {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  color: var(--muted);
  font-size: 18px;
  transition: .2s;
}
.lb-close:hover { color: var(--text); border-color: var(--border2); }

.lb-body {
  display: grid;
  grid-template-columns: 1fr 360px;
  flex: 1;
  overflow: hidden;
}

.lb-media {
  position: relative;
  background: var(--bg2);
  display: flex;
  flex-direction: column;
}

.lb-img-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Before/After slider */
.ba-slider {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
}
.ba-slider > img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.ba-before {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.ba-before img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.ba-handle {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: rgba(255,255,255,0.85);
  transform: translateX(-50%);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ba-knob {
  width: 46px; height: 46px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #1a1a1a;
  flex-shrink: 0;
  box-shadow: 0 2px 16px rgba(0,0,0,0.45);
}

.ba-labels {
  position: absolute;
  bottom: 16px;
  left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
}
.ba-labels span {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(0,0,0,0.6);
  color: var(--text);
  padding: 4px 12px;
  border-radius: 4px;
}

.lb-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.lb-thumb {
  width: 64px; height: 48px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: opacity .15s, border-color .15s;
  opacity: 0.55;
}
.lb-thumb:hover { opacity: 0.85; }
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumb.active { border-color: var(--accent); opacity: 1; }

.lb-nav {
  position: absolute;
  top: 50%; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 12px;
  transform: translateY(-50%);
  pointer-events: none;
}
.lb-nav button {
  width: 40px; height: 40px;
  background: rgba(0,0,0,0.6);
  border: 1px solid var(--border2);
  border-radius: 50%;
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  pointer-events: all;
  transition: .2s;
  display: flex; align-items: center; justify-content: center;
}
.lb-nav button:hover { background: var(--bg3); }

.lb-info {
  padding: 28px;
  overflow-y: auto;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.lb-meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.lb-meta-item {
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.lb-desc { font-size: 13.5px; line-height: 1.7; }
.lb-video { margin-top: 8px; }
.lb-video iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.lb-mode-toggle {
  display: flex;
  gap: 8px;
}
.lb-mode-btn {
  flex: 1;
  padding: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
  transition: .2s;
  font-family: 'Poppins', sans-serif;
}
.lb-mode-btn.active {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── FORM INPUTS (admin) ──────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  font-size: 13.5px;
  padding: 10px 14px;
  outline: none;
  transition: border-color .2s;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}
.form-group textarea { resize: vertical; min-height: 90px; }
.form-group select { cursor: pointer; }

/* ── TOGGLE ───────────────────────────────────────── */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.toggle-label { font-size: 13px; color: var(--text); font-weight: 500; }
.toggle-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

.toggle {
  position: relative;
  width: 40px; height: 22px;
  cursor: pointer;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 22px;
  transition: .2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  left: 3px; top: 50%;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--dim);
  transform: translateY(-50%);
  transition: .2s;
}
.toggle input:checked + .toggle-slider { background: var(--accent-glow); border-color: var(--accent); }
.toggle input:checked + .toggle-slider::before { left: 20px; background: var(--accent); }

/* ── UPLOAD ZONE ──────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border2);
  border-radius: 10px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: .2s;
  background: var(--bg4);
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-subtle);
}
.upload-zone p { font-size: 13px; margin-top: 10px; }
.upload-zone small { font-size: 11px; color: var(--dim); }
.upload-zone label { color: var(--accent); cursor: pointer; text-decoration: underline; }

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.thumb-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg3);
}
.thumb-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.thumb-item .thumb-ctrl {
  padding: 6px;
  display: flex;
  gap: 4px;
}
.thumb-item select {
  flex: 1;
  font-size: 10.5px;
  padding: 3px 5px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
}
.thumb-remove {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(180,50,50,0.2);
  border: 1px solid rgba(180,50,50,0.3);
  border-radius: 4px;
  cursor: pointer;
  color: #e05c5c;
  font-size: 13px;
  flex-shrink: 0;
  transition: .15s;
}
.thumb-remove:hover { background: rgba(180,50,50,0.35); }

/* ── EMPTY STATE ──────────────────────────────────── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 24px;
  color: var(--dim);
  font-size: 14px;
}
.empty-state a { color: var(--accent); text-decoration: none; }
.empty-state a:hover { text-decoration: underline; }

/* ── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 900px) {
  .nav { padding: 0 24px; }
  .nav-links { display: none; gap: 24px; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px 24px;
  }
  .nav-burger { display: flex; }

  .section { padding: 64px 24px; }
  .section-full { padding: 64px 24px; }
  .footer { padding: 40px 24px 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }

  .lb-body { grid-template-columns: 1fr; }
  .lb-info { border-left: none; border-top: 1px solid var(--border); max-height: 280px; }
}
