/* ═══════════════════════════════════════════════════════════════════
   DEJMIN THEME — main.css  v1.1.0
   Palette: Space Dark Blue + Gold
   ═══════════════════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────────────────── */
:root {
  --bg:          #090b10;
  --bg-surface:  #0f1520;
  --bg-warm:     #0c1018;
  --text:        #e8e4d6;
  --text-muted:  #5a6a82;
  --accent:      #c8962e;
  --accent-h:    #ddb050;
  --border:      rgba(200, 150, 46, 0.12);

  --font-sans:   'Space Grotesk', system-ui, sans-serif;
  --font-mono:   'Space Mono', 'Courier New', monospace;

  --nav-h:       60px;
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:    cubic-bezier(0, 0, 0.2, 1);
}

/* ── Reset ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--bg); color: var(--text);
       -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img  { display: block; max-width: 100%; height: auto; }
a    { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; }

/* ── Navigation ──────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 40px;
  mix-blend-mode: difference;
}

.site-logo {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #fff;
  margin-right: auto;
}

.nav-menu {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-menu a {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  transition: opacity 0.2s;
}
.nav-menu a:hover { opacity: 0.5; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: #fff; transition: all 0.25s; }

/* ── Homepage — fullscreen scroll ─────────────────────────────────── */
.homepage { position: relative; }

.project-section {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  cursor: none;
}

/* Background */
.project-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.project-slides,
.project-video,
.project-placeholder {
  width: 100%;
  height: 100%;
}

.project-placeholder { background: var(--bg-surface); }

.project-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.project-slide.active { opacity: 1; }

.project-slide img,
.project-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Hover overlay */
.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 11, 16, 0.65);
  opacity: 0;
  backdrop-filter: blur(0px);
  transition: opacity 0.5s var(--ease), backdrop-filter 0.5s var(--ease);
}

.project-section:hover .project-overlay {
  opacity: 1;
  backdrop-filter: blur(6px);
}

.project-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  backdrop-filter: blur(0px);
  transition: backdrop-filter 0.6s var(--ease);
  pointer-events: none;
}
.project-section:hover .project-bg::after {
  backdrop-filter: blur(8px);
}

/* Content */
.project-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  pointer-events: none;
}

.project-section:hover .project-content {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.project-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.project-meta {
  display: flex;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-h);
}

.project-title {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text);
}

.project-excerpt {
  font-size: 0.9rem;
  font-weight: 300;
  color: rgba(232, 228, 214, 0.7);
  max-width: 520px;
  line-height: 1.75;
}

.project-cta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.project-cta:hover { color: var(--accent-h); border-color: var(--accent-h); }

/* Slide dots (per section) */
.slide-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 8px;
}
.slide-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transition: background 0.3s, transform 0.3s;
}
.slide-dot.active { background: var(--accent); transform: scale(1.3); }

/* Section navigator (right side) */
.section-nav {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: background 0.3s, transform 0.3s;
}
.section-dot.active  { background: var(--accent); transform: scale(1.5); }
.section-dot:hover   { background: rgba(255,255,255,0.5); }

/* Empty state */
.homepage-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100dvh;
  gap: 20px;
  color: var(--text-muted);
}
.homepage-empty a {
  font-size: 0.85rem;
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 8px 20px;
  border-radius: 2px;
}

/* ── Project single page ─────────────────────────────────────────── */
.project-hero {
  position: relative;
  height: 100dvh;
  overflow: hidden;
}

.hero-slides { position: absolute; inset: 0; }
.hero-slide  { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s var(--ease); }
.hero-slide.active { opacity: 1; }
.hero-slide img, .hero-video { width: 100%; height: 100%; object-fit: cover; }

.hero-caption {
  position: absolute;
  bottom: 60px;
  left: 60px;
  z-index: 2;
}

.hero-meta {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-h);
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  text-shadow: 0 2px 30px rgba(0,0,0,0.6);
}

.hero-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 8px;
}
.hero-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transition: background 0.3s, transform 0.3s;
}
.hero-dot.active { background: var(--accent); transform: scale(1.3); }

