/* 
  Awwwards-Quality Design System
  Tokens for Typography, Colour, and Scale
*/
:root {
  --bg-color: #0c0c0c;
  --bg-surface: #141414;
  --text-primary: #f4f0ea;
  --text-secondary: #a3a09a;
  --accent: #c49a6c;
  
  --font-display: 'Cormorant Garamond', serif;
  --font-sans: 'Manrope', sans-serif;
  
  --size-display: clamp(3rem, 6vw, 6.5rem); 
  --size-h1: clamp(2.5rem, 6vw, 4.5rem);
  --size-h3: clamp(1.75rem, 4vw, 3rem);
  --size-h4: clamp(1.25rem, 2vw, 1.5rem);
  --size-body: clamp(1rem, 1.2vw, 1.125rem);
  
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--size-body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, .heading {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  text-wrap: pretty;
}

p {
  color: var(--text-secondary);
  font-weight: 300;
  text-wrap: pretty;
  margin-bottom: 1.5rem;
}

/* Navbar */
#mynav {
  transition: background-color 300ms var(--ease-in-out), 
              backdrop-filter 300ms var(--ease-in-out),
              padding 300ms var(--ease-in-out);
  padding-top: 1rem;
  padding-bottom: 1rem;
  background-color: rgba(12, 12, 12, 0.95) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(244, 240, 234, 0.05);
}

#mynav.nav-transparent {
  background-color: transparent !important;
  backdrop-filter: none;
  border-bottom: 1px solid transparent;
}

#mynav.nav-colored {
  background-color: rgba(12, 12, 12, 0.85) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(244, 240, 234, 0.05);
}

.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: var(--text-primary) !important;
  max-width: 70vw; /* Prevents the logo from taking up the whole row on mobile */
  transition: opacity 300ms ease;
}

.navbar-brand:hover {
  opacity: 0.8;
}

.navbar-brand img {
  width: 100%;
  height: auto;
  max-width: 280px; 
}

@media (max-width: 576px) {
  .navbar-brand {
    width: 65vw !important; 
  }
}

.nav-link {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary) !important;
  transition: color 250ms ease;
}

.nav-link:hover, .nav-item.active .nav-link {
  color: var(--accent) !important;
}

.navbar-toggler {
  transition: opacity 250ms ease, transform 250ms ease;
}

.navbar-toggler:focus, .navbar-toggler:active {
  box-shadow: none;
  opacity: 0.7;
}

/* Custom Animated Hamburger Menu */
.navbar-toggler {
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 10px;
}

.navbar-toggler span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  transition: all 300ms var(--ease-in-out);
  transform-origin: center;
}

/* Active State (The Cross) */
.navbar-toggler.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.navbar-toggler.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0); /* Shrinks the middle line into nothing */
}

.navbar-toggler.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Sections */
.section {
  padding: 10rem 0; 
  position: relative;
  overflow: hidden;
}

.section h1 { font-size: var(--size-h1); position: relative; z-index: 2; }
.section h2 { font-size: var(--size-display); color: var(--text-primary); }
.section h3 { font-size: var(--size-h3); color: var(--text-primary); position: relative; z-index: 2; }
.section h4 { font-size: var(--size-h4); color: var(--text-primary); }

.bg-light { background-color: var(--bg-surface) !important; }
.section .container { position: relative; z-index: 2; }

/* Buttons */
.btn-light, .btn-dark {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(244, 240, 234, 0.3);
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 1.25rem 3rem !important; 
  transition: all 400ms var(--ease-out);
  position: relative;
  overflow: hidden;
  z-index: 2;
}

@media (hover: hover) and (pointer: fine) {
  .btn-light:hover, .btn-dark:hover {
    background-color: var(--text-primary);
    color: var(--bg-color);
    border-color: var(--text-primary);
    transform: translateY(-2px);
  }
}

/* Carousel (Home Page) */
.carousel-caption { z-index: 10; }
.carousel-caption h1 { font-size: var(--size-display); margin-bottom: 1.5rem; text-transform: capitalize; }
.hero-subtitle {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600; 
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-primary); 
  margin-bottom: 1.5rem;
  display: block;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.carousel-control-prev, .carousel-control-next { width: 15%; min-width: 80px; z-index: 20; }
