/* Chart images for modal/project visuals */
.chart-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  display: block;
  margin: 0.5em auto;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: #181818;
  box-shadow: 0 2px 8px #0002;
}
/* Chart images for modal/project visuals */
.chart-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  display: block;
  margin: 0.5em auto;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: #181818;
  box-shadow: 0 2px 8px #0002;
}
.project-modal .modal-page h5,
.modal-page h5 {
  color: var(--orange-yellow-crayola) !important;
  font-weight: bold;
  margin-bottom: 0.5em;
}
/* Make the Mister project calculation link yellow in the project modal */
/* Ensure the mister calculation link and its states are yellow in the project modal */
.project-modal .mister-calculation-link,
.project-modal .mister-calculation-link:visited,
.project-modal .mister-calculation-link:active,
.project-modal .mister-calculation-link:hover,
.project-modal .mister-calculation-link:focus {
  color: #FFD600 !important;
  font-weight: bold;
  text-decoration: underline;
}
/* Prevent layout shift when scrollbar appears/disappears */
html {
  overflow-y: scroll;
}

body {
  /* Optionally, ensure body always takes full width minus scrollbar */
  width: 100vw;
  box-sizing: border-box;
}
/* Custom button style for Project and Resume sections */
.btn {
  padding: 16px 32px; /* 16px top/bottom for height, 32px left/right for width */
  font-size: 1.1rem;
  min-height: 48px;
  border-radius: 8px;
  background: var(--orange-yellow-crayola, #ffd600);
  color: #181818;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover,
.btn:focus {
  background: #ffe066;
}
a, a:hover, a:focus, a:active,
.contact-link, .social-link, .mister-link {
  cursor: pointer !important;
}

/* Ensure modal images inside <a> are styled like other modal images */
.project-modal .image-row a {
  display: inline-block;
  background: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 0.5em 0.5em 0 !important;
}
.project-modal .image-row a img.project-img {
  width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: none !important;
  display: block !important;
}
/*-----------------------------------*\
  #style.css
\*-----------------------------------*/


/**
 * copyright 2022 @codewithsadee
 */





/*-----------------------------------*\
  #CUSTOM PROPERTY
\*-----------------------------------*/

:root {

  /**
   * colors
   */

  /* gradient */

  --bg-gradient-onyx: linear-gradient(
    to bottom right, 
    hsl(240, 1%, 25%) 3%, 
    hsl(0, 0%, 19%) 97%
  );
  --bg-gradient-jet: linear-gradient(
    to bottom right, 
    hsla(240, 1%, 18%, 0.251) 0%, 
    hsla(240, 2%, 11%, 0) 100%
  ), hsl(240, 2%, 13%);
  --bg-gradient-yellow-1: linear-gradient(
    to bottom right, 
    hsl(45, 100%, 71%) 0%, 
    hsla(36, 100%, 69%, 0) 50%
  );
  --bg-gradient-yellow-2: linear-gradient(
    135deg, 
    hsla(45, 100%, 71%, 0.251) 0%, 
    hsla(35, 100%, 68%, 0) 59.86%
  ), hsl(240, 2%, 13%);
  --border-gradient-onyx: linear-gradient(
    to bottom right, 
    hsl(0, 0%, 25%) 0%, 
    hsla(0, 0%, 25%, 0) 50%
  );
  --text-gradient-yellow: linear-gradient(
    to right, 
    hsl(45, 100%, 72%), 
    hsl(35, 100%, 68%)
  );

  /* solid */

  --jet: hsl(0, 0%, 22%);
  --onyx: hsl(240, 1%, 17%);
  --eerie-black-1: hsl(240, 2%, 13%);
  --eerie-black-2: hsl(240, 2%, 12%);
  --smoky-black: hsl(0, 0%, 7%);
  --white-1: hsl(0, 0%, 100%);
  --white-2: hsl(0, 0%, 98%);
  --orange-yellow-crayola: hsl(45, 100%, 72%);
  --vegas-gold: hsl(45, 54%, 58%);
  --light-gray: hsl(0, 0%, 84%);
  --light-gray-70: hsla(0, 0%, 84%, 0.7);
  --bittersweet-shimmer: hsl(0, 43%, 51%);

  /**
   * typography
   */

  /* font-family */
  --ff-poppins: 'Poppins', sans-serif;

  /* font-size */
  --fs-1: 24px;
  --fs-2: 18px;
  --fs-3: 17px;
  --fs-4: 16px;
  --fs-5: 15px;
  --fs-6: 14px;
  --fs-7: 13px;
  --fs-8: 11px;

  /* font-weight */
  --fw-300: 300;
  --fw-400: 400;
  --fw-500: 500;
  --fw-600: 600;

  /**
   * shadow
   */
  
  --shadow-1: -4px 8px 24px hsla(0, 0%, 0%, 0.25);
  --shadow-2: 0 16px 30px hsla(0, 0%, 0%, 0.25);
  --shadow-3: 0 16px 40px hsla(0, 0%, 0%, 0.25);
  --shadow-4: 0 25px 50px hsla(0, 0%, 0%, 0.15);
  --shadow-5: 0 24px 80px hsla(0, 0%, 0%, 0.25);

  /**
   * transition
   */

  --transition-1: 0.25s ease;
  --transition-2: 0.5s ease-in-out;

}





/*-----------------------------------*\
  #RESET
\*-----------------------------------*/

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

a { text-decoration: none; }

li { list-style: none; }

img, ion-icon, a, button, time, span { display: block; }

button {
  font: inherit;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
}

input, textarea {
  display: block;
  width: 100%;
  background: none;
  font: inherit;
}

::selection {
  background: var(--orange-yellow-crayola);
  color: var(--smoky-black);
}

:focus { outline-color: var(--orange-yellow-crayola); }

html { font-family: var(--ff-poppins); }

body { background: var(--smoky-black); transition: background 0.3s, color 0.3s; }

body.light-theme {
  background: var(--white-2);
  color: var(--smoky-black);
}


.light-theme .sidebar,
.light-theme article {
  background: var(--white-1);
  color: var(--smoky-black);
  border: 1px solid var(--light-gray);
}

/* Sidebar avatar and name */
.light-theme .sidebar-info .name {
  color: var(--smoky-black) !important;
}
.light-theme .sidebar-info .title {
  background: #222;
  color: var(--orange-yellow-crayola) !important;
  border-radius: 1em;
  padding: 0.2em 0.8em;
  display: inline-block;
  font-weight: 500;
}
.light-theme .sidebar-info .contact-link,
.light-theme .sidebar-info .contact-title {
  color: var(--smoky-black) !important;
}
.light-theme .sidebar-info .icon-box {
  background: var(--light-gray) !important;
  color: var(--orange-yellow-crayola) !important;
  box-shadow: var(--shadow-1);
}
.light-theme .sidebar-info .icon-box ion-icon {
  color: var(--orange-yellow-crayola) !important;
}

/* Service/What I'm Doing section */
.light-theme .service-item {
  background: var(--light-gray) !important;
  color: var(--smoky-black) !important;
  box-shadow: var(--shadow-2);
}
.light-theme .service-item .service-item-title {
  color: var(--smoky-black) !important;
}
.light-theme .service-item .service-item-text {
  color: var(--onyx) !important;
}
.light-theme .service-icon-box {
  background: var(--white-2) !important;
  color: var(--orange-yellow-crayola) !important;
  box-shadow: var(--shadow-1);
}
.light-theme .service-icon-box ion-icon {
  color: var(--orange-yellow-crayola) !important;
}

/* Recommendations/testimonials cards */
.light-theme .content-card {
  background: var(--light-gray) !important;
  color: var(--smoky-black) !important;
  box-shadow: var(--shadow-2);
}
.light-theme .testimonials-avatar-box {
  background: var(--white-2) !important;
}
.light-theme .testimonials-item-title {
  color: var(--smoky-black) !important;
}
.light-theme .testimonials-text {
  color: var(--onyx) !important;
}

/* Project filter and cards */
.light-theme .filter-btn,
.light-theme .filter-select,
.light-theme .select-list,
.light-theme .project-card {
  background: var(--white-1) !important;
  color: var(--smoky-black) !important;
  box-shadow: var(--shadow-2);
}
.light-theme .filter-btn.active,
.light-theme .filter-btn:focus {
  background: var(--orange-yellow-crayola) !important;
  color: var(--smoky-black) !important;
}
.light-theme .project-category {
  color: var(--onyx) !important;
}
.light-theme .project-title {
  color: var(--smoky-black) !important;
}
.light-theme .project-overlay {
  background: rgba(0,0,0,0.05) !important;
}

/* Timeline/Resume */
.light-theme .timeline-item-title,
.light-theme .timeline-text,
.light-theme .timeline-list span,
.light-theme .timeline-list li {
  color: var(--smoky-black) !important;
}
.light-theme .timeline-list .icon-box {
  background: var(--light-gray) !important;
  color: var(--orange-yellow-crayola) !important;
}

/* Skills section */
.light-theme .skills-title,
.light-theme .skills-list span {
  color: var(--smoky-black) !important;
}
.light-theme .skills-list span {
  background: var(--light-gray) !important;
  color: var(--onyx) !important;
}

/* General fixes for light theme */
.light-theme .h2,
.light-theme .h3,
.light-theme .h4,
.light-theme .h5 {
  color: var(--smoky-black) !important;
}
.light-theme .article-title::after {
  background: var(--orange-yellow-crayola) !important;
}

.light-theme .h2,
.light-theme .h3,
.light-theme .h4,
.light-theme .h5 {
  color: var(--smoky-black);
}

.theme-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5em;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.theme-toggle-btn:hover {
  background: var(--light-gray-70);
}
.theme-toggle-btn ion-icon {
  font-size: 1.6em;
  color: var(--orange-yellow-crayola);
  pointer-events: none;
}





/*-----------------------------------*\
  #REUSED STYLE
\*-----------------------------------*/

.sidebar,
article {
  background: var(--eerie-black-2);
  border: 1px solid var(--jet);
  border-radius: 20px;
  padding: 15px;
  box-shadow: var(--shadow-1);
  z-index: 1;
}

.separator {
  width: 100%;
  height: 1px;
  background: var(--jet);
  margin: 16px 0;
}

.icon-box {
  position: relative;
  background: var(--border-gradient-onyx);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  color: var(--orange-yellow-crayola);
  box-shadow: var(--shadow-1);
  z-index: 1;
}

.icon-box::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--eerie-black-1);
  border-radius: inherit;
  z-index: -1;
}

