/* Dark theme - base styles */
html,
body {
  background-color: #1a1a1a;
  color: #e0e0e0;
}

#canvas-image-blending {
  display: none; /* Canvas background removed for better performance */
}

.main-content {
  padding: 5% 5%;
  padding-top: 6%;
  position: relative;
  z-index: 2;
  background-color: #1a1a1a;
}

/* Add spacing between navigation and content */
.main-content > .container {
  margin-bottom: 40px;
  margin-top: 20px;
  transition: padding-bottom 0.3s ease;
}

/* Add extra padding when dropdown menu is open */
.main-content > .container.menu-open {
  padding-bottom: 200px;
}

/* Hero section - hide the hero text section */
.main-content > div[style*='height: 400px'] {
  display: none !important; /* Hide hero section text */
}

/* Content sections - no hero section, so minimal spacing needed */
.main-content > main {
  position: relative;
  margin-top: 20px; /* Minimal spacing */
  z-index: 2;
}

.main-content > .flex-container-reverse,
.main-content > .flex-container {
  position: relative;
  margin-top: 20px; /* Minimal spacing */
  z-index: 2;
}

.header {
  display: flex;
}

.work-header {
  display: flex;
}

h1 {
  font-family: 'Rubik', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: #e0e0e0;
}

h2 {
  font-family: 'Rubik', sans-serif;
  font-size: 2rem;
  font-weight: 500;
  color: #e0e0e0;
}

h3 {
  font-family: 'Rubik', sans-serif;
  font-size: 1.8rem;
  font-weight: 500;
  color: #e0e0e0;
  padding-bottom: 10px;
}

p {
  font-family: 'Rubik', sans-serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: #d0d0d0;
}

.time-text {
  font-family: 'Rubik', sans-serif;
  font-size: 1.2rem;
  font-weight: 200;
  color: #b0b0b0;
}

.header-text {
  width: 80%;
}

.header-image {
  width: 65%;
  height: 65%;
}

.col {
  padding-bottom: 30px;
}

.rounded-corners {
  border-radius: 20px;
  height: 300px;
}

.title-image {
  border-radius: 20px;
  width: 80%;
}

.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0, 0, 0); /* Fallback color */
  background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
}

.modal-content {
  background-color: #2a2a2a;
  margin: 15% auto; /* 15% from the top and centered */
  padding: 20px;
  border: 1px solid #555;
  width: 80%; /* Could be more or less, depending on screen size */
  border-radius: 3%;
  color: #e0e0e0;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: #e0e0e0;
  text-decoration: none;
  cursor: pointer;
}

ul {
  list-style-position: inside;
  list-style-type: square;
}

/* Links in main content */
.main-content a {
  color: #4a9eff;
}

.main-content a:hover {
  color: #6bb3ff;
}

/* Social media icons keep their original colors - protected from theme overrides */

.flex-container {
  display: flex;
  flex-wrap: wrap;
  font-size: 30px;
  text-align: center;
}

.flex-container-reverse {
  display: flex;
  flex-wrap: wrap;
  font-size: 30px;
  text-align: center;
}

.big-container-left {
  flex: 70%;
  padding: 10px;
  text-align: left;
}

.small-container-right {
  flex: 30%;
  padding: 10px;
  text-align: right;
}

.big-container-right {
  flex: 70%;
  padding: 10px;
  text-align: left;
}

.small-container-left {
  flex: 30%;
  padding: 10px;
  text-align: left;
}

/* Contact me section */

.fa {
  padding: 20px;
  font-size: 20px;
  width: 60px;
  text-align: center;
  text-decoration: none;
  border-radius: 50%;
}

.fa:hover {
  opacity: 0.7;
  color: white;
}

.fa-paper-plane {
  background: #3d348b !important;
  color: white !important;
}

.fa-linkedin {
  background: #5659e3 !important;
  color: white !important;
}

.fa-github {
  background: #0e0e0e !important;
  color: white !important;
}

/* Styling for the progress bars */

.progressbar {
  height: 30px;
  width: 20%;
  background-color: #3d348b;
  display: flex;
  align-items: center;
  margin: 20px;
}

.inner-progressbar {
  background-color: #7678ed;
  height: 22px;
  margin-left: 4px;
  margin-right: 4px;
  padding-right: 4px;
  color: white;
  text-align: right;
  font-size: 15px;
}

.italian {
  width: 100%;
}

.english {
  width: 100%;
}

.german {
  width: 85%;
}

.mandarin {
  width: 20%;
}

