canvas {
  position: fixed;
  top: 0;
  left: 0;
  display: none;
}

body {
  width: 100%;
  color: #012d5c;
  font-family:'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

body::-webkit-scrollbar {
  display: none;
}

#flat-site {
  margin-left: 200px;
  transition: all 0.3s;
  width: calc(100% - 200px); /* Ensure content doesn't overflow */
  box-sizing: border-box;
}

#top {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

h1 {
  color: #ddd;
  font-size: 7vw;
}

#title {
  margin-bottom: 2vw;
}

#subtitle {
  color: #ddd;
  text-align: center;
  margin-bottom: 2vw;
  font-size: 1vw;
}

#sidebar {
  height: 100%;
  width: 200px;
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  background-color: #111;
  overflow-x: hidden;
  transition: 0.5s;
  padding-top: 60px;
}

#sidebar i {
  margin-right: 15px;
}

#sidebar a {
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  color: #818181;
  transition: 0.3s;
  margin-left: 1vw;
  display: flex;
  flex-direction: row;
  margin-bottom: 2vw;
}

#sidebar a:hover {
  color: #f1f1f1;
}

#sidebar hr {
  width: 200px;
  margin-left: 0;
  border: 1px solid #818181;
}

#open-sidebar {
  font-size: 2vw;
  cursor: pointer;
  background: none;
  border: none;
  color: white;
  position: fixed;
  top: 5px;
  left: 5px;
  z-index: 2;
}

#close-sidebar {
  font-size: 30px;
  cursor: pointer;
  background: none;
  border: none;
  color: white;
  position: absolute;
  top: 20px;
  right: 25px;
}

#switch {
  position: fixed;
  top: 5px;
  right: 5px;
  background: deepskyblue;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.5vw;
  width: 2.5vw;
  border: none;
  border-radius: 5px;
  font-size: 2vw;
  transition: all 0.3s ease;
  z-index: 10;
}

@media screen and (max-width: 768px) {
  #switch {
    display: none !important;
  }
}

#switch:hover {
  cursor: pointer;
  background: #ddd;
}

#about {
  background-color: #90e0ef;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 2vw;
  padding-left: 5vw;
  padding-right: 5vw;
}

h2 {
  font-size: 4vw;
  text-align: center;
  margin-bottom: 2vw;
}

#about img {
  height: auto;
  width: auto;
  margin-left: 2vw;
  border-radius: 10px;
}

.about-text {
  flex-direction: column;
}

.about-text p {
  font-size: 1.5vw;
  text-align: center;
  background-color: #2a6f97;
  color: #ddd !important;
  border-radius: 10px;
  padding: 2vw;
}

#experiences {
  background-color: #caf0f8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-items: center;
  padding: 2vw;
  padding-left: 5vw;
  padding-right: 5vw;
}

#experience-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.experience {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  text-align: center;
  background: #2a6f97;
  color: #ddd !important;
  margin: 1vw 0;
  padding: 1vw;
  border-radius: 10px;
  width: 90%;
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 1s, transform 1s;
}

.experience-content {
  flex: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1vw;
  position: relative;
}

.experience-content::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0px;
  width: 2px;
  height: 100%;
  background-color: #ddd;
}

.experience-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 1vw;
}

.experience-image img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
}

.experience.animate {
  opacity: 1;
  transform: translateX(0);
}

.experience h6 {
  margin: 0;
}

.experience h4 {
  margin-bottom: 5px;
}

.experience h6 {
  margin-top: 5px;
}

a {
  color: lightskyblue;
}

#projects {
  background-color: #caf0f8;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 2vw;
  padding-left: 5vw;
  padding-right: 5vw;
}

.projects-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.project {
  flex: 1 1 10%;
  text-align: center;
  background-color: #2a6f97;
  padding: 15px;
  margin: 10px;
  border-radius: 8px;
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 1s, transform 1s;
  cursor: pointer;
}

.project.animate {
  opacity: 1;
  transform: translateX(0px);
}

.project a {
  color: lightskyblue;
}

.project h6 {
  margin: 0;
}

.project h4 {
  color: #ddd;
  margin-bottom: 5px;
}

.project h6 {
  margin-top: 5px;
}

.project img {
  max-height: 10vw;
  max-width: 10vw;
  border-radius: 10px;
  margin-top: 20px;
}

.project-icons {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.project-icons i {
  margin: 10px;
  background: none;
  border: 1px solid #ddd;
  color: #ddd;
  border-radius: 5px;
  font-size: 2vw;
  padding: 5px;
  transition: all 0.3s ease;
}

.project-icons i:hover {
  background: #ddd;
  border: 1px solid black;
  color: black;
}

.project-icons i[title] {
  position: relative;
}

.project-icons i[title]::after {
  content: attr(title);
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #012d5c;
  color: #ddd;
  padding: 5px;
  border-radius: 5px;
  white-space: nowrap;
  font-size: 0.5em;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  font-family:'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}

.project-icons i:hover[title]::after {
  opacity: 1;
}

.slide-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: auto;
}

.slides {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s ease-in-out;
}

.project-period {
  min-width: 90%;
  box-sizing: border-box;
}

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  padding: 16px;
  color: #012d5c;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  -webkit-user-select: none;
  user-select: none;
}