.icon-box ion-icon { --ionicon-stroke-width: 35px; }

article { display: none; }

article.active {
  display: block;
  animation: fade 0.5s ease backwards;
}

@keyframes fade {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.h2,
.h3,
.h4,
.h5 {
  color: var(--white-2);
  text-transform: capitalize;
}

.h2 { font-size: var(--fs-1); }

.h3 { font-size: var(--fs-2); }

.h4 { font-size: var(--fs-4); }

.h5 {
  font-size: var(--fs-7);
  font-weight: var(--fw-500);
}

.article-title {
  position: relative;
  padding-bottom: 7px;
}

.article-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 3px;
  background: var(--text-gradient-yellow);
  border-radius: 3px;
}

.has-scrollbar::-webkit-scrollbar {
  width: 5px; /* for vertical scrollbar */
  height: 5px; /* for horizontal scrollbar */
}

.has-scrollbar::-webkit-scrollbar-track {
  background: var(--onyx);
  border-radius: 5px;
}

.has-scrollbar::-webkit-scrollbar-thumb {
  background: #ffd600;
  border-radius: 5px;
}

.has-scrollbar::-webkit-scrollbar-button { width: 20px; }

.content-card {
  position: relative;
  background: var(--border-gradient-onyx);
  padding: 15px;
  padding-top: 45px;
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  cursor: pointer;
  z-index: 1;
}

.content-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-gradient-jet);
  border-radius: inherit;
  z-index: -1;
}

/* --- Project Card Styles with Floating 3D Animation --- */
.project-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  width: 100%;
  height: 200px;
  min-height: 200px;
  background: var(--border-gradient-onyx, #232323); /* fallback if var missing */
  margin-bottom: 15px;
  display: block;
  
  /* 3D Floating Animation Setup */
  transform-style: preserve-3d;
  perspective: 1000px;
  animation: floatingTile 6s ease-in-out infinite;
  transition: all 0.3s ease;
}

/* Stagger animation delays for each project card */
.project-card:nth-child(1) { animation-delay: 0s; }
.project-card:nth-child(2) { animation-delay: 0.5s; }
.project-card:nth-child(3) { animation-delay: 1s; }
.project-card:nth-child(4) { animation-delay: 1.5s; }
.project-card:nth-child(5) { animation-delay: 2s; }
.project-card:nth-child(6) { animation-delay: 2.5s; }
.project-card:nth-child(7) { animation-delay: 3s; }
.project-card:nth-child(8) { animation-delay: 3.5s; }
.project-card:nth-child(9) { animation-delay: 4s; }

/* Enhanced hover effect */
.project-card:hover {
  animation-play-state: paused;
  transform: translateY(-8px) rotateX(5deg) rotateY(2deg) scale(1.01);
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

/* Floating 3D Animation Keyframes */
@keyframes floatingTile {
  0% {
    transform: translateY(0px) rotateX(0deg) rotateY(0deg);
  }
  25% {
    transform: translateY(-4px) rotateX(1deg) rotateY(-0.5deg);
  }
  50% {
    transform: translateY(-2px) rotateX(-0.5deg) rotateY(1deg);
  }
  75% {
    transform: translateY(-6px) rotateX(0.5deg) rotateY(-1deg);
  }
  100% {
    transform: translateY(0px) rotateX(0deg) rotateY(0deg);
  }
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
  display: block;
}

/* Mobile fixes for project thumbnails */
@media (max-width: 600px) {
  .project-card {
    height: 160px;
    min-height: 160px;
    border-radius: 12px;
  }
  
  .project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
  }
}

/* Additional mobile thumbnail optimizations */
@media (max-width: 480px) {
  .project-card {
    height: 140px;
    min-height: 140px;
    margin-bottom: 10px;
  }
  
  .project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: inherit;
  }
  
  .project-list {
    gap: 12px;
  }
}

/* Very small mobile devices */
@media (max-width: 360px) {
  .project-card {
    height: 120px;
    min-height: 120px;
    border-radius: 8px;
  }
  
  .project-list {
    gap: 10px;
  }
  
  .project-title {
    font-size: var(--fs-8);
    margin-left: 4px;
  }
  
  .project-category {
    font-size: var(--fs-8);
    margin-left: 4px;
    margin-bottom: 4px;
  }
}

