/* Organized and cleaned CSS */

/* Root variables */
:root {
  --colorPrimaryNormal: #00b3bb;
  --colorPrimaryDark: #00979f;
  --colorPrimaryGlare: #00cdd7;
  --colorPrimaryHalf: #80d9dd;
  --colorPrimaryQuarter: #bfecee;
  --colorPrimaryEighth: #dff5f7;
  --colorPrimaryPale: #f3f5f7;
  --colorPrimarySeparator: #f3f5f7;
  --colorPrimaryOutline: #dff5f7;
  --colorButtonNormal: #00b3bb;
  --colorButtonHover: #00cdd7;
  --colorLinkNormal: #00979f;
  --colorLinkHover: #00cdd7;
}

/* Body and basic layout */
body {
 font-family: 'Georgia', 'Times New Roman', serif;
  margin: 24px;
  color: #e0e0e0;
  padding-left: 0 !important;
  padding-right: 0 !important;
 padding-top: 110px;     
}

.inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* Articles and headings */
article {
  font-family: 'Playfair Display', serif;
  background: #2e3141;
  border-radius: 12px;
  padding: 2em;
  margin: 2em 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

h1, h2 {
  color: #D2691E;
}

a {
  color: #4ac1b8;
  text-decoration: none;
}
h1.major, h2.major, h3.major {
  font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: #D2691E;  /* Warm wood orange */
    letter-spacing: 1px;
    margin-bottom: 1em;
}
/* Header and navigation */
#header {
    background: rgba(30, 31, 38, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.8em 0;               /* Increase vertical padding for taller bar */
    min-height: 300px;               /* Force minimum height to cover pills */
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: fixed;                /* If you want it to stay on scroll */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
}

#header.scrolled {
  background: rgba(30, 31, 38, 0.95);
}

#header .inner.container {
    display: flex;
    background: transparent;        /* No background on inner — let header show through */
    align-items: center;
    justify-content: flex-start !important;  /* Force left */
    gap: 1em;                                /* Tight gap between logo and nav */
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 3em 0 0.5em !important;       /* Minimal left, room right */
    box-sizing: border-box;
}

.logo {
 margin: 0;
    font-size: 1.8em;
    flex-shrink: 0;
}

.logo a {
  display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.2em;
flex-wrap: wrap;                /* Wrap if too many */
    margin: 0 !important; 
}
.logo img {
    height: 40px;  /* Adjust size — e.g., 40-60px for header */
    width: auto;   /* Maintains aspect ratio */
    display: block;
}

.logo span {
    margin-left: 0.8em;
    font-size: 1.4em;  /* Text size if using both */
    color: #44475f;
}

.main-nav ul {
  display: flex;
  gap: 2em;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav a {
  color: #e0e0e0;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1em;
  padding: 0.5em 0;
  transition: color 0.3s;
}

.main-nav a:hover, .main-nav a.active {
  color: #4ac1b8;
}

/* Override .link-pill margins/padding when in main nav */
.main-nav .link-pill {
    margin: 0 !important;           /* Remove individual margins */
    padding: 0.6em 1.2em !important;
}

.mobile-toggle {
  margin-left: auto;
  display: none;
}

.mobile-toggle a {
  color: white;
  font-size: 2em;
  padding: 0.5em;
}

/* Hamburger icon */
#header nav a[href="#menu"]::before,
#header nav a[href="#menu"]::after {
  display: none !important;
  content: none !important;
}

#header nav a[href="#menu"] i {
  margin-right: 0.8em;
  font-size: 1.4em;
  vertical-align: middle;
  color: #ffffff;
}

#header nav a[href="#menu"] {
  background: #383b50;
  padding: 0.6em 1.4em;
  border-radius: 30px;
  backdrop-filter: blur(5px);
  transition: background 0.3s ease;
}