.prev {
  left: 5px;
  border-radius: 3px;
}

.next {
  right: 5px;
  border-radius: 3px;
}

.prev:hover, .next:hover {
  color: black;
  background: #ffffff80;
  border: 1px solid #012d5c;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: #00000066;
  padding-top: 60px;
}

.modal-content {
  background-color: #2a6f97;
  margin: 5% auto;
  padding: 20px;
  border-radius: 10px;
  max-width: 800px;
  animation: modalFadeIn 0.3s forwards;
}

.modal-content span, h4, h6, p {
  color: #ddd;
}

.modal.fade-out .modal-content {
  animation: modalFadeOut 0.3s forwards;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalFadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}


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

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

hr {
  width: 95%;
  margin: 2vw;
  border: 1px solid #6295aa;
}

h3 {
  font-size: 2vw;
  text-align: center;
  margin-bottom: 2vw;
}

#skills {
  background-color: #caf0f8;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 2vw;
  padding-left: 5vw;
  padding-right: 5vw;
}

#skills-list {
  display: flex;
  flex-wrap: wrap;
}

.skill {
  flex: 1 1 45%;
  background-color: #2a6f97;
  padding: 15px;
  margin: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 4px #0000001a;
  opacity: 0;
  transition: transform 0.3s, box-shadow 0.3s;
}

.skill:nth-child(1) {
  transition: opacity 1s;  
}

.skill:nth-child(2) {
  transition: opacity 1s 0.1s;  
}

.skill:nth-child(3) {
  transition: opacity 1s 0.2s;  
}

.skill:nth-child(4) {
  transition: opacity 1s 0.3s;  
}

.skill:nth-child(5) {
  transition: opacity 1s 0.4s;  
}

.skill:nth-child(6) {
  transition: opacity 1s 0.5s;  
}

.skill.animate {
  opacity: 1;
}

.skill h4 {
  font-size: 18px;
  color: #ddd;
}

.skill p {
  font-size: 16px;
  color: #ddd;
}

.experience:hover, .project:hover, .skill:hover, .about-text p:hover, #about img:hover {
  transform: scale(1.01);
  box-shadow: 0px 0px 8px #000000e6;
  transition: transform 0.3s, box-shadow 0.3s;
}

.experience, .project, .skill, .about-text p, #about img {
  transition: transform 0.3s, box-shadow 0.3s;
}

#last-sections {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
}

#last-sections div {
  padding: 2vw;
}

#last-sections h4, 
#last-sections h5, 
#last-sections img,
#last-sections a,
#last-sections p {
  opacity: 0;
  color: #012d5c;
  transform: translateY(50px);
  transition: opacity 1s, transform 1s;
}

#last-sections i {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s, transform 1s;
}

#last-sections p {
  text-align: left;
  font-weight: 100;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s, transform 1s;
}

#last-sections h4.animate,
#last-sections h5.animate,
#last-sections img.animate,
#last-sections a.animate,
#last-sections i.animate,
#last-sections p.animate {
  opacity: 1;
  transform: translateY(0px);
}

#last-sections h6.animate {
  opacity: 1;
  transform: translateY(0px);
}

#education {
  width: 40%;
  display: flex;
  flex-direction: column;
  align-items: center; 
  justify-content: center;
  text-align: center;
  background-color: #90e0ef;
}

#classes {
  width: 40%;
  display: flex;
  flex-direction: column;
  align-items: center; 
  justify-content: center;
  text-align: center;
  background-color: #00b4d8;
}

#contact {
  width: 40%;
  display: flex;
  flex-direction: column;
  align-items: center; 
  justify-content: center;
  text-align: center;
  background-color: #90e0ef;
}

#contact p {
  font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
  text-align: center;
}

#icons {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

#icons a {
  margin: 10px;
  background: none;
  color: #012d5c;
  border: 1px solid #012d5c;
  padding: 5px;
  border-radius: 5px;
  font-size: 2.5vw;
  transition: all 0.3s ease;
}

#icons a:hover {
  background: #ddd;
  border: 1px solid black;
  color: black;
}

#illinois {
  height: 7.5vw;
  width: 5vw;
  filter: brightness(350%);
}

#onespace {
  filter: brightness(800%);
}

#illinois2 {
  filter: brightness(350%);
}

#hobbies {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 2vw;
  padding-left: 5vw;
  padding-right: 5vw;
}

#hobbies h3 {
  color: #ddd;
}

.hobby {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-radius: 10px;
  width: 100%;
}

.hobby img {
  max-width: 15vw;
  border-radius: 10px;
}