.carousel-control-prev-icon, .carousel-control-next-icon { width: 3rem; height: 3rem; }

.carousel-indicators { margin-bottom: 2rem; z-index: 20; }
.carousel-indicators [data-bs-target], .carousel-indicators button {
  width: 32px;
  height: 2px;
  background-color: rgba(244, 240, 234, 0.3);
  border: none;
  margin: 0 6px;
  transition: width 400ms var(--ease-out), background-color 400ms var(--ease-out);
  padding: 0;
}
.carousel-indicators .active { width: 64px; background-color: var(--accent); }


/* Carousel Overlays & Gradients */
.hero-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(12, 12, 12, 0.2);
  pointer-events: none;
}

.hero-gradient-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(rgba(12, 12, 12, 0.9), transparent);
  pointer-events: none;
}

.hero-gradient-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(transparent, rgba(12, 12, 12, 1));
  pointer-events: none;
}


/* Mission, Services & Contact Sections */
.mission-section, .contact-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.mission-statement {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.15;
  color: var(--text-primary);
  text-wrap: balance; 
}

.contact-heading {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.service-list-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 3rem 0;
  border-bottom: 1px solid rgba(244, 240, 234, 0.1);
  transition: border-color 400ms var(--ease-out), background-color 400ms var(--ease-out);
  cursor: default;
}

.service-list-item:first-of-type { border-top: 1px solid rgba(244, 240, 234, 0.1); }

@media (min-width: 992px) {
  .service-list-item { grid-template-columns: 80px 1fr 1fr; align-items: center; gap: 2rem; }
}

.service-num { font-family: var(--font-sans); font-size: 0.85rem; color: var(--text-secondary); letter-spacing: 0.15em; transition: color 400ms var(--ease-out); }
.service-title h3 { font-size: clamp(1.75rem, 3vw, 2.5rem); margin-bottom: 0; transition: transform 500ms var(--ease-out), color 400ms var(--ease-out); will-change: transform; }
.service-desc p { color: var(--text-secondary); margin-bottom: 0; font-size: 1.1rem; transition: color 400ms var(--ease-out); }

@media (hover: hover) and (pointer: fine) {
  .service-list-item:hover { border-bottom-color: var(--accent); }
  .service-list-item:hover .service-num { color: var(--accent); }
  .service-list-item:hover .service-title h3 { transform: translateX(15px); color: var(--accent); }
  .service-list-item:hover .service-desc p { color: var(--text-primary); }
}

/* Staggering Service Rows */
.service-list-item:nth-child(1) { transition-delay: 0ms; }
.service-list-item:nth-child(2) { transition-delay: 100ms; }
.service-list-item:nth-child(3) { transition-delay: 150ms; }
.service-list-item:nth-child(4) { transition-delay: 200ms; }
.service-list-item:nth-child(5) { transition-delay: 250ms; }
.service-list-item:nth-child(6) { transition-delay: 300ms; }
.service-list-item:nth-child(7) { transition-delay: 350ms; }

/* Unified Project Hero Wrapper */
.project-hero { padding-top: 8rem; }
.project-title { font-size: var(--size-display); color: var(--text-primary); margin-bottom: 0; }
.editorial-breadcrumb {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.editorial-breadcrumb a { color: var(--text-secondary); text-decoration: none; transition: color 300ms ease; }
.editorial-breadcrumb a:hover { color: var(--text-primary); }
.editorial-breadcrumb .separator { color: rgba(244, 240, 234, 0.2); }

/* Editorial Opening Layout & Narrative */
.editorial-intro {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.4vw, 2.25rem);
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 2.5rem;
}
.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  border-top: 1px solid rgba(244, 240, 234, 0.1);
  padding-top: 2rem;
  margin-top: 2rem;
}
.meta-block { text-align: left; }
.meta-block h4 {
  font-family: var(--font-sans); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-primary); margin-bottom: 0.5rem;
}
.meta-block ul { padding: 0; list-style: none; margin: 0; color: var(--text-secondary); font-size: 0.9rem; }
@media (max-width: 768px) { .meta-grid { grid-template-columns: 1fr; gap: 1.5rem; } }