/* Only apply .project-card and .project-overlay effects to main grid thumbnails, not modal/detail images */
.project-modal .project-card,
.project-modal .project-overlay,
.project-modal .project-card img,
.project-modal .project-overlay ion-icon {
  all: unset;
  box-shadow: none !important;
  border-radius: 0 !important;
  background: none !important;
  position: static !important;
  width: auto !important;
  height: auto !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  display: block !important;
  transition: none !important;
}
.project-modal .project-overlay {
  display: none !important;
}
.project-modal .project-card {
  box-shadow: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  background: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.project-modal .project-card img {
  width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.project-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  background: rgba(40, 40, 40, 0.92);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.project-card:hover .project-overlay,
.project-card:focus .project-overlay {
  opacity: 1;
  pointer-events: auto;
}

.project-overlay ion-icon {
  color: #ffd600;
  font-size: 2rem;
  opacity: 1;
  transition: color 0.2s;
}


/* Chart.js and Mermaid styling */
.charts-container {
  margin: 1.5rem 0;
}

.chart-item {
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pie-charts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.pie-chart-container {
  text-align: center;
  min-width: 200px;
  max-width: 300px;
  flex: 1;
}

.pie-chart-container h6 {
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.pie-chart-container canvas {
  width: 100% !important;
  height: 200px !important;
  max-width: 250px;
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

canvas {
  background: transparent !important;
}

#performanceChart {
  width: 100% !important;
  height: 300px !important;
  max-width: 100%;
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.mermaid {
  background: #1e1e1e !important;
  color: #ffffff !important;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  min-height: 200px;
  overflow: auto;
}

.mermaid svg {
  max-width: 100%;
  height: auto;
}

.diagrams-container {
  margin: 1.5rem 0;
}

.diagram-item {
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-table-container {
  margin: 1.5rem 0;
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  overflow: hidden;
}

.comparison-table th,
.comparison-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-table th {
  background: rgba(255, 255, 255, 0.1);
  font-weight: 600;
  color: #ffffff;
}

.comparison-table td {
  color: #e0e0e0;
}

.comparison-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 768px) {
  .pie-charts-row {
    flex-direction: column;
  }
  
  .pie-chart-container {
    min-width: 100%;
    max-width: 100%;
  }
}

/*-----------------------------------*\
  #EXISTING STYLES
\*-----------------------------------*/

main {
  margin: 15px 12px;
  margin-bottom: 75px;
  min-width: 259px;
}





/*-----------------------------------*\
  #SIDEBAR
\*-----------------------------------*/

.sidebar {
  margin-bottom: 15px;
  max-height: 112px;
  overflow: hidden;
  transition: var(--transition-2);
}

.sidebar.active { max-height: 405px; }

.sidebar-info {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 15px;
}

.avatar-box {
  background: var(--bg-gradient-onyx);
  border-radius: 20px;
}

.info-content .name {
  color: var(--white-2);
  font-size: var(--fs-3);
  font-weight: var(--fw-500);
  letter-spacing: -0.25px;
  margin-bottom: 10px;
}

.info-content .title {
  color: var(--white-1);
  background: var(--onyx);
  font-size: var(--fs-8);
  font-weight: var(--fw-300);
  width: max-content;
  padding: 3px 12px;
  border-radius: 8px;
}

.info_more-btn {
  position: absolute;
  top: -15px;
  right: -15px;
  border-radius: 0 15px;
  font-size: 13px;
  color: var(--orange-yellow-crayola);
  background: var(--border-gradient-onyx);
  padding: 10px;
  box-shadow: var(--shadow-2);
  transition: var(--transition-1);
  z-index: 1;
}

.info_more-btn::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: var(--bg-gradient-jet);
  transition: var(--transition-1);
  z-index: -1;
}

.info_more-btn:hover,
.info_more-btn:focus { background: var(--bg-gradient-yellow-1); }

.info_more-btn:hover::before,
.info_more-btn:focus::before { background: var(--bg-gradient-yellow-2); }

.info_more-btn span { display: none; }

.sidebar-info_more {
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-2);
}

.sidebar.active .sidebar-info_more {
  opacity: 1;
  visibility: visible;
}

.contacts-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.contact-item {
  min-width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-info {
  max-width: calc(100% - 46px);
  width: calc(100% - 46px);
}

.contact-title {
  color: var(--light-gray-70);
  font-size: var(--fs-8);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.contact-info :is(.contact-link, time, address) {
  color: var(--white-2);
  font-size: var(--fs-7);
}

.contact-info address { font-style: normal; }

.social-list {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 15px;
  padding-bottom: 4px;
  padding-left: 7px;
}

.social-item .social-link {
  color: var(--light-gray-70);
  font-size: 18px;
}


.social-item .social-link:hover { color: var(--light-gray); }





/*-----------------------------------*\
  #NAVBAR
\*-----------------------------------*/

.navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: hsla(240, 1%, 17%, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid var(--jet);
  border-radius: 12px 12px 0 0;
  box-shadow: var(--shadow-2);
  z-index: 5;
}

.navbar-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  padding: 0 10px;
  gap: 1.5rem;
}

.navbar-link {
  color: var(--light-gray);
  font-size: var(--fs-8);
  padding: 20px 12px;
  transition: color var(--transition-1);
  white-space: nowrap;
  margin: 0;
}

  .navbar-link:hover,
  .navbar-link:focus { color: var(--light-gray-70); }

  .navbar-link.active { color: var(--orange-yellow-crayola); }





/*-----------------------------------*\
  #ABOUT
\*-----------------------------------*/

.about .article-title { margin-bottom: 15px; }

.about-text {
  color: var(--light-gray);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  line-height: 1.6;
}

.about-text p { margin-bottom: 15px; }



/**
 * #service 
 */

.service { margin-bottom: 35px; }

.service-title { margin-bottom: 20px; }

.service-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.service-item {
  position: relative;
  background: var(--border-gradient-onyx);
  padding: 20px;
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  z-index: 1;
}

.service-item::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-gradient-jet);
  border-radius: inherit;
  z-index: -1;
}

.service-icon-box { margin-bottom: 10px; }

.service-icon-box img { margin: auto; }

.service-content-box { text-align: center; }

.service-item-title { margin-bottom: 7px; }

.service-item-text {
  color: var(--light-gray);
  font-size: var(--fs-6);
  font-weight: var(--fw-3);
  line-height: 1.6;
}


/**
 * #testimonials 
 */

.testimonials { margin-bottom: 30px; }

.testimonials-title { margin-bottom: 20px; }

.testimonials-list {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 15px;
  margin: 0 -15px;
  padding: 25px 15px;
  padding-bottom: 35px;
  overflow-x: auto;
  scroll-behavior: smooth;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
}

.testimonials-item {
  min-width: 100%;
  scroll-snap-align: center;
}

.testimonials-avatar-box {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(15px, -25px);
  background: var(--bg-gradient-onyx);
  border-radius: 14px;
  box-shadow: var(--shadow-1);
}

.testimonials-item-title { margin-bottom: 7px; }

.testimonials-text {
  color: var(--light-gray);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  line-height: 1.6;
  display: -webkit-box;
  line-clamp: 4;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/**
 * #testimonials-modal
 */

.modal-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  z-index: 20;
  pointer-events: none;
  visibility: hidden;
}

.modal-container::-webkit-scrollbar { display: none; }

.modal-container.active {
  pointer-events: all;
  visibility: visible;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: hsl(0, 0%, 5%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 1;
  transition: var(--transition-1);
}

.overlay.active {
  opacity: 0.8;
  visibility: visible;
  pointer-events: all;
}

.testimonials-modal {
  background: var(--eerie-black-2);
  position: relative;
  padding: 15px;
  margin: 15px 12px;
  border: 1px solid var(--jet);
  border-radius: 14px;
  box-shadow: var(--shadow-5);
  transform: scale(1.2);
  opacity: 0;
  transition: var(--transition-1);
  z-index: 2;
}

.modal-container.active .testimonials-modal {
  transform: scale(1);
  opacity: 1;
}

.modal-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--onyx);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--white-2);
  font-size: 24px;
  opacity: 0.92;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: opacity 0.2s, box-shadow 0.2s;
}

.modal-close-btn:hover,
.modal-close-btn:focus { opacity: 1; }

.modal-close-btn ion-icon { --ionicon-stroke-width: 50px; }

.modal-avatar-box {
  background: var(--bg-gradient-onyx);
  width: max-content;
  border-radius: 14px;
  margin-bottom: 15px;
  box-shadow: var(--shadow-2);
}

.modal-img-wrapper > img { display: none; }

.modal-title { margin-bottom: 4px; }

.modal-content time {
  font-size: var(--fs-6);
  color: var(--light-gray-70);
  font-weight: var(--fw-300);
  margin-bottom: 10px;
}

.modal-content p {
  color: var(--light-gray);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  line-height: 1.6;
}


/**
 * #clients 
 */

.clients { margin-bottom: 15px; }

.clients-list {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 15px;
  margin: 0 -15px;
  padding: 25px;
  padding-bottom: 25px;
  overflow-x: auto;
  scroll-behavior: smooth;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
}

.clients-item {
  min-width: 50%;
  scroll-snap-align: start;
}

.clients-item img {
  width: 100%;
  filter: grayscale(1);
  transition: var(--transition-1);
}

.clients-item img:hover { filter: grayscale(0); }





/*-----------------------------------*\
  #RESUME
\*-----------------------------------*/

.article-title {
  margin-bottom: 15px;
  padding-bottom: 18px;
}

/* Add spacing above Resume section subheadings (e.g., Full-Time Experience, Internship/Co-op) */
.resume-section h3,
.resume-section h4 {
  margin-top: 0 !important;
}


/**
 * education and experience 
 */

.timeline { margin-bottom: 30px; }

.timeline .title-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 22px;
  margin-bottom: 25px;
}

.timeline-list {
  font-size: var(--fs-6);
  margin-left: 45px;
}

.timeline-item { position: relative; }

.timeline-item:not(:last-child) { margin-bottom: 20px; }

.timeline-item-title {
  font-size: var(--fs-6);
  line-height: 1.3;
  margin-bottom: 7px;
}

.timeline-list span {
  color: var(--vegas-gold);
  font-weight: var(--fw-400);
  line-height: 1.6;
}

.timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  top: -25px;
  left: -30px;
  width: 1px;
  height: calc(100% + 50px);
  background: var(--jet);
}

.timeline-item::after {
  content: "";
  position: absolute;
  top: 5px;
  left: -33px;
  height: 6px;
  width: 6px;
  background: var(--text-gradient-yellow);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--jet);
}

.timeline-text {
  color: var(--light-gray);
  font-weight: var(--fw-300);
  line-height: 1.6;
}


/**
 * skills 
 */

.skills-title { margin-bottom: 20px; }

.skills-list { padding: 20px; }


