/* ==========================================================================
   Janez Grošelj — Light & Sound Installations
   Minimalist Dark Gallery Design System
   ========================================================================== */

:root {
  --bg: #050505;
  --bg-elevated: #0c0c0e;
  --bg-subtle: #121215;
  --text: #f3f3f1;
  --text-muted: rgba(243, 243, 241, 0.66);
  --text-subtle: rgba(243, 243, 241, 0.44);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.24);
  --accent: #ffffff;

  --font-sans: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --pad-x: clamp(1.25rem, 4.5vw, 3.75rem);
  --max-width: 1120px;
  --prose-width: 660px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--text);
  font-weight: 300;
  overflow-x: hidden;
}

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

img {
  max-width: 100%;
  display: block;
}

::selection {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Fixed Minimal Top Navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.35rem var(--pad-x);
  background: linear-gradient(to bottom, rgba(5, 5, 5, 0.65) 0%, rgba(5, 5, 5, 0) 100%);
  transition: background-color 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(5, 5, 5, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-brand,
.site-nav a {
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: rgba(243, 243, 241, 0.88);
  transition: color 0.25s ease, opacity 0.25s ease;
}

.site-brand:hover,
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #ffffff;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

/* --------------------------------------------------------------------------
   Homepage: Full-Screen Panels
   -------------------------------------------------------------------------- */

.home-main {
  width: 100%;
}

.panel {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 580px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-color: var(--bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.panel--hero {
  justify-content: center;
}

/* Full-bleed 16:9 background media container */
.panel-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #070709;
  z-index: 0;
}

.panel-media--ambient-1 {
  background:
    radial-gradient(circle at 65% 38%, rgba(72, 130, 155, 0.22), transparent 55%),
    radial-gradient(circle at 28% 72%, rgba(45, 75, 95, 0.16), transparent 60%),
    #060709;
}

.panel-media--ambient-2 {
  background:
    radial-gradient(circle at 55% 45%, rgba(64, 128, 92, 0.2), transparent 55%),
    radial-gradient(circle at 25% 70%, rgba(28, 60, 48, 0.18), transparent 60%),
    #050807;
}

.panel-media--ambient-3 {
  background:
    radial-gradient(circle at 60% 42%, rgba(190, 195, 210, 0.15), transparent 50%),
    radial-gradient(circle at 30% 65%, rgba(100, 110, 130, 0.12), transparent 55%),
    #060608;
}

.panel-media--ambient-4 {
  background:
    radial-gradient(circle at 62% 45%, rgba(205, 165, 82, 0.18), transparent 50%),
    radial-gradient(circle at 30% 62%, rgba(120, 92, 42, 0.14), transparent 55%),
    #070605;
}

.panel-video-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 56.25vw; /* 16:9 */
  min-height: 100svh;
  min-width: 177.78svh; /* 16:9 */
  pointer-events: none;
}

.panel-video-frame iframe,
.panel-video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  pointer-events: none;
}

/* Subtle dark scrim so white typography stays legible over bright light frames */
.panel-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      to top,
      rgba(5, 5, 5, 0.86) 0%,
      rgba(5, 5, 5, 0.42) 38%,
      rgba(5, 5, 5, 0.18) 70%,
      rgba(5, 5, 5, 0.45) 100%
    );
  pointer-events: none;
}

.panel--hero .panel-scrim {
  background:
    radial-gradient(circle at center, rgba(5, 5, 5, 0.32) 0%, rgba(5, 5, 5, 0.68) 100%),
    linear-gradient(to top, rgba(5, 5, 5, 0.82) 0%, rgba(5, 5, 5, 0.25) 45%, rgba(5, 5, 5, 0.5) 100%);
}

/* Panel text content */
.panel-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--pad-x) clamp(2.5rem, 6.5vh, 5rem);
}

.panel--hero .panel-content {
  padding-bottom: 0;
  max-width: 820px;
  text-align: left;
}

.hero-statement {
  margin: 0;
  font-size: clamp(1.55rem, 3.4vw, 2.75rem);
  font-weight: 300;
  line-height: 1.24;
  letter-spacing: -0.015em;
  color: var(--text);
}

.hero-credits {
  margin: 1.5rem 0 0;
  font-size: clamp(0.8rem, 1.15vw, 0.92rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  line-height: 1.7;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.75rem;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-subtle);
  transition: color 0.25s ease;
}

.scroll-cue:hover {
  color: var(--text);
}

.scroll-cue-line {
  width: 1px;
  height: 28px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
}

/* Installation Card Link inside Full-Screen Panel */
.work-link {
  display: block;
  max-width: 640px;
}

.work-festivals {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.work-title {
  margin: 0 0 0.8rem;
  font-size: clamp(1.85rem, 4.2vw, 3.35rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  transition: opacity 0.25s ease;
}

.work-excerpt {
  margin: 0 0 1.4rem;
  font-size: clamp(0.95rem, 1.35vw, 1.08rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 540px;
}

.work-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text);
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--border-strong);
  transition: border-color 0.25s ease, gap 0.25s var(--ease);
}

.work-link:hover .work-cta {
  border-color: #ffffff;
  gap: 0.85rem;
}