.narrative-block { padding: 7rem 0; }
.narrative-block p { margin-bottom: 0; font-size: 1.15rem; }
.editorial-chapter {
  font-family: var(--font-sans); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--accent); margin-bottom: 1rem; display: block;
}


/* Editorial Byline (Author attribution for 1st person project narratives) */
.editorial-byline {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-top: 2rem;
  margin-bottom: 2rem;
  border-top: 1px solid rgba(244, 240, 234, 0.1);
}

.editorial-byline img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(244, 240, 234, 0.2);
  filter: grayscale(100%); /* Adds an editorial touch, remove if you prefer full color */
  transition: filter 400ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .editorial-byline:hover img {
    filter: grayscale(0%);
  }
}

.editorial-byline .author-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-primary);
  line-height: 1.1;
  display: block;
  margin-bottom: 0.25rem;
}

.editorial-byline .author-role {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  display: block;
}


/* Portfolio Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0;
}
.filters a {
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.75rem 1.5rem;
  border: 1px solid rgba(244, 240, 234, 0.2);
  border-radius: 0px; 
  transition: border-color 300ms var(--ease-out), background-color 300ms var(--ease-out), color 300ms var(--ease-out), transform 300ms var(--ease-out);
  will-change: transform, background-color;
}
@media (hover: hover) and (pointer: fine) { .filters a:hover { transform: translateY(-2px); } }
.filters a:hover, .filters a.active { color: var(--bg-color); background-color: var(--text-primary); border-color: var(--text-primary); }
.item-hidden { display: none; }

/* Grids & Cards */
.section-other-projects {
  padding: 4rem 0 4rem 0; 
  margin-top: 2rem;
}

.portfolio-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .portfolio-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; } }
@media (min-width: 992px) { .portfolio-grid { grid-template-columns: repeat(3, 1fr); gap: 3rem; } }

.item-wrap {
  display: block; position: relative; overflow: hidden;
  border: 1px solid rgba(244, 240, 234, 0.1);
  transition: border-color 400ms var(--ease-out);
  background-color: var(--bg-color); border-radius: 0px; height: 100%;
}
.item-wrap img { width: 100%; height: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 0px; transition: transform 700ms var(--ease-out); will-change: transform; }

.work-info {
  position: absolute; inset: 0; background: linear-gradient(to top, rgba(12,12,12,0.9) 0%, transparent 50%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 2rem; pointer-events: none;
}
.work-info h3 {
  font-size: clamp(1.25rem, 2vw, 1.75rem); margin-bottom: 0.25rem; color: var(--text-primary);
  text-shadow: 0 2px 4px rgba(0,0,0,0.8); transform: translateY(10px); transition: transform 400ms var(--ease-out);
}
.work-info span {
  font-family: var(--font-sans); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--accent);
  transform: translateY(10px); opacity: 0.8; transition: transform 400ms var(--ease-out), opacity 400ms ease;
}

.img-wrap {
  overflow: hidden; border-radius: 0px; position: relative; background-color: var(--bg-surface); cursor: zoom-in; 
}
.img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; will-change: transform; transition: filter 700ms var(--ease-out); }

@media (hover: hover) and (pointer: fine) {
  .item-wrap:hover { border-color: var(--accent); }
  .item-wrap:hover img { transform: scale(1.05); }
  .item-wrap:hover .work-info h3, .item-wrap:hover .work-info span { transform: translateY(0); }
  .item-wrap:hover .work-info span { opacity: 1; }
  
  .img-wrap::after {
    content: 'View Fullscreen'; position: absolute; inset: 0; background: rgba(12, 12, 12, 0.4); color: var(--text-primary); font-family: var(--font-sans); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 400ms var(--ease-out); pointer-events: none;
  }
  .img-wrap:hover::after { opacity: 1; }
  .img-wrap:hover img { filter: blur(2px); }
}

.view-all-btn {
  display: inline-flex; align-items: center; gap: 0.75rem; font-family: var(--font-sans); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-primary); text-decoration: none; transition: color 300ms var(--ease-out);
}
.view-all-btn svg { width: 20px; height: 20px; transition: transform 400ms var(--ease-out); }
.view-all-btn:hover { color: var(--accent); }
.view-all-btn:hover svg { transform: translateX(6px); }