.skills-item:not(:last-child) { margin-bottom: 15px; }

.skill .title-wrapper {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
}

.skill .title-wrapper data {
  color: var(--light-gray);
  font-size: var(--fs-7);
  font-weight: var(--fw-300);
}

.skill-progress-bg {
  background: var(--jet);
  width: 100%;
  height: 8px;
  border-radius: 10px;
}

.skill-progress-fill {
  background: var(--text-gradient-yellow);
  height: 100%;
  border-radius: inherit;
}





/*-----------------------------------*\
  #PORTFOLIO
\*-----------------------------------*/

.filter-list { display: none; }

.filter-select-box {
  position: relative;
  margin-bottom: 25px;
}

.filter-select {
  background: var(--eerie-black-2);
  color: var(--light-gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 18px;
  min-height: 44px;
  min-width: 44px;
  border: 1.5px solid var(--jet);
  border-radius: 14px;
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  box-shadow: 0 2px 12px rgba(0,0,0,0.13);
  cursor: pointer;
  transition: box-shadow 0.2s, border 0.2s;
}

.filter-select.active .select-icon { transform: rotate(0.5turn); }

.select-list {
  background: var(--eerie-black-2);
  position: absolute;
  top: calc(100% + 6px);
  width: 100%;
  padding: 6px;
  border: 1.5px solid var(--jet);
  border-radius: 14px;
  z-index: 2;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: 0.15s ease-in-out;
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}

.select-list {
  max-height: 9.5em; /* About 3 items tall, adjust as needed */
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #ffd600 #222; /* yellow thumb, dark track */
}

/* For Webkit browsers (Chrome, Safari, iOS) */
.select-list::-webkit-scrollbar {
  width: 8px;
}
.select-list::-webkit-scrollbar-thumb {
  background: #ffd600;
  border-radius: 6px;
}
.select-list::-webkit-scrollbar-track {
  background: #222;
  border-radius: 6px;
}

.filter-select.active + .select-list {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.select-item button {
  background: var(--eerie-black-2);
  color: var(--light-gray);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  text-transform: capitalize;
  width: 100%;
  padding: 12px 10px;
  min-height: 44px;
  min-width: 44px;
  border-radius: 8px;
  cursor: pointer;
}

.select-item button:hover { --eerie-black-2: hsl(240, 2%, 20%); }

.project-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-bottom: 10px;
  width: 100%;
}

.project-item { 
  display: none; 
}

.project-item.active {
  display: block;
  animation: scaleUp 0.25s ease forwards;
}

@keyframes scaleUp {
  0% { transform: scale(0.5); }
  100% { transform: scale(1); }
}

.project-item > a { 
  width: 100%; 
  display: block;
}

.project-img {
  max-width: 100%;
  height: auto;
  cursor: pointer;
  margin: 0.5rem auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s;
}

.project-img:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

.project-img-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 600px) {
  .project-img-row {
    flex-direction: column;
    gap: 0.3rem;
  }
  .project-img {
    margin: 0.3rem auto;
  }
}

.project-item > a:hover .project-img::before { background: hsla(0, 0%, 0%, 0.5); }

.project-item-icon-box {
  --scale: 0.8;

  background: var(--jet);
  color: var(--orange-yellow-crayola);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(var(--scale));
  font-size: 20px;
  padding: 18px;
  border-radius: 12px;
  opacity: 0;
  z-index: 1;
  transition: var(--transition-1);
}

.project-item > a:hover .project-item-icon-box {
  --scale: 1;
  opacity: 1;
}

.project-item-icon-box ion-icon { --ionicon-stroke-width: 50px; }

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-1);
}

.project-item > a:hover img { transform: scale(1.1); }

.project-title,
.project-category { 
  margin-left: 10px; 
}

.project-title {
  color: var(--white-2);
  font-size: var(--fs-5);
  font-weight: var(--fw-400);
  text-transform: capitalize;
  line-height: 1.3;
  margin-bottom: 5px;
  height: auto;
  min-height: 1.5em;
}

.project-category {
  color: var(--light-gray-70);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  margin-bottom: 10px;
}




/*-----------------------------------*\
  #PROJECT DETAIL POPUP
\*-----------------------------------*/
/* Project Detail Modal Styles */
.project-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
}
.project-modal.active {
  display: block;
}
@keyframes fadeInBg {
  from { background: rgba(0,0,0,0); }
  to   { background: rgba(0,0,0,0.7); }
}
.project-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  cursor: pointer;
  z-index: 0;
  animation: fadeInBg 0.25s;
}
.project-modal-wrapper {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  background: #181818;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  width: 95%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2em 1.5em 1.5em 1.5em;
}
@keyframes fadeInModal {
  from { opacity: 0; transform: translateY(40px) scale(0.98);}
  to   { opacity: 1; transform: translateY(0) scale(1);}
}
.project-modal-close {
  position: absolute;
  top: -12px; 
  right: -12px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  padding: 6px;
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  color: #ffd600;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s;
  z-index: 1000;
}
.project-modal-close:hover { 
  background: rgba(40, 40, 40, 0.7);
  box-shadow: 0 4px 16px rgba(0,0,0,0.6);
}
.project-modal-header {
  text-align: center;
  margin-bottom: 1.2em;
}
.project-modal-image {
  display: none !important;
}
.project-modal-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
  color: #ffd600;
  letter-spacing: 0.01em;
}
.project-modal-body {
  min-height: 120px;
}
.project-modal-body .modal-page {
  display: none;
  padding: 1em 0;
}
.project-modal-body .modal-page:first-child {
  display: block;
}
.project-modal-body ul {
  list-style-type: disc;
  margin-left: 1.5em;
  padding-left: 0;
}
.project-modal-body li {
  margin-bottom: 0.7em;
  font-size: 1em;
}
.project-modal-body h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5em;
  color: #ffd600;
  letter-spacing: 0.01em;
}
.project-modal-footer {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  margin-top: 1.2em;
}

/* Utility classes for single button alignment */
.project-modal-footer.only-next {
  justify-content: flex-end !important;
}
.project-modal-footer.only-prev {
  justify-content: flex-start;
}
.project-modal-footer button {
  background: #ffd600;
  color: #181818;
  border: none;
  border-radius: 5px;
  padding: 0.5em 1.2em;
  font-weight: 600;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s;
}
.project-modal-footer button:disabled {
  background: #eee;
  color: #888;
  cursor: not-allowed;
}
@media (max-width: 600px) {
  .project-modal-wrapper {
    padding: 1em 0.5em 1em 0.5em;
    max-width: 98vw;
  }
  .project-modal-image {
    max-height: 120px;
  }
}

/* --- Improved Project Modal Scroll Styles --- */
.project-modal-wrapper {
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Prevent content from overflowing the box */
}

.project-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 80px;
  max-height: 100%;
  scrollbar-width: thin;           /* Firefox */
  scrollbar-color: #ffd600 #222;   /* yellow thumb, dark track */
}

/* Webkit scrollbar for modal body */
.project-modal-body::-webkit-scrollbar {
  width: 8px;
}
.project-modal-body::-webkit-scrollbar-thumb {
  background: #ffd600;
  border-radius: 6px;
}
.project-modal-body::-webkit-scrollbar-track {
  background: #222;
  border-radius: 6px;
}

/* Ensure footer stays at the bottom and is always reachable */
.project-modal-footer {
  flex-shrink: 0;
  background: #181818;
  padding-bottom: env(safe-area-inset-bottom, 0); /* iOS safe area */
  position: static;
}

/* Responsive: ensure modal never exceeds viewport height */
@media (max-width: 768px) {
  .project-modal-wrapper {
    max-height: 90vh;
  }
  .project-modal_body {
    max-height: 100%;
  }
}
/* --- End Improved Modal Scroll Styles --- */

/*-----------------------------------*\
  #BLOG
\*-----------------------------------*/

.blog-posts { margin-bottom: 10px; }

.blog-posts-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.blog-post-item > a {
  position: relative;
  background: var(--border-gradient-onyx);
  height: 100%;
  box-shadow: var(--shadow-4);
  border-radius: 16px;
  z-index: 1;
}

.blog-post-item > a::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: var(--eerie-black-1);
  z-index: -1;
}

.blog-banner-box {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
}

.blog-banner-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-1);
}

.blog-post-item > a:hover .blog-banner-box img { transform: scale(1.1); }

.blog-content { padding: 15px; }

.blog-meta {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
}

.blog-meta :is(.blog-category, time) {
  color: var(--light-gray-70);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
}

