@import url("../vendor/fonts/fonts.css"); /* local fonts (Inter), no external requests */
/* ===================================
   Lumen Template - Single Viewport Design
   Clean & Modular Structure
   =================================== */

/* ==================
   CSS Variables
   ================== */
:root {
  --lmn-color-bg: #120c08;                                /* Main page background */
  --lmn-color-bg-hero: #0a0605;                           /* Very dark hero/overlay background */
  --lmn-color-surface: #2a1c14;                           /* Main card/surface background */
  --lmn-color-text: #f7f2ec;                              /* Primary text color */
  --lmn-color-text-muted: #c6a88f;                        /* Secondary/muted text color */

  --lmn-color-accent-primary: #c55b1f;                    /* Main accent (rich dark orange) */
  --lmn-color-accent-secondary: #e38a3a;                  /* Secondary accent (warm amber) */
  --lmn-color-accent-tertiary: #8c4a26;                   /* Tertiary accent (burnt copper) */

  --lmn-color-surface-glass: rgba(42, 28, 20, 0.72);      /* Glass panel background */
  --lmn-color-frame-bg: rgba(18, 12, 8, 0.78);            /* Gallery frame background */
  --lmn-color-frame-bg-strong: rgba(18, 12, 8, 0.88);     /* Tab/control stronger frame */
  --lmn-color-border-soft: rgba(198, 168, 143, 0.22);     /* Soft border */
  --lmn-color-border-mid: rgba(198, 168, 143, 0.36);      /* Medium border */
  --lmn-color-border-accent: rgba(227, 138, 58, 0.35);    /* Accent border */

  --lmn-color-overlay-start: rgba(18, 12, 8, 0.86);       /* Hero overlay start */
  --lmn-color-overlay-end: rgba(42, 28, 20, 0.68);        /* Hero overlay end */
  --lmn-color-sheen: rgba(255, 255, 255, 0.06);           /* Hover sheen */
  --lmn-color-shadow: rgba(0, 0, 0, 0.38);                /* General shadow */
  --lmn-color-accent-glow: rgba(227, 138, 58, 0.24);      /* Accent glow */
  --lmn-color-link-fill: rgba(197, 91, 31, 0.24);         /* Action button fill */
  --lmn-color-link-fill-hover: rgba(227, 138, 58, 0.3);   /* Action button hover fill */

  --lmn-radius: 12px;
  --lmn-radius-sm: 8px;
  --lmn-radius-md: 12px;
  --lmn-radius-large: 16px;
  --lmn-spacing: 24px;
  --lmn-spacing-large: 60px;
  --lmn-transition: 0.3s ease;
}

/* Research variant: same template, green accent overrides only */
body.research-project,
body[data-project-variant="research"] {
  --lmn-color-accent-primary: #1f8a43;
  --lmn-color-accent-secondary: #39b86a;
  --lmn-color-accent-tertiary: #176838;
  --lmn-color-border-accent: rgba(57, 184, 106, 0.35);
  --lmn-color-accent-glow: rgba(57, 184, 106, 0.24);
  --lmn-color-link-fill: rgba(31, 138, 67, 0.24);
  --lmn-color-link-fill-hover: rgba(57, 184, 106, 0.3);
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* ==================
   Base Container
   ================== */
.lumen {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--lmn-color-text);
  background: var(--lmn-color-bg);
  min-height: 100vh;
  position: relative;
  margin: 0;
  padding: 0;
}

/* Desktop: project pages are a single-viewport design, no page scroll.
   Scoped to body.project-page (set in admin/templates/template-lumen.html) so other
   pages that load this stylesheet — homepage, admin, error page — scroll normally. */
@media (min-width: 1025px) {
  body.project-page,
  body.project-page .lumen {
    overflow: hidden;
  }
}

/* ==================
   Hero Section
   ================== */
.hero {
  position: relative;
  width: 100vw;
  margin: 0;
  margin-left: calc(-50vw + 50%);
}

@media (min-width: 1025px) {
  .hero {
    height: 100vh;
    overflow: hidden;
  }
}

/* Hero Background */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.4);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--lmn-color-overlay-start) 0%, var(--lmn-color-overlay-end) 100%);
  pointer-events: none;
}

/* ==================
   Content Grid Layout
   ================== */
.content-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(400px, 600px) 1fr;
  grid-template-rows: 1fr;
  gap: var(--lmn-spacing-large);
  padding: var(--lmn-spacing-large);
  grid-template-areas: "left right";
}

@media (min-width: 1025px) {
  .content-grid {
    position: absolute;
    inset: 0;
  }
}