/* Full-Screen Edge-to-Edge Lightbox */
.custom-lightbox {
  position: fixed; inset: 0; background-color: #0c0c0c; z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 400ms var(--ease-out);
}
.custom-lightbox.active { opacity: 1; pointer-events: auto; }
.lightbox-image-wrapper { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; padding: 0; }
.lightbox-img { position: absolute; width: 100vw; height: 100vh; object-fit: contain; will-change: transform, opacity; }
.lightbox-control-btn { position: absolute; z-index: 30; background: transparent; border: none; color: var(--text-primary); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 1.5rem; transition: color 300ms var(--ease-out); }
.lightbox-control-btn svg { width: 36px; height: 36px; transition: transform 400ms var(--ease-out); will-change: transform; }
.lightbox-control-btn:hover { color: var(--accent); }
.lightbox-control-btn:active svg { transform: scale(0.9); transition: transform 100ms ease; }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-close:hover svg { transform: scale(1.1); }
.lightbox-prev { top: 50%; left: 1rem; transform: translateY(-50%); }
.lightbox-prev:hover svg { transform: translateX(-4px) scale(1.1); }
.lightbox-next { top: 50%; right: 1rem; transform: translateY(-50%); }
.lightbox-next:hover svg { transform: translateX(4px) scale(1.1); }

/* Lightbox Loading Spinner */
.lightbox-loader {
  position: absolute;
  width: 48px;
  height: 48px;
  border: 3px solid rgba(244, 240, 234, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  opacity: 0;
  transition: opacity 300ms ease;
  z-index: 10;
  pointer-events: none;
}
.lightbox-loader.active {
  opacity: 1;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Scroll Reveal Animation */
.fade-up-element, .hero-fade-up {
  opacity: 0; 
  transform: translateY(30px); 
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
  will-change: opacity, transform;
}
.fade-up-element.is-visible, .hero-fade-up.is-visible {
  opacity: 1; transform: translateY(0);
}

/* Unified Footer */
.footer {
  background-color: var(--bg-color) !important;
  border-top: 1px solid rgba(244, 240, 234, 0.1) !important;
  padding: 3rem 0 !important; /* Forces uniform padding everywhere */
  font-size: 0.85rem;
}

/* Light Mode Carousel Hero Text (White Text, Heavy Dark Shadow) */
html[data-theme="light"] .carousel-caption h1 {
  color: #fcfbf9 !important; /* Keeps the text crisp and light */
  text-shadow: 
    0 8px 30px rgba(0, 0, 0, 0.8), 
    0 2px 10px rgba(0, 0, 0, 0.6) !important; /* Double-layered black shadow for maximum contrast */
}
/* Light Mode Carousel Button */
html[data-theme="light"] .carousel-caption .btn-light {
  background-color: #f4f0ea !important;
  color: #0c0c0c !important;
  border: 1px solid #f4f0ea !important;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); /* Soft, luxurious floating shadow */
}

@media (hover: hover) and (pointer: fine) {
  html[data-theme="light"] .carousel-caption .btn-light:hover {
    background-color: #0c0c0c !important;
    color: #f4f0ea !important;
    border-color: #0c0c0c !important;
  }
}



/* Light Mode Carousel Indicators */
html[data-theme="light"] .carousel-indicators button {
  background-color: rgba(12, 12, 12, 0.3) !important;
}

html[data-theme="light"] .carousel-indicators .active {
  background-color: var(--accent) !important;
}


/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fade-up-element, .hero-fade-up, .img-wrap, .item-wrap { opacity: 1 !important; transform: none !important; }
  .img-wrap img, .item-wrap img { transform: none !important; filter: none !important; }
  .img-wrap::after { display: none !important; }
  .work-info h3, .work-info span { transform: none !important; opacity: 1 !important; }
  .lightbox-control-btn svg, .view-all-btn svg, .service-title h3 { transform: none !important; }
}

.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: var(--text-primary) !important;
  width: clamp(180px, 60vw, 340px);
  max-width: 75%;
  display: flex;
  align-items: center;
  padding: 0;
  transition: opacity 300ms ease;
}

