/* Light mode variables */
:root {
  --background-color: white; 
  --background-secondary-color: #F2F1F6; 
  --background-tertiary-color: #C4B780;
  --background-inverted-color: black;
  --grayed-background-color: rgba(0, 0, 0, 0.4);
  --navbar-background-color: rgba(255, 255, 255, 0.7);
  --text-color: #1F1F1F;
  --text-secondary-color: white; 
  --text-inverted-color: white;
  --link-color: blue; 
  --contact-label-text-color: #333;
  --highlight-color: #808080;
  --close-icon-color: black; 
  --default-icon-color: black; 
  --indicator-background-color: #D3D3D3;

  --fa-width: 25px; 
  --fa-height: 25px;
  --fa-shadow-background: hsl(0deg 0% 0% / 0.25);;

  --profile-image-border: 5px;
}

/* dark mode variables */
body.dark-mode {
  --background-color: black; 
  --background-secondary-color: #3A3A45; 
  --background-tertiary-color: #7a6b3f;
  --background-inverted-color: white;
  --grayed-background-color: rgba(255, 255, 255, 0.4);
  --navbar-background-color: rgba(0, 0, 0, 0.7);
  --text-color: #f8f8f8;
  --text-secondary-color: white;
  --text-inverted-color: black;
  --link-color: rgb(139, 139, 237);
  --contact-label-text-color: #c5c5c5;
  --highlight-color: #c5c5c5;
  --close-icon-color: white; 
  --default-icon-color: white; 
  --indicator-background-color: #636161;

  --fa-width: 30px; 
  --fa-height: 30px;
  --fa-shadow-background: black;
  --profile-image-border: 6.5px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background-color: black; 
        --background-secondary-color: #3A3A45; 
        --background-tertiary-color: #7a6b3f;
        --background-inverted-color: white;
        --grayed-background-color: rgba(255, 255, 255, 0.4);
        --navbar-background-color: rgba(0, 0, 0, 0.7);
        --text-color: #f8f8f8;
        --text-secondary-color: white;
        --text-inverted-color: black;
        --link-color: rgb(139, 139, 237);
        --contact-label-text-color: #c5c5c5;
        --highlight-color: #c5c5c5;
        --close-icon-color: white; 
        --default-icon-color: white; 
        --indicator-background-color: #636161;

        --fa-width: 30px; 
        --fa-height: 30px;
        --fa-shadow-background: black;
        --profile-image-border: 6.5px;
    }
}

body {
  margin: 0;
  display: flex;
  height: 100dvh;
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: 'IBM Plex Mono', monospace;
}

h2 {
  font-size: 2.25rem;
  font-weight: normal;
}

p {
  font-family: "roboto", sans-serif;
  font-weight: 400;
  font-style: normal;
}

/* Creating Grid Layout */
.grid {
  display: grid;
  width: 100dvw;
  height: 100dvh;
  grid-template-areas: 
    'typewriter' 
    'projects'
    'aboutme'
    'footer';
  grid-template-columns: 100%;
  position: relative;
  gap: 4rem;
}


/* Creating Typewriter Container layout */
.typewriter-container {
  grid-area: typewriter;
  display: flex;
  height: 100vh;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  padding: 0 20px;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
}

.welcome-message-container {
  text-align: center;
}

#welcome {
  padding-left: 2dvw;
}

.cursor {
    animation: blink-cursor 0.75s infinite;
  }
  
  /* Blinking cursor animation */
  @keyframes blink-cursor {
    50% {
      opacity: 0;
    }
  }

/* Creating Projects Container Layout */
.projects-container {
  grid-area: projects;
  display: block;
  width: 100dvw;
  height: auto;
  text-align: center;
  box-sizing: border-box;
  opacity: 1;
  margin-bottom: 4rem;
}

.projects-container h2 {
  width: 90dvw;
  margin-left: 5dvw;
}

.scroll-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 20px 0 40px 0;
}

