/* Text Selection Color */
::selection {
  background-color: #de6433;
  color: white;
}

::-moz-selection {
  background-color: #de6433;
  color: white;
}

/* Scrolling */
* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  font-family: sans-serif;
  background: white;
  overflow: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}

/* Hide scrollbar globally */
*::-webkit-scrollbar {
  display: none;
}

* {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Container - fills viewport */
.layout {
  position: relative;
  width: 100%;
  min-height: 100vh;
  height: 100%;
}


/* -------- Top Bar -------- */
.top-bar {
  position: absolute;
  top: 20px;
  left: 40px;
  right: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  z-index: 100;
}

.top-bar .left {
  position: fixed;
  top: 20px;
  left: 40px;
  font-weight: bold;
  color: black;
}

.top-bar .center {
  color: #0004FF !important;
  display: flex;
  gap: 40px;
}

.top-bar .center .nav-item {
  cursor: pointer !important;
  transition: all 0.3s ease;
}

.top-bar .center .nav-item:hover {
  color: #de6433 !important;
  cursor: pointer !important;
}

.top-bar .center .nav-item.cursive {
  font-style: italic;
  color: #0004FF;
}

.top-bar .logo {
  cursor: pointer;
  font-weight: bold;
  text-decoration: none;
  color: black;
}

.top-bar .right .nav-item {
  color: #0004FF !important;
  display: flex;
  gap: 40px;
  color: #0004FF
}

.top-bar .right .nav-item:hover {
  color: #de6433 !important;
}

/* -------- Placeholder Blocks -------- */
.image-placeholder {
  background: #d9d9d9;
  width: 31.25%;
  aspect-ratio: 3 / 2;
  height: auto;
}

.placeholder {
  position: absolute;
  text-align: left;
  font-size: 14px;
}

.placeholder.left {
  width: 31.25%;
  aspect-ratio: 3 / 2;
  height: auto;
  left: 25%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.placeholder.right {
  width: 26.04%;
  aspect-ratio: 2 / 3;
  height: auto;
  left: 75%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: right;
}

/* Center Nav */
.top-bar .center {
  position: absolute;
  left: 32%;
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  width: 16vw;
  min-width: 200px;
  max-width: 500px;
  font-size: 16px;
}

@media (min-width: 1920px) {
  .top-bar .center {
    width: 307px;
  }
}

/* Right Nav */
.top-bar .right {
  position: absolute;
  left: 75%;
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  width: 24vw;
  min-width: 120px;
  max-width: 300px;
  font-size: 16px;
}

.top-bar .right span,
.top-bar .right a {
  cursor: pointer;
}

.top-bar .right span.clicked,
.top-bar .right a.clicked {
  font-style: italic;
  color: #0004FF;
}

.top-bar .right a {
  text-decoration: none;
  color: black;
}

/* Projects Table */
.projects-table {
  position: absolute;
  top: 200px;
  left: 40px;
  right: 40px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

/* Projects Header and Row Styling */
.projects-header,
.projects-row {
  display: grid;
  grid-template-columns: 200px 110px 110px 40px;
  gap: 15px;
  margin-bottom: 6px;
  white-space: nowrap;
}

.projects-header {
  font-weight: bold;
  margin-bottom: 16px;
}

.projects-row>div:not(:first-child) {
  visibility: hidden;
}

.projects-row>div:first-child:hover~div {
  visibility: visible;
  color: rgb(185, 185, 185);
}

/* Captions */
.caption {
  font-size: 12px;
  margin-top: 6px;
}

.body-text {
  margin-top: 20px;
  font-size: 16px;
}

/* What section text styling */
.what-text {
  font-style: italic;
  color: #0004FF;
  left: 40px;
  top: 220px;
  font-size: 16px;
  line-height: 1.6;
  max-width: 600px;
  position: absolute;
}

.what-text p {
  margin-bottom: 16px;
}

.what-text p:last-child {
  margin-bottom: 0;
}

/* CSS-only toggle functionality */
#what-toggle {
  display: none;
}

.placeholder.left {
  display: block;
}

.what-text-content {
  display: none;
}

#what-toggle:checked~.layout .placeholder.left {
  display: none;
}

#what-toggle:checked~.layout .what-text-content {
  display: block;
}

#what-toggle,
#why-toggle,
#how-toggle,
#where-toggle,
#none-toggle {
  display: none;
}

