/* ======================================
   UNIVERSAL STYLES
====================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #FFFFFF;
  color: #000000;
  line-height: 1.6;
}

body.expanded-mode {
  overflow: hidden;
}

/* ======================================
   ANIMATION CLASSES
====================================== */
.sway-element {
  transition: transform 0.1s ease-out;
}

@keyframes bounceBack {
  0% { transform: translateY(0); }
  35% { transform: translateY(-15px); }
  65% { transform: translateY(6px); }
  85% { transform: translateY(0); }
  100% { transform: translateY(0); }
}

.hidden {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.7s ease;
}

.show {
  opacity: 1;
  transform: translateY(0);
}

/* ======================================
   TYPING ANIMATION
====================================== */
#typingTarget,
#projectsTypingTarget,
#skillsTypingTarget,
#contactTypingTarget {
  display: inline-block;
  border-right: 4px solid #000000;
  height: 120px; /* Adjust this value based on your needs */
  white-space: nowrap;
  overflow: hidden;
}

@keyframes blink {
  0%, 50% { border-color: #000000; }
  50.01%, 100% { border-color: transparent; }
}

.blink {
  animation: blink 1.14s steps(1, start) infinite;
}

/* ======================================
   NAVBAR
====================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row; 
  justify-content: center;
  align-items: center;
  gap: 20px;
  text-align: center;
  z-index: 10000;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.25s, opacity 0.25s, visibility 0.25s;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.navbar a {
  margin: 10px 20px;
  text-decoration: none;
  color: #A3A3A3;
  font-size: 15px;
  transition: font-size 0.3s ease, color 0.3s ease;
}

.navbar a:hover {
  color: #000000;
}

.navbar a.active-link {
  font-size: 20px;
  font-weight: bold;
  color: #000000;
}

body.expanded-mode .navbar {
  transform: translate(-50%, -100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ======================================
   HOME SECTION
====================================== */
#home {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

#home h1 {
  font-size: 90px;
  text-align: center;
  color: #000000;
}

/* ======================================
   PROJECTS SECTION
====================================== */
#projects {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 50px;
  box-sizing: border-box;
}

.projects-container {
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 1200px;
  gap: 50px;
}

.projects-title {
  flex: 0 0 30%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.projects-title h2 {
  font-size: 70px;
  text-align: center;
  color: #000000;
}

.projects-cards {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.lower-projects {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 30px;
  width: 100%;
  max-width: 600px;
}

.lower-projects .card {
  width: calc(50% - 15px);
  max-width: 285px;
}

/* ======================================
   CARD2 HENRI.AI (BASIC STATES)
====================================== */
.card2 .henriAI-container {
  opacity: 1;
  transition: opacity 0.2s ease-in-out;
}

.hidden-state.card2 .henriAI-container {
  opacity: 0;
}

.card2:not(.hidden-state) .henriAI-container {
  opacity: 1;
}

/* ======================================
   HENRI.AI SECTION (CARD2 STYLING)
====================================== */
.card2 {
  width: 100%;
  max-width: 600px;
  background: #141414;
  border-radius: 20px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.henriAI-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 600px;
  margin: 0 auto; 
  border-radius: 20px;
}

.henriAI-top {
  position: relative;
  width: 100%;
  margin-bottom: -60px;
}

.henriAI-top video {
  width: 100%;
  height: auto;
  border-radius: 20px;
  display: block;
}

.glass-text {
  color: rgba(255, 255, 255, 9);
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.2);
  letter-spacing: 0.3px;
}

.text-overlay {
  position: absolute;
  top: 65%;
  left: 2%;
  color: #FFFFFF;
}

.text-overlay h1 {
  font-size: 1.5em;
}

#top-text {
  font-size: 1em;
}

#bottom-text {
  font-size: 0.75em;
}

.henriAI-bottom {
  background: rgba(0, 0, 0, 0.23);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(12.8px);
  -webkit-backdrop-filter: blur(12.8px);
  color: white;
  padding: 15px;
  border-radius: 0 0 20px 20px;
  width: 100%;
  margin-top: -4px;
  max-width: 600px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}

.brand-title {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
}

.ai-highlight {
  background: linear-gradient(90deg, #1e90ff, #9b59b6, #e74c3c, #1e90ff);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-animation 40s ease infinite;
  font-weight: 700;
}

@keyframes gradient-animation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

#visit-button {
  background-color: rgba(212, 212, 212, 0.5);
  color: white;
  font-weight: bold;
  padding: 6px 13px;
  margin-right: 20px;
  border-radius: 35px; 
  cursor: pointer;
  text-align: center;
  transition: background-color 0.3s ease; 
}

#visit-button:hover {
  background-color: rgb(191, 191, 191); 
}

