/*-----------------------------------*\
  #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-orange-1: linear-gradient(
    to bottom right, 
    #D73F09 0%, 
    hsla(15, 100%, 50%, 0) 50%
  );
  --bg-gradient-orange-2: linear-gradient(
    135deg, 
    hsla(15, 100%, 50%, 0.251) 0%, 
    hsla(15, 100%, 45%, 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-orange: linear-gradient(
    to right, 
    #D73F09, 
    #FF4500
  );

  /* 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: #D73F09;
  --complementary-orange: #FF4500;
  --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;

}

/* Light Mode Variables */
.light-mode {
  --bg-gradient-onyx: linear-gradient(to bottom right, hsl(0, 0%, 92%) 3%, hsl(0, 0%, 97%) 97%);
  --bg-gradient-jet: linear-gradient(to bottom right, hsla(0, 0%, 85%, 0.251) 0%, hsla(0, 0%, 90%, 0) 100%), hsl(0, 0%, 95%);
  --border-gradient-onyx: linear-gradient(to bottom right, hsl(0, 0%, 80%) 0%, hsla(0, 0%, 80%, 0) 50%);
  --jet: hsl(0, 0%, 50%);
  --onyx: hsl(0, 0%, 85%);
  --eerie-black-1: hsl(0, 0%, 90%);
  --eerie-black-2: hsl(0, 0%, 93%);
  --smoky-black: hsl(0, 0%, 98%);
  --white-1: hsl(0, 0%, 100%);
  --white-2: hsl(0, 0%, 98%);
  --light-gray: hsl(0, 0%, 25%);
  --light-gray-70: hsla(0, 0%, 20%, 0.7);
  --text-color: hsl(0, 0%, 5%); /* Darker black for text */
  --primary-color: hsl(15, 90%, 50%); /* Keep the orange vibrant */
  --complementary-orange: hsl(15, 100%, 45%);
  --shadow-1: -4px 8px 24px hsla(0, 0%, 0%, 0.1);
  --shadow-2: 0 16px 30px hsla(0, 0%, 0%, 0.1);
  --shadow-3: 0 16px 40px hsla(0, 0%, 0%, 0.1);
}

/* Apply Light Mode Colors */
body.light-mode {
  background: var(--smoky-black);
  color: var(--text-color);
}

.light-mode a {
  color: var(--primary-color);
}

.light-mode button {
  background: var(--onyx);
  color: var(--text-color);
}

.light-mode .navbar {
  background: var(--eerie-black-2);
  border-color: var(--jet);
}

.light-mode .timeline-text li {
  color: var(--text-color);
}

.light-mode .credits-description a {
  color: var(--primary-color);
}

.light-mode .project-title {
  color: var(--text-color);
}

.light-mode .project-description li::before,
.light-mode .timeline-text li::before {
  color: var(--primary-color);
}

/*-----------------------------------*\
  #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);
  color: var(--smoky-black);
}

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

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

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

[data-page] {
  display: none;
}

[data-page].active {
  display: block;
}




/*-----------------------------------*\
  #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,
.contact-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;
  box-shadow: var(--shadow-1);
  z-index: 1;
}

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

.contact-icon-box img {
  width: 15px; 
}

.icon-box img {
  width: 15px;
}

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-orange);
  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: var(--orange);
  border-radius: 5px;
}

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

video:fullscreen,
video:-webkit-full-screen,
video:-moz-full-screen {
  width: 100% !important;
  height: auto !important;
  max-height: 100vh !important;
  object-fit: contain;
  background: black;
}




/*-----------------------------------*\
  #MAIN
\*-----------------------------------*/

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

.main-content {
  opacity: 0; /* Hide the content initially */
  transition: opacity 0.3s ease; /* Smooth fade-in effect */
}

.main-content.visible {
  opacity: 1; /* Make the content visible */
}



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

.sidebar {
  margin-bottom: 15px;
  max-height: 112px;
  overflow: hidden;
}

.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;
}

.avatar-box img {
  border-radius: 12px;
}

.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);
  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-orange-1); }

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

.info_more-btn span { display: none; }

.info_more-btn img {
  width: 20px;
}

.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;
}

.navbar-link {
  color: var(--light-gray);
  font-size: var(--fs-8);
  padding: 20px 7px;
  transition: color var(--transition-1);
}

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

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

