@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@100;500&display=swap");

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

body {
  background: #282c34;
  font-size: clamp(14px, 2vmin, 20px);
  font-family: "JetBrains Mono", monospace;
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #e4bb68;

  transition: all 0.5s ease;
  /* Disable regular scrolling */
  overflow: hidden;
}

html {
  overflow: hidden;
  scroll-behavior: none;
}

.code-container {
  text-align: center;
  margin-bottom: 5vh;
}

.string {
  display: flex;
  flex-direction: column;
  text-align: center;
  animation: move 4s infinite;
}

.greeting {
  position: relative;
  top: 8.6vmin;
  animation: white-out 5s infinite;
}

.closure::after {
  content: "";
  position: absolute;
  height: 25vmin;
  width: 40vmin;
  background: #282c34;
  transform: translate(-45vmin, -24.5vmin);
}

.closure::before {
  content: "";
  position: absolute;
  height: 25vmin;
  width: 40vmin;
  background: #282c34;
  transform: translate(-40vmin, 5vmin);
}

.en {
  color: #fa8231;
}

.es {
  color: white;
}

.de {
  color: #c678dd;
}

.it {
  color: #a9b0bd;
}

@keyframes move {
  25% {
    transform: translatey(-5.8vmin);
    opacity: 1;
  }
  50% {
    transform: translatey(-11vmin);
  }
  75% {
    transform: translatey(-16.5vmin);
  }
}

/* Menu Styles */
.menu {
  position: absolute;
  bottom: 10vh;
  display: flex;
  gap: 2rem;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  z-index: 100;
}

.menu.active {
  position: fixed;
  top: 2rem;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
}

.menu-item {
  color: #a9b0bd;
  text-decoration: none;
  font-size: 1.2rem;
  position: relative;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

.menu-item:hover {
  color: #61afef;
}

.menu-item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #61afef;
  transition: all 0.3s ease;
}

.menu-item:hover::after {
  width: 100%;
  left: 0;
}

.menu-item.active {
  color: #61afef;
}

.menu-item.active::after {
  width: 100%;
  left: 0;
}

/* Page Content */
.page {
  position: absolute;
  top: 100%;
  width: 100%;
  height: 100vh;
  padding: 5rem;
  background: #282c34;
  transition: all 0.5s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.me {
  gap: 1.5rem;
}

.page.active {
  top: 0;
}

.page h2 {
  color: #e06c75;
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.page p {
  color: #a9b0bd;
  font-size: 1.2rem;
  max-width: 800px;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 768px) {
  .page {
    padding: 2rem 1rem;
  }

  .page h2 {
    font-size: 2rem;
  }

  .page p {
    font-size: 1rem;
    padding: 0 1rem;
  }

  .menu {
    flex-direction: column;
    bottom: 5vh;
    gap: 1rem;
  }

  .menu-item {
    font-size: 1rem;
  }

  .me h1 {
    font-size: 1.5rem;
    text-align: center;
    word-break: break-word;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .menu {
    flex-direction: column;
    gap: 1rem;
  }

  .menu.active {
    width: 100%;
    justify-content: center;
  }
}

#home-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#home-page .me {
  margin-bottom: 0.5rem; /* Reduced gap between h2 and h1 */
}

#home-page h2 {
  margin-bottom: 0.2rem; /* Very small gap after h2 */
  color: #e06c75;
  font-size: 1.8rem;
}

#home-page h1 {
  margin-top: 0.2rem; /* Very small gap before h1 */
  color: #61afef;
  font-size: 2.5rem;
}

#home-page p {
  margin-top: 1.5rem; /* Increased gap after the name section */
  color: #a9b0bd;
  font-size: 1.3rem;
  position: relative;
}

.app-type {
  color: #e4bb68;
  font-weight: bold;
  display: inline-block;
  min-width: 120px;
  text-align: left;
  opacity: 1;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.app-type.fade-out {
  opacity: 0;
  transform: translateY(-10px);
}

.app-type.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.tech-highlight {
  color: #e4bb68;
  font-weight: bold;
  position: relative;
  display: inline-block;
}

.tech-highlight::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: #e4bb68;
  opacity: 0.3;
  transition: all 0.3s ease;
}

.tech-highlight:hover::after {
  height: 2px;
  opacity: 0.7;
}

#about-page p {
  padding-top: 80px;
  color: #c0cad9;
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 800px;
  text-align: left;
  margin: 1rem auto;
  padding: 0 2rem;
}

#projects-page {
  padding: 2rem;
}

.projects-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
  max-width: 1400px;
  margin: 2rem auto;
}