.navbar-brand img {
  width: 100%;
  height: auto;
  max-width: 280px; 
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 3rem; /* Prevents the fixed navbar from covering the section titles */
}
/* =========================================
   DAY / NIGHT THEME TOGGLE
   ========================================= */

/* (Keep your existing .theme-toggle, .mode-label, .toggle-track etc. above this) */

/* 1. Crisp, Modern Gallery Palette */
html[data-theme="light"] {
  --bg-color: #fcfbf9;      /* Crisp, gallery-style paper white */
  --bg-surface: #f3f1ec;    /* Subtle contrasting neutral for sections */
  --text-primary: #121212;  /* Stark, modern near-black */
  --text-secondary: #7a7874;/* Sleeker mid-grey for typography hierarchy */
  --accent: #bd8f58;        /* A refined, desaturated architectural gold */
}

/* 2. Constant Frosted Tint on Navbar */
html[data-theme="light"] #mynav.nav-transparent,
html[data-theme="light"] #mynav.nav-colored {
  background-color: rgba(252, 251, 249, 0.85) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(18, 18, 18, 0.05);
}

html[data-theme="light"] .navbar-toggler span { background-color: var(--text-primary); }
html[data-theme="light"] .editorial-byline img { border-color: rgba(18, 18, 18, 0.1); }
html[data-theme="light"] .filters a { border-color: rgba(18, 18, 18, 0.1); }
html[data-theme="light"] .toggle-track { background-color: rgba(18, 18, 18, 0.1); border-color: rgba(18, 18, 18, 0.1); }
html[data-theme="light"] .theme-toggle.light-active .toggle-indicator { transform: translateX(20px); background-color: var(--text-primary); }
html[data-theme="light"] .btn-dark { border-color: var(--text-primary); }

@media (hover: hover) and (pointer: fine) {
  html[data-theme="light"] .btn-dark:hover {
    background-color: var(--text-primary);
    color: var(--bg-color);
  }
}

/* 3. Carousel Fades & Overlays */
html[data-theme="light"] .hero-overlay {
  background-color: transparent !important; /* Keep photos 100% clear */
}

html[data-theme="light"] .hero-gradient-top {
  display: none !important; /* Kills the top fade completely */
}

html[data-theme="light"] .hero-gradient-bottom {
  display: none !important; /* Kills the bottom fade completely */
}



html[data-theme="light"] .carousel-caption .btn-light {
  background-color: #fcfbf9 !important;
  color: #121212 !important;
  border: 1px solid #fcfbf9 !important;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); 
}

@media (hover: hover) and (pointer: fine) {
  html[data-theme="light"] .carousel-caption .btn-light:hover {
    background-color: #121212 !important;
    color: #fcfbf9 !important;
    border-color: #121212 !important;
  }
}



/* Light Mode Carousel Indicators */
html[data-theme="light"] .carousel-indicators button {
  background-color: #fff !important;
}

html[data-theme="light"] .carousel-indicators .active {
  background-color: var(--accent) !important;
}


/* =========================================
   DAY / NIGHT THEME TOGGLE (Awwwards Style)
   ========================================= */

.theme-toggle {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center;
  gap: 1rem; /* Slightly wider gap for breathing room */
  cursor: pointer;
  user-select: none;
  padding: 0.5rem; /* Better tap target for mobile */
}

.mode-label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  transition: color 400ms var(--ease-out);
}

.mode-label.active {
  color: var(--text-primary);
  font-weight: 600;
}

/* Elegant Hollow Track */
.toggle-track {
  display: block !important;
  width: 46px;
  height: 22px;
  background-color: transparent !important; 
  border-radius: 20px;
  position: relative;
  border: 1px solid rgba(244, 240, 234, 0.3);
  transition: border-color 400ms var(--ease-out);
}

/* High-Contrast Snapping Dot */
.toggle-indicator {
  width: 14px;
  height: 14px;
  background-color: var(--text-primary);
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  /* Custom spring curve for a luxurious snap */
  transition: transform 0.5s cubic-bezier(0.85, 0.05, 0.18, 1.35), background-color 400ms ease; 
  will-change: transform;
}

/* Hover Interaction */
@media (hover: hover) and (pointer: fine) {
  .theme-toggle:hover .toggle-track {
    border-color: var(--text-primary);
  }
}

