* { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    height: 100%;

    scroll-behavior: smooth;
    background-color: black;
    display: flex;
    justify-content: center;
}

#splash {
    background-color: black;
    color: white;
    font-family: monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    flex-direction: column;
    z-index: 10;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
}

.cursor::after {
    content: "|";
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

#main-content {
    display: none;
    width: 85vw;
    margin-top: 10vh;
    padding: 100px;
    padding-top: 15vh;
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
    border: 0.5px solid black;
    color: white;
    display: flex;
    flex-direction: column;

    background-color: rgb(0, 0, 0);
    background-image: url('./images/noise.png');
    background-size: 100% auto;
    background-repeat: repeat-y;
    height: min-content;
    position: relative;
    padding-bottom: 300px;
}

#more-projects-link {
  margin-top: auto;
  font-size: x-large;
  font-weight: 500;
}
.lineHeader {
    color: green; /* Make the lineHeader green */
}

.header {
  /* pass */
}
.greetings {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-weight: 400;
  font-size: 4.2rem;
  margin: 0;
  margin-top: 10px;
  margin-bottom: 15px;
}
.sub-wrapper {
  height: 2.8rem;
  overflow: hidden;
  position: relative;
}

.sub-slider {
  display: flex;
  flex-direction: column;
  transition: transform 0.5s ease-in-out;
}

.sub {
  color: rgb(0, 223, 0);
  font-weight: 250;
  font-size: 1.8rem;
  margin: 0;
  height: 2.8rem;
  display: flex;
  align-items: center;
}

.main-sub {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}

.links {
  flex: 4;
  /* border: 1px solid white; */
  display: flex;
  flex-direction: column;
  min-width: 400px;
  margin-top: 3vw;


}
.carousel {
  flex: 4;
  height: 330px;
  min-width: 300px;
  gap: 15px;
  display: flex;
  overflow-x: scroll;
  align-items: center;
  padding: 30px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;
  position: relative;
  -webkit-overflow-scrolling: touch;
  
}

.carousel > * {
  flex-shrink: 0;
  width: 70px;
  height: 100%;
  font-size: large;
  border-radius: 10px;
  background-color: rgba(0, 0, 0, 0.527);
  transition: 0.6s ease, padding 0.3s ease;
  display: flex;
  justify-content: flex-start;
  padding: 20px;
  align-items: center;
  text-align: center;
  writing-mode: vertical-rl; 
}

.carousel > .expanded {
  width: 300px;
  writing-mode: horizontal-tb; /* Horizontal text when expanded */
  align-items: flex-end; /* Align text at the bottom when expanded */
  justify-content: flex-start;
}

.section-link {
  color: white;
  text-decoration: none;
  font-family: 'geist', sans-serif;
  font-size: 1.3rem;
  font-weight: 200;

  margin-bottom: 1.2rem;
  width: fit-content;
}

.section-title {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-size: xx-large;
  font-weight: 500;
}
a:hover {
  text-shadow: 0 0 10px #01ae12aa, 0 0 20px #01ae12aa, 0 0 30px #01ae12aa, 0 0 40px #01ae12aa;
}


.section {
  width: 100%;
  box-sizing: border-box;
  min-height: 75vh;
  font-size: 1rem;
  font-family: sans-serif;
  display: flex;
  flex-wrap: wrap;
  padding-left: 0; /* Remove left padding */
  padding-right: 0; /* Remove right padding */
}

.more-projects {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: fit-content;
  margin-top: 50px;
  margin-bottom: 200px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, 200px);
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
  font-family: sans-serif;
  font-size: 16px;
  font-weight: 550;
  margin-left: auto;
  margin-right: auto;
  width: 70vw;
}

.project-link {
  display: block;
  width: 200px;
  height: 200px;
  text-decoration: none;
  position: relative;
  border-radius: 20px;
  overflow: hidden; /* Prevent text and overlay from overflowing */
  font-size: 14px;
}

.project {
  position: relative;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.423);
}
.project:hover {
  opacity: 1;
}

.project .overlay {
  border-radius: 20px;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.573); /* Black overlay with 0.6 opacity */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1; /* Ensure overlay is above the background but below text */
}

.project span {
  position: relative;
  z-index: 2; /* Ensure text is above the overlay */
  color: white;
  text-align: center;
  text-transform: uppercase; /* Optional for uppercase text */
}