.navbar {
  opacity: 0;
  transition: opacity 0.3s ease; /* Match main-content */
}

body.page-ready .navbar {
  opacity: 1;
}




/*-----------------------------------*\
  #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 
 */

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

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

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

/* Service / "What I Do" */
.service {
  margin-bottom: 35px;
}

.service-title {
  margin-bottom: 20px;
  font-size: var(--fs-5);
}

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

.service-item {
  position: relative;
  background: var(--border-gradient-onyx);
  padding: 20px;
  border-radius: 12px;
  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;
  font-size: var(--fs-6);
}

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


/**
 * #hobbies 
 */

.hobbies {
  margin-bottom: 5px;
}

.hobbies-content-card {
  position: relative;
  background: var(--border-gradient-onyx);
  padding: 30px;
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  z-index: 1;
}

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

.hobbies-title {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  font-size: var(--fs-5);
}

.hobbies-item {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  box-shadow: var(--shadow-1);
  margin-bottom: 20px;
}

.hobbies-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.hobbies-avatar-box img {
  width: 40px;
  height: 40px;
}

.hobbies-item-title {
  font-size: var(--fs-6);
  color: var(--white-2);
}

.hobbies-text {
  font-size: var(--fs-7);
  color: var(--light-gray);
  line-height: 1.6;
}



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

.article-title { margin-bottom: 30px; }


/**
 * education and experience 
 */

.timeline { margin-bottom: 30px; }

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

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

.timeline-item { position: relative; }

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

.timeline-item-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: var(--fs-6);
  line-height: 1.3;
  margin-bottom: 3px;
}

.timeline-item-subtitle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 5px;
  color: var(--orange)
}

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

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

.timeline-item::after {
  content: "";
  position: absolute;
  top: 5px;
  left: -23px;
  height: 6px;
  width: 6px;
  background: var(--text-gradient-orange);
  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;
  margin-block-end: 10px;
}

.timeline-text li {
  position: relative;
  margin-left: 20px;
  padding-left: 20px;
  line-height: 1.8;
  font-size: var(--fs-7);
  color: var(--light-gray);
}

.timeline-text li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--light-gray);
  font-weight: var(--fw-400);
}


/* Responsive styles for larger screens */
@media (min-width: 768px) {
  .timeline-list {
    margin-left: 45px;
  }

  .timeline-item-title,
  .timeline-item-subtitle {
    gap: 15px;
  }
}


/*-----------------------------------*\
  #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-orange);
  height: 100%;
  border-radius: inherit;
}

.skill-category {
  padding: 15px 30px;
  background: var(--eerie-black-2);
  border: 1px solid var(--jet);
  border-radius: 12px;
  box-shadow: var(--shadow-1);
  margin-bottom: 15px;
}

.skills-list {
  list-style: none;
  padding: 0;
}

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

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

.skills-item {
  flex-direction: column;
  align-items: flex-start;
  display: flex;
  margin-right: 5px;
  margin-bottom: 8px;
  padding: 5px;
}

.skills-item h4 {
  font-size: var(--fs-6);
  color: var(--white-2);
  margin-bottom: 5px;
}

.skills-item p {
  font-size: var(--fs-8);
  color: var(--light-gray);
  line-height: 1.2;
  margin-bottom: 0px;
}

.skill-icon {
  display: none;
}

.skill-icon-placeholder {
  display: none;
}



/*-----------------------------------*\
  #PROJECTS
\*-----------------------------------*/

.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: 12px 16px;
  border: 1px solid var(--jet);
  border-radius: 14px;
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
}

.filter-select:hover { background: var(--eerie-black-1); }

.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: 1px solid var(--jet);
  border-radius: 14px;
  z-index: 2;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: 0.15s ease-in-out;
}

.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: 8px 10px;
  border-radius: 8px;
}

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

.project-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 15px;
  overflow: hidden;
}

.project-images {
  flex: 1;
  display: flex;
  flex-direction: row;
  overflow-y: auto;
  overflow-x: auto;
  min-height: 0;
  max-height: 100%;
  gap: 10px;
  transition: height 0.3s ease;
  padding-bottom: 15px;
}

.project-images img,
.project-images video {
  max-height: 200px;
  width: auto;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: var(--shadow-1);
  cursor: pointer;
}

.project-images img:hover,
.project-images video:hover {
  opacity: 0.8;
}