/* Mobile Responsive Design */
@media screen and (max-width: 768px) {
  /* Hide sidebar on mobile by default and adjust main content */
  #flat-site {
    margin-left: 0;
    width: 100%;
    transition: all 0.3s;
  }
  
  #sidebar {
    width: 0;
    transition: 0.5s;
  }
  
  #sidebar.open {
    width: 200px;
  }
  
  #flat-site.sidebar-open {
    margin-left: 200px;
    width: calc(100% - 200px);
  }
  
  /* Adjust font sizes for mobile */
  h1 {
    font-size: 12vw;
  }
  
  h2 {
    font-size: 8vw;
    margin-bottom: 4vw;
  }
  
  h3 {
    font-size: 6vw;
    margin-bottom: 4vw;
  }
  
  #subtitle {
    font-size: 3vw;
    margin-bottom: 4vw;
  }
  
  /* Make about section stack vertically */
  #about {
    flex-direction: column;
    padding: 4vw 2vw;
    width: 100%;
    box-sizing: border-box;
  }
  
  #about img {
    margin-left: 0;
    margin-top: 4vw;
    max-width: 80vw;
    height: auto;
  }
  
  .about-text {
    width: 100%;
  }
  
  .about-text p {
    font-size: 4vw;
    padding: 4vw;
  }
  
  /* Fix experience section layout */
  #experiences {
    padding: 4vw 2vw;
    width: 100%;
    box-sizing: border-box;
  }
  
  .experience {
    flex-direction: column;
    width: 95%;
    margin: 2vw auto;
    padding: 4vw;
  }
  
  .experience-content::after {
    display: none;
  }
  
  .experience-image {
    padding-left: 0;
    padding-top: 2vw;
  }
  
  .experience-image img {
    max-width: 60vw;
    height: auto;
  }
  
  /* Fix projects section */
  #projects {
    padding: 4vw 2vw;
    width: 100%;
    box-sizing: border-box;
  }
  
  .projects-list {
    flex-direction: column;
    width: 100%;
  }
  
  .project {
    flex: none;
    width: 90%;
    margin: 2vw auto;
    max-width: none;
  }
  
  .project img {
    max-height: 20vw;
    max-width: 20vw;
  }
  
  .project-icons {
    flex-wrap: wrap;
  }
  
  .project-icons i {
    font-size: 6vw;
    margin: 1vw;
    padding: 2vw;
  }
  
  /* Fix skills section */
  #skills {
    padding: 4vw 2vw;
    width: 100%;
    box-sizing: border-box;
  }
  
  #skills-list {
    flex-direction: column;
    width: 100%;
  }
  
  .skill {
    flex: none;
    width: 90%;
    margin: 2vw auto;
  }
  
  /* Fix last sections */
  #last-sections {
    flex-direction: column;
    width: 100%;
  }
  
  #education, #classes, #contact {
    width: 100%;
    box-sizing: border-box;
  }
  
  #icons {
    flex-wrap: wrap;
  }
  
  #icons a {
    font-size: 8vw;
    margin: 2vw;
    padding: 2vw;
  }
  
  /* Fix hobbies section */
  #hobbies {
    flex-direction: column;
    padding: 4vw 2vw;
    width: 100%;
    box-sizing: border-box;
  }
  
  .hobby {
    margin-bottom: 4vw;
    width: 100%;
  }
  
  .hobby img {
    max-width: 40vw;
  }
  
  /* Adjust button sizes */
  #open-sidebar {
    font-size: 6vw;
    top: 2vw;
    left: 2vw;
  }
  
  #switch {
    height: 8vw;
    width: 8vw;
    font-size: 4vw;
    top: 2vw;
    right: 2vw;
  }
  
  /* Fix modal for mobile */
  .modal {
    padding-top: 20px;
  }
  
  .modal-content {
    margin: 5% 2vw;
    max-width: 90vw;
    padding: 4vw;
    box-sizing: border-box;
  }
  
  /* Adjust slide navigation */
  .prev, .next {
    font-size: 4vw;
    padding: 3vw;
  }
  
  /* Fix slide container */
  .slide-container {
    width: 100%;
    box-sizing: border-box;
  }
  
  .project-period {
    min-width: 100%;
    box-sizing: border-box;
    padding: 0 2vw;
  }
}

@media screen and (max-width: 480px) {
  /* Extra small mobile adjustments */
  h1 {
    font-size: 15vw;
  }
  
  h2 {
    font-size: 10vw;
  }
  
  h3 {
    font-size: 8vw;
  }
  
  #subtitle {
    font-size: 4vw;
  }
  
  .about-text p {
    font-size: 5vw;
  }
  
  .project img {
    max-height: 25vw;
    max-width: 25vw;
  }
  
  .project-icons i {
    font-size: 8vw;
  }
  
  #icons a {
    font-size: 10vw;
  }
  
  .hobby img {
    max-width: 50vw;
  }
}

@media screen and (min-width: 1200px) {
  /* Large desktop adjustments */
  #flat-site {
    width: calc(100% - 200px);
    max-width: none;
  }
  
  .about-text p {
    font-size: 1.2vw;
  }
  
  .project-icons i {
    font-size: 1.5vw;
  }
  
  #icons a {
    font-size: 2vw;
  }
}