.top-bar .center .nav-item {
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.top-bar .center .nav-item:hover {
  opacity: 1;
}

#what-toggle:checked~.layout .top-bar .center .nav-item:first-child,
#why-toggle:checked~.layout .top-bar .center .nav-item:nth-child(2),
#how-toggle:checked~.layout .top-bar .center .nav-item:nth-child(3),
#where-toggle:checked~.layout .top-bar .center .nav-item:nth-child(4) {
  font-style: italic;
  color: #0004FF;
  opacity: 1;
}

#none-toggle:checked~.layout .top-bar .center .nav-item:first-child,
#none-toggle:checked~.layout .top-bar .center .nav-item:nth-child(2),
#none-toggle:checked~.layout .top-bar .center .nav-item:nth-child(3),
#none-toggle:checked~.layout .top-bar .center .nav-item:nth-child(4) {
  font-style: normal;
  color: inherit;
  opacity: 0.7;
}

#none-toggle:checked~.layout .placeholder.left {
  display: block;
}

#none-toggle:checked~.layout .what-text-content,
#none-toggle:checked~.layout .why-text-content,
#none-toggle:checked~.layout .how-text-content,
#none-toggle:checked~.layout .where-text-content {
  display: none;
}

.what-text-content,
.why-text-content,
.how-text-content,
.where-text-content {
  display: none;
}

#what-toggle:checked~.layout .what-text-content {
  display: block;
}

#why-toggle:checked~.layout .why-text-content {
  display: block;
}

#how-toggle:checked~.layout .how-text-content {
  display: block;
}

#where-toggle:checked~.layout .where-text-content {
  display: block;
}

#what-toggle:checked~.layout .placeholder.left,
#why-toggle:checked~.layout .placeholder.left,
#how-toggle:checked~.layout .placeholder.left,
#where-toggle:checked~.layout .placeholder.left {
  display: none;
}

/* Why section text styling */
.why-text {
  font-style: italic;
  color: #0004FF;
  left: 40px;
  top: 220px;
  font-size: 16px;
  line-height: 1.6;
  max-width: 600px;
  position: absolute;
}

.why-text p {
  margin-bottom: 16px;
}

.why-text p:last-child {
  margin-bottom: 0;
}

/* How section text styling */
.how-text {
  font-style: italic;
  color: #0004FF;
  left: 40px;
  top: 220px;
  font-size: 16px;
  line-height: 1.6;
  max-width: 600px;
  position: absolute;
}

.how-text p {
  margin-bottom: 16px;
}

.how-text p:last-child {
  margin-bottom: 0;
}

/* Where section text styling */
.where-text {
  font-style: italic;
  color: #0004FF;
  left: 40px;
  top: 220px;
  font-size: 16px;
  line-height: 1.6;
  max-width: 600px;
  position: absolute;
}

.where-text p {
  margin-bottom: 16px;
}

.where-text p:last-child {
  margin-bottom: 0;
}

/* Contact section text styling */
.contact-text {
  font-style: italic;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px;
  font-size: 16px;
  line-height: 1.6;
  max-width: 600px;
  position: absolute;
  text-align: center;
  width: 100%;
}

.contact-text p {
  margin: 0;
}

#contact-toggle {
  display: none;
}

.contact-text-content {
  display: none;
}

#contact-toggle:checked~.layout .contact-text-content {
  display: block;
}

#contact-toggle:checked~.layout .bottom-bar .contact-link {
  font-style: italic;
  color: black;
  cursor: pointer;
}

.contact-link {
  cursor: pointer;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: #FF5500;
}

.contact-text a {
  transition: color 0.3s ease;
}

.contact-text a:hover {
  color: #FF5500 !important;
}


#why-toggle,
#how-toggle,
#where-toggle {
  display: none;
}

.why-text-content,
.how-text-content,
.where-text-content {
  display: none;
}

#why-toggle:checked~.layout .placeholder.left {
  display: none;
}

#why-toggle:checked~.layout .why-text-content {
  display: block;
}

#how-toggle:checked~.layout .placeholder.left {
  display: none;
}

#how-toggle:checked~.layout .how-text-content {
  display: block;
}

#where-toggle:checked~.layout .placeholder.left {
  display: none;
}

#where-toggle:checked~.layout .where-text-content {
  display: block;
}

#what-toggle:checked~.layout .top-bar .center .nav-item:first-child {
  font-style: italic;
  color: #0004FF;
}

#why-toggle:checked~.layout .top-bar .center .nav-item:nth-child(2) {
  font-style: italic;
  color: #0004FF;
}

#how-toggle:checked~.layout .top-bar .center .nav-item:nth-child(3) {
  font-style: italic;
  color: #0004FF;
}