.blog-meta .dot {
  background: var(--light-gray-70);
  width: 4px;
  height: 4px;
  border-radius: 4px;
}

.blog-item-title {
  margin-bottom: 10px;
  line-height: 1.3;
  transition: var(--transition-1);
}

.blog-post-item > a:hover .blog-item-title { color: var(--orange-yellow-crayola); }

.blog-text {
  color: var(--light-gray);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  line-height: 1.6;
}

/*-----------------------------------*\
  #PRODUCTS
\*-----------------------------------*/

.products-intro {
  margin-bottom: 30px;
}

.products-intro p {
  color: var(--light-gray);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  line-height: 1.6;
}

.products-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.product-item {
  display: none;
}

.product-item.active {
  display: block;
  animation: fadeInUp 0.5s ease-out;
}

.product-card {
  position: relative;
  background: var(--border-gradient-onyx);
  padding: 1px;
  border-radius: 20px;
  box-shadow: var(--shadow-4);
  z-index: 1;
  transition: all 0.3s ease;
  overflow: hidden;
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--eerie-black-1);
  border-radius: inherit;
  z-index: -1;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 193, 7, 0.3);
}

.product-banner {
  width: 100%;
  height: 200px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
}

.product-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-1);
}

.product-card:hover .product-banner img {
  transform: scale(1.05);
}

.product-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.product-category {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.product-tag {
  background: var(--border-gradient-onyx);
  color: var(--orange-yellow-crayola);
  font-size: var(--fs-8);
  font-weight: var(--fw-500);
  padding: 4px 8px;
  border-radius: 8px;
}

.product-status {
  font-size: var(--fs-8);
  font-weight: var(--fw-500);
  padding: 4px 8px;
  border-radius: 8px;
}

.product-status.coming-soon {
  background: rgba(255, 193, 7, 0.1);
  color: #ffcc00;
}

.product-status:not(.coming-soon) {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

.product-title {
  color: var(--white-2);
  font-size: var(--fs-5);
  font-weight: var(--fw-500);
  margin-bottom: 10px;
  line-height: 1.3;
}

.product-description {
  color: var(--light-gray);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  line-height: 1.6;
  margin-bottom: 15px;
}

.product-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.tech-tag {
  background: linear-gradient(135deg, var(--smoky-black), var(--jet));
  color: var(--orange-yellow-crayola);
  font-size: var(--fs-8);
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid var(--jet);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tech-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
  border-color: var(--orange-yellow-crayola);
}

.tech-tag::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 193, 7, 0.2), transparent);
  transition: left 0.5s;
}

.tech-tag:hover::before {
  left: 100%;
}

.product-progress {
  margin-bottom: 20px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--jet);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange-yellow-crayola), var(--vegas-gold));
  transition: width 0.3s ease;
  position: relative;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

.progress-text {
  color: var(--light-gray-70);
  font-size: var(--fs-8);
  font-weight: var(--fw-300);
}

.product-actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.btn {
  padding: 12px 20px;
  border-radius: 12px;
  font-size: var(--fs-7);
  font-weight: var(--fw-500);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange-yellow-crayola), var(--vegas-gold));
  color: var(--smoky-black);
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 193, 7, 0.6);
}

.btn-secondary {
  background: var(--border-gradient-onyx);
  color: var(--light-gray);
  border: 1px solid var(--jet);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
  background: var(--jet);
  color: var(--white-2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.1);
}

.btn-secondary.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
}

/* Product Modal */
.product-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  backdrop-filter: blur(10px);
}

.product-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInBg 0.3s ease;
}

.product-modal-content {
  background: var(--eerie-black-1);
  border: 1px solid var(--jet);
  border-radius: 16px;
  max-width: 90vw;
  max-height: 90vh;
  width: 800px;
  overflow: hidden;
  box-shadow: var(--shadow-2);
  animation: modalSlideIn 0.3s ease;
}

.product-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid var(--jet);
  background: var(--border-gradient-onyx);
}

.product-modal-title {
  color: var(--white-2);
  font-size: var(--fs-3);
  font-weight: var(--fw-500);
  margin: 0;
}

.product-modal-close {
  background: none;
  border: none;
  color: var(--light-gray);
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-1);
}

.product-modal-close:hover {
  background: var(--jet);
  color: var(--white-2);
}

.product-modal-body {
  padding: 25px;
  max-height: 70vh;
  overflow-y: auto;
}

.product-detail {
  color: var(--light-gray);
}

.product-hero {
  margin-bottom: 20px;
}

.product-hero img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
}

.product-info h4 {
  color: var(--white-2);
  font-size: var(--fs-4);
  margin-bottom: 15px;
}

.product-info h5 {
  color: var(--orange-yellow-crayola);
  font-size: var(--fs-5);
  margin: 20px 0 10px 0;
}

.product-info ul {
  margin: 10px 0 20px 20px;
}

.product-info li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 15px 0;
}

.tech-badge {
  background: var(--border-gradient-onyx);
  color: var(--orange-yellow-crayola);
  font-size: var(--fs-8);
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid var(--jet);
}

.status-info {
  background: var(--smoky-black);
  padding: 15px;
  border-radius: 8px;
  border-left: 3px solid var(--orange-yellow-crayola);
  margin: 20px 0;
}

.product-actions-modal {
  margin-top: 25px;
  text-align: center;
}

/*-----------------------------------*\
  #EXTRAS
\*-----------------------------------*/

.extras-posts { margin-bottom: 10px; }

.extras-posts-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.extras-post-item > a {
  position: relative;
  background: var(--border-gradient-onyx);
  height: 100%;
  box-shadow: var(--shadow-4);
  border-radius: 16px;
  z-index: 1;
}

.extras-post-item > a::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: var(--eerie-black-1);
  z-index: -1;
}