.scroll-container {
  display: flex;
  width: 100%;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  scroll-behavior: smooth;
  transition: all 0.5s ease-in-out;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.scroll-container::-webkit-scrollbar {
  display: none;
}

.scroll-item {
  min-width: 100%;
  scroll-snap-align: center;
  padding: 0 5%;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
}

.project-cell {
  background-color: var(--background-secondary-color);
  border-radius: 25px;
  padding: 20px;
  width: 80%;
  max-height: 500px;
  box-sizing: border-box;
  margin: 0;
  position: relative;
}

.heading-container {
  text-align: left;
  margin-left: 25px;
  width: 50dvw;
  transform: translate3d(0, -20px, 0);
  opacity: 0;
  transition: all 0.8s ease-out;
}

.heading-container h3 {
  padding-top: 5px;
  font-weight: normal;
  margin-bottom: 0.25em;
}

.heading-container h5 {
  font-size: 1.25rem;
  font-family: "acumin-pro", sans-serif;
  font-weight: 400;
  margin-top: 0;
}

.animate-heading {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

.detail-project-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  height: 45px;
  width: 45px;
  display: flex;
  justify-content: center; 
  align-items: center;
}

.detail-project-btn-img {
  object-fit: contain;
  height: 25px;
  width: auto;
  max-height: 45px;
}

.image-animation {
  max-height: 200px;
  width: auto;
  object-fit: contain;
  margin-left: 20dvw;
  position: relative;
  margin-top: -5dvh;
  transform: translate3d(0, 30px, 0);
  opacity: 0;
  transition: all 0.8s ease-out;
}

.animate-image {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

@media(prefers-reduced-motion) {
  /* add code for reduced motion here; Basically no animation */
}

/* Update indicators positioning */
.scroll-indicators {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--indicator-background-color);
  transition: all 0.3s ease-in-out;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.indicator.active {
  width: 50px;
  border-radius: 25px;
  background-color: var(--indicator-background-color);
  transform: scale(1);
}

.indicator.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: var(--text-color);
  border-radius: 25px;
}

/* Separate transition for the filling effect */
.indicator.active.filling::after {
  width: 100%;
  transition: width 5000ms linear;
}

/* Dark mode support */
body.dark-mode .indicator {
  background-color: #3A3A3A;
}

body.dark-mode .indicator.active::after {
  background-color: #FFFFFF;
}

/* Create overlay for project cell */
#overlay {
  position: fixed;
  display: none;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--grayed-background-color);
  z-index: 2;
  cursor: pointer;
}

.no-scroll {
  overflow: hidden;
}

#overlay-background {
  background-color: var(--background-color);
  position: absolute;
  width: 90%;
  height: 95%;
  top: 2.5%;
  left: 5%;
  border-radius: 25px;
}

.close-button {
  position: absolute;
  /* background-color: var(--background-inverted-color); */
  background-color: transparent;
  height: 40px;
  width: 40px;
  top: 20px;
  right: 20px;
  border-radius: 20px;
  z-index: 4;
}

.close-button img {
  object-fit: cover;
  position: relative;
  height: 20px;
  width: 20px;
  top: 10px;
  left: 10px;
}

.overlay-content {
  position: relative;
  width: 100%;
  height: 100%;
  align-items: center;
  text-align: center;
  overflow: scroll;
}

.overlay-content h2 {
  margin-top: 40px;
}

.overlay-content h5 {
  font-size: 1.25em;
  font-family: "acumin-pro", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.detail-grid-container {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-areas: 
  'chat'
  'chattext'
  'finances'
  'financestext'
  'todos'
  'todostext';
  grid-template-columns: 100%;
  align-items: center;
}

.image-item {
  grid-area: image;
  width: 100%;
  height: auto;
  margin-top: 8dvh;
}

.image-item img {
  width: 50dvw;
  height: auto;
}

.text-item {
  grid-area: textbox;
  width: 50dvw;
  height: auto;
  margin-left: 22.5%;
}

.text-item h2 {
  margin-top: 2%;
  font-size: 1.25rem;
  text-align: left;
}

.text-item p {
  text-align: left;
  font-size: 1rem;
  letter-spacing: normal;
  line-height: 23px;
}

#chat {
  grid-area: chat;
}

#chat-text {
  grid-area: chattext; 
  margin-bottom: 5%;
}

#finances {
  grid-area: finances;
}

#finances-text {
  grid-area: financestext; 
  margin-bottom: 5%;
}

#todos {
  grid-area: todos; 
}

#todos-text {
  grid-area: todostext; 
}


/* About me section layout */
.about-me-container {
  grid-area: aboutme;
  display: grid;
  grid-template-columns: 1fr;
  padding: 1rem;
  min-height: 100vh;
  align-items: center;
  margin-top: 1.5rem;
}

.about-me-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-items: flex-start;
  padding: 2rem;
  height: auto;
}

.about-me-left h2 {
  margin-top: 0;
  margin-bottom: 2rem;
  font-size: 2rem;
  width: 100%;
  text-align: center;
}

.about-me-buttons {
  display: flex;
  order: 3;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  align-items: center;
}

.read-more-button,
    .contact-button {
        width: 70%;
        max-width: 300px;
        font-size: 12px;
        cursor: pointer;
        border-radius: 20px;
    }