/* Old HTML structure (OPcache compat) — same horizontal layout */
.project-body {
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.project-sidebar {
  display: flex;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 40px 60px;
  border-bottom: 1px solid var(--border);
  gap: 0;
}
.project-sidebar .meta-item {
  flex: 1;
  min-width: 120px;
  padding: 0 32px;
  border-left: 1px solid var(--border);
}
.project-sidebar .meta-item:first-child {
  padding-left: 0;
  border-left: none;
}
.project-content-body {
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
  padding: 48px 60px;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.85;
  color: rgba(232, 228, 214, 0.85);
}
.project-content-body p { margin-bottom: 1.2em; }

/* Info bar — horizontal meta row */
.project-info-bar {
  display: flex;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 60px;
  border-bottom: 1px solid var(--border);
  gap: 0;
}
.project-info-bar .meta-item {
  flex: 1;
  min-width: 120px;
  padding: 0 32px;
  border-left: 1px solid var(--border);
}
.project-info-bar .meta-item:first-child {
  padding-left: 0;
  border-left: none;
}

.meta-item { display: flex; flex-direction: column; gap: 4px; }
.meta-item span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.meta-item strong {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text);
}

/* Description block */
.project-description {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 60px;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.85;
  color: rgba(232, 228, 214, 0.85);
}
.project-description h2 {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 2em 0 0.6em;
  color: var(--text);
}
.project-description h3 {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 1.8em 0 0.6em;
}
.project-description p { margin-bottom: 1.2em; }

/* Gallery */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 3px;
  background: var(--bg);
  padding: 3px;
}
.gallery-item { overflow: hidden; aspect-ratio: 4/3; cursor: zoom-in; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.gallery-item:hover img { transform: scale(1.03); }

/* Next/Prev nav */
.project-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 60px 80px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.project-nav-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: opacity 0.2s;
}
.project-nav-item:hover { opacity: 0.7; }
.project-nav-prev { align-items: flex-start; }
.project-nav-next { align-items: flex-end; text-align: right; }

.nav-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.nav-title {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text);
}

.project-nav-index {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  white-space: nowrap;
}

/* ── Lightbox ─────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.96);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }

.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 90dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-img-wrap img {
  max-width: 90vw;
  max-height: 90dvh;
  object-fit: contain;
  transition: opacity 0.3s;
}

.lightbox-close {
  position: absolute;
  top: 24px; right: 32px;
  font-size: 1.2rem;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}
.lightbox-close:hover { color: #fff; }

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  font-size: 2.5rem;
  color: rgba(255,255,255,0.4);
  padding: 20px;
  transition: color 0.2s;
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-prev:hover, .lightbox-next:hover { color: var(--accent-h); }

.lightbox-counter {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.1em;
}

/* ── Content page (About, Contact) ───────────────────────────────── */
.content-page { min-height: 100dvh; background: var(--bg); padding-top: var(--nav-h); }
.content-page-inner { max-width: 720px; margin: 0 auto; padding: 80px 60px; }
.page-title {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
  color: var(--text);
}
.page-content { font-size: 1rem; font-weight: 300; line-height: 1.85; color: rgba(232,228,214,0.82); }
.page-content p { margin-bottom: 1.4em; }

/* ── Site footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-warm);
  border-top: 1px solid var(--border);
  padding: 48px 60px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
}
.footer-name    { font-family: var(--font-sans); font-weight: 500; font-size: 0.9rem; }
.footer-tagline { font-size: 0.78rem; font-weight: 300; color: var(--text-muted); margin-right: auto; }
.footer-email   { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); }
.footer-email:hover { color: var(--accent-h); }

/* ── Mobile ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .site-header { padding: 0 20px; }
  .nav-menu { display: none; }
  .nav-toggle { display: flex; }

  .section-nav { display: none; }

  .project-sidebar, .project-info-bar { padding: 32px 24px; }
  .project-sidebar .meta-item,
  .project-info-bar .meta-item {
    flex: 0 0 50%;
    padding: 12px 0;
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .project-sidebar .meta-item:first-child,
  .project-info-bar .meta-item:first-child { border-top: none; }
  .project-content-body, .project-description { padding: 32px 24px; }

  .hero-caption { left: 24px; bottom: 40px; }

  .project-nav { padding: 40px 24px; }

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

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }

  .content-page-inner { padding: 48px 24px; }
}

@media (max-width: 480px) {
  .project-gallery { grid-template-columns: 1fr; }
  .project-nav { grid-template-columns: 1fr; text-align: center; }
  .project-nav-index { display: none; }
}