.project-images::-webkit-scrollbar {
  height: 5px;
}

.project-images::-webkit-scrollbar-track {
  background: var(--onyx); /* Match the vertical scrollbar track color */
  border-radius: 5px;
}

.project-images::-webkit-scrollbar-thumb {
  background: var(--orange); /* Match the vertical scrollbar thumb color */
  border-radius: 5px;
}

.project-images::-webkit-scrollbar-thumb:hover {
  background: hsla(0, 0%, 100%, 0.15); /* Slightly lighter on hover */
}

.project-images::-webkit-scrollbar-button {
  width: 5px; /* Optional: Adjust the width of the scrollbar buttons */
}

.project-details {
  flex: 2;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.project-details::-webkit-scrollbar {
  width: 5px;
}

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

.project-details::-webkit-scrollbar-thumb {
  background: var(--orange);
  border-radius: 5px;
}

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

.project-title {
  font-size: var(--fs-5);
  color: var(--white-2);
  margin-bottom: 10px;
}

.project-subtitle {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.project-category,
.project-date {
  font-size: var(--fs-7);
  color: var(--light-gray-70);
  margin-bottom: 10px;
}

.project-description-summary {
  font-size: var(--fs-7);
  color: var(--light-gray);
  line-height: 1.5;
  margin-bottom: 10px;
}

.project-description-summary::before {
  content: "Summary:  ";
  color: var(--primary-color);
}

.project-description {
  font-size: var(--fs-7);
  color: var(--light-gray);
  line-height: 1.8;
  list-style-type: disc;
  margin-bottom: 15px;
}

.project-description li::before {
  content: "• ";
  color: var(--primary-color);
}

.project-considerations-title {
  font-size: var(--fs-7);
  color: var(--light-gray-70);
  margin-bottom: 10px;
}

.project-considerations {
  font-size: var(--fs-7);
  color: var(--light-gray);
  line-height: 1.8;
  list-style-type: disc;
  margin-bottom: 15px;
}

.project-considerations li::before {
  content: "• ";
  color: var(--primary-color);
}

/* === Modal Container === */
.modal-container {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0);
  opacity: 0;
  z-index: 1000;
  pointer-events: none;
  transition: background-color 0.3s ease, opacity 0.3s ease;
}

.modal-container.active {
  background-color: rgba(0, 0, 0, 0.8);
  opacity: 1;
  pointer-events: auto;
}

.modal-container.closing {
  background-color: rgba(0, 0, 0, 0);
  opacity: 0;
}

/* === Modal Content === */
.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  max-width: 80vw;   /* Have to adjust in js under const mediaElement = type === 'video' */
  max-height: 75vh;  /* Have to adjust in js under const mediaElement = type === 'video' */
  padding: 0;
  overflow: show;
  background: transparent;
  border-radius: 8px; 
  animation: fadeInScale 0.2s ease forwards;
  transition: transform 0.3s ease, opacity 0.3s ease;
} 

.modal-content img,
.modal-content video {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  background-color: #000;
}