/* =========================================
   DAY MODE GLOBAL FIXES
   ========================================= */

/* 1. Force ALL Navbars to Light Mode (Fixes Project Pages) */
html[data-theme="light"] #mynav {
  background-color: rgba(252, 251, 249, 0.95) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(18, 18, 18, 0.05);
}

/* 2. Restore "All Projects" Button Outline */
html[data-theme="light"] .btn-light {
  color: var(--text-primary);
  border-color: rgba(18, 18, 18, 0.2) !important; /* Replaces the invisible white line */
}

@media (hover: hover) and (pointer: fine) {
  html[data-theme="light"] .btn-light:hover {
    background-color: var(--text-primary);
    color: var(--bg-color);
  }
}

/* 3. Darken "End of Project" Lines */
html[data-theme="light"] span[style*="background: rgba(244, 240, 234, 0.1)"] {
  background: rgba(18, 18, 18, 0.15) !important;
}

/* 4. Project Grid & Headings (Awwwards Gallery Style - No Fade) */

/* Fix the invisible "Continue Browsing" heading */
html[data-theme="light"] .section-other-projects .text-white,
html[data-theme="light"] .narrative-block .text-white {
  color: var(--text-primary) !important;
}


/* Remove the card borders, stack the content, and kill default link underlines */
html[data-theme="light"] .item-wrap,
html[data-theme="light"] .item-wrap:hover,
html[data-theme="light"] .item-wrap:focus {
  border: none !important;
  background: transparent !important;
  display: flex;
  flex-direction: column;
  text-decoration: none !important; /* Kills the blue browser underlines */
}

/* 5. Custom Gold Hover Underlines (Awwwards Style) */
html[data-theme="light"] .item-wrap h3,
html[data-theme="light"] .item-wrap span {
  text-decoration: underline;
  text-decoration-color: transparent !important;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px; /* Pushes the line down so it doesn't cross out letters like 'p' and 'y' */
  transition: text-decoration-color 400ms var(--ease-out), color 400ms var(--ease-out) !important;
}

@media (hover: hover) and (pointer: fine) {
  html[data-theme="light"] .item-wrap:hover h3,
  html[data-theme="light"] .item-wrap:hover span {
    text-decoration-color: var(--accent) !important; /* Fades in the gold */
  }
}

/* Keep the image crisp and uncompromised */
html[data-theme="light"] .item-wrap img {
  height: auto !important; 
  aspect-ratio: 4 / 5;
}

/* Move the text block completely below the image and remove the fade */
html[data-theme="light"] .work-info {
  position: relative !important;
  background: none !important; /* Eliminates the fade completely */
  padding: 1.25rem 0 0 0 !important; /* Adds breathing room below the photo */
  pointer-events: auto !important;
}

/* Reset the text to be stark, clean, and permanently visible */
html[data-theme="light"] .work-info h3 {
  text-shadow: none !important;
  color: var(--text-primary) !important;
  transform: translateY(0) !important; /* Disables the hover slide-up */
}

html[data-theme="light"] .work-info span {
  opacity: 1 !important;
  transform: translateY(0) !important; /* Disables the hover slide-up */
}

/* 6. Fix "View Fullscreen" Hover State */
html[data-theme="light"] .img-wrap::after {
  color: #fcfbf9 !important; /* Forces the text to stay crisp white */
  background: rgba(18, 18, 18, 0.4) !important; /* Keeps the dark translucent overlay so the white text pops */
}

/* 7. Force Lightbox Background to Cream (Overrides the black default) */
html[data-theme="light"] .custom-lightbox {
  background-color: rgba(252, 251, 249, 0.98) !important; /* Crisp, frosted paper-white */
}

/* Ensure Lightbox controls and indicators flip to dark so they are visible against the cream */
html[data-theme="light"] .lightbox-control-btn {
  color: var(--text-primary) !important; 
}

html[data-theme="light"] .lightbox-loader {
  border: 3px solid rgba(18, 18, 18, 0.1) !important;
  border-top-color: var(--accent) !important;
}

/* -----------------------------------------
   Light Theme Toggle Overrides
----------------------------------------- */
html[data-theme="light"] .toggle-track {
  border-color: rgba(18, 18, 18, 0.3);
}