.extras-banner-box {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.extras-image-carousel {
  width: 100%;
  height: 100%;
  position: relative;
}

.extras-image-scroll {
  display: flex;
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease;
}

.extras-image-scroll img {
  width: calc(100% / 3);
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: var(--transition-1);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.extras-image-scroll img:last-child {
  border-right: none;
}

.extras-image-scroll img:hover {
  transform: scale(1.02);
}

.extras-scroll-btn {
  display: none; /* Hide scroll buttons since we have exactly 3 images */
}

.extras-post-item > a:hover .extras-banner-box img { transform: scale(1.1); }

.extras-content { padding: 15px; }

.extras-meta {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
}

.extras-meta :is(.extras-category, time) {
  color: var(--light-gray-70);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
}

.extras-meta .dot {
  background: var(--light-gray-70);
  width: 4px;
  height: 4px;
  border-radius: 4px;
}

.extras-item-title {
  margin-bottom: 10px;
  line-height: 1.3;
  transition: var(--transition-1);
}

.extras-post-item > a:hover .extras-item-title { color: var(--orange-yellow-crayola); }

.extras-text {
  color: var(--light-gray);
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  line-height: 1.6;
}







/*-----------------------------------*\
  #CONTACT
\*-----------------------------------*/

.mapbox {
  position: relative;
  height: 250px;
  width: 100%;
  border-radius: 16px;
  margin-bottom: 30px;
  border: 1px solid var(--jet);
  overflow: hidden;
}

.mapbox figure { height: 100%; }

.mapbox iframe {
  width: 100%;
  height: 100%;
  border: none;
  filter: grayscale(1) invert(1);
}

.contact-form { margin-bottom: 10px; }

.form-title { margin-bottom: 20px; }

.input-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
  margin-bottom: 25px;
}

.form-input {
  color: var(--white-2);
  font-size: var(--fs-6);
  font-weight: var(--fw-400);
  padding: 13px 20px;
  border: 1px solid var(--jet);
  border-radius: 14px;
  outline: none;
}

.form-input::placeholder { font-weight: var(--fw-500); }

.form-input:focus { border-color: var(--orange-yellow-crayola); }

textarea.form-input {
  min-height: 100px;
  height: 120px;
  max-height: 200px;
  resize: vertical;
  margin-bottom: 25px;
}

textarea.form-input::-webkit-resizer { display: none; }

.form-input:focus:invalid { border-color: var(--bittersweet-shimmer); }

.form-btn {
  position: relative;
  width: 100%;
  background: var(--border-gradient-onyx);
  color: var(--orange-yellow-crayola);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: 14px;
  font-size: var(--fs-6);
  text-transform: capitalize;
  box-shadow: var(--shadow-3);
  z-index: 1;
  transition: var(--transition-1);
}

.form-btn::before {
  content: "";
  position: absolute;
  inset: 1px;
  background: var(--bg-gradient-jet);
  border-radius: inherit;
  z-index: -1;
  transition: var(--transition-1);
}

.form-btn ion-icon { font-size: 16px; }

.form-btn:hover { background: var(--bg-gradient-yellow-1); }

.form-btn:hover::before { background: var(--bg-gradient-yellow-2); }

.form-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.form-btn:disabled:hover { background: var(--border-gradient-onyx); }

.form-btn:disabled:hover::before { background: var(--bg-gradient-jet); }





/*-----------------------------------*\
  #RESPONSIVE
\*-----------------------------------*/

/**
 * responsive larger than 450px screen
 */

@media (min-width: 450px) {

  /**
   * client
   */

  .clients-item { min-width: calc(33.33% - 10px); }



  /**
   * #PORTFOLIO, BLOG 
   */

  .project-img,
  .blog-banner-box { height: auto; }

}





/**
 * responsive larger than 580px screen
 */

@media (min-width: 580px) {

  /**
   * CUSTOM PROPERTY
   */

  :root {

    /**
     * typography
     */

    --fs-1: 32px;
    --fs-2: 24px;
    --fs-3: 26px;
    --fs-4: 18px;
    --fs-6: 15px;
    --fs-7: 15px;
    --fs-8: 12px;

  }



  /**
   * #REUSED STYLE
   */

  .sidebar, article {
    width: 520px;
    margin-inline: auto;
    padding: 30px;
  }

  .article-title {
    font-weight: var(--fw-600);
    padding-bottom: 15px;
  }

  .article-title::after {
    width: 40px;
    height: 5px;
  }

  .icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 18px;
  }



  /**
   * #MAIN
   */

  main {
    margin-top: 60px;
    margin-bottom: 100px;
  }



  /**
   * #SIDEBAR
   */

  .sidebar {
    max-height: 180px;
    margin-bottom: 30px;
  }

  .sidebar.active { max-height: 584px; }

  .sidebar-info { gap: 25px; }

  .avatar-box { border-radius: 30px; }

  .avatar-box img { width: 120px; }

  .info-content .name { margin-bottom: 15px; }

  .info-content .title { padding: 5px 18px; }

  .info_more-btn {
    top: -30px;
    right: -30px;
    padding: 10px 15px;
  }

  .info_more-btn span {
    display: block;
    font-size: var(--fs-8);
  }

  .info_more-btn ion-icon { display: none; }

  .separator { margin: 32px 0; }

  .contacts-list { gap: 20px; }

  .contact-info {
    max-width: calc(100% - 64px);
    width: calc(100% - 64px);
  }



  /**
   * #NAVBAR
   */

  .navbar { border-radius: 20px 20px 0 0; }

  .navbar-list { gap: 1.5rem; }

  .navbar-link { --fs-8: 14px; }



  /**
   * #ABOUT
   */

  .about .article-title { margin-bottom: 20px; }

  .about-text { margin-bottom: 40px; }

  /* service */

  .service-item {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 18px;
    padding: 30px;
  }

  .service-icon-box {
    margin-bottom: 0;
    margin-top: 5px;
  }

  .service-content-box { text-align: left; }

  /* testimonials */

  .testimonials-title { margin-bottom: 25px; }

  .testimonials-list {
    gap: 30px;
    margin: 0 -30px;
    padding: 30px;
    padding-bottom: 35px;
  }

  .content-card {
    padding: 30px;
    padding-top: 25px;
  }

  .testimonials-avatar-box {
    transform: translate(30px, -30px);
    border-radius: 20px;
  }

  .testimonials-avatar-box img { width: 80px; }

  .testimonials-item-title {
    margin-bottom: 10px;
    margin-left: 95px;
  }

  .testimonials-text {
    line-clamp: 2;
    -webkit-line-clamp: 2;
  }

  /* testimonials modal */

  .modal-container { padding: 20px; }

  .testimonials-modal {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    gap: 25px;
    padding: 30px;
    border-radius: 20px;
  }

  .modal-img-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .modal-avatar-box {
    border-radius: 18px;
    margin-bottom: 0;
  }

  .modal-avatar-box img { width: 65px; }

  .modal-img-wrapper > img {
    display: block;
    flex-grow: 1;
    width: 35px;
  }



  /**
   * #RESUME
   */

  .timeline-list { margin-left: 65px; }

  .timeline-item:not(:last-child) { margin-bottom: 20px; }

  .timeline-item-title {
    font-size: var(--fs-6);
    line-height: 1.3;
    margin-bottom: 7px;
  }

  .timeline-list span {
    color: var(--vegas-gold);
    font-weight: var(--fw-400);
    line-height: 1.6;
  }

  .timeline-item:not(:last-child)::before {
    content: "";
    position: absolute;
    top: -25px;
    left: -30px;
    width: 1px;
    height: calc(100% + 50px);
    background: var(--jet);
  }

  .timeline-item::after {
    content: "";
    position: absolute;
    top: 5px;
    left: -33px;
    height: 8px;
    width: 8px;
    background: var(--text-gradient-yellow);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--jet);
  }

  .skills-item:not(:last-child) { margin-bottom: 25px; }



  /**
   * #PORTFOLIO, BLOG
   */

  .project-img, .blog-banner-box, .extras-banner-box { border-radius: 16px; }

  .blog-posts-list, .extras-posts-list { gap: 30px; }

  .blog-content, .extras-content { padding: 25px; }



  /**
   * #CONTACT
   */

  .mapbox {
    height: 380px;
    border-radius: 18px;
  }

  .input-wrapper {
    gap: 30px;
    margin-bottom: 30px;
  }

  .form-input { padding: 15px 20px; }

  textarea.form-input { margin-bottom: 30px; }

  .form-btn {
    --fs-6: 16px;
    padding: 16px 20px;
  }

  .form-btn ion-icon { font-size: 18px; }

}





/**
 * responsive larger than 768px screen
 */

@media (min-width: 768px) {

  /**
   * REUSED STYLE
   */

  .sidebar, article { width: 700px; }

  .has-scrollbar::-webkit-scrollbar-button { width: 100px; }



  /**
   * SIDEBAR
   */

  .contacts-list {
    grid-template-columns: 1fr 1fr;
    gap: 30px 15px;
  }



  /**
   * NAVBAR
   */

  .navbar-link { --fs-8: 15px; }



  /**
   * ABOUT
   */

  /* testimonials modal */

  .testimonials-modal {
    gap: 35px;
    max-width: 680px;
  }

  .modal-avatar-box img { width: 80px; }



  /**
   * PORTFOLIO
   */

  .article-title { padding-bottom: 20px; }

  .filter-select-box { display: none; }

  .filter-list {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: clamp(0.8rem, 2vw, 1.8rem);
    margin-bottom: 30px;
    padding: 0 0.5rem 0.5em;
    overflow-x: hidden;
    overflow-y: hidden;
    width: 100%;
  }

  .filter-list li {
    flex: 1 1 auto;
    text-align: center;
  }
@media (min-width: 768px) {
  .filter-list {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: clamp(1rem, 2.5vw, 2.5rem);
    padding: 0 1rem 0.5em;
    margin-bottom: 30px;
    overflow-x: hidden;
    width: 100%;
  }

  .filter-list li {
    flex: 1 1 auto;
    text-align: center;
  }
}

  .filter-item button {
    color: var(--light-gray);
    font-size: var(--fs-5);
    transition: var(--transition-1);
  }

  .filter-item button:hover { color: var(--light-gray-70); }

  .filter-item button.active { color: var(--orange-yellow-crayola); }

  .filter-title {
    font-weight: var(--fw-600);
  }

  .filter-subtitle {
    font-size: 0.7em;
    font-style: italic;
  }

  /* portfolio and blog grid */

  .project-list, .blog-posts-list, .extras-posts-list, .products-list { 
    grid-template-columns: 1fr 1fr; 
  }
  
  .project-item.active {
    width: 100%;
  }
  
  .project-card {
    height: 200px;
    min-height: 200px;
  }



  /**
   * CONTACT
   */

  .input-wrapper { grid-template-columns: 1fr 1fr; }

  .form-btn {
    width: max-content;
    margin-left: auto;
  }
  
}





/**
 * responsive larger than 1024px screen
 */