/* Optional: helps avoid subtle anti-aliasing lines on mobile */
.modal-content img,
.modal-content video {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* === Swipe Animations === */
.modal-content img.swipe-left,
.modal-content video.swipe-left,
.modal-close-btn.swipe-left,
.modal-caption.swipe-left {
  animation: swipeLeft 0.3s ease forwards;
}


.modal-content img.swipe-right,
.modal-content video.swipe-right,
.modal-close-btn.swipe-right,
.modal-caption.swipe-right {
  animation: swipeRight 0.3s ease forwards;
}

.modal-container.swipe-down {
  animation: swipeDown 0.3s ease forwards;
}

/* === Keyframes === */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeOutScale {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

@keyframes swipeLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

@keyframes swipeRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes swipeDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

/* === Modal Close Button === */
.modal-close-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background-color: rgba(0, 0, 0, 0.3);
  color: var(--white-1);
  border: none;
  font-size: 1rem;
  padding: 0rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: background-color 0.2s ease;
  animation: fadeInScale 0.2s ease forwards;
}

.modal-close-btn:hover {
  background-color: rgba(0, 0, 0, 0.75);
}

.modal-arrow {
  display: none;
}

/* === Modal Dots === */
.modal-dots {
  display: none;
  position: fixed; /* Change to fixed to prevent movement */
  bottom: -1rem; /* Adjust position relative to the viewport */
  left: 50%; /* Center horizontally */
  transform: translateX(-50%); /* Center alignment */
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  z-index: 10001;
  pointer-events: auto; /* Ensure they are clickable */
}

.modal-dot {
  display: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--jet);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.modal-dot.active {
  background-color: var(--orange);
}

.modal-caption {
  margin-top: 1rem; /* Adjust for top placement */
  margin-bottom: 1rem; /* Adjust for bottom placement */
  font-size: var(--fs-7);
  color: var(--light-gray);
  text-align: center;
  max-width: 80%;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

/* === Body Scroll Lock === */
body.modal-open {
  position: fixed;
  width: 100%;
  overflow: hidden;
  height: 100vh;
}

.modal-open #page-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  overflow: hidden;
  width: 100%;
}



/* Resume-style bullet points */
.project-description li,
.project-considerations li {
  position: relative;
  margin-left: 10px; /* Indent the bullet points */
  padding-left: 20px; /* Space between bullet and text */
  line-height: 1.8;
  font-size: var(--fs-7);
  color: var(--light-gray);
}

.project-description li::before,
.project-considerations li::before {
  content: "✔"; /* Use the same dash as the resume page */
  position: absolute;
  left: 0;
  color: var(--light-gray); /* Match the color used in the resume */
  font-weight: var(--fw-400);
}

/*-----------------------------------*\
  #COURSES
\*-----------------------------------*/

.course-matrix {
  margin-top: 0px;
}

.course-table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--jet);
  border-radius: 12px;
  box-shadow: var(--shadow-1);
  z-index: 1;
}

/* Each row and column as block for mobile */
.course-row {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--jet);
  padding: 12px 0;
}

.course-col {
  padding: 8px 16px;
  font-size: var(--fs-7);
  color: var(--light-gray);
}

/* Hide the second column (Category) on small screens */
.course-row > .course-col:nth-child(2) {
  display: none;
}

/* Hide table headers on small screens */
.course-header {
  display: none;
}


/*-----------------------------------*\
  #CREDITS
\*-----------------------------------*/

/* Default (Mobile-First) Styles */
.credits-list {
  margin-bottom: 30px;
}

.credits-list-items {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column; /* Stack items vertically */
  gap: 15px; /* Space between items */
}

.credits-item {
  display: flex;
  flex-direction: column; /* Stack title and description */
  gap: 10px;
  background: var(--eerie-black-2);
  padding: 15px;
  border: 1px solid var(--jet);
  border-radius: 12px;
  box-shadow: var(--shadow-1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.credits-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

.credits-title {
  font-size: var(--fs-6);
  font-weight: var(--fw-500);
  color: var(--white-2);
}

.credits-description {
  font-size: var(--fs-7);
  color: var(--light-gray);
  line-height: 1.6;
}

.credits-description a {
  color: var(--orange);
  text-decoration: none;
  transition: color 0.2s ease;
}

.credits-description a:hover {
  color: var(--complementary-orange);
  text-decoration: underline;
}

/* Sublist for Icons */
.icon-credit-sublist {
  display: flex;
  flex-direction: column; /* Stack items vertically */
  gap: 8px; /* Space between items */
  padding-left: 20px;
}

.icon-credit-sublist li {
  margin-bottom: 4px;
  font-size: var(--fs-7);
  color: var (--light-gray);
}

.icon-credit-sublist li a {
  color: var(--orange);
  text-decoration: none;
  transition: color 0.2s ease;
}

.icon-credit-sublist li a:hover {
  color: var(--complementary-orange);
  text-decoration: underline;
}

/* Icons Credits Section */
.icons-credits {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--jet);
}

.icons-credits-title {
  font-size: var(--fs-5);
  font-weight: var(--fw-500);
  color: var(--white-2);
  margin-bottom: 15px;
  text-align: center;
}

.icon-credit-sublist {
  list-style-type: disc;
  padding-left: 20px;
  margin: 0 auto;
  max-width: 800px; /* Limit the width for better readability */
}

.icon-credit-sublist li {
  margin-bottom: 8px;
  font-size: var(--fs-7);
  color: var(--light-gray);
}

.icon-credit-sublist li a {
  color: var(--orange);
  text-decoration: none;
  transition: color 0.2s ease;
}

.icon-credit-sublist li a:hover {
  color: var(--complementary-orange);
  text-decoration: underline;
}

.icon-credit-sublist li a::before {
  content: "✔"; /* Use the same dash as the resume page */
  position: flex;
  padding-right: 15px;
  color: var(--light-gray); /* Match the color used in the resume */
  font-weight: var(--fw-400);
}

/* Responsive Adjustments */
@media (min-width: 768px) {
  .icon-credit-sublist {
    padding-left: 40px;
  }
}

@media (min-width: 1024px) {
  .icon-credit-sublist {
    padding-left: 60px;
  }
}


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


/**
 * responsive larger than 360px screen
 */

@media (min-width: 360px) {

  /**
   * #SCROLL BAR
   */

  html { 
    font-family: var(--ff-poppins); 
    overflow-y: scroll; /* Always "show" scrollbar */
  }

  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; }

}


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