.about-me {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: #0E1117;
  border-radius: 10px;
  width: 109%;
  margin-left: -4.5%;
  height: 700px;
  overflow-x: hidden;
  /* Hide scrollbar for WebKit (Chrome, Edge, Safari) */
  scrollbar-width: none;           /* Firefox */
  -ms-overflow-style: none;        /* IE/Edge */
}

.about-me-header {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  padding: 0.5rem;
  padding-left: 2rem;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.253);
}

.about-me-title {
  font-size: 1.5rem;
  font-weight: 600;
}

.about-me::-webkit-scrollbar {
  display: none;                   /* Chrome, Safari */
}

.narrative {
  display: flex;
  padding-top: 20px;
  width: 100%;
  padding: 0; /* Remove all padding */
  overflow-y: scroll;
}

.readme-container {
  flex: 1;
}
.readme {
  border: 0.5px solid rgba(255, 255, 255, 0.253);
  border-radius: 8px;
  width: 100% !important;
}

.profile {
  width: 30%;
  margin: 0;
  padding: 20px;
  padding-left: 0;
}

.narrative-text {
  box-sizing: border-box;
  max-width: 600px;
  min-width: 400px;
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 0.05em; /* Or px/rem */
  line-height: 1.6;
}

.me-img {
  flex: 1;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 500px;
  border: 0.2px solid rgba(255, 255, 255, 0.222);
}

.car-item {
  position: relative;
}

.car-item a {
  position: relative;
  z-index: 2;
}

.bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(rgba(0, 0, 0, 1), rgba(0, 0, 0, 1));
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  border-radius: 10px;
}

.skills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start; /* Left align */
  gap: 15px;
}

.skill {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  margin: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  object-fit: contain;
}

.skills-h {
  font-family:monospace;
  font-size: 25px;
}

.footer {
  background-color: #000000; /* dark slate */
  color: #f8fafc; /* light text */
  padding: 2rem;
  text-align: center;
  font-family: 'Inter', sans-serif;

  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
}

.footer .section-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer p {
  font-size: 1rem;
  margin: 0;
}

.footer a {
  color: #61c284; /* green-500 */
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #4ade80; /* green-400 */
  text-decoration: underline;
}
/* Add media queries for responsiveness below */

@media (max-width: 768px) {
  /* Styles for screens smaller than 768px */
  #main-content {
    width: 100vw;
    padding: 5vh 3vw;
    overflow-x: hidden;
    margin-top: 5vh;
    border-radius: 20px;
  }

  .greetings {
    font-size: 2.5rem;
    text-align: center;
  }

  .sub {
    font-size: 1.3rem;
    text-align: center;
  }

  .main-sub {
    flex-direction: column;
    gap: 20px;
  }

  .links {
    width: 100%;
    min-width: unset;
    margin-left: 0;
    align-items: center;
    order: 2;
  }

  .section-link {
    font-size: 1.1rem;
    margin-left: 0;
    margin-bottom: 1rem;
    text-align: center;
  }

  .section {
    padding-left: 0;
    padding-right: 0;
    min-height: auto;
  }

  .narrative {
    flex-direction: column;
    gap: 5vw;
    align-items: center;
  }

  .narrative-text {
    max-width: 95vw;
    min-width: unset;
    padding: 0 20px;
    text-align: center;
  }

  .me-img {
    width: 200px;
    height: 200px;
    margin: 0;
  }

  .skills-h {
    font-size: 20px;
  }

  .skills {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .skill {
    width: 50px;
    height: 50px;
  }

  .more-projects {
    margin-bottom: 100px;
    margin-top: 30px;
  }

  .projects-grid {
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
    display: grid;
    grid-template-columns: repeat(auto-fit, 150px);
    margin-left: auto;
    margin-right: auto;
    width: 80vw;
  }

  .carousel {
    padding: 15px;
    height: 280px;
    min-width: unset;
    width: 100%;
    order: 1;
  }

  .carousel > * {
    width: 60px;
    min-width: 60px;
    font-size: 14px;
    padding: 15px 10px;
  }

  .carousel > .expanded {
    width: 250px;
    min-width: 250px;
  }

  .project-link {
    flex: 0 0 150px;
    height: 150px;
  }

  .footer h3 {
    font-size: 1.3em;
  }

  .footer p {
    font-size: 0.9em;
  }

  .footer a {
    margin: 0 5px;
  }

  .about-me {
    padding: 20px;
  }

  .about-me-header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .readme-container {
    max-width: 100%;
    overflow-x: hidden;
  }

  .readme {
    padding: 1rem !important;
    font-size: 14px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
  }

  /* Prevent code blocks from overflowing */
  .readme pre {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
  }

  .readme code {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Ensure tables don't overflow */
  .readme table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
  }

  .readme img {
    max-width: 100%;
    height: auto;
  }

  .profile {
    width: 100%;
    max-width: 100%;
    display: none; /* Hide profile on mobile */
  }

  .readme-container {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  /* Styles for screens smaller than 480px */
  #main-content {
    padding: 3vh 2vw;
    margin-top: 2vh;
  }

  .greetings {
    font-size: 2rem;
    line-height: 1.2;
  }

  .sub {
    font-size: 1.1rem;
    height: 2.2rem;
  }

  .sub-wrapper {
    height: 2.2rem;
  }

  .links {
    margin-top: 3vw;
  }

  .section-link {
    font-size: 1rem;
    margin-bottom: 0.8rem;
  }

  .section {
    padding-left: 0;
    padding-right: 0;
  }

  .narrative-text {
    font-size: 12px;
    padding: 0 10px;
  }

  .me-img {
    width: 150px;
    height: 150px;
  }

  .skills-h {
    font-size: 18px;
  }

  .skill {
    width: 40px;
    height: 40px;
    margin: 0;
  }

  .more-projects {
    margin-bottom: 80px;
    margin-top: 20px;
  }

  .projects-grid {
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
    display: grid;
    grid-template-columns: repeat(auto-fit, 130px);
    margin-left: auto;
    margin-right: auto;
    width: 80vw;
  }

  .carousel {
    padding: 10px;
    height: 250px;
  }

  .carousel > * {
    width: 50px;
    min-width: 50px;
    font-size: 12px;
    padding: 10px 8px;
  }

  .carousel > .expanded {
    width: 200px;
    min-width: 200px;
  }

  .project-link {
    flex: 0 0 130px;
    height: 130px;
  }

  .project span {
    font-size: 14px;
  }

  .footer h3 {
    font-size: 1.1em;
  }

  .footer p {
    font-size: 0.8em;
  }

  .about-me {
    padding: 15px;
  }

  .readme {
    padding: 0.5rem !important;
    font-size: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
  }

  /* Prevent code blocks from overflowing */
  .readme pre {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
  }

  .readme code {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Ensure tables don't overflow */
  .readme table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
  }

  .readme img {
    max-width: 100%;
    height: auto;
  }

  .profile {
    display: none; /* Keep profile hidden on small mobile */
  }


}