.card2-hiddencontent {
  max-width: 600px;
  padding: 40px;
  background: #141414;
  border-radius: 0 0 20px 20px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: none;
}

.card2-hiddencontent h4 {
  font-size: 18px;
  margin-top: 30px;
  color: white;
}

.card2-hiddencontent p {
  font-size: 16px;
  margin-bottom: 10px;
  padding-left: 20px;
  color: #D0D0D0;
  line-height: 2;
}

.card2-hiddencontent .repo_link {
  color: rgb(10, 132, 255);
  text-decoration: none;
}

/* ======================================
   CARDS (COMMON TO .card & .card2)
====================================== */
.card {
  background: #141414;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  width: 100%;
  color: #FFFFFF;
}

.card:hover, .card2:hover{
  transform: translateY(-10px);
  box-shadow: 0 10px 15px rgba(0,0,0,0.2);
}

.card-header,
.brief-description {
  opacity: 1;
  transition: opacity 0.2s ease-in-out;
}

.card.pressed .card-header,
.card.pressed .brief-description {
  opacity: 0;
}

.hidden-state .card-header,
.hidden-state .brief-description {
  opacity: 0;
}

.card-content {
  display: none;
}

.fullscreen-card .brief-description {
  display: none;
}

/* ======================================
   FULLSCREEN CARD
====================================== */
.fullscreen-card {
  max-width: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  background-color: #141414;
  overflow: auto;
  border-radius: 20px;
  box-shadow: none;
  cursor: auto;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 60px;
  transform: none !important;
}

.fullscreen-card .card-content {
  display: block;
  margin-top: 20px;
}

.fullscreen-card .card-content > div {
  margin-top: 40px;
}

.fullscreen-card .card-header h2,
.fullscreen-card .card-content {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.fullscreen-card.content-ready .card-header h2 {
  font-size: 80px;
  margin-top: 30px;
  color: #FFFFFF;
}

.fullscreen-card.content-ready .card-content {
  display: block;
}

.fullscreen-card.content-visible .card-header h2,
.fullscreen-card.content-visible .card-content {
  opacity: 1;
  transform: translateY(0);
}

.fullscreen-card.closing .card-header h2,
.fullscreen-card.closing .card-content {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.fullscreen-card.closing .card-content h4,
.fullscreen-card.closing .card-content p,
.fullscreen-card.closing .card-content div {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

/* ======================================
   CARD2 FULLSCREEN OVERRIDES
====================================== */
.card2.fullscreen-card .henriAI-top {
  position: relative;
  width: 100vw;
  height: 70vh;
  margin-bottom: 0; 
  border-radius: 20px 20px 0 0;
  margin-top: -60px;
  overflow: hidden;
}

.card2.fullscreen-card .henriAI-top video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  object-position: 50% 5%;
}

.card2.fullscreen-card .henriAI-bottom {
  position: absolute;
  bottom: 0;
  width: 100vw;
  border-radius: 0;
  width: 100vw; 
  max-width: none;
}

.card2.fullscreen-card .brand-title {
  padding-left: 20px;
}

.card2.fullscreen-card #visit-button {
  margin-right: 20px;
}

.card2.fullscreen-card .text-overlay {
  padding-top: 30px;
}

.card2.fullscreen-card .card2-hiddencontent {
  display: block;
  opacity: 1;
  transform: translateY(0);
  margin-top: 20px;
  padding-top: 10px;
  border-radius: 0;
  margin-left: auto;
  margin-right: auto;
  max-width: 600px;
}

.card2.fullscreen-card .henriAI-container {
  width: 100%;
  max-width: 900px; 
  margin: 0 auto;
  position: relative;
  background: transparent;
  max-width: none;
}

.card2.pressed .henriAI-container,
.card2.pressed .henriAI-bottom,
.card2.pressed .card2-hiddencontent {
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.card2.fullscreen-card.content-visible .henriAI-container,
.card2.fullscreen-card.content-visible .henriAI-bottom,
.card2.fullscreen-card.content-visible .card2-hiddencontent {
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

/* ======================================
   CARD CONTENT (FOR NORMAL CARD1)
====================================== */
.fullscreen-card .card-content h4 {
  font-size: 22px;
  margin: 30px 0 10px 0;
  color: white;
}

.fullscreen-card .card-content p {
  font-size: 18px;
  margin-bottom: 10px;
  padding-left: 10px;
  color: #D0D0D0;
  line-height: 1.6;
}

.fullscreen-card .card-header {
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.fullscreen-card.content-ready .card-header {
  opacity: 1;
}

.repo_link {
  color: rgb(10, 132, 255);
  text-decoration: none;
}

/* ======================================
   CLOSE INDICATOR (SCROLL UP TO CLOSE)
====================================== */
.fullscreen-card.ready-to-close {
  position: fixed;
  width: 100%;
  height: 100%;
}

.fullscreen-card.ready-to-close::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(to right, #ffffff, #1e90ff);
  animation: readyToClose 1.5s ease-in-out infinite;
}

.ready-to-close::before {
  content: '';
  position: fixed;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: #A3A3A3;
  border-radius: 2px;
}

@keyframes readyToClose {
  0%   { transform: scaleX(0); opacity: 0; }
  50%  { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(0); opacity: 0; }
}

/* ======================================
   DETAILED OVERVIEW (NORMAL CARD CONTENT)
====================================== */
.detailed-overview {
  margin-bottom: 20px;
}

.detailed-overview h4 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #A3A3A3;
}

.detailed-overview p {
  font-size: 16px;
  color: #FFFFFF;
  line-height: 1.5;
}

/* ======================================
   SKILLS SECTION
====================================== */
#skills {
  padding: 100px;
  margin-top: -125px;
}

.skills-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 50px;
  min-height: 100vh;
}

.skills-title {
  flex: 0 0 30%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skills-title h2 {
  font-size: 70px;
  text-align: center;
  color: #000000;
  border-right: 4px solid #000000;
  white-space: nowrap;
  overflow: hidden;
}

.skills-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
}

.skill-section h2 {
  font-size: 24px;
  margin-bottom: 10px;
  color: #000000;
}

.skillsContainer {
  display: flex;
  flex-wrap: wrap;
  padding: 20px;
}

.skillsContainer div {
  padding: 20px;
  margin: 5px;
  background-color: #F2F2F2;
  border-radius: 10px;
  color: #000000;
}

/* ======================================
   CONTACT SECTION
====================================== */
#contact {
  margin-bottom: 250px;
  padding: 100px;
}