@media (min-width: 450px) {



  /**
   * #PROJECTS
   */

  .project-img { 
    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: 25px;
  }

  .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 img {
    display: none;
  }

  .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: 20px; }

  .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; }



  /**
   * #RESUME
   */

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

  .timeline-item:not(:last-child)::before { left: -40px; }

  .timeline-item::after {
    height: 8px;
    width: 8px;
    left: -43px;
  }


  /**
   * #SKILLS
   */

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


  /**
   * #PROJECTS
   */

  .project-img { 
    border-radius: 16px; 
  }

  .modal-prev,
  .modal-next {
    position: absolute;
    top: 50%; /* Center vertically */
    transform: translateY(-50%); /* Adjust for perfect centering */
    z-index: 999; /* Ensure it stays above other elements */
  }

  .modal-prev {
    left: 1rem;
  }
  
  .modal-next {
    right: 1rem;
  }


  /**
   * #CREDITS
   */

   .credits-list-items {
    flex-direction: row;
    flex-wrap: wrap; /* Allow wrapping to the next line */
    justify-content: center;
  }

  .icon-box img {
    width: 25px;
  }
  
}





/**
 * 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
   */

  .about-text {
    font-size: var(--fs-6);
  }

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

  .service-item-title {
    font-size: var(--fs-5);
  }

  .service-item-text {
    font-size: var(--fs-6);
  }

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

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

  /**
   * PROJECTS
   */

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

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

  .filter-list {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 25px;
    padding-left: 5px;
    margin-bottom: 30px;
  }

  .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); }

  /* projects */

  .project-content {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 30px;
    overflow: hidden;
  }
  
  .project-content.reverse {
    flex-direction: row-reverse;
  }
  
  .project-images {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: auto;
    min-height: 0;
    max-height: 100%;
    padding-right: 10px;
    gap: 10px;
    transition: height 0.3s ease;
    padding-bottom: 0;
  }
  
  .project-images img,
  .project-images video {
    max-height: none;
    width: auto;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
    box-shadow: var(--shadow-1);
    cursor: pointer;
    background-color: #000;
  }
  
  .project-images img:hover,
  .project-images video:hover {
    opacity: 0.8;
  }
  
  .project-images::-webkit-scrollbar {
    width: 5px; /* Set the width for the vertical scrollbar */
  }
  
  .project-images::-webkit-scrollbar-track {
    background: var(--onyx); /* Match the vertical scrollbar track color */
    border-radius: 5px;
  }
  
  .project-images::-webkit-scrollbar-thumb {
    background: var(--orange); /* Match the vertical scrollbar thumb color */
    border-radius: 5px;
  }
  
  .project-images::-webkit-scrollbar-thumb:hover {
    background: hsla(0, 0%, 100%, 0.15); /* Slightly lighter on hover */
  }
  
  .project-images::-webkit-scrollbar-button {
    width: 5px; /* Optional: Adjust the width of the scrollbar buttons */
  }
  
  .project-details {
    flex: 2;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-right: 10px;
  }
  
  .project-details::-webkit-scrollbar {
    width: 5px;
  }
  
  .project-details::-webkit-scrollbar-track {
    background: var(--onyx);
    border-radius: 5px;
  }
  
  .project-details::-webkit-scrollbar-thumb {
    background: var(--orange);
    border-radius: 5px;
  }
  
  .project-details::-webkit-scrollbar-thumb:hover {
    background: hsla(0, 0%, 100%, 0.15);
  }

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

  .project-category,
  .project-date,
  .project-description-summary,
  .project-description,
  .project-considerations-title,
  .project-considerations {
    font-size: var(--fs-6);
  }

  .modal-close-btn {
    font-size: 1.5rem;
  }

  .modal-arrow {
    display: flex;
    position: absolute;
    top: 30vh;
    font-size: 2rem;
    background-color: rgba(0, 0, 0, .3);
    color: var(--white-1);
    padding: 0rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    z-index: 999;
    transition: background-color 0.2s ease;
    animation: fadeInScale 0.2s ease forwards;
    transition: opacity 0.2s ease;  
  }

  .modal-arrow.disabled {
    display: none
  }
  
  .modal-arrow:hover {
    background-color: rgba(0, 0, 0, 0.75);
  }

  .modal-dots {
    display: flex;
  }

  .modal-dot {
    display: flex;
  }



  /**
   * COURSES
   */

  .course-table {
    display: table;;
    border-radius: 12px;
    overflow: hidden;
  }

  .course-row {
    display: table-row;
    padding: 0;
    border-radius: 12px;
  }

  .course-col {
    display: table-cell;
    padding: 12px 16px;
    vertical-align: middle;
    border-top: 1px solid var(--jet);
    min-width: 105px;
  }

  .course-header {
    display: table-row;
    background: var(--jet);
    font-weight: var(--fw-600);
    color: var(--white-2);
    border-bottom: 1px solid var(--jet);
    border-radius: 12px;
  }

  .course-header .course-col {
    font-size: var(--fs-6);
    white-space: nowrap;
  }

  .course-row > .course-col:nth-child(2) {
    display: table-cell;
  }


  /**
   * CREDITS
   */

   .credits-list-items {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .credits-item {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--eerie-black-2);
    padding: 8px 15px;
    border: 1px solid var(--jet);
    border-radius: 12px;
    box-shadow: var(--shadow-1);
    transition: transform 0.2s ease;
  }
  
  .credits-item:hover {
    transform: translateY(-2px);
  }
  
  .credits-title {
    font-size: var(--fs-7);
    color: var(--white-2);
    font-weight: var(--fw-500);
  }
  
  .credits-description a {
    font-size: var(--fs-7);
    color: var(--orange);
    text-decoration: none;
    font-weight: var(--fw-400);
  }
  
  .credits-description a:hover {
    text-decoration: underline;
  }

  .credits-list-items {
    flex-direction: row; /* Arrange items in a row */
    gap: 20px; /* Increase spacing between items */
  }

  .credits-item {
    max-width: calc(50% - 20px);
  }

  .icon-credit-sublist {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 10px 50px; /* Space between items */
    padding-left: 0; /* Optional: Adjust padding for larger screens */
    max-width: 97%; /* Ensure it doesn't exceed the container width */
  }
}