/* Left Column - Project Info */
.left {
  grid-area: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--lmn-spacing);
}

.left-bottom {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: auto;
  margin-bottom: 62px; /* Align with gallery frame bottom */
}

/* Right Column - Gallery */
.right {
  grid-area: right;
  display: flex;
  flex-direction: column;
}

/* ==================
   Project Header
   ================== */
.header {
  align-self: start;
}

.title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--lmn-color-accent-primary) 0%, var(--lmn-color-accent-secondary) 52%, var(--lmn-color-accent-tertiary) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: spectral-shift 8s ease-in-out infinite;
  text-shadow: 0 0 40px var(--lmn-color-accent-glow);
}

@keyframes spectral-shift {
  0%, 100% { filter: hue-rotate(0deg); }
  50% { filter: hue-rotate(30deg); }
}
.meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--lmn-color-text-muted);
  font-weight: 500;
}

.category {
  color: var(--lmn-color-accent-secondary);
}

.category-secondary {
  color: var(--lmn-color-text-muted);
}

.category-secondary:empty {
  display: none;
}

.year {
  color: var(--lmn-color-text-muted);
}

.separator {
  opacity: 0.5;
}

/* ==================
   Project Description
   ================== */
.description {
  align-self: stretch;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--lmn-color-text);
  background: var(--lmn-color-surface-glass);
  backdrop-filter: blur(8px);
  padding: var(--lmn-spacing);
  border-radius: var(--lmn-radius);
  border-left: 4px solid var(--lmn-color-accent-secondary);
  min-height: 240px;
  position: relative;
  overflow: hidden;
  transition: all var(--lmn-transition);
}

.description-subtitle {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--lmn-color-text);
  margin: 0 0 10px;
  letter-spacing: 0.01em;
}

.description-subtitle:empty {
  display: none;
}

.description-body {
  color: inherit;
  line-height: inherit;
}

.description::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--lmn-color-sheen), transparent);
  opacity: 0;
  transition: opacity var(--lmn-transition);
  pointer-events: none;
}

.description:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 20px var(--lmn-color-accent-glow);
}
.description:hover::after {
  opacity: 1;
}

/* ==================
   Project Details Card
   ================== */
.details {
  align-self: stretch;
  background: var(--lmn-color-surface-glass);
  backdrop-filter: blur(8px);
  padding: 20px var(--lmn-spacing);
  border-radius: var(--lmn-radius);
  border: 1px solid var(--lmn-color-border-accent);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: all var(--lmn-transition);
}

.details::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--lmn-color-sheen), transparent);
  opacity: 0;
  transition: opacity var(--lmn-transition);
  pointer-events: none;
}

.details:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 20px var(--lmn-color-accent-glow);
}

.details:hover::after {
  opacity: 1;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--lmn-color-border-soft);
}

.detail-item-credits {
  align-items: flex-start;
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--lmn-color-text-muted);
  font-weight: 600;
}

.detail-value {
  font-size: 1rem;
  color: var(--lmn-color-text);
  font-weight: 500;
  text-align: right;
}

.detail-value-multiline {
  white-space: pre-line;
}

/* ==================
   Gallery Container
   ================== */
.gallery {
  align-self: stretch;
  justify-self: start;
  width: 100%;
  max-width: none;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.gallery-stage {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Gallery Frame */
.gallery-frame {
  position: relative;
  flex: 1;
  min-height: 0;
  background: var(--lmn-color-frame-bg);
  border-radius: var(--lmn-radius-large);
  border: 1px solid var(--lmn-color-border-soft);
  overflow: hidden;
  box-shadow: 0 18px 40px var(--lmn-color-shadow);
}

.gallery-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--lmn-color-border-accent);
  border-radius: var(--lmn-radius-large);
  pointer-events: none;
  opacity: 0.6;
}

/* Gallery Image Display */
.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity var(--lmn-transition);
}

/* Gallery Panels (Images/Videos) */
.gallery-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--lmn-transition);
}

.gallery-panel.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Gallery Empty State */
.gallery-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lmn-color-frame-bg);
  border-radius: var(--lmn-radius-large);
  border: 1px dashed var(--lmn-color-border-mid);
  color: var(--lmn-color-text-muted);
  font-size: 0.85rem;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* ==================
   Video Player
   ================== */
.video-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.video-embed {
  width: 100%;
  height: 100%;
  display: block;
}

.video-empty {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--lmn-color-frame-bg);
  color: var(--lmn-color-text-muted);
  font-size: 0.85rem;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* ==================
   Gallery Controls
   ================== */
.gallery-controls-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: 12px;
  padding: 0 var(--lmn-spacing);
}