#where-toggle:checked~.layout .top-bar .center .nav-item:nth-child(4) {
  font-style: italic;
  color: #0004FF;
}

#what-toggle:checked~.layout .top-bar .center .nav-item:first-child {
  font-style: italic;
  color: #0004FF;
}

/* -------- Footer -------- */
.bottom-bar {
  position: absolute;
  bottom: 20px;
  right: 40px;
  display: flex;
  gap: 40px;
  font-size: 16px;
  z-index: 100;
}

.bottom-bar a {
  color: black !important;
  text-decoration: none !important;
  cursor: pointer;
}

.bottom-bar a:visited {
  color: black !important;
  text-decoration: none !important;
}

.bottom-bar a:hover {
  color: #de6433 !important;
  text-decoration: none !important;
}

.bottom-bar a:active {
  color: black !important;
  text-decoration: none !important;
}

/* Images */
.left-image {
  object-fit: cover;
  display: block;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.right-image {
  object-fit: cover;
  display: block;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

#left-image {
  cursor: pointer;
}

.right-image {
  cursor: pointer;
}

.main-image:not(#left-image):hover {
  opacity: 1;
  transform: none;
  box-shadow: none;
}

/* Image Captions */
.placeholder .caption {
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 12px;
  pointer-events: none;
  font-style: italic;
  color: #666;
  position: absolute;
  top: 100%;
  bottom: 0;
  right: 0;
  margin: 2px;
}

.placeholder:hover .caption {
  opacity: 1;
}

#left-caption {
  transition: all 0.3s ease;
}

/* Project Hover Images */
.project-image {
  position: fixed;
  top: 50%;
  left: 75%;
  transform: translate(-50%, -50%);
  width: 30vw;
  max-width: 500px;
  aspect-ratio: 2 / 3;
  height: auto;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 10;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.projects-row:nth-child(2):hover~#Atelier-Kerkwerve_JB_01,
.projects-row:nth-child(3):hover~#kom-kijken-image,
.projects-row:nth-child(4):hover~#Opera_JB_01,
.projects-row:nth-child(5):hover~#refractor-image,
.projects-row:nth-child(6):hover~#furniture-image {
  opacity: 1;
  visibility: visible;
}

.projects-row:nth-child(2):hover+#Atelier-Kerkwerve_JB_01,
.projects-row:nth-child(3):hover+#kom-kijken-image,
.projects-row:nth-child(4):hover+#Opera_JB_01,
.projects-row:nth-child(5):hover+#refractor-image,
.projects-row:nth-child(6):hover+#furniture-image {
  opacity: 1;
  visibility: visible;
}

/* Mobile View */
@media (max-width: 768px) {

  .project-image {
    display: none !important;
  }

  .projects-row>div:not(:first-child) {
    visibility: visible !important;
    opacity: 1 !important;
    color: black;
  }

  .projects-header,
  .projects-row {
    gap: 10px;
    font-size: 14px;
  }

  .projects-table {
    overflow-x: auto;
    padding-bottom: 20px;
  }
}

.project-link {
  color: #0004FF;
  text-decoration: none;
}

.project-link:hover {
  color: #0004FF;
  /* Keep blue on hover */
}

.project-link:visited {
  color: #0004FF;
  /* Always blue, never purple for visited links */
}

.project-link:active {
  color: #0004FF;
  /* Blue when clicked */
}

/* ===========================================
   PROJECT PAGE LAYOUT
   =========================================== */

.back-button {
  position: absolute;
  left: 44px;
  top: 100px;
  width: 10px;
  height: 10px;
  border-left: 2px solid #0004FF;
  border-bottom: 2px solid #0004FF;
  transform: rotate(45deg);
  display: block;
  cursor: pointer;
}

.back-button:hover {
  border-color: #de6433
}