#header nav a[href="#menu"]:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Link bar and pills */
.link-bar {
  margin: 2em auto;
  padding: 0.8em 1em;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
  scrollbar-width: thin;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  display: flex;
  justify-content: center;
  gap: 0.8em;
}

.link-bar::-webkit-scrollbar {
  height: 6px;
}

.link-bar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.3);
  border-radius: 3px;
}

.link-pill {
  flex: 0 0 auto;
  display: inline-block;
  padding: 0.5em 1em;
  margin: 0;
  font-size: 0.9em;
  border-radius: 20px;
  white-space: nowrap;
  background: #383b50;
  color: #e0e0e0;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);

}

.link-pill:hover {
  background: #44475f;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.link-pill.primary {
  background: linear-gradient(to bottom, #4ac1b8, #3a9e96);
  color: white;
  box-shadow: 0 6px 20px rgba(74, 193, 184, 0.4);
}

.link-pill.primary:hover {
  background: linear-gradient(to bottom, #5ad0c7, #45b0a8);
  box-shadow: 0 10px 30px rgba(74, 193, 184, 0.6);
}

/* Buttons */
button,
input[type="submit"],
input[type="button"],
a.button,
.btn {
  background: #3f4259;
  color: #e0e0e0;
  border: none;
  border-radius: 8px;
  padding: 0.8em 1.8em;
  font-size: 1em;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

button.primary,
input[type="submit"],
a.button.primary,
.btn-primary {
  background: linear-gradient(to bottom, #4ac1b8, #3a9e96);
  color: white;
  box-shadow: 0 6px 20px rgba(74, 193, 184, 0.4);
}

button.collapsible {
  background: linear-gradient(to bottom, #44475f, #383b50);
  color: #e0e0e0;
  border: none;
  border-radius: 8px;
  padding: 0.8em 1.4em;
  font-size: 1em;
  font-weight: 500;
  width: 100%;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
  margin-bottom: 0.5em;
}

button.collapsible:hover {
  background: linear-gradient(to bottom, #50536b, #44475f);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

button.collapsible::after {
  content: ' ▼';
  float: right;
  transition: transform 0.3s ease;
}

button.collapsible.active::after {
  transform: rotate(180deg);
}

/* Dropdowns */
select {
  background: #3f4259;
  color: #e0e0e0;
  border: 1px solid #4a4e69;
  border-radius: 8px;
  padding: 0.8em 1.2em;
  font-size: 1em;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path fill="%23888888" d="M1 1l5 5 5-5"/></svg>');
  background-repeat: no-repeat;
  background-position: right 1em center;
  cursor: pointer;
  transition: all 0.3s ease;
}

select:hover {
  background-color: #4a4e69;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

select:focus {
  outline: none;
  border-color: #4ac1b8;
  box-shadow: 0 0 0 3px rgba(74, 193, 184, 0.3);
}

select option {
  background: #2e3141;
  color: #e0e0e0;
}

.dropdown-toggle {
  background: #3f4259 !important;
  color: #e0e0e0 !important;
  border: 1px solid #4a4e69;
  border-radius: 8px;
  padding: 0.8em 1.2em;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.dropdown-toggle:hover, .dropdown-toggle:focus {
  background: #4a4e69 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.dropdown-menu {
  background: #2e3141;
  border: 1px solid #4a4e69;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  margin-top: 0.5em;
}

.dropdown-item {
  color: #e0e0e0;
  padding: 0.8em 1.2em;
}

.dropdown-item:hover {
  background: #383b50;
}

/* Links */
a {
  color: #4ac1b8;
  text-decoration: none;
  padding: 0.2em 0.6em;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 500;
}

a:hover {
  background: rgba(74, 193, 184, 0.2);
  box-shadow: 0 2px 8px rgba(74, 193, 184, 0.3);
  transform: translateY(-1px);
}

a.standalone, .link-styled {
  display: inline-block;
  background: #383b50;
  color: #e0e0e0;
  padding: 0.6em 1.4em;
  margin: 0.4em 0;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

a.standalone:hover, .link-styled:hover {
  background: #44475f;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.link-styled.primary {
  background: linear-gradient(to bottom, #4ac1b8, #3a9e96);
  color: white;
  box-shadow: 0 6px 20px rgba(74, 193, 184, 0.4);
}

.link-styled.primary:hover {
  background: linear-gradient(to bottom, #5ad0c7, #45b0a8);
}

/* Collapsible and content */
.active, .collapsible:hover {
  background-color: #555;
}

.content {
  padding: 0 18px;
  display: none;
  overflow: hidden;
  background-color: #2e3141;
}

/* Upload styles */
.upload_dropZone {
  text-align: center;
  color: #0f3c4b;
  background-color: var(--colorPrimaryPale, #c8dadf);
  outline: 2px dashed var(--colorPrimaryHalf, #c1ddef);
  outline-offset: -12px;
  transition: outline-offset 0.2s ease-out, outline-color 0.3s ease-in-out, background-color 0.2s ease-out;
}

.upload_dropZone.highlight {
  outline-offset: -4px;
  outline-color: var(--colorPrimaryNormal, #0576bd);
  background-color: var(--colorPrimaryEighth, #c8dadf);
}

.upload_svg {
  fill: var(--colorPrimaryNormal, #0576bd);
}

.btn-upload {
  color: #fff;
  background-color: var(--colorPrimaryNormal);
}

.btn-upload:hover, .btn-upload:focus {
  color: #fff;
  background-color: var(--colorPrimaryGlare);
}

.upload_img {
  width: calc(33.333% - (2rem / 3));
  object-fit: contain;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: #2e3141;
}

.modal-content {
  position: relative;
  background-color: #fefefe;
  margin: auto;
  padding: 0;
  border: 1px solid #888;
  width: 80%;
  box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
  animation-name: animatetop;
  animation-duration: 0.4s;
}

@-webkit-keyframes animatetop {
  from {top:-300px; opacity:0} 
  to {top:0; opacity:1}
}

@keyframes animatetop {
  from {top:-300px; opacity:0}
  to {top:0; opacity:1}
}

.close {
  color: white;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover, .close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}
.modal {
    padding-top: 300px !important;  /* Clears fixed header height */
}

.modal-dialog {
    max-width: 900px;   /* Your ideal width */
    margin: 1.75rem auto;
}
.modal-header, .modal-footer {
    padding: 1.5rem;
    border-bottom: none;
    position: relative;
    z-index: 10;  /* Ensures close button is on top */
  background-color: #3f4259;
}
.carousel-item {
  background-color: #3f4259;
}
.modal-body {
  padding: 2px 16px;
  background-color: #3f4259;
}

model-viewer {
  width: 480px;
  height: 480px;
}

.hide {
  position:absolute; 
  top:-1px; 
  left:-1px; 
  width:1px; 
  height:1px; 
}

/* Prevent content under header */
#wrapper, #main {
  padding-top: 80px;
}

/* Image pointers */
.img, .img-sm, .img-md, .img-lg, .box-comments .box-comment img, .user-block.user-block-sm img {
  pointer-events: none;
}

.img-sm, .box-comments .box-comment img, .user-block.user-block-sm img {
  float: left;
  width: 30px !important;
  height: 30px !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  #header .inner.container {
    padding: 0 1em;
    justify-content: center;
  }
  
  .logo {
    font-size: 1.6em;
  }
  
  .main-nav {
    display: none;
  }
  
  .mobile-toggle {
    display: block;
  }
}

/* Restore vertical mobile menu - overrides desktop flex */
#menu .inner ul {
    display: block !important;   /* Force block instead of flex */
    margin: 1em 0;
    padding: 0;
}

#menu .inner li {
    display: block;
    margin: 0.5em 0;
}

#menu .inner a {
    display: block;
    padding: 1em 1.5em;
    background: #383b50;
    color: #e0e0e0;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    transition: background 0.3s ease;
}

#menu .inner a:hover {
    background: #44475f;
    color: #4ac1b8;
}

@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: none;
        width: calc(100% - 1rem);
    }
    
    model-viewer {
        height: 50vh !important;
    }
}
/* Custom gallery modal - ideal size and responsive */
.custom-gallery-modal {
    max-width: 90vw;           /* Never wider than 90% of screen */
    width: 800px;              /* Ideal max width on large screens */
    margin: 0 auto;
}

/* On medium screens (tablets) */
@media (max-width: 992px) {
    .custom-gallery-modal {
        width: 95vw;
        max-width: none;
    }
}

/* On small screens (phones) */
@media (max-width: 576px) {
    .custom-gallery-modal {
        width: 98vw;
        max-width: none;
        margin: 0.5rem;
    }
    
    .carousel-inner img,
    model-viewer {
        height: 60vh !important;
        object-fit: contain;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 10%;
    }
}

/* Ensure modal is perfectly centered vertically + horizontally */
.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

/* Extra breathing room inside modal */
.modal-content {
    border-radius: 12px;
    overflow: hidden;
}

.modal-body {
    padding: 0;
}

/* Zoom on carousel images */
.carousel-inner .carousel-item {
    background: #1e1f26;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;               /* Contain zoom */
}

.carousel-inner img {
    max-height: 75vh;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    cursor: zoom-in;
    touch-action: pinch-zoom pan-x pan-y;  /* Enable native pinch on mobile */
}

/* Hover zoom on desktop */
.carousel-inner img:hover {
    transform: scale(1.35);         /* Smooth 15% zoom */
}

/* Optional: Stronger zoom on click (toggle) */
.carousel-inner img.zoomed {
    transform: scale(2);            /* Double size on click */
    cursor: zoom-out;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-image: none !important;  /* Remove default (sometimes broken) */
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    position: relative;
}

.carousel-control-prev-icon::after,
.carousel-control-next-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    border: solid white;
    border-width: 3px 3px 0 0;
    transform: translate(-50%, -50%) rotate(45deg);
}

.carousel-control-prev-icon::after {
    transform: translate(-50%, -50%) rotate(-135deg);  /* Left arrow */
}

.carousel-control-next-icon::after {
    transform: translate(-50%, -50%) rotate(45deg);   /* Right arrow */
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    opacity: 0.8;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
    background-color: rgba(74, 193, 184, 0.3);  /* Teal tint on hover */
}

.btn-close-custom {
    background:  linear-gradient(to bottom, #50536b, #44475f);
    border: none;
    color: #1e1f26;
    opacity: 0.8;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    z-index: 10;
}

.btn-close-custom:hover {
    opacity: 1;
    color: #4ac1b8;
}
.card-img-top {
    transition: transform 0.4s ease;
    cursor: zoom-in;
    object-fit: cover;
}

.card-img-top:hover {
    transform: scale(1.1);  /* Smooth 10% zoom on hover */
}

.bit-detail article,
.project-detail article {  /* or whatever class you use */
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 1em !important;
    box-sizing: border-box;
}

/* Auto-correct thumbnail rotation based on common EXIF orientations */
.thumbnail-auto-rotate {
    display: block;
    max-width: 100%;
    height: auto;
}

/* 90 degrees clockwise (common for portrait photos) */
.thumbnail-auto-rotate[data-orientation="6"],
.thumbnail-auto-rotate[data-orientation="8"] {
    transform: rotate(90deg);
}

/* 180 degrees */
.thumbnail-auto-rotate[data-orientation="3"] {
    transform: rotate(180deg);
}

/* 270 degrees clockwise */
.thumbnail-auto-rotate[data-orientation="8"] {
    transform: rotate(-90deg);
}

/* Fix aspect ratio after rotation */
.thumbnail-auto-rotate.rotated-90,
.thumbnail-auto-rotate.rotated-270 {
    width: auto;
    height: 100%;
    object-fit: contain;
}