.gallery-controls {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 36px;
  padding: 8px 16px 6px;
  background: var(--lmn-color-frame-bg);
  border: 1px solid var(--lmn-color-border-soft);
  border-radius: var(--lmn-radius);
  backdrop-filter: blur(8px);
}

/* Navigation Controls */
.gallery-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
}

.btn-nav {
  border: 1px solid var(--lmn-color-border-mid);
  background: transparent;
  color: var(--lmn-color-text);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn-nav:hover {
  border-color: var(--lmn-color-accent-secondary);
  color: var(--lmn-color-accent-secondary);
  transform: translateY(-1px);
}

.btn-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.gallery-index {
  font-size: 0.75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--lmn-color-text-muted);
  background: var(--lmn-color-frame-bg);
  box-shadow: 0 -2px 0 var(--lmn-color-frame-bg);
}

/* ==================
   Gallery Tabs
   ================== */
.btn-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 62px;
  margin-top: -12px;
  padding: 0 20px;
  width: 160px;
  border-radius: 0 0 var(--lmn-radius) var(--lmn-radius);
  border: 1px solid var(--lmn-color-border-mid);
  border-top: 0;
  background: var(--lmn-color-frame-bg-strong);
  color: var(--lmn-color-text);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  position: relative;
  z-index: 2;
  cursor: pointer;
}

.btn-tab.is-active {
  border-color: var(--lmn-color-accent-secondary);
  color: var(--lmn-color-accent-secondary);
  background: var(--lmn-color-frame-bg);
  box-shadow: 0 -2px 0 var(--lmn-color-frame-bg);
}

.btn-tab.is-active[data-tab="images"] {
  border-left: 4px solid var(--lmn-color-accent-secondary);
}

.btn-tab.is-active[data-tab="videos"] {
  border-right: 4px solid var(--lmn-color-accent-secondary);
}

/* ==================
   Project Links
   ================== */
.links {
  position: absolute;
  bottom: var(--lmn-spacing-large);
  right: var(--lmn-spacing-large);
  z-index: 3;
  display: flex;
  gap: 16px;
}

/* ==================
   Footer Utilities
   ================== */
.footer-height {
  height: 60px;
  display: flex;
  align-items: center;
}

.footer-height .container {
  width: 100%;
}

.link {
  padding: 12px 24px;
  background: var(--lmn-color-link-fill);
  border: 1px solid var(--lmn-color-accent-secondary);
  border-radius: 8px;
  color: var(--lmn-color-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--lmn-transition);
  backdrop-filter: blur(8px);
}

.link:hover {
  background: var(--lmn-color-link-fill-hover);
  border-color: var(--lmn-color-accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--lmn-color-accent-glow);
}

/* ==================
   Responsive Design
   ================== */
@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    grid-template-areas: "left" "right";
    padding: 40px;
    gap: 30px;
  }

  .title {
    font-size: 2.5rem;
  }

  .left {
    justify-content: flex-start;
  }

  .gallery {
    justify-self: center;
    max-width: 100%;
    height: auto;
  }

  .gallery-frame {
    aspect-ratio: 4/3;
  }

  .description {
    min-height: auto;
  }

  .left-bottom {
    margin-top: 0;
    margin-bottom: 0;
  }

  .links {
    bottom: 40px;
    right: 40px;
  }
}

@media (max-width: 768px) {
  .content-grid {
    padding: 30px 20px;
    gap: 20px;
  }

  .title {
    font-size: 2rem;
  }

  .meta {
    font-size: 0.85rem;
    flex-wrap: wrap;
    row-gap: 6px;
  }

  .description {
    font-size: 0.95rem;
    padding: 20px;
    min-height: auto;
  }

  .gallery {
    height: auto;
  }

  .gallery-frame {
    aspect-ratio: 1;
  }

  .links {
    position: static;
    margin-top: 20px;
    justify-content: center;
  }

  .gallery-controls-row {
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
  }

  .btn-tab {
    flex: 0 1 auto;
    width: auto;
    height: 44px;
    margin-top: 0;
    padding: 0 18px;
    font-size: 0.72rem;
    border-radius: var(--lmn-radius);
    border-top: 1px solid var(--lmn-color-border-mid);
  }

  .btn-tab.is-active[data-lmn-tab="images"],
  .btn-tab.is-active[data-lmn-tab="videos"] {
    border-left: 1px solid var(--lmn-color-accent-secondary);
    border-right: 1px solid var(--lmn-color-accent-secondary);
  }

  .gallery-controls {
    order: 3;
    flex: 1 1 100%;
  }

  .detail-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .detail-value {
    text-align: left;
  }
}