.project-left {
  position: absolute;
  left: 40px;
  top: 120px;
  width: calc(75% - 250px - 40px);
  /* Extends to left edge of right image (75% - half right width - buffer) */
  max-height: calc(100vh - 160px);
  /* Scrollable height: viewport minus top offset + bar buffers */
  overflow-y: auto;
  /* Enable vertical scroll for long content (e.g., gallery) */
  scrollbar-width: none;
  /* Hide scrollbar in Firefox */
  -ms-overflow-style: none;
  /* Hide scrollbar in IE/Edge */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Hide scrollbar in WebKit browsers (Chrome/Safari) */
.project-left::-webkit-scrollbar {
  display: none;
}

.project-left .project-intro {
  /* Project description - regular text, wider than index page text */
  position: static;
  /* inside flow within project-left */
  margin-bottom: 24px;
  font-style: normal;
  color: black;
  font-size: 16px;
  line-height: 1.6;
  max-width: 80%;
}

.project-data {
  display: grid;
  grid-template-columns: auto 1fr;
  /* Label auto-sized, value takes remaining space */
  column-gap: 30px;
  /* Fixed 30px between label and value */
  row-gap: 8px;
  font-size: 14px;
  /* Smaller font size */
  line-height: 1.6;
  max-width: 600px;
  margin-top: 4px;
  margin-bottom: 16px;
}

.project-data+.project-data {
  margin-top: 0;
  /* Remove extra margin between project-data sections */
}

.project-data .value {
  word-break: break-word;
  overflow-wrap: break-word;
}

.project-data .row {
  align-items: start;
  /* Consistent alignment for each row */
}

.project-data .row {
  display: contents;
  /* Allows label/value to align to grid columns */
}

.project-data .label {
  color: #000;
  /* Labels black */
}

.project-data .value {
  color: rgb(120, 120, 120);
  /* Values gray */
}

.project-spacer {
  height: 24px;
  /* white space between table and next sections */
}

.project-sections .section {
  margin-bottom: 16px;
}

.project-sections .section-title {
  font-weight: bold;
  margin-bottom: 6px;
}

.project-sections .section-body p {
  margin-bottom: 6px;
}

/* Project Gallery Styles */
.project-gallery {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
  margin-bottom: 16px;
  max-width: 600px;
}

.gallery-image {
  height: 100px;
  /* Fixed height to force alignment */
  width: auto;
  /* Width adjusts to maintain aspect ratio */
  object-fit: contain;
  /* Ensures full image/video is visible */
  border: 1px solid transparent;
  /* Mimic spacing/border if needed */
  cursor: pointer;
  /* Indicate clickable for full-screen modal */
  transition: opacity 0.3s ease;
}

/* Ensure videos in gallery display properly */
video.gallery-image {
  height: 100px;
  min-width: 60px;
}

.project-gallery .gallery-image:hover {
  opacity: 0.8 !important;
  transition: opacity 0.3s ease;
}

/* Right-side images for project detail pages - exact match to index.html .placeholder.right */
.project-right {
  position: absolute;
  /* Matches .placeholder.right (absolute, no fixed/transform) */
  width: 500px;
  height: 750px;
  left: calc(75% - 250px);
  /* Center at 75% horizontally */
  top: calc(50% - 375px);
  /* Center at 50% vertically */
  text-align: right;
  z-index: 10;
}

.project-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}



/* Canvas container */
#canvas-container {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  overflow-y: auto;
  cursor: grab;
  user-select: none;
  /* Add padding so first photos don't hide behind header */
  padding-bottom: 200px;
  /* Add extra padding so last photos don't cover footer buttons */
  box-sizing: border-box;
}

#canvas-container:active {
  cursor: grabbing;
}

/* Inner canvas div for images and panning */
#canvas {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100vw;
  height: auto;
  /* Dynamic height based on content */
  /* No transition - instant layout changes */
  user-select: none;
  /* Prevent text selection during panning */
}

#canvas-container.dragging {
  cursor: grabbing;
}

/* Styles for images */
#canvas img {
  position: absolute;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  /* GPU acceleration for smooth repositioning */
  will-change: transform;
  /* No transitions - instant changes */
  transition: none !important;
  /* Prevent rendering delays */
  content-visibility: auto;
}

/* Modal for full photo preview */
.photo-modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(255, 255, 255, 0.8);
  /* Semi-transparent white overlay */
  justify-content: center;
  align-items: center;
  user-select: none;
  /* Prevent selection */
  pointer-events: none;
  /* Allow clicks to pass through overlay */
}

.photo-modal-content {
  position: relative;
  margin: 5px;
  pointer-events: auto;
}

.photo-modal img,
.photo-modal video {
  display: block;
  height: calc(100vh - 10px);
  /* Fill viewport height minus top/bottom borders */
  width: auto;
  /* Maintain aspect ratio */
  max-width: calc(100vw - 10px);
  /* Prevent horizontal overflow */
  object-fit: contain;
  /* Ensure full visibility without cropping */
  margin: 0 auto;
  /* Center horizontally */
}

