@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900&display=swap");
@import url('https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400..700&display=swap');

/* GENERAL RESET */
* {
  box-sizing: border-box;
}

body, html {
  margin: 0;
  padding: 0;
  font-family: "Roboto", sans-serif;
  background: #fff;
  color: #111;
}

/* LAYOUT */
.layout {
  display: flex;
  height: 100vh;
}

/* LEFT SIDEBAR */
.left {
  width: 15%;
  padding: 24px 24px 0px 12px;;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  align-items: flex-start;
  border-right: 5px solid black;
  border-left: 50px solid violet;
}

.left .logo {
  max-width: 100%;
  height: auto;
  margin-bottom: 32px;
  padding-left: 1rem;
}
/* Scrollable caption */
h1 {
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 400;
  font-style: normal;
}

/* Scrollable caption */
h3 {
  font-family: "Pixelify Sans", sans-serif;
  font-size: 1rem;
  margin: 1rem;
  padding-left: 1rem;
  margin-bottom: 16px;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  display: flex;
}

/* Span holds the scrolling text */
h3 span {
  display: inline-block;
  animation: tickerEffect 20s steps(120) infinite;
  font-family: "Pixelify Sans", sans-serif;
  padding-right: 100%; /* Ensure there's space for the scrolling effect */
  white-space: nowrap;
  animation-timing-function: linear; /* Ensures consistent, smooth animation */
}

/* Keyframes for segmented scrolling effect */
@keyframes tickerEffect {
  0% {
    transform: translateX(100%); /* Start from the right edge */
  }
  100% {
    transform: translateX(-100%); /* Move to the left */
  }
}

/* Sidebar main links */
.button-sidebar {
  position: relative;
  display: inline-block;
  width: 100%;
  padding: 0.8rem 1rem;
  /*font-family: 'Roboto', monospace;*/
  font-family: "Pixelify Sans", sans-serif;
  font-weight: 500;
  color: #111; /* Black text (default state) */
  background-color: #fff; /* White background (default state) */
  text-decoration: none;
  overflow: hidden;
  margin-bottom: 0; /* Removed gap between buttons */
  text-align: left;
  transition: background-color 0.3s, color 0.3s;
}

.button-sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background-color: #111;
  z-index: 0;
  transition: left 0.3s;
}

.button-sidebar span {
  position: relative;
  z-index: 1;
  color: #111; /* Black text color (default) */
  transition: color 0.3s;
}

/* Hover and active states */
.button-sidebar:hover::before,
.button-sidebar.active::before {
  left: 0; /* Moves purple background to cover button */
}

.button-sidebar:hover span,
.button-sidebar.active span {
  color: #fff; /* White text when hovered/active */
}

/* Social links at bottom */
.nav-social {
  margin-top: auto;
}

.nav-social a {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
  opacity: 0.7;
  text-decoration: none;
  color: #111;
}

.nav-social a:hover {
  opacity: 1;
}

/* RIGHT MAIN AREA */
.right {
  width: 90%;
  display: flex;
  flex-direction: row;
  gap: 24px;
  padding-left: 12px;
  border-right: 5px solid black;
  border-left: 50px solid plum;

  height: 100vh;    /* full viewport height */
  min-height: 0;    /* crucial for child scroll */
}

/* GALLERY (2-column masonry) */
.gallery {
  flex: 0 0 30%;        /* 30% width */
  max-width: 100%;
  column-gap: 16px;

  overflow-y: auto;     /* vertical scroll */
  overflow-x: hidden;   /* prevent horizontal scroll */
  min-height: 0;        /* crucial: allows vertical scrolling */

  padding-right: 1rem;
  padding-top: 24px;
  border-right: 55px solid thistle;
  border-right: 5px solid black;
}

/* Figures inside gallery */
.gallery figure {
  break-inside: avoid;
  margin: 0 0 16px;
  display: block;
}

/* Images inside gallery */
.gallery img {
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
}

.gallery figcaption {
  font-size: 14px;
  margin-top: 0px;
  text-align: left;
}

/* PREVIEW AREA */
/* Make preview area take full column height */
.preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;   /* stretch children horizontally */
  justify-content: flex-start;
  overflow-y: auto;
  min-height: 0;
  margin-left: -12px; /* cancel out parent padding */
}

.preview img {
  max-width: 100%;
  height: auto;
}

.preview p {
  font-size: 16px;
  text-align: center;
  margin-top: 0px;
}


/* Preview area animation */
@keyframes previewEffect {
  0% {
    background-color: rgba(0, 0, 0, 0); /* Transparent background */
  }
  50% {
    background-color: rgba(111, 111, 111, 0.2); /* Light grayish background */
  }
  100% {
    background-color: rgba(0, 0, 0, 0); /* Reset to transparent */
  }
}

.preview.highlight {
  animation: previewEffect 1s ease-out;
}

/* Wrapper fills the preview area */
.iframe-wrapper {
  flex: 1;               /* fill available vertical space */
  position: relative;
  overflow: hidden;      /* needed for slide animation */
  width: 100%;           /* full width */
}

/* Iframe fills the wrapper completely */
#preview-frame {
  width: 100%;
  height: 100%;
  border: none;

  /* Start off-screen left and invisible */
  opacity: 0;
  transform: translateX(-50px);

  /* Slide + fade with easing */
  transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1),
              transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

figcaption {
  font-family: "Pixelify Sans", sans-serif;
    font-size: 20px;
    color: #333;
  }

.footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  background-color: black;
  color: white;
  text-align: center;
}

.bottom-right
{
right: 0;
bottom: 0;
position: absolute;
}

/* MOBILE */
@media (max-width: 800px) {
  .layout {
    flex-direction: column;
  }

  .left, .right {
    width: 100%;
  }

  .gallery, .preview {
    width: 100%;
  }
  
  
}

@media (max-width: 1100px) {
  .gallery {
    column-count: 1;
  }
}