/**
 * 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);
  }

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



  /**
   * 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: 30px;
    padding: 0 20px;
  }

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



  /**
   * ABOUT
   */

  /* service */

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


  
  /**
   * SKILLS
   */

  .skills-title { 
    font-size: var(--fs-3); 
  }

  .skills-item {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

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

  .skills-item p {
    font-size: var(--fs-6);
    margin-top: 0px;
  }

  .skill-icon {
    width: 40px;
    height: 40px;
    display: block;
  }



  /**
   * PROJECTS
   */

   .project-content {
    gap: 30px;
  }

  .modal-close-btn {
    position: absolute;
    top: 0rem;
    right: 0.5rem;
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--white-1);
    border: none;
    font-size: 2rem;
    padding: 0rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease;
    animation: fadeInScale 0.2s ease forwards;
  }

  /**
   * COURSES
   */

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

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


  /**
   * CREDITS
   */

  .credits-item {
    max-width: calc(33.33% - 10px);
  }
}





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

@media (min-width: 1250px) {

  /**
   * RESET
   */



  /**
   * REUSED STYLE
   */

  .sidebar, article { width: auto; }

  article { min-height: 100%; }
  



  /**
   * MAIN
   */

  main {
    max-width: 2000px;
    margin-inline: auto;
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: flex(25px, 5%);
    margin-right: 75px;
    margin-left: 30px;
  }

  .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;
    min-width: 280px;
  }

  .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 {
    min-width: 178px;
  }

  .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; }

  .contact-icon-box, .contact-info {
    position: relative;
    left: -5px;
  }



  /**
     * RESUME
     */

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

}

