.category-header {
  position: relative;
  background-color: transparent;
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
  padding: 3rem 1rem;
  overflow: hidden;
  z-index: 0;
  box-shadow: 0px -2px 20px 10px rgba(0, 0, 0, 0.5);
  background-repeat: no-repeat;
}
:root {
  --seq-mult: 2;
   --seq-aspect: calc(1920/1080);
  
}

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

body {
  background: #0f0f0f;
   font-family: 'Red Hat Display', sans-serif;
   overflow-x: hidden;
  
}

/* Scroll canvas section */
#scroll-section {
  position: relative;
   height: calc(var(--seq-mult) * 100vh);
   background: #0f0f0f;
  
}

.sticky {
  position: sticky;
   top: 0;
   width: 100%;
   height: 100vh;
   display: flex;
   align-items: center;
   justify-content: center;
   overflow: hidden;
  
}

.scroll-overlay {
  position: absolute;
   inset: 0;
   background: rgba(0,0,0,0);
   z-index: 1;
   pointer-events: none;
  
}

/* Intro */
.intro-overlay {
  position: absolute;
  
  top: 55%;
   left: 50%;
  
  transform: translate(-50%, -50%);
  
  padding: 1.5rem;
  
  color: #fff;
  
  text-align: center;
  
  width: 90vw;
  
  max-width: 600px;
  
  z-index: 2;
  
}

.intro-photo {
  width: 150px;
   height: 150px;
  
  border-radius: 50%;
  
  object-fit: cover;
  
  margin: 0 auto 1rem;
  
  border: 2px solid #fff;
  
}

.scroll-arrow {
  font-size: 2rem;
   color: #fff;
   margin-top: 1rem;
  
}

/* Project sections */
.project-section {
  position: relative;
  
  width: 100%;
   height: 100vh;
  
  overflow: hidden;
  
  z-index: 1;
  
}

.bg-image {
  position: absolute;
  
  top: 0;
   left: 0;
  
  width: 100%;
   height: 100%;
  
  background-size: cover;
  
  background-position: center;
  
  z-index: 1;
  
}

.dark-overlay {
  position: absolute;
  
  inset: 0;
  
  background: rgba(0,0,0,0.8);
  
  z-index: 2;
  
  opacity: 0;
  
  transition: opacity 0.2s;
  
}

a.overlay {
  position: absolute;
  
  top: 50%;
   left: 50%;
  
  transform: translate(-50%, -50%);
  
  padding: 0.5rem 1rem;
  
  font-size: 1.75rem;
  
  color: #fff;
  
  z-index: 3;
  
  text-decoration: none;
  
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.9);
  
}

/* Category header with blurred preview and background image */


.category-header::before {
  content: '';
  
  position: absolute;
  
  inset: 0;
  
  backdrop-filter: blur(4px);
  
  background-color: rgba(0, 0, 0, 0.3);
  
  
  z-index: 1;
  
}

.category-header.expanded::before {
  backdrop-filter: none;
  
  background-color: transparent;
  
}

.category-header h2,
.category-header p {
  position: relative;
  
  z-index: 2;
  
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.9);
  
}

/* Expand/collapse animation */

}

/* Desktop: Max 3 columns */


/* Mobile: Single column */


/* Adjust category-header blur logic */
.category-header::before {
  content: '';
  
  position: absolute;
  
  inset: 0;
  
  backdrop-filter: none;
  
  background-color: transparent;
  
  
  z-index: 1;
  
}

.category-header:hover::before {
  backdrop-filter: blur(4px);
  
  background-color: rgba(0, 0, 0, 0.3);
  
}

/* Contact section styling */
#contact {
  background-color: #111;
  
  color: #fff;
  
  padding: 4rem 2rem;
  
  text-align: center;
  
}

#contact h2 {
  font-size: 2rem;
  
  margin-bottom: 1.5rem;
  
}

#contact form {
  max-width: 500px;
  
  margin: 0 auto;
  
}

#contact input,
#contact textarea {
  width: 100%;
  
  padding: 0.75rem;
  
  margin-bottom: 1rem;
  
  border: none;
  
  border-radius: 4px;
  
  font-size: 1rem;
  
}

#contact button {
  padding: 0.75rem 1.5rem;
  
  font-size: 1rem;
  
  background-color: #333;
  
  color: #fff;
  
  border: none;
  
  border-radius: 4px;
  
  cursor: pointer;
  
}

#contact button:hover {
  background-color: #555;
  
}

/* Grid layout for projects */

}

.project-card {
  position: relative;
  
  cursor: pointer;
  
  overflow: hidden;
  
  border-radius: 8px;
  
}

.project-card img {
  width: 100%;
  
  display: block;
  
  border-radius: 8px;
  
  object-fit: cover;
  
}

/* Modal structure */
.project-modal {
  position: fixed;
  
  inset: 0;
  
  display: flex;
  
  align-items: center;
  
  justify-content: center;
  
  z-index: 1000;
  
}

.project-modal.hidden {
  display: none;
  
}

.modal-overlay {
  position: absolute;
  
  inset: 0;
  
  background: rgba(0, 0, 0, 0.8);
  
  z-index: 1;
  
}