.photo-modal-close {
  position: fixed;
  top: 16px;
  /* Align with top border */
  right: 40px;
  /* Align with right edge/border */
  color: #0004FF;
  /* Blue per theme */
  font-size: 36px;
  /* Slightly smaller for thinner feel */
  font-weight: 200;
  /* Thinner styling */
  line-height: 1;
  /* Tight spacing */
  cursor: pointer;
  z-index: 1001;
  transition: color 0.3s ease;
  /* Smooth hover */
}

.photo-modal-close:hover {
  color: #de6433;
  /* Orange on hover */
}

/* Modal navigation arrows */
.modal-arrow-left,
.modal-arrow-right {
  position: fixed;
  width: 10px;
  height: 10px;
  cursor: pointer;
  z-index: 1001;
  transition: border-color 0.3s ease;
  top: 50%;
  transform: translateY(-50%);
}

.modal-arrow-left {
  left: 40px;
  border: none;
  border-left: 2px solid #0004FF;
  border-bottom: 2px solid #0004FF;
  transform: translateY(-50%) rotate(45deg);
}

.modal-arrow-right {
  right: 40px;
  border: none;
  border-right: 2px solid #0004FF;
  border-top: 2px solid #0004FF;
  transform: translateY(-50%) rotate(-315deg);
}

.modal-arrow-left:hover,
.modal-arrow-right:hover {
  border-color: #de6433;
}

/* Hide arrows if no gallery (single image mode) */
.photo-modal[data-gallery-length="1"] .modal-arrow-left,
.photo-modal[data-gallery-length="1"] .modal-arrow-right {
  display: none;
}

.photo-modal-caption {
  position: absolute;
  bottom: 8px;
  right: 8px;

  color: rgba(255, 255, 255, 0.765);
  background: rgba(0, 0, 0, 0.7);
  padding: 8px 12px;
  border-radius: 2px;
  font-size: 12px;
  font-family: inherit;
  text-align: center;
  max-width: 100%;
  z-index: 1001;
}

/* Position-specific orientation classes for index page */
/* Left image orientations - centered at 25% page width, 50% height */

/* Landscape: 600x400 (3:2) */
.index-left-landscape {
  width: 31.25% !important;
  aspect-ratio: 3 / 2 !important;
  height: auto !important;
  position: absolute;
  left: 25% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
}

/* Portrait: 500x750 (2:3) */
.index-left-portrait {
  width: 26.04% !important;
  aspect-ratio: 2 / 3 !important;
  height: auto !important;
  position: absolute;
  left: 25% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
}

/* Square: 500x500 (1:1) */
.index-left-square {
  width: 26.04% !important;
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  position: absolute;
  left: 25% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
}

/* --- RIGHT SIDE (Centered at 75% Left, 50% Top) --- */

/* Landscape: 600x400 (3:2) */
.index-right-landscape {
  width: 31.25% !important;
  aspect-ratio: 3 / 2 !important;
  height: auto !important;
  position: absolute;
  left: 75% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
}

/* Portrait: 500x750 (2:3) */
.index-right-portrait {
  width: 26.04% !important;
  aspect-ratio: 2 / 3 !important;
  height: auto !important;
  position: absolute;
  left: 75% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
}

/* Square: 500x500 (1:1) */
.index-right-square {
  width: 26.04% !important;
  aspect-ratio: 1 / 1 !important;
  height: auto !important;
  position: absolute;
  left: 75% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
}

/* ===========================================
   RESPONSIVE HEADER & LAYOUT (Portrait / Mobile)
   =========================================== */