.contact-title {
  flex: 0 0 30%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.contact-title h2 {
  font-size: 70px;
  text-align: center;
  color: #000000;
}

#contact p {
  margin: -10px 0;
  line-height: 1.2;
  font-size: 20px;
  text-align: center;
}

#contact a {
  text-decoration: none;
  color: #10A37F;
}

#contact a:hover {
  color: #000000;
}

#contactEmail,
#contact p a {
  font-size: 30px;
  color: #000000;
}

/* ======================================
   RESPONSIVE
====================================== */
@media (max-width: 1100px) {
  .navbar a {
    font-size: 14px;
  }

  .navbar a.active-link {
    font-size: 18px;
  }
  
  .fullscreen-card .card-header h2 {
    font-size: 50px !important;
    line-height: 1.2;
    margin: 15px 0;
  }

  .projects-container,
  .skills-container {
    flex-direction: column;
    align-items: center;
  }

  .projects-title h2,
  .skills-title h2 {
    font-size: 60px;
  }

  .lower-projects {
    flex-direction: row;
    max-width: 100%;
    gap: 20px;
    padding-bottom: 100px;
  }

  .binaryTranslator-card,
  .proj3-card {
    width: 100%;
    max-width: none;
  }

  #contact p {
    padding-left: 0;
    text-align: center;
    font-size: 20px;
  }

  .contact-title {
    flex: none;
    width: 100%;
    max-width: none;
    margin-bottom: 10px;
  }

  .contact-title h2 {
    font-size: 60px;
    border-right: none;
  }

  #contact {
    padding: 50px;
    margin-bottom: 150px;
  }
}

@media only screen and (max-width: 700px) {

  #projectsTypingTarget,
  #skillsTypingTarget,
  #contactTypingTarget{
    height: 80px;
  }

  .navbar {
    width: 100%;
  }

  #home h1 {
    font-size: 60px;
  }

  .projects-title h2 {
    font-size: 45px;
  }

  .card2 {
    width: 100%;
    max-width: none;
  }

  .text-overlay {
    position: absolute;
    top: 90%; 
    transform: translateY(calc(-1.5vh * 9));
  }
  
  #top-text {
    font-size: clamp(0.3rem, 2vw, 1em);
  }

  .text-overlay h1 {
    font-size: clamp(0.3rem, 4vw, 1.5em);
  }
  
  #bottom-text {
    font-size: clamp(0.3rem, 1.5vw, 0.75em);
  }

  .lower-projects {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .lower-projects .card {
    width: 97.5%;      
    max-width: none;
    align-items: center;
    justify-content: center;
  }

  #skills {
    margin-top: 0px;
  }

  .skills-title h2 {
    font-size: 45px;
  }

  .contact-title h2 {
    font-size: 45px;
  }

  #contact span {
    font-size: 25px;
    font-weight: 400;
  }

  #contact p a {
    font-size: 25px;
    font-weight: 400;
  }

}