/* Bottom "More Works / Other" Band on Homepage */
.archive-band {
  width: 100%;
  padding: clamp(4.5rem, 10vh, 7.5rem) var(--pad-x);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.archive-band-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.archive-kicker {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.archive-heading {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 300;
  letter-spacing: -0.015em;
  color: var(--text);
}

.archive-sub {
  margin: 0.65rem 0 0;
  color: var(--text-muted);
  font-size: 0.98rem;
  max-width: 500px;
}

/* --------------------------------------------------------------------------
   Subpages Shared Layout (Artwork, Other, About)
   -------------------------------------------------------------------------- */

.page-main {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(6.5rem, 12vh, 8.5rem) var(--pad-x) clamp(4rem, 8vh, 6rem);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--text-subtle);
  margin-bottom: 2.25rem;
  transition: color 0.25s ease;
}

.back-link:hover {
  color: var(--text);
}

.page-header {
  margin-bottom: clamp(2rem, 4.5vw, 3.25rem);
}

.page-meta {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.page-title {
  margin: 0;
  font-size: clamp(2rem, 4.8vw, 3.6rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--text);
}

.page-subtitle {
  margin: 1.15rem 0 0;
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  font-weight: 300;
  color: var(--text-muted);
  max-width: 660px;
  line-height: 1.65;
}

/* Responsive 16:9 Featured Video Player */
.featured-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.featured-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  color: var(--text-subtle);
  font-size: 0.9rem;
}

/* Prose / Concept Block */
.prose {
  max-width: var(--prose-width);
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
}

.prose p {
  margin: 0 0 1.4rem;
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  line-height: 1.8;
  color: rgba(243, 243, 241, 0.82);
}

.prose p:last-child {
  margin-bottom: 0;
}

.section-label {
  margin: 0 0 1.5rem;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

/* Crowd-Scale Night Photo Gallery */
.gallery-section {
  margin-bottom: clamp(3.5rem, 7vw, 5.5rem);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.photo-item {
  margin: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  overflow: hidden;
}

.photo-item--wide {
  grid-column: 1 / -1;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 10;
}

.photo-item--wide img {
  aspect-ratio: 16 / 9;
}

.photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  padding: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-subtle);
  background: linear-gradient(135deg, #0b0b0d 0%, #111116 100%);
}

.photo-item--wide .photo-placeholder {
  aspect-ratio: 16 / 9;
}

.photo-caption {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--text-subtle);
  border-top: 1px solid var(--border);
}

/* At-a-Glance Touring Specs */
.specs-section {
  padding-top: clamp(2.5rem, 5vw, 3.75rem);
  border-top: 1px solid var(--border);
  margin-bottom: clamp(3.5rem, 7vw, 5.5rem);
}

.specs-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-top: 1px solid var(--border);
  margin-bottom: 2.25rem;
}

.spec-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1rem 2rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.spec-key {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.spec-val {
  font-size: 0.98rem;
  color: var(--text);
  font-weight: 300;
}

/* Minimalist Action Buttons */
.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.4rem;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
  background: #ffffff;
  color: #050505;
  border-color: #ffffff;
}

.btn--primary {
  background: #ffffff;
  color: #050505;
  border-color: #ffffff;
}

.btn--primary:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.85);
}

/* Next Artwork Navigation */
.next-work {
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.next-work-label {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.next-work-link {
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  font-weight: 300;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  transition: gap 0.25s var(--ease), opacity 0.25s ease;
}

.next-work-link:hover {
  gap: 1rem;
}

/* --------------------------------------------------------------------------
   Other / Archive Page
   -------------------------------------------------------------------------- */

.archive-list {
  display: flex;
  flex-direction: column;
  gap: clamp(3.5rem, 7vw, 5.5rem);
}

.archive-item {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.25rem);
  align-items: start;
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--border);
}

.archive-item-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  overflow: hidden;
}

.archive-item-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.archive-item-title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 300;
  letter-spacing: -0.015em;
}

.archive-item-desc {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   About Page & Selected Exhibitions CV
   -------------------------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  margin-bottom: clamp(4rem, 8vw, 6rem);
}

.portrait-wrap {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  overflow: hidden;
}

.portrait-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.cv-section {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--border);
  margin-bottom: clamp(3.5rem, 6vw, 5rem);
}

.cv-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.cv-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 0.5rem 1.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
  font-size: 0.96rem;
}

.cv-year {
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
}

.cv-festival {
  color: var(--text);
  font-weight: 400;
}

.cv-location {
  color: var(--text-muted);
  font-weight: 300;
}

.contact-block {
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.25rem;
}

.contact-email {
  font-size: clamp(1.2rem, 2.4vw, 1.75rem);
  font-weight: 300;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 0.15rem;
  transition: border-color 0.25s ease;
}

.contact-email:hover {
  border-color: #ffffff;
}

/* --------------------------------------------------------------------------
   Global Minimal Footer
   -------------------------------------------------------------------------- */

.site-footer {
  width: 100%;
  padding: 2.25rem var(--pad-x);
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  font-size: 0.82rem;
  color: var(--text-subtle);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  transition: color 0.25s ease;
}

.footer-links a:hover {
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Subtle Reveal Animation (Progressive Enhancement)
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   Responsive Adjustments
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .archive-item,
  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 1.1rem var(--pad-x);
  }

  .photo-grid {
    grid-template-columns: 1fr;
  }

  .spec-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .cv-row {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .cv-location {
    grid-column: 2;
    font-size: 0.88rem;
  }

  .panel {
    min-height: 520px;
  }
}