@media (min-width: 1024px) {

  /**
   * CUSTOM PROPERTY
   */

  :root {

    /**
    * shadow
    */

    --shadow-1: -4px 8px 24px hsla(0, 0%, 0%, 0.125);
    --shadow-2: 0 16px 30px hsla(0, 0%, 0%, 0.125);
    --shadow-3: 0 16px 40px hsla(0, 0%, 0%, 0.125);

  }



  /**
   * REUSED STYLE
   */

  .sidebar, article {
    width: 950px;
    box-shadow: var(--shadow-5);
  }



  /**
   * MAIN 
   */

  main { margin-bottom: 60px; }

  .main-content {
    position: relative;
    width: max-content;
    margin: auto;
  }



  /**
   * NAVBAR
   */

  .navbar {
    position: absolute;
    bottom: auto;
    top: 0;
    left: auto;
    right: 0;
    width: max-content;
    border-radius: 0 20px;
    padding: 0 20px;
    box-shadow: none;
  }

  .navbar-list {
    gap: 1.5rem;
    padding: 0 20px;
  }

  .navbar-link { font-weight: var(--fw-500); }



  /**
   * ABOUT
   */

  /* service */

  .service-list {
    grid-template-columns: 1fr 1fr;
    gap: 20px 25px;
  }

  /* testimonials */

  .testimonials-item { min-width: calc(50% - 15px); }

  /* clients */

  .clients-item { min-width: calc(25% - 38px); }



  /**
   * PORTFOLIO
   */

  .project-list { 
    grid-template-columns: repeat(3, 1fr); 
  }
  
  .project-item.active {
    width: 100%;
  }
  
  .project-card {
    height: 200px;
    min-height: 200px;
  }



  /**
   * BLOG
   */

  .blog-banner-box, .extras-banner-box { height: 230px; }

}





/**
 * responsive larger than 1250px screen
 */

@media (min-width: 1250px) {

  /**
   * RESET
   */

  body::-webkit-scrollbar { width: 20px; }

  body::-webkit-scrollbar-track { background: var(--smoky-black); }

  body::-webkit-scrollbar-thumb {
    border: 5px solid var(--smoky-black);
    background: hsla(0, 0%, 100%, 0.1);
    border-radius: 20px;
    box-shadow: inset 1px 1px 0 hsla(0, 0%, 100%, 0.11),
                inset -1px -1px 0 hsla(0, 0%, 100%, 0.11);
  }

  body::-webkit-scrollbar-thumb:hover { background: hsla(0, 0%, 100%, 0.15); }

  body::-webkit-scrollbar-button { height: 60px; }



  /**
   * REUSED STYLE
   */

  .sidebar, article { width: auto; }

  article { min-height: 100%; }



  /**
   * MAIN
   */

  main {
    max-width: 1200px;
    margin-inline: auto;
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 25px;
  }

  .main-content {
    min-width: 75%;
    width: 75%;
    margin: 0;
  }



  /**
   * SIDEBAR
   */

  .sidebar {
    position: sticky;
    top: 60px;
    max-height: max-content;
    height: 100%;
    margin-bottom: 0;
    padding-top: 60px;
    z-index: 1;
  }

  .sidebar-info { flex-direction: column; }

  .avatar-box img { width: 150px; }

  .info-content .name {
    white-space: nowrap;
    text-align: center;
  }

  .info-content .title { margin: auto; }

  .info_more-btn { display: none; }

  .sidebar-info_more {
    opacity: 1;
    visibility: visible;
  }

  .contacts-list { grid-template-columns: 1fr; }

  .contact-info :is(.contact-link) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .contact-info :is(.contact-link, time, address) {
    --fs-7: 14px;
    font-weight: var(--fw-300);
  }

  .separator:last-of-type {
    margin: 15px 0;
    opacity: 0;
  }

  .social-list { justify-content: center; }



  /**
   * RESUME
   */

  .timeline-text { max-width: 700px; }

}

/* Ensure filter list stays in a single row and scrolls horizontally if needed */

/* Improved spacing for category titles in project filter list */
.filter-list {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  overflow-x: hidden;
  overflow-y: hidden;
  white-space: nowrap;
  gap: clamp(0.5rem, 1.5vw, 1.5rem);
  padding: 0 0 0.5em 0;
  margin-bottom: 3em;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.filter-list li:first-child {
  margin-left: 0;
}

.filter-list li {
  flex: 1 1 auto;
  margin-right: 0;
  text-align: center;
}

.filter-list .filter-btn {
  white-space: nowrap;
  margin-right: 0;
  padding-right: 0;
  width: 100%;
  text-align: center;
}

/* Tablet screens - ensure proper left margin */
@media (min-width: 768px) {
  .filter-list {
    gap: clamp(0.8rem, 2vw, 2rem);
    padding: 0 0 0.5em 0;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

/* Desktop and larger screens - maintain proper left alignment */
@media (min-width: 1200px) {
  .filter-list {
    gap: clamp(1rem, 2.5vw, 2.5rem);
    padding: 0 0 0.5em 0;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 700px) {
  .filter-list {
    display: none !important;
  }
  .filter-select-box {
    display: block;
  }
}

@media (max-width: 600px) {
  .filter-list {
    gap: 0.7em;
  }
  
  /* Two project tiles per row on mobile */
  .project-list {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  
  .project-item.active {
    width: 100%;
    margin-bottom: 0;
  }
}

@media (max-width: 700px) {
  .filter-list {
    display: none !important;
  }
  .filter-select-box {
    display: block;
  }
}

@media (max-width: 768px) {
  .project-modal-wrapper {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    /* Ensure modal does not overflow viewport */
  }
  .project-modal_body {
    max-height: 80vh;
    overflow-y: auto;
    flex: 1 1 auto;
  }
  .project-modal-footer {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: #181818; /* Match modal background */
    z-index: 10;
    padding-bottom: env(safe-area-inset-bottom, 0); /* For iOS safe area */
  }
}

.project-modal_body a {
  color: #fbd109;
  text-decoration: underline;
}
.project-modal_body a:visited {
  color: #fbd109;
}
.project-modal_body a:hover,
.project-modal_body a:active,
.project-modal_body a:focus {
  color: #fbd109;
  text-decoration: underline;
}

/* Responsive row for HEPA images */
.hepa-image-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7em;
  justify-content: center;
  margin: 0.7em 0;
}

.hepa-image-row .hepa-img {
  max-width: 48%;
  min-width: 180px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  background: #fff;
}

@media (max-width: 600px) {
  .hepa-image-row .hepa-img {
    max-width: 100%;
    min-width: 0;
  }
}

/* CAD Gallery Styles */
.image-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1em;
  padding: 10px;
  margin: 1em 0;
}

.image-row a {
  position: relative;
  display: block;
  overflow: visible;
  border-radius: 8px;
  background: #2a2a2a;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.image-row a:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.image-row .project-img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  display: block;
  background: #222;
  transition: all 0.3s ease;
  padding: 10px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.image-row a:hover .project-img {
  transform: scale(1.05);
}


.cad-caption {
  position: static;
  background: #181818;
  color: #FFD600;
  padding: 6px 0 4px 0;
  text-align: center;
  font-size: 0.97rem;
  font-weight: 500;
  width: 100%;
  min-height: 28px;
  border-radius: 8px 8px 0 0;
  margin: 0 0 2px 0;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: break-word;
  box-sizing: border-box;
  z-index: 2;
}

/* Remove hover effect for caption */
.image-row a:hover .cad-caption {
  opacity: 1;
  transform: none;
  background: #181818;
  border-radius: 8px 8px 0 0;
}
@media (max-width: 600px) {
  .image-row .project-img {
    max-width: 100%;
    min-width: 0;
  }
}

a,
a:hover,
a:focus,
a:active {
  cursor: pointer;
}

/* Add spacing between vertically stacked images in project modals so they don't appear stuck together */
.project-modal .image-row img.project-img,
.project-modal .hepa-image-row img.hepa-img {
  display: block;
  margin-bottom: 1em;
}

/* Remove bottom margin for last image in a row */
.project-modal .image-row img.project-img:last-child,
.project-modal .hepa-image-row img.hepa-img:last-child {
  margin-bottom: 0;
}

.project-modal .image-row,
.project-modal .hepa-image-row {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.project-modal .image-row img.project-img,
.project-modal .hepa-image-row img.hepa-img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1em;
}

.project-modal .image-row img.project-img:last-child,
.project-modal .hepa-image-row img.hepa-img:last-child {
  margin-bottom: 0;
}

/*-----------------------------------*\
  #IMAGE ZOOM FUNCTIONALITY
\*-----------------------------------*/

/* Make project modal images clickable and add cursor indicator */
.project-modal .project-img {
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.project-modal .project-img:hover {
  transform: scale(1.02);
}

/* Image zoom overlay - Fixed animations */
.image-zoom-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
       width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 20000;
  cursor: zoom-out;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity     0.3s ease;
}

.image-zoom-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.image-zoom-overlay img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  cursor: grab;
  transition: transform 0.2s ease;
  transform-origin: center;
}

.image-zoom-overlay img:active {
  cursor: grabbing;
}

/* Close button for zoom overlay */
.zoom-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  backdrop-filter: blur(10px);
}

.zoom-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Zoom controls for better interaction */
.zoom-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  background: rgba(0, 0, 0, 0.6);
  padding: 10px;
  border-radius: 25px;
  backdrop-filter: blur(10px);
}

.zoom-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.zoom-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Mobile specific zoom styles */
@media (max-width: 768px) {
  .image-zoom-overlay {
    padding: 10px;
  }
  
  .zoom-close-btn {
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
  }
  
  .zoom-controls {
    bottom: 10px;
    padding: 8px;
  }
  
  .zoom-btn {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
}

/* Fix download button positioning - ensure they stay inline with headers */
.header-with-download {
  display: flex !important;
  align-items: center !important;
  gap: 1em !important;
  flex-wrap: wrap !important;
  margin-bottom: 1.2em !important;
}

.header-with-download .h2 {
  margin-bottom: 0 !important;
}

.header-with-download a[download] {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  color: var(--light-gray-70) !important;
  border: 1px solid var(--light-gray-70) !important;
  border-radius: 6px !important;
  width: 2em !important;
  height: 2em !important;
  text-decoration: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  vertical-align: middle !important;
  transition: all 0.2s ease !important;
  flex-shrink: 0 !important;
  font-size: 1.1em !important;
  opacity: 0.8 !important;
  transform: translateY(-15%) !important;
}

/* CAD Gallery Styles */
.cad-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.cad-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  aspect-ratio: 1;
  background: var(--eerie-black-1);
}

.cad-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.cad-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.cad-caption {
  position: static;
  background: rgba(0,0,0,0.85);
  color: #FFD600;
  padding: 10px 0 8px 0;
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  width: 100%;
  min-height: 28px;
  border-radius: 0 0 8px 8px;
  margin: 0;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: break-word;
  box-sizing: border-box;
  z-index: 2;
}

/* Ensure .cad-item uses flex to stack image and caption vertically */
.cad-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}

