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

html {
    font-size: 16px;
}

body {
    font-family: 'IBM Plex Sans', Arial, sans-serif;
    line-height: 1.5;
    background-color: #fff;
    color: #333;
}

/* Links */
a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #5c5c5c;
}

/* Navigation Bar */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: transparent;
    z-index: 10;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

/* Sweep background animation */
.sweep {
  position: fixed; /* use fixed to stay behind everything */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: fuchsia;
  transform: translateY(-100%);
  animation: sweepDown 1.5s ease-in-out forwards;
  z-index: -1; /* this sends it to the back */
}


@keyframes sweepDown {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(0);
  }
}

/* Dual-colored title with white shadow */
.brand {
  position: relative;
}

.brand a {
  font-size: 2rem;
  font-weight: bold;
  color: black;
  position: relative;
  text-decoration: none;
  z-index: 1;
}

.brand a::before {
  content: 'Roland Chen';
  position: absolute;
  top: 0;
  left: 0;
  color: white;
  -webkit-text-stroke: 1px black;
  text-stroke: 1px black;
  z-index: 0;
}


/* Hide the mobile menu toggle button by default (desktop view) */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
}
.nav-links a {
    padding: 0.5rem;
    position: relative;
}

.nav-links a:hover {
    color: #555;
}

/* Dropdown */
.dropdown {
  position: relative;
  display: inline-block;
}

/* Dropdown menu */
/* Dropdown container */
.dropdown-content {
  position: absolute;
  top: 100%;
  right: -20%;
  background-color: #fff;
  list-style: none;
  margin: 0;
  padding: 0.5rem 1rem;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  width: max-content;
  text-align: right;
  box-shadow: 6px 6px 0 black; /* <-- Added shadow */
}