html[data-theme="light"] .theme-toggle:hover .toggle-track {
  border-color: var(--text-primary);
}

/* Snaps the dot exactly to the other side */
html[data-theme="light"] .theme-toggle.light-active .toggle-indicator {
  transform: translateX(24px); 
  background-color: var(--text-primary);
}

/* =========================================
   MOBILE LAYOUT FIXES (Phones & Small Tablets) 
   ========================================= */
@media (max-width: 768px) {
  
  /* Bulletproof Mobile Navbar & Logo Sizing */
  #mynav {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }
  
  .navbar-brand {
    width: 60vw !important; /* Forces uniform width across all pages */
    max-width: 220px !important; /* Prevents the index.html logo from looking larger */
  }

  /* Projects Page: More space above the header */
  #portfolio.section {
    padding-top: 5rem !important; 
  }

/* Projects Grid: Force 1 column on mobile and make images square */
  .portfolio-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important; /* Slightly larger gap since they are stacked */
  }
  
  /* Force images to be perfect squares on mobile */
  .item-wrap img {
    aspect-ratio: 1 / 1 !important; 
  }
  
  /* Adjust text padding for the larger full-width cards */
  .work-info {
    padding: 1.5rem !important;
  }
  .work-info h3 {
    font-size: 1.5rem !important; /* Bumped back up since card is wider */
  }
  .work-info span {
    font-size: 0.85rem !important;
  }

  /* Filter Tabs: Fit on one line */
  .filters {
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    gap: 0.25rem !important;
    width: 100%;
  }
  
  .filters a {
    padding: 0.5rem 0.35rem !important;
    font-size: 0.65rem !important;
    letter-spacing: 0px !important;
    text-align: center;
    flex: 1; 
    white-space: nowrap; 
  }

  /* Reduce massive section spacing & ends globally */
  .section {
    padding: 4rem 0 !important; 
  }
  
  .project-hero {
    padding-top: 6.5rem !important; 
    padding-bottom: 2rem !important;
  }
  
  .narrative-block {
    padding: 3rem 0 !important; 
  }
  
  .section-other-projects {
    padding: 4rem 0 2rem 0 !important; 
    margin-top: 2rem !important;
  }
  
  .narrative-block .mb-5, 
  .narrative-block .pb-lg-4 {
    margin-bottom: 2rem !important;
  }
  .narrative-block .mt-5,
  .narrative-block .mt-4 {
    margin-top: 2rem !important;
  }

  .mission-section, 
  .contact-section {
    min-height: 50vh !important; 
  }
  
  /* Lift the hero content to prevent button cut-off */
  .carousel-caption {
    transform: translateY(-8vh);
  }
  
  .carousel-caption p.mt-5 {
    margin-top: 1.5rem !important;
  }

/* Keep all buttons on one line */
  .btn-light, 
  .btn-dark {
    padding: 1rem 1.5rem !important; 
    font-size: 0.75rem !important; 
    white-space: nowrap !important; 
  }

  /* Move carousel arrows closer to the edges */
  .carousel-control-prev, 
  .carousel-control-next {
    width: 10% !important; /* Reduces the hit-area width */
    min-width: 40px !important; /* Overrides the 80px desktop minimum */
  }
  
  /* Shrinks the actual arrow icons slightly so they fit better on mobile */
  .carousel-control-prev-icon, 
  .carousel-control-next-icon {
    width: 2rem !important;
    height: 2rem !important;
  }

  /* Force Carousel H1 to stay on a single line and shrink appropriately */
  .carousel-caption h1 {
    font-size: clamp(2.3rem, 7vw, 2.5rem) !important;
    white-space: nowrap !important;
  }

  /* Move Lightbox arrows closer to the edges on mobile */
  .lightbox-prev {
    left: 0.25rem !important;
  }
  .lightbox-next {
    right: 0.25rem !important;
  }
  
  /* Make the Lightbox tap targets slightly smaller on mobile to prevent overlapping */
  .lightbox-control-btn {
    padding: 1rem !important; 
  }
  .lightbox-control-btn svg {
    width: 28px !important;
    height: 28px !important;
  }




}