/* Ensure image does not overflow and caption stays attached */
.cad-item img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
}

/* Lightbox styles */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  position: relative;
}

.lightbox img {
  max-width: 100%;
  max-height: 80vh;
  border: 2px solid var(--orange-yellow-crayola);
  border-radius: 4px;
}

.close-lightbox {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 30px;
  cursor: pointer;
}

.nav-buttons {
  position: absolute;
  width: 100%;
  display: flex;
  justify-content: space-between;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 20px;
  box-sizing: border-box;
}

.nav-btn {
  background: rgba(255,255,255,0.3);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  transition: background 0.3s;
}

.nav-btn:hover {
  background: var(--orange-yellow-crayola);
  color: black;
}

.cad-description {
  color: white;
  text-align: center;
  margin-top: 10px;
  font-size: 14px;
}

.header-with-download a[download]:hover {
  background: var(--orange-yellow-crayola) !important;
  color: var(--smoky-black) !important;
  border-color: var(--orange-yellow-crayola) !important;
  transform: translateY(-15%) translateY(-1px) !important;
  opacity: 1 !important;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2) !important;
}

/* Enhanced tooltip styling for download buttons */
.header-with-download a[download]::before {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--eerie-black-1);
  color: var(--white-2);
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1000;
  pointer-events: none;
  margin-bottom: 5px;
  border: 1px solid var(--jet);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.header-with-download a[download]::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--eerie-black-1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1000;
  pointer-events: none;
  margin-bottom: 1px;
}

.header-with-download a[download]:hover::before,
.header-with-download a[download]:hover::after {
  opacity: 1;
  visibility: visible;
}

/*-----------------------------------*\
  #MODERN ANIMATIONS & INTERACTIONS
\*-----------------------------------*/

/* Simple project animation matching template exactly */
@keyframes scaleUp {
  0% { transform: scale(0.5); }
  100% { transform: scale(1); }
}

/* Ensure resume article displays properly */
article.resume {
  min-height: 100vh;
  background: var(--eerie-black-2);
  color: var(--white-2);
}

article.resume.active {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Data Center Project Visualizations */
.comparison-table-container {
  margin: 2rem 0;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: var(--eerie-black-2);
  border-radius: 8px;
  overflow: hidden;
}

.comparison-table th,
.comparison-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--jet);
}

.comparison-table th {
  background: var(--onyx);
  color: var(--orange-yellow-crayola);
  font-weight: 600;
}

.comparison-table tr:hover {
  background: var(--jet);
}

.comparison-table td:last-child {
  font-weight: 600;
  color: var(--vegas-gold);
}

.charts-container {
  margin: 2rem 0;
}

.chart-item {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--eerie-black-2);
  border-radius: 12px;
  border: 1px solid var(--jet);
}

.chart-item h5 {
  color: var(--orange-yellow-crayola);
  margin-bottom: 1rem;
  text-align: center;
}

.pie-charts-row {
  display: flex;
  gap: 2rem;
  justify-content: space-around;
  flex-wrap: wrap;
}

.pie-chart-container {
  flex: 1;
  min-width: 250px;
  text-align: center;
}

.pie-chart-container h6 {
  color: var(--white-2);
  margin-bottom: 1rem;
}

.diagrams-container {
  margin: 2rem 0;
}

.diagram-item {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--eerie-black-2);
  border-radius: 12px;
  border: 1px solid var(--jet);
}

.diagram-item h5 {
  color: var(--orange-yellow-crayola);
  margin-bottom: 1rem;
  text-align: center;
}

/* Mermaid diagram specific styling */
.mermaid {
  background: var(--smoky-black) !important;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'Poppins', sans-serif !important;
}

.mermaid svg {
  max-width: 100% !important;
  height: auto !important;
  background: transparent !important;
}

.mermaid .node rect,
.mermaid .node circle,
.mermaid .node ellipse,
.mermaid .node polygon {
  stroke: #333 !important;
  stroke-width: 2px !important;
}

.mermaid .edgePath .path {
  stroke: #ffffff !important;
  stroke-width: 2px !important;
}

.mermaid .edgeLabel {
  background-color: var(--smoky-black) !important;
  color: #ffffff !important;
}

.mermaid .cluster rect {
  fill: var(--eerie-black-2) !important;
  stroke: var(--jet) !important;
}

/* Force visibility for mermaid elements */
.mermaid .nodeLabel,
.mermaid .edgeLabel {
  color: #ffffff !important;
  font-weight: 500 !important;
}

/* Chart container adjustments */
.chart-item canvas {
  background: var(--smoky-black) !important;
  border-radius: 8px;
  padding: 1rem;
}

/*-----------------------------------*\
  #EXTRAS MOBILE RESPONSIVE
\*-----------------------------------*/

@media (max-width: 768px) {
  /* Extras mobile optimizations */
  .extras-banner-box {
    height: 150px;
  }
  
  .extras-image-scroll img {
    width: calc(100% / 2); /* Show 2 images on mobile */
  }
  
  .extras-scroll-btn {
    width: 25px;
    height: 25px;
    font-size: 14px;
  }
  
  .extras-content {
    padding: 12px;
  }
  
  .extras-item-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
  }
  
  .extras-text {
    font-size: 0.85rem;
    line-height: 1.4;
  }
  
  /* Ensure single column layout on mobile */
  .extras-posts-list, .products-list {
    grid-template-columns: 1fr !important;
    gap: 15px;
  }
  
  .product-content {
    padding: 20px !important;
  }
  
  .product-actions {
    gap: 8px;
  }
  
  .btn {
    padding: 10px 16px !important;
    font-size: var(--fs-8) !important;
  }
}

@media (max-width: 480px) {
  .extras-banner-box {
    height: 120px;
  }
  
  .extras-image-scroll img {
    width: calc(100% / 2);
  }
  
  .extras-scroll-btn {
    width: 20px;
    height: 20px;
    font-size: 12px;
  }
  
  .extras-content {
    padding: 10px;
  }
  
  .extras-item-title {
    font-size: 1rem;
  }
  
  .extras-text {
    font-size: 0.8rem;
  }
  
  /* Products mobile styling for very small screens */
  .product-banner {
    height: 150px !important;
  }
  
  .product-content {
    padding: 15px !important;
  }
  
  .product-tech {
    gap: 6px;
  }
  
  .tech-tag {
    padding: 4px 8px !important;
    font-size: var(--fs-9) !important;
  }
}