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

html {
  overflow-y: scroll;
}

html, body {
  height: 100%;
  background: #f9f6e3;
  color: #6e61a2;
  font-family:  Arial, Helvetica, sans-serif, serif;
}

body {
  display: flex;
  flex-direction: column;
}

#profilepic {

  display: block;
  margin: auto;
  width: 240px;
  border-radius: 50%;
}

/* Top bar */
.top-bar {
  width: 100%;
  padding: 1.2rem 0 1.5rem 0; /* tighter and consistent */
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.top-bar h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 6rem);
  letter-spacing: 0.08em;
  font-family: "Bagel Fat One", sans-serif;
  font-weight: 400;
  font-style: normal;
  background: linear-gradient(45deg, #605396, #8071bb);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  
}

.top-bar h1 a {
  color: inherit;
  text-decoration: none;
}

/* Hide hamburger on desktop */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  margin: 1rem auto 0 auto;
  padding: 0;
}

/* Hamburger lines */
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #6e61a2;
  margin: 5px 0;
  transition: 0.3s ease;
}

.main-nav {
  margin-top: 0.6rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: 0.9rem;
}

.main-nav a {
  color: #6e61a2;
  text-decoration: none;
}

.main-nav a:hover {
  color: #8153c6;
}

.nav-icon img {
  width: 18px;
  height: 18px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.nav-icon img:hover {
  opacity: 1;
}

.page-content {
  width: 100%;
  max-width:800px;   /* adjust as desired */
  margin: 2rem auto;
  padding: 1rem 0 4rem 0;
  font-size: 1rem;
  flex: 1;
  min-width: 0;
}

/* Landing sections */
.landing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  flex: 1;
}

.panel {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Dongle', sans-serif;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-align: center;
  line-height: 0.7;
  color: inherit;
  font-size: clamp(4rem, 2.5vw, 3rem);
  border-right: 0px solid rgba(255,255,255,0.1);
}

/* Base panel colours */
.panel.animation {
  background: #72acce;
  color: #f9f6e3;  
}

.panel.character {
  background: #f09139;
  color: #f9f6e3;
}

.panel.motion {
  background: #787c49;
  color: #f9f6e3;   
}

.panel:last-child {
  border-right: none;
}

.panel:hover {
  filter: brightness(1);
}

/* Mobile layout */
@media (max-width: 768px) {
  .landing-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 1fr);
  }

  .panel {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .panel:last-child {
    border-bottom: none;
  }
  
  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
  }

  .main-nav.active {
    display: flex;
  }

  .video-gallery {
    padding: 0 1rem;
  }

  .video-item {
    margin-bottom: 2rem;
  }

  .gallery-page .gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding: 0 1rem;
  }

.page-content {
  padding: 1rem 1rem 4rem 1rem;
}

}

.gallery-page .page-content {
  max-width: 800px;
}

.video-page .page-content {
  max-width: 1300px;
  padding: 1rem 0 3rem 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

.gallery-item {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  min-width: 0;   /* VERY important */
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;  /* Prevents inline-image sizing quirks */
  cursor: pointer;
  background: #000;
  transition: transform 0.2s ease;
}

  .gallery-item img:hover { 
    transform: scale(1.05);
}

.video-gallery {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0rem;
}

.video-item {
  margin-bottom: 3rem;
}

.video-caption {
  text-align: center;
  font-size: 0.95rem;
  color: #6e61a2;
  line-height: 1.4;
}

.video-item iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  display: block;
}

.video-embed {
  position: relative;
  margin-bottom: 0.8rem;
  width: 100%;
  aspect-ratio: 16 / 9;
  cursor: pointer;
  overflow: hidden;
}

.video-embed img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.video-embed:hover img {
  transform: scale(1.05);
  filter: brightness(0.9);
}

.video-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.play-button {
  position: absolute;
  width: 70px;
  height: 70px;
  background: #f9f6e3;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.play-button::before {
  content: "";
  position: absolute;
  left: 29px;
  top: 24px;
  border-left: 18px solid #6e61a2;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
}

.video-embed:hover .play-button {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

@media (hover: none) {

  .video-embed:hover .play-button {
    transform: translate(-50%, -50%);
  }

}


.panel {
  position: relative;
  overflow: hidden;
}

/* GIF overlay */
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Individual previews */
.panel.animation::before {
  background-image: url("../images/animation-preview.gif");
}

.panel.character::before {
  background-image: url("../images/character-preview.jpg");
}

.panel.motion::before {
  background-image: url("../images/motion-preview.gif");
}

/* Reveal on hover */
.panel:hover::before {
  opacity: 0.35;
}

/* Keep text above GIF */
.panel {
  z-index: 1;
}

.panel {
  color: #fff;
}

/* Character design thumbnails as squares */
.gallery-item {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.page-content h2 {
  margin-top: 4rem;
  margin-bottom: 2rem;
  font-size: 1.4rem;
  font-weight: 500;
  text-align: center;

}

.page-content p {
    margin: 0 auto;
  max-width: 62ch;
  line-height: 1.6;
  text-align: center;
  
}

/* Lightbox overlay */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none; /* hidden by default */
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

#lightbox.active {
  display: flex; /* visible when active */
}

#lightbox img {
  max-width: 90%;
  max-height: 90%;
  position: relative;
  z-index: 1000;
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2000;
}


.lightbox-prev {
  left: 2rem;
}

.lightbox-next {
  right: 2rem;
}

.site-footer {
  text-align: center;
  font-size: 0.85rem;
  padding: 2rem 0;
  border-top: 0px solid #ffb1a5;
  opacity: 0.7;
}