/* Reveal dropdown on hover */
.dropdown:hover .dropdown-content {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Dropdown link items */
.dropdown-content a {
  position: relative; /* Required for ::after positioning */
  display: inline-block;
  padding: 0.4rem 0; /* vertical spacing between links */
  text-decoration: none;
  color: #000;
}

.dropdown-content li + li {
  margin-top: 0.15rem;
}

/* Decorative red dot */
.dropdown-content a::after {
  content: "";
  position: absolute;
  bottom: 0; /* Closely below the text */
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 6px;
  background-color: red;
  border-radius: 50%;
  transition: width 0.3s ease;
}

/* Hover Effect for the Dot */
.dropdown-content a:hover::after {
    width: 6px; /* Width of the dot when hovered */
    left: 50%; /* Ensures it remains centered */
}

/* Animation for the Dropdown Links (Cascade) */
.dropdown-content a:nth-child(1) {
    animation-delay: 0.1s;
}

.dropdown-content a:nth-child(2) {
    animation-delay: 0.2s;
}

.dropdown-content a:nth-child(3) {
    animation-delay: 0.3s;
}

.dropdown-content a:nth-child(4) {
    animation-delay: 0.4s;
}

.dropdown-content a:nth-child(5) {
    animation-delay: 0.5s;
}

.dropdown-content a:nth-child(6) {
    animation-delay: 0.6s;
}

.dropdown-content a:nth-child(7) {
    animation-delay: 0.7s;
}

/* Cascade Animation Definition */
@keyframes cascade {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Hero Section */
header {
    position: relative;
    width: 100%;
    height: 10vh;
    overflow: hidden;
}

.home-feature-image {
    width: 100%;
    max-width: 3000px;
    height: auto;
    display: block;
    margin: 1.2rem auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease;
}

header h1 {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Main Content */
main {
    padding: 20px;
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

p {
    font-size: 1.125rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Footer */
.site-footer {
    padding: 2rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: center;
    background-color: transparent;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    gap: 2rem;
}

.footer-icon img {
    width: 24px;
    height: 24px;
    transition: opacity 0.4s ease;
}

.footer-icon img:hover {
    opacity: 0.6;
    cursor: pointer;
}

/* About Section */
.about-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1000px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.about-text,
.about-image-container {
    flex: 1 1 45%;
    text-align: left;
}

.about-image {
    max-width: 100%;
    height: auto;
}

/* Work Content */
.content-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.content-wrapper h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.description {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    max-width: 600px;
    text-align: center;
}
.description2 {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    max-width: 600px;
    text-align: left;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    height: 100%;
    width: 250px;
    background: #111;
    color: white;
    padding-top: 60px;
    transition: left 0.4s ease;
    z-index: 1001;
}

.sidebar.active {
    left: 0;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    padding: 1rem;
}

.sidebar a {
    color: white;
    text-decoration: none;
    transition: color 0.4s;
}

.sidebar a:hover {
    color: #ccc;
}

/* Work Page Gallery */
.gallery-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.gallery-item {
    text-align: center;
    max-width: 400px;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item p {
    margin-top: 0.5rem;
    font-size: 1rem;
    color: #333;
}

.gallery-item a {
    text-decoration: none;
    color: inherit;
}

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

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    transition: opacity 0.4s, visibility 0.4s;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Image Grid Styling */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.photo-grid img {
    width: 100%;
    height: auto;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

/* Video Container and Wrapper */
.photo-grid .video-container,
.video-container {
    width: 100%;
    max-width: 100%;
    padding: 0 1rem;
}

.photo-grid .video-wrapper,
.video-wrapper {
    aspect-ratio: 16 / 9;
    width: 100%;
    max-width: 100%;
    position: relative;
    background: #000;
    overflow: hidden;
}

.photo-grid .video-wrapper iframe,
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* centred image styling */

.centered-image {
  display: block;           /* Removes inline spacing and allows margin auto to work */
  margin-left: 0;
  margin-right: 0;
  padding: 1.5rem;
  width: 100%;              /* Takes full width of its container */
  max-width: 1500px;        /* But no more than 1500px */
  height: auto;             /* Maintains aspect ratio */
}

/* Styling only for #video-photo-grid */
#video-photo-grid {
  display: grid;
  grid-template-columns: 2fr 1fr; /* 2 parts for video, 1 part for image */
  gap: 1.5rem;
  padding: 1.5rem;
  max-width: 1500px;
  margin: 0 auto;
}

#video-photo-grid .video-container {
  width: 100%;
  max-width: 100%;
}

#video-photo-grid .video-wrapper {
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 100%;
}

#video-photo-grid .video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

#video-photo-grid img {
  width: 100%;
  height: auto;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

/* Only this specific video container will be affected */
.video-container-side-by-side {
  display: flex; /* Align videos horizontally */
  gap: 1rem; /* Space between the videos */
}

/* Individual video wrapper */
.video-container-side-by-side .video-wrapper {
  flex: 1; /* Each video takes equal space */
  position: relative;
  width: 100%; /* Ensures it fills its container */
  aspect-ratio: 16 / 9; /* Keeps the correct aspect ratio */
  overflow: hidden;
}

/* Make sure the iframe fills the wrapper */
.video-container-side-by-side .video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}


/* Dumpling Fest Wrapper */

.dphoto-grid {
    width: 100vw;
    box-sizing: border-box;
    padding: 0 2rem; /* 2rem padding on left and right */
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem; /* 1rem gap between grid items */
    align-items: center;
    justify-items: center;
}


.dphoto-grid img {
    width: 100%; /* Ensure content fills the grid cell */
    height: auto; /* Maintain aspect ratio for images */
}

.dphoto-grid .video-container {
    aspect-ratio: 10.5/ 16; 
    width: 100%; /* Ensure content fills the grid cell */
    height: auto; /* Maintain aspect ratio for images */
}

.dphoto-grid .video-wrapper {
  aspect-ratio: 10.5 / 16;
  width: 100%; /* Ensure the container takes up the full width available */
  position: relative;
  background: #000;
  margin: auto;
  overflow: hidden; /* Prevent overflow */
}

.dphoto-grid .video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  object-fit: cover; /* Ensures the iframe fully covers the container without distortion */
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  .top-nav {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    position: relative;
  }

  .top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background-color: #fff;
    width: 100%;
    padding: 1rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 999;
  }

 .nav-links li {
    display: block;
    margin: 0; /* Ensure no extra spacing between items */
    padding: 0; /* Remove default padding */
  }


  .nav-links.mobile-visible {
    display: flex;
  }

  .nav-links a {
    padding: 0.75rem 1rem;
    display: block;
    font-size: 1rem;
    color: #333;
    text-align: right;
  }

  .dropdown-content {
    position: static;
    background: none;
    padding: 0;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    padding-left: 0;
    margin-top: 0;
    box-shadow: 6px 6px 0 black; /* <-- Added shadow */
  }

  .dropdown-content a {
    padding: 0.5rem 1rem;
    animation: none;
    opacity: 1;
    transform: none;
  }

  .dropdown-content a::after {
    bottom: 2px; /* adjust as needed */
  }

  .dropdown:hover .dropdown-content {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .dropdown-content {
    right: 0;
    text-align: right;
  }

  header h1 {
    font-size: 1.5rem;
    bottom: 10px;
  }

  .about-layout {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .about-text,
  .about-image-container {
    flex: 1 1 100%;
    text-align: center;
  }

  #video-photo-grid {
    grid-template-columns: 1fr;
  }

  .dphoto-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }

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

  .video-container-side-by-side {
    flex-direction: column;
  }

  .content-wrapper {
    padding: 1rem;
  }

  .description,
  .description2 {
    font-size: 1rem;
    text-align: center;
  }

  .site-footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .gallery-wrapper {
    padding: 1rem;
    gap: 1rem;
  }

  .gallery-item {
    max-width: 100%;
  }

  p,
  h1,
  h2,
  a {
    word-break: break-word;
  }

  img,
  iframe {
    max-width: 100%;
    height: auto;
  }




/* Footer styles */
.site-footer .footer-content {
  display: flex;
  gap: 1rem;
}

.footer-icon img {
  width: 24px;
  height: 24px;
}


  .site-footer .footer-content {
    flex-direction: column;
    align-items: center;
  }

