@font-face {
    font-family: 'VenusMain';
    src: url('fonts/Venus+Plomb.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

:root {
  --header-height: 120px;
  --footer-height: 30px;
  --ui-gray: #000000;
  --gap: 5px;
  --text-color: #ffffff;
  --base-font-size: 18px;
}

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

body, html {
  height: 100%;
  overflow: hidden;
  background: var(--ui-gray);
  font-family: 'VenusMain', sans-serif;
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
  font-size: var(--base-font-size);
}

h1 {
  margin: 0 !important;
  padding: 0 !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: 1 !important;
}

.name-layout, .about-top, .first-word, .header-link {
  line-height: 1 !important;
  display: inline-block;
  vertical-align: top;
}

/* --- PEALEHE STRUKTUUR --- */
.split-wrapper {
  display: flex;
  width: 100vw;
  height: 100vh;
  padding: 0 var(--gap);
  gap: var(--gap);
  position: relative;
  z-index: 600;
}

.scroll-column {
  flex: 1;
  height: 100%;
  overflow-y: scroll;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  scrollbar-width: none;
  position: relative;
}
.scroll-column::-webkit-scrollbar { display: none; }

.scroll-column::before {
  content: "";
  display: block;
  height: var(--header-height);
  flex-shrink: 0;
}

.column-header {
  height: var(--header-height);
  display: flex;
  align-items: flex-start;
  padding: 1cm 0 0 1cm;
  position: fixed;
  top: 0;
  z-index: 1000;
  pointer-events: none;
  width: calc(50% - (var(--gap) / 2));
}

.column-header .name-layout, .column-header .about-top, .column-header a {
  pointer-events: auto;
}

.right-header {
  left: 50%;
  padding-left: 0;
}

.name-layout { display: flex; align-items: flex-start; }
.info-block { display: flex; flex-direction: column; gap: 2px; }
.header-link { text-decoration: none; color: var(--text-color); }
.header-link:hover { opacity: 0.7; }

/* --- ABOUT PANEEL --- */
.about-panel {
    position: fixed; 
    top: var(--header-height);
    right: var(--gap);
    width: calc(50% - (var(--gap) * 1.5));
    height: calc(100vh - var(--header-height));
    background: var(--ui-gray);
    z-index: 1500;
    padding: 0 1cm 1cm 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    overflow-y: auto;
}
.about-panel::-webkit-scrollbar { display: none; }
.about-panel.active { opacity: 1; pointer-events: all; }
.about-content { max-width: 500px; display: flex; flex-direction: column; gap: 20px; }
.about-text p { line-height: 1.2; }

/* --- BOXID --- */
.box {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #000;
  cursor: pointer;
}
.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.slide.active { opacity: 1; z-index: 2; }

/* --- LIGHTBOX (PARANDATUD) --- */
.lightbox {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}
.lightbox.active { opacity: 1; pointer-events: all; }

.lightbox-close {
  position: absolute;
  top: 1cm;
  right: 1cm;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 22px;
  height: 22px;
  z-index: 1000;
}
.lightbox-close::before, .lightbox-close::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 2px;
  background: #fff;
  left: 0;
}
.lightbox-close::before { transform: rotate(45deg); }
.lightbox-close::after { transform: rotate(-45deg); }

.lightbox-content {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}
.lightbox-image {
  width: 100%;
  height: 100%;
  padding: 10px; /* Vähendatud padding - pilt on servadele lähemal */
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-image img {
  max-width: 100%;
  max-height: 95%; /* Tõstetud 85% -> 95%, et pilt täidaks peaaegu kogu ekraani */
  object-fit: contain;
}

/* Nihutame alumist teksti veidi madalamale, et see pildile ette ei jääks */
.lightbox-bar {
  position: absolute;
  bottom: 10px; 
  left: 0;
  right: 0;
  height: auto;
  display: flex;
  justify-content: center;
  z-index: 100;
  pointer-events: none;
}

#lb-desc {
  color: #888888 !important;
  font-size: 15px !important; /* Veidi väiksem font, et pildile rohkem ruumi jätta */
  background: rgba(0, 0, 0, 0.5); /* Lisasin õrna tausta, et tekst oleks loetav ka pildi peal */
  padding: 5px 10px;
  pointer-events: auto;
}

.lightbox-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  pointer-events: none;
}
#lb-desc {
  color: #888888 !important;
  font-size: 17px !important;
  pointer-events: auto;
}

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 0;
  width: 20%;
  height: 100%;
  cursor: pointer;
  z-index: 50;
  background: transparent;
  border: none;
}
.lightbox-prev { left: 0; }
.lightbox-next { right: 0; }
.lightbox-prev::after, .lightbox-next::after {
  content: "";
  width: 18px; height: 18px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  position: absolute;
  top: 50%;
}
.lightbox-prev::after { left: 40px; transform: translateY(-50%) rotate(45deg); }
.lightbox-next::after { right: 40px; transform: translateY(-50%) rotate(-135deg); }

@media (max-width: 768px) {
  body, html { overflow: auto; }
  .split-wrapper { flex-direction: column; height: auto; }
  .column-header { position: relative; padding: 20px; width: 100%; left: 0; pointer-events: auto; }
  .about-panel { width: 100%; right: 0; left: 0; height: 100vh; top: 0; padding: 20px; }
}