.project-modal-content {
  position: relative;
  
  background: #c00;
  
  padding: 1rem;
  
  max-width: 900px;
  
  width: 95%;
  
  border-radius: 10px;
  
  z-index: 2;
  
  display: flex;
  
  flex-direction: column;
  
  align-items: center;
  
}

.project-modal-content video,
.project-modal-content img {
  width: 100%;
  
  max-height: 60vh;
  
  border-radius: 6px;
  
  object-fit: contain;
  
  background: #000;
  
}

.modal-title {
  font-size: 1.5rem;
  
  margin: 1rem 0 0.5rem;
  
}

.modal-description {
  text-align: center;
  
  font-size: 1rem;
  
  padding: 0 1rem;
  
}

.close-btn {
  position: absolute;
  
  top: 10px;
  
  right: 14px;
  
  font-size: 2rem;
  
  color: #fff;
  
  cursor: pointer;
  
}

/* Disable scroll when modal open */
body.no-scroll {
  overflow: hidden;
  
}

/* Responsive project layout on mobile */
@media (max-width: 600px) {
  .modal-title {
    font-size: 1.25rem;
  
}

}

/* Restore blurred image background on category headers */


/* Modal style cleanup */
.project-modal-content {
  position: relative;
  
  background: linear-gradient(to bottom, #111, #1a1a1a);
  
  padding: 1rem;
  
  max-width: 900px;
  
  width: 95%;
  
  border-radius: 10px;
  
  z-index: 2;
  
  display: flex;
  
  flex-direction: column;
  
  align-items: center;
  
}

.project-modal-content h3,
.project-modal-content p {
  color: #fff;
  
}

/* Close button outside modal box */
.close-btn {
  position: fixed;
  
  top: 20px;
  
  right: 24px;
  
  font-size: 2rem;
  
  color: #fff;
  
  cursor: pointer;
  
  z-index: 1001;
  
}


#sequence {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100vh;
  width: auto;
  max-width: none;
  object-fit: contain;
  background-image: url('sequence/seq_000.jpg');
  background-size: cover;
  background-position: center;
}


@media (min-width: 900px) {
  .category-content.expanded {
    grid-template-columns: repeat(3, 1fr);
  
    max-width: 1200px;
  
    margin: 0 auto;
  
}



/* 3-column layout for desktop */


/* 1-column layout on mobile */


.category-content {
  display: grid;
  
  grid-template-columns: 1fr;
  
  gap: 1rem;
  
  padding: 0;
  
  max-height: 0;
  
  opacity: 0;
  
  overflow: hidden;
  
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease, visibility 0.3s ease;
  
  visibility: hidden;
  
}

.category-content.expanded {
  padding: 1rem;
  
  max-height: 3000px;
  
  opacity: 1;
  
  visibility: visible;
  
}

}

@media (max-width: 600px) {
  .category-content.expanded {
    grid-template-columns: 1fr;
  
    max-width: 100%;
  
}

}

/* Prevent image from flashing during collapse */
.category-content:not(.expanded) .project-card img {
  height: 0 !important;
  
  padding: 0 !important;
  
  margin: 0 !important;
  
  overflow: hidden !important;
  
  transition: none !important;
  
}

.category-content:not(.expanded) .project-card {
  transform: scaleY(0);
  
  transition: none !important;
  
}

/* DEFAULT: no blur or overlay */
.category-header::before {
  content: '';
  
  position: absolute;
  
  inset: 0;
  
  background-color: transparent;
  
  backdrop-filter: none;
  
  transition: all 0.3s ease;
  
  z-index: 1;
  
}

/* HOVER: apply blur and overlay */
.category-header:hover::before {
  backdrop-filter: blur(4px);
  
  background-color: rgba(0, 0, 0, 0.3);
  
}

/* EXPANDED: no image, dark background */
.category-header.expanded {
  background-image: none !important;
  
  background-color: #050505 !important;
  
}

#socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 1rem;
  background: #000; /* darker than #0f0f0f */
  text-align: center;
  border-top: 1px solid #222;
}

#socials a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.2s ease;
}

#socials a:hover {
  color: #f90;
}

/* Style for external link in modal */
.external-link {
  margin-top: 1rem;
  display: inline-block;
  color: #fff;
  text-decoration: underline;
  font-weight: 500;
}

.external-link:hover {
  color: #f90;
}

.intro-overlay h1,
.intro-overlay h2,
.intro-overlay p {
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.85);
}

.intro-overlay {
  background-color: rgba(0, 0, 0, 0);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0);
}

.intro-overlay h2 {
  font-family: 'Red Hat Display', sans-serif;
  font-weight: 400;
  font-style: italic;
  opacity: 0.9;
}

.intro-text {
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0);
}

.intro-text h1,
.intro-text h2,
.intro-text p {
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.85);
}

.intro-text h2 {
  font-family: 'Red Hat Display', sans-serif;
  font-weight: 400;
  font-style: italic;
  opacity: 0.9;
}


@media (max-width: 600px) {
  .project-card img {
    border-radius: 0 !important;
  }
}


/* Ensure scroll section is rendered behind category content */
#scroll-section {
  position: relative;
  z-index: 1;
}

/* Bring category headers above scroll section for proper drop shadow visibility */



.project-modal-content iframe {
  width: 100%;
  height: auto;
  max-height: 60vh;
  display: block;
  border-radius: 6px;
  background: #000;
  object-fit: contain;
}