.project-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  border-color: #61afef;
}

.project-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-info {
  padding: 1.5rem;
}

.project-title {
  color: #61afef;
  margin-bottom: 0.5rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tech-tag {
  background: rgba(97, 175, 239, 0.1);
  color: #61afef;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

.project-description {
  color: #a9b0bd;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Project Details Modal */
.project-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.project-modal.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: #282c34;
  width: 80%;
  max-width: 900px;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 8px;
  border: 1px solid #61afef;
  position: relative;
  padding: 2rem;
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #a9b0bd;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-image {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.modal-title {
  color: #61afef;
  margin-bottom: 1rem;
}

.modal-description {
  color: #a9b0bd;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.modal-features {
  margin: 1.5rem 0;
}

.modal-features li {
  margin-bottom: 0.5rem;
  color: #a9b0bd;
}

.modal-links a {
  color: #61afef;
  text-decoration: none;
  margin-right: 1rem;
  display: inline-block;
  margin-top: 1rem;
}

.modal-links a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
  .projects-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .projects-container {
    grid-template-columns: 1fr;
  }

  .modal-content {
    width: 95%;
    padding: 1rem;
  }
}

#projects-page {
  display: flex;
  flex-direction: column;
  /* Remove height and overflow for better mobile scroll */
  /* height: 100vh; */
  /* overflow: hidden; */
  padding: 0;
  min-height: 100vh; /* Ensures background fills screen */
}

.projects-header {
  padding: 2rem;
  background: rgba(40, 44, 52, 0.9);
  backdrop-filter: blur(5px);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.projects-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 2rem 2rem;
  width: 100%;
  box-sizing: border-box;
}

.projects-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1rem;
  max-width: 1400px;
  margin: 0 auto;
  padding-bottom: 2rem;
}

/* Rest of your existing project styles remain the same */

/* Add smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .projects-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .projects-container {
    grid-template-columns: 1fr;
  }

  .projects-header {
    padding: 1rem;
  }

  .projects-content {
    padding: 0 1rem 1rem;
    /* Remove fixed height/overflow for mobile scrolling */
    overflow-y: visible;
  }

  #projects-page {
    /* Allow vertical scrolling on mobile */
    min-height: 100vh;
    height: auto;
    overflow: visible;
  }
}

/* Modal adjustments for mobile */
@media (max-width: 768px) {
  .modal-content {
    width: 98vw;
    max-width: 98vw;
    max-height: 90vh;
    padding: 1rem;
    overflow-y: auto;
    box-sizing: border-box;
  }
}

/* Ensure modal is always scrollable if content overflows */
.project-modal .modal-content {
  max-height: 90vh;
  overflow-y: auto;
}

.buttoncustom {
  display: inline-block;
  background-color: #e06c75;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.buttoncustom:hover {
  background-color: #be5046;
}

.buttoncustom::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #61afef;
  transition: all 0.3s ease;
}

.github-corner {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1000;
}
.github-corner svg {
  fill: #151513;
  color: #fff;
}
.github-corner:hover .octo-arm {
  animation: octocat-wave 560ms ease-in-out;
}
@keyframes octocat-wave {
  0%,
  100% {
    transform: rotate(0);
  }
  20%,
  60% {
    transform: rotate(-25deg);
  }
  40%,
  80% {
    transform: rotate(10deg);
  }
}

@media (max-width: 500px) {
  .github-corner:hover .octo-arm {
    animation: none;
  }
  .github-corner .octo-arm {
    animation: octocat-wave 560ms ease-in-out;
  }
}

/* About Page Styles */
.about-container {
  display: flex;
  gap: 3rem;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem;
}

@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
    gap: 2rem;
    padding: 1rem;
  }
}

.about-text {
  flex: 1;
  min-width: 0;
}

.skills-section {
  flex: 1;
  min-width: 280px;
}

.skills-section h3 {
  color: #e06c75;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.skills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}
.skill-category {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-category h4 {
  color: #61afef;
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
  border-bottom: 1px solid rgba(97, 175, 239, 0.3);
  padding-bottom: 0.5rem;
}

.skills-list {
  list-style-type: none;
}

.skills-list li {
  color: #a9b0bd;
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.2rem;
  font-size: 0.95rem;
}

.skills-list li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: #e4bb68;
}

/* Responsive */
@media (max-width: 900px) {
  .about-container {
    flex-direction: column;
  }

  .skills-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .skills-container {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .about-container {
    padding: 0 1rem;
  }

  .skill-category {
    padding: 1rem;
  }
}