/* Add touch-friendly styles for mobile */
@media (hover: none) and (pointer: coarse) {
  .carousel > * {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .carousel > *:active {
    transform: scale(0.95);
  }

  .section-link {
    padding: 8px 0;
    -webkit-tap-highlight-color: transparent;
  }

  .section-link:active {
    opacity: 0.7;
  }

  .project-link:active {
    transform: scale(0.98);
  }
}

/* Prevent horizontal scrolling on mobile */
html, body {
  overflow-x: hidden;
  width: 100%;
}

/* Extra small screens */
@media (max-width: 375px) {
  #main-content {
    padding: 2vh 1vw;
  }

  .greetings {
    font-size: 1.8rem;
  }

  .sub {
    font-size: 1rem;
    height: 2rem;
  }

  .sub-wrapper {
    height: 2rem;
  }

  .carousel {
    height: 220px;
    padding: 8px;
  }

  .carousel > * {
    width: 45px;
    min-width: 45px;
    font-size: 11px;
    padding: 8px 6px;
  }

  .carousel > .expanded {
    width: 180px;
    min-width: 180px;
  }

  .projects-grid {
    gap: 8px;
    margin-top: 8px;
    justify-content: center;
    display: grid;
    grid-template-columns: repeat(auto-fit, 120px);
    margin-left: auto;
    margin-right: auto;
    width: 80vw;
  }

  .project-link {
    width: 120px;
    height: 120px;
  }

  .project span {
    font-size: 12px;
  }

  .section-link {
    font-size: 0.9rem;
  }

  .readme {
    font-size: 11px !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
  }

  /* Prevent code blocks from overflowing */
  .readme pre {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
  }

  .readme code {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Ensure tables don't overflow */
  .readme table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
  }

  .readme img {
    max-width: 100%;
    height: auto;
  }

  .profile {
    display: none; /* Keep profile hidden on extra small mobile */
  }

  .skills {
    gap: 10px;
  }

  .skill {
    width: 35px;
    height: 35px;
  }
}

/* Improve carousel scrolling on mobile */
.carousel {
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.carousel > * {
  scroll-snap-align: start;
}