/* Mobile and tablet responsive styles */
@media only screen and (max-width: 768px) {
  .container-fluid {
    align-content: center;
  }

  .header {
    display: inline;
    align-items: center;
  }

  .progressbar {
    width: 60%;
  }

  .flex-container-reverse {
    flex-direction: column-reverse;
  }

  .big-container-left,
  .small-container-right {
    flex: 100%;
  }

  .small-container-right {
    text-align: center;
  }

  .big-container-right,
  .small-container-left {
    flex: 100%;
  }

  .small-container-left {
    text-align: center;
  }

  /* Container and navigation fixes */
  .container {
    flex-direction: row;
    align-items: center;
    gap: 15px;
    position: relative;
  }

  /* Adjust spacing for mobile */
  .main-content > .container {
    margin-bottom: 30px;
    margin-top: 10px;
    transition: padding-bottom 0.3s ease;
  }

  /* Add extra padding when dropdown menu is open on mobile */
  .main-content > .container.menu-open {
    padding-bottom: 20px;
  }

  /* Show hamburger menu on mobile */
  .mobile-menu-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    order: 1;
  }

  .mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background: #e0e0e0;
    border-radius: 3px;
    transition: all 0.3s ease;
    display: block;
  }

  .mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
  }

  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
  }

  /* Hide regular nav on mobile by default, show dropdown when active */
  .topnav {
    display: none !important;
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: #2d2d2d;
    border-radius: 20px;
    padding: 10px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    gap: 0;
    margin: 0 !important;
    width: 100%;
    overflow: visible;
    justify-content: flex-start;
    align-items: stretch;
  }

  .topnav.active {
    display: flex !important;
  }

  /* Ensure the navigation container doesn't take full width on mobile */
  .container {
    width: 100%;
  }

  .topnav a {
    padding: 12px 20px;
    margin: 0;
    width: 100%;
    text-align: left;
    border-radius: 0;
  }

  .topnav a:hover {
    background-color: #3d3d3d;
    border-radius: 0;
  }

  .right-section {
    order: 2;
    margin-left: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .fa {
    padding: 15px;
    font-size: 18px;
    width: 50px;
  }

  /* Responsive font sizes */
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  h3 {
    font-size: 1.4rem;
  }

  p {
    font-size: 1rem;
  }

  .time-text {
    font-size: 1rem;
  }

  /* Main content padding */
  .main-content {
    padding: 3% 3%;
    padding-top: 4%;
  }

  /* Add more top margin to container on mobile */
  .main-content > .container {
    margin-top: 15px;
  }

  /* Hero section adjustments */
  .main-content > div[style*='height: 400px'] {
    height: 250px !important;
  }

  .main-content > div[style*='height: 400px'] h1 {
    padding-top: 60px !important;
    font-size: 1.75rem !important;
    color: #333 !important; /* Dark text for light background */
  }

  .main-content > div[style*='height: 400px'] p {
    padding-top: 15px !important;
    font-size: 1rem !important;
    color: #555 !important; /* Dark text for light background */
  }

  /* Title image adjustments */
  .title-image {
    width: 100% !important;
    max-width: 300px;
    margin: 0 auto;
    display: block;
  }

  /* Adjust content margin for mobile */
  .main-content > main {
    margin-top: 10px;
  }

  .main-content > .flex-container-reverse,
  .main-content > .flex-container {
    margin-top: 10px;
  }

  /* Smaller mobile devices */
  @media only screen and (max-width: 480px) {
    .topnav a {
      font-size: 14px;
      padding: 8px 6px;
      margin-right: 3px;
      font-family: 'Rubik', 'Apple Color Emoji', 'Segoe UI Emoji',
        'Segoe UI Symbol', sans-serif;
    }

    h1 {
      font-size: 1.75rem;
    }

    h2 {
      font-size: 1.4rem;
    }

    h3 {
      font-size: 1.2rem;
    }

    p {
      font-size: 0.95rem;
    }

    .main-content {
      padding: 2% 2%;
      padding-top: 3%;
    }

    /* Add more top margin on smaller mobile devices */
    .main-content > .container {
      margin-top: 10px;
    }

    .fa {
      padding: 12px;
      font-size: 16px;
      width: 45px;
    }

    /* Adjust spacing for smaller mobile devices */
    .main-content > .container {
      margin-bottom: 20px;
    }

    /* Hero section adjustments for very small devices */
    .main-content > div[style*='height: 400px'] {
      height: 200px !important;
    }

    .main-content > div[style*='height: 400px'] h1 {
      padding-top: 50px !important;
      font-size: 1.5rem !important;
      color: #333 !important; /* Dark text for light background */
    }

    .main-content > div[style*='height: 400px'] p {
      color: #555 !important; /* Dark text for light background */
    }

    /* Further adjust content margin on very small devices */
    .main-content > main {
      margin-top: 10px;
    }

    .main-content > .flex-container-reverse,
    .main-content > .flex-container {
      margin-top: 10px;
    }
  }

  /* Original breakpoint for very small devices */
  @media only screen and (max-width: 550px) and (min-width: 200px) {
    .container-fluid {
      align-content: center;
    }

    .header {
      display: inline;
      align-items: center;
    }

    .progressbar {
      width: 60%;
    }

    .flex-container-reverse {
      flex-direction: column-reverse;
    }

    .big-container-left,
    .small-container-right {
      flex: 100%;
    }

    .small-container-right {
      text-align: center;
    }

    .big-container-right,
    .small-container-left {
      flex: 100%;
    }

    .small-container-left {
      text-align: center;
    }
  }
}

/* Navigation bar styles - applied to all screen sizes */
/* Desktop styles - will be overridden on mobile */
.topnav {
  background-color: #2d2d2d;
  overflow: hidden;
  border-radius: 50px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  margin: auto;
  position: relative;
}

/* Ensure topnav is visible on desktop */
@media (min-width: 769px) {
  .topnav {
    display: flex !important;
  }

  .mobile-menu-toggle {
    display: none !important;
  }
}

/* Hide hamburger menu on desktop, show on mobile */
.mobile-menu-toggle {
  display: none;
}

/* Style the links inside the navigation bar */
.topnav a {
  float: none;
  color: #e0e0e0;
  text-align: center;
  padding: 14px 12px;
  text-decoration: none;
  font-size: 20px;
  margin-right: 20px;
  font-family: 'Rubik', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
    sans-serif;
}

/* Change the color of links on hover */
.topnav a:hover {
  background-color: #3d3d3d;
  color: #ffffff;
  border-radius: 50px;
  justify-content: space-between;
}

/* Add a color to the active/current link */
.topnav a.active {
  background-color: #4a5568;
  color: white;
  border-radius: 50px;
}

.container {
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.right-section {
  display: flex;
  align-items: center;
  gap: 10px;
}