@media (max-width: 900px),
(max-aspect-ratio: 1/1) {


  /* Enable scrolling on body/html */
  html,
  body {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100%;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    scroll-behavior: auto !important;
    /* Native momentum scroll */
    -webkit-overflow-scrolling: touch !important;
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative;
  }

  /* Adjust Top Bar Position */
  .top-bar {
    top: 10px !important;
  }

  .top-bar .left {
    top: 10px !important;
  }

  /* Layout container becomes a flex column */
  .layout {
    height: auto !important;
    min-height: 100vh;
    padding-top: 90px;
    /* Adjusted padding for balanced spacing */
    padding-bottom: 0;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    gap: 30px;
  }

  #canvas-container {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    height: auto !important;
    width: 100% !important;
    overflow: visible !important;
    padding: 0 10px !important;
    /* Add side padding */
    margin-bottom: 0 !important;
    flex: 0 0 auto !important;
    /* Prevent collapsing */
  }

  /* Force CSS Grid on canvas to fix height collapse and layout */
  #canvas {
    height: auto !important;
    position: relative !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    /* 2 columns for main photos */
    gap: 15px;
    width: 100% !important;
  }

  /* Override JS absolute positioning for images */
  #canvas img {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    /* display: block !important; REMOVED to allow JS display: none */
    object-fit: contain;
  }


  /* Header adjustments */
  .top-bar .right {
    position: absolute;
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;
    width: auto !important;
    max-width: none !important;
    justify-content: flex-end;
    gap: 20px;
  }

  .top-bar .center {
    position: absolute;
    top: 30px !important;
    /* Push below the first row */
    right: 0 !important;
    left: auto !important;
    transform: none !important;
    width: auto !important;
    max-width: none !important;
    justify-content: flex-end;
    gap: 15px;
  }


  .placeholder.left,
  .placeholder.right,
  .index-left-landscape,
  .index-left-portrait,
  .index-left-square,
  .index-right-landscape,
  .index-right-portrait,
  .index-right-square {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: 80% !important;
    /* Responsive width */
    max-width: 500px;
    height: auto !important;
    max-width: 500px;
    height: auto !important;
    margin: 0 auto !important;
    text-align: left !important;
    /* Keep caption aligned left relative to image? */
  }

  /* Ensure aspect ratios */

  /* Adjust caption position if needed */
  .placeholder .caption {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    right: auto !important;
    margin-top: 8px !important;
    text-align: center !important;
    /* Center caption text? */
    width: 100%;
  }

  /* 
     Text Content Adjustments for Mobile
  */
  .what-text-content,
  .why-text-content,
  .how-text-content,
  .where-text-content {
    position: relative !important;
    width: 80% !important;
    max-width: 600px;
    margin: 0 auto 60px auto !important;
    /* Same bottom margin as images */
    display: none;
    /* Hidden by default, toggled by checkbox */
  }

  /* Override absolute positioning of inner text divs */
  .what-text,
  .why-text,
  .how-text,
  .where-text {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    max-width: 100% !important;
  }

  #what-toggle:checked~.layout .what-text-content,
  #why-toggle:checked~.layout .why-text-content,
  #how-toggle:checked~.layout .how-text-content,
  #where-toggle:checked~.layout .where-text-content {
    display: block !important;
  }

  /* Contact Text Adjustments for Mobile */
  .contact-text-content {
    position: relative !important;
    width: 80% !important;
    max-width: 600px;
    margin: 0 auto 60px auto !important;
    display: none;
    order: 5;
  }

  .contact-text {
    position: relative !important;
    left: auto !important;
    transform: none !important;
    bottom: auto !important;
    text-align: center !important;
    width: 100% !important;
  }

  #contact-toggle:checked~.layout .contact-text-content {
    display: block !important;
  }

  /* Footer adjustments for responsive layout */
  /* Footer adjustments for responsive layout */
  .bottom-bar {
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    margin-top: 0;
    /* Gap handles spacing */
    width: 100%;
    justify-content: flex-end;
    padding-right: 40px;
    padding-bottom: 40px;
    background-color: transparent;
    z-index: 999;
    box-sizing: border-box;
    order: 9999;
    /* Ensure footer is always last */
    flex-shrink: 0;
  }


  /* ===========================================
     PROJECT PAGE RESPONSIVE
     =========================================== */

  /* Reset absolute positioning for project columns */
  .project-left,
  .project-right {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: 80% !important;
    max-width: 600px;
    margin: 0 auto !important;
  }

  /* 1. Project Image */
  .project-right {
    display: none !important;
  }

  .project-right img {
    width: 100% !important;
    height: auto !important;
    max-height: 60vh;
    object-fit: cover;
  }

  /* 2. Project Info & Gallery (from left side) - Order 2 */
  .project-left {
    order: 2 !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    display: block !important;
    margin-bottom: 40px !important;
    position: static !important;
    /* Add top margin to clear fixed header if needed */
    margin-top: 20px !important;
    flex: 0 0 auto !important;
    /* Prevent shrinking/collapsing */
  }

  .project-intro,
  .project-data,
  .project-gallery {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Force 3-column grid for project gallery on mobile */
  .project-gallery {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
    overflow-x: hidden !important;
    /* Ensure no horizontal scroll */
    width: 100% !important;
    box-sizing: border-box;
  }

  /* Resize gallery images for mobile grid */
  .gallery-image {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
  }

  /* Hide navigation arrows on mobile (swipe only) */
  .modal-arrow-left,
  .modal-arrow-right {
    display: none !important;
  }
}