.contact-button {
  color: var(--text-color);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 2px solid var(--text-color);
  padding: 5px 12px;
  transition: background-color 0.3s ease;
}

.read-more-button {
  color: var(--text-inverted-color);
  background: var(--text-color);
  border: none;
  padding: 8px 20px;
  transition: transform 0.3s ease;
}

.read-more-button:hover {
  transform: scale(1.05);
}

.about-me-right {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  width: 100%;
  max-width: 500px;
  background-color: var(--background-secondary-color);
  border-radius: 25px;
}

#profile-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
}

.contact-card h3 {
  font-size: 1.25rem;
}

.skills-container {
  width: 100%;
  max-width: 400px;
  margin: 1.25rem auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.contact-card-skills {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 0;
  padding-bottom: 10px;
}

.contact-skill {
  flex: 1;
  text-align: center;
  padding: 8px 15px;
  font-size: 0.9rem;
  white-space: nowrap;
  background-color: transparent;
  border: 2px solid #4A4A4A;
  color: var(--text-color);
  border-radius: 20px;
}

/* Add new popover styles */
.popover-background {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--grayed-background-color);
  justify-content: center;
  align-items: center;
}

.popover-content {
  background-color: var(--background-color);
  border-radius: 25px;
  padding: 3rem;
  max-width: 800px;
  width: 80%;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}

.popover-content .close-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  cursor: pointer;
  padding: 0.5rem;
}

.popover-content .close-button img {
  width: 24px;
  height: 24px;
}

#about-me-text {
  font-size: 1.125rem;
  line-height: 1.7;
  text-align: left;
  max-width: 90%;
}

.github-link, .linkedIn-link {
  color: var(--link-color);
}

/* Footer section */
.footer {
  grid-area: footer;
  background-color: var(--background-color);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100dvw;
}

.divider {
  height: 2px;
  width: 90%;
  border-radius: 2px;
  background-color: var(--highlight-color);
}

.footer-container {
  width: 90%;
}

.copyright-text {
  font-size: 12px;
}

/* .recaptcha-info {
  font-size: 12px;
}

.google-link {
  color: var(--link-color);
} */

#impressum {
  cursor: pointer;
  font-size: 12px;
}

/* Contact form popover styles */
#contact-popover .popover-content {
  width: 95%;
  max-width: none;
  max-height: 90vh;
  padding: 2vh 2vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

#contact-popover h2 {
  margin: 0 0 3vh;
  font-size: clamp(1.5rem, 3vw, 2rem);
  text-align: center;
}

#contact-popover .contact-form-container {
  width: 100%;
  max-width: 90%;
  background-color: var(--background-secondary-color);
  border-radius: 15px;
  padding: 2vh 4vw;
  display: flex;
  justify-content: center;
}

#contact-popover form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2vh;
}

#contact-popover .form-group {
  width: 100%;
}

#contact-popover label {
  display: block;
  margin-bottom: 1vh;
  text-align: left;
  color: var(--contact-label-text-color);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
}

#contact-popover input,
#contact-popover textarea {
  width: 100%;
  padding: 1.5vh 1.5vw;
  border: none;
  border-radius: 10px;
  background-color: var(--background-color);
  color: var(--text-color);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  box-sizing: border-box;
}

#contact-popover textarea {
  resize: vertical;
  min-height: 15vh;
  max-height: 30vh;
}

#contact-form .error-message {
  color: red;
  font-size: 0.9rem;
}

.ohnohoney{
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  height: 0;
  width: 0;
  z-index: -1;
}

#contact-popover .submit-button {
  align-self: center;
  min-width: min(150px, 30%);
  margin-top: 2vh;
  padding: 1.5vh 3vw;
  background-color: var(--background-tertiary-color);
  color: var(--text-secondary-color);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  letter-spacing: 1.5px;
  transition: transform 0.2s;
}

#popup-background {
  position: fixed;
  display: none;
  width: 100dvw;
  height: 100dvh;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--grayed-background-color);
  z-index: 100;
}

#popup {
  position: fixed;
  display: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--background-color);
  padding: 20px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
  z-index: 10;
  border-radius: 5px;
}

#popup-message {
  font-size: 16px;
  margin-top: 10px;
}

.close-popup-button {
  padding: 10px 20px;
  background-color: var(--background-inverted-color);
  color: var(--text-inverted-color);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  display: block;
  margin: 0 auto;
}

.grecaptcha-badge { 
  visibility: hidden;
}

/* Cookie Popup Styles - Mobile First */
.cookie-popup-background {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--grayed-background-color);
}

.cookie-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--background-color);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 500px;
  display: none;
}

.cookie-content {
  text-align: center;
}

.cookie-content h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.cookie-content p {
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

.cookie-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.cookie-buttons button {
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background-color: var(--background-tertiary-color);
  color: var(--text-secondary-color);
  font-size: 0.9rem;
  transition: opacity 0.2s ease;
}

.cookie-buttons button:hover {
  opacity: 0.9;
}

/* media query for desktop screen size */
@media only screen and (min-width: 786px) {
  h2 {
    font-size: 3rem;
  }
  
  /* Creating Logo layout */
  #logoPrimary {
    width: 250px;
  }

  /* Creating typwriter container layout */
  .typewriter-container {
    height: 40dvh;
    margin-top: 15%;
    font-size: 4rem;
    align-items: center;
    justify-content: left;
    flex-direction: row;
  }

  #welcome {
    padding-left: 4dvw;
  }

  /* Creating Projects Container Layout */
  .projects-container h2 {
    margin-top: 45dvh;
    padding-bottom: 2.5dvh;
    width: 100dvw;
    margin-left: 0;
  }

  .scroll-item {
    padding: 0;
  }

  .project-cell {
    height: auto;
  }

  .heading-container {
    margin-left: 50px;
  }

  .heading-container h3 {
    padding-top: 45px;
    font-weight: bold;
    font-size: 2.25rem;
  }

  .heading-container h5 {
    font-size: 1.5rem;
  }

  .detail-project-btn {
    top: 20px;
    right: 20px;
  }
  
  .detail-project-btn-img {
    height: 40px;
  }

  .image-animation {
    max-height: 350px;
    width: 50dvw;
    margin-top: -15dvh;
    margin-left: 25dvw;
    margin-bottom: 2dvh;
  }

  /* Create overlay for project cell */
  #overlay-background {
    width: 80%;
    height: 90%;
    top: 5dvh;
    left: 10dvw;
  }
  
  .close-button {
    height: 50px;
    width: 50px;
    border-radius: 50px;
  }
  
  .close-button img {
    height: 35px;
    width: 35px;
    top: 6.25px;
    left: 6.25px;
  }
  
  .overlay-content h2 {
    font-size: 2.25rem;
  }

  .overlay-content h5 {
    font-size: 1.5rem;
  }
  
  .detail-grid-container {
    grid-template-areas: 
    'chat chattext'
    'financestext finances'
    'todos todostext';
    grid-template-columns: 
    50%;
  }
  
  .image-item {
    width: 50%;
    margin-left: 8dvw;
  }
  
  .image-item img {
    width: 25dvw;
  }
  
  .text-item {
    width: 25dvw;
    margin-left: 8dvw;
  }

  .text-item h2 {
    font-size: 1.5rem;
  }

  .text-item p {
    font-size: 1.125rem;
    line-height: 26px;
  }

  .close-button img:hover {
    transform: scale(1.04);
  }


  /* About me section layout */
  .about-me-container {
    grid-template-columns: 1fr 1fr;
    padding: 5%;
    min-height: 100vh;
    margin-top: 2rem;
  }

  .about-me-left {
    height: 100%;
  }

  .about-me-left h2 {
    text-align: left;
    font-size: 2.35rem;
  }

  .about-me-container h2 {
    margin-top: 45dvh;
  }

  .about-me-buttons {
    display: block;
    flex-direction: row;
  }

  .read-more-button,
    .contact-button {
        width: auto;
        height: 40px;
        font-size: 16px;
    }

  .contact-card h3 {
    font-size: 1.75rem;
  }

  #profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
  }

  .contact-card-skills {
    width: 80%;
  }

  .contact-skill {
    display: inline-block;
    padding-left: 15px;
    padding-right: 15px;
    font-size: 0.875rem;
  }

  .popover-content .close-button img {
    width: 35px;
    height: 35px;
  }

  #about-me-text {
    font-size: 1.125rem;
    line-height: 1.7;
  }

  .footer-container {
    display: flex;
    justify-content: space-between;
  }

  .copyright-text {
    font-size: 16px;
  }
  
  /* .recaptcha-info {
    font-size: 16px;
  } */
  
  #impressum {
    font-size: 16px;
  }

  #contact-popover .popover-content {
    width: 90%;
    max-width: 60dvw;
    padding: 3dvh 3dvw;
  }

  #contact-popover .contact-form-container {
    padding: 3vh 3vw;
  }

  #contact-popover .submit-button:hover {
    transform: scale(1.03);
  }

  .cookie-popup {
    padding: 2rem;
    max-width: 600px;
  }

  .cookie-content h3 {
    font-size: 1.5rem;
  }

  .cookie-content p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .cookie-buttons {
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
  }

  .cookie-buttons button {
    width: auto;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
}
