body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header,
main,

footer {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 1.25rem;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

nav {
    position: relative;
    right: -220px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

nav i {
    font-size: 1.3rem;
}

nav a i.fa-github {
color: black; 
}

nav a i.fa-linkedin {
color: #0077B5;
}


main,
section {
    display: flex;
    flex-direction: column;
}

main {
    gap: 4rem;
}

section {
    gap: 1rem;
}

.intro-header 
p {padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    margin-top: -10px;
    margin-bottom: -8px;
    }

h1 {
    margin-top: -190px;
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(1.5rem, 2.5vw, 1.75rem);
}

.intro-header .fa-meetup {
    font-size: clamp(2.25rem, 2.5vw, 3.5rem);
    color: var(--color-accent);
    animation: float 4s ease-in-out infinite;
}

.intro-header .fa-meetup:hover {
    color: var(--color-link);
    transform: scale(1.1);
    transition: transform 0.3s ease-in-out;
    cursor: pointer;
}

h5 {
    font-family: 'Courier New', Courier, monospace;
    font-size: clamp(0.75rem, 4vw, 1.25rem);
}

.contact-sidebar {
    position: fixed;
    right: 1.75%; 
    top: 67%; 
    transform: translateY(-70%); 
    display: flex;
    flex-direction: column; 
    gap: 12.5px; 
    z-index: 14; 
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 0;
    width: fit-content;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    animation: fadeIn 4.5s ease-in-out;
}

.contact-sidebar .music-bars {
  pointer-events: auto;
  cursor: pointer;
}

.contact-sidebar .contact-item {
    display: flex;
    justify-content: center;
    align-items: center;
    width:50px !important;
    height:50px !important;
    background-color: transparent; 
    transition: all 0.3s ease-in-out;
     will-change: transform;
}

.contact-sidebar .contact-item svg {
    width: 45%; 
    height: 45%;
    transition: transform 0.3s ease-in-out;
    will-change: transform;
}

.contact-item:hover svg {
  transform: rotate(-360deg) scale(1.25);
  
}

.icon-bar {
  width: 15px;           
  height: 1px;          
  background-color:rgba(0, 0, 0, 0.25);
  margin: -7.5px auto;    
  border-left: .5px dotted black; 
  border-right: .5px dotted black;
}

.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 100px;
  background-color: transparent;
  color: #000000;
  text-align: center;
  border-radius: 6px;
  padding: 2.5px 3px;
  position: absolute;
  z-index: 1;
  bottom: 5%; 
  left: 0%;
  margin-left: -80px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 12px;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Initial (hidden) state */
.project-card {
  filter: blur(8px);
  opacity: 0;
  transition: all 0.75s ease-in-out;
}

/* When AOS activates */
.project-card.aos-animate {
  filter: blur(0);
  opacity: 1;
  transition: all 0.75s ease-in-out;
}

.skill-section {
    margin-top: clamp(.25rem, 2.5vw, 1.25rem);
}

.intro-description {
    width: 100%;
    max-width: 1200px !important;
    margin-top: 15%;
}

.links-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 3rem 0;
    margin-bottom: -15%;
}

.link-arrow {
    color: var(--color-link);
    transform: rotate(-45deg);
}

.color-div {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 20px !important;
}

.color-div.hidden {
  display: none;
}

.color-div .hidden-text {
  display: none;
}

.color-div .reset-btn {
  display: none;
}

.cards-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-card {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  padding: 1.5rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap; /* fallback for small screens */
}

.project-card:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease-in-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.project-card > div:first-child {
  flex: 1 1 300px;
}

.video-project {
  flex: 1 1 100px;
  max-width: 180px;
}

.video-proj {
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

.project-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 0.5rem;
}

.tech-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.25rem 0;
}

.tech-list div {
    padding: 0.1rem 0.5rem;
    border-radius: var(--border-radius-small);
}

.tech-list p {
    font-size: 0.8rem;
}

.memory-game-container h4 {
text-align: center;
display: block;
margin: 0 auto;
width: fit-content;
}

.memory-game-container button {
display: block;
margin: 20px auto; 
padding: 10px 20px;
font-size: 16px;
cursor: pointer;
}

.intro-container {
display: flex;
align-items: center; 
position: relative
}

.video-banner {
position: absolute;
pointer-events: none;
top: 0;
left: 50%; 
transform: translateX(-46%);
width: 100%; 
height: 100%;
max-height: 280px;
overflow: hidden;
z-index: -1;
}

.video-bg {
position: absolute;
top: 40%;
left: 40%;
transform: translate(-50%, -50%);
width: 100vw;  
height: auto;   
min-height: 100%;
object-fit: cover;
}

.video-project {
position: relative;
width: 50vw; 
max-width: 300px; 
aspect-ratio: 4 / 4; 
border-radius: 10px; 
overflow: hidden; 
box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2); 
}
  
.video-project video {
width: 100%;
height: 100%;
object-fit: cover; 
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr); 
  gap: 15px;
  max-width: 90px;
  margin: 10.5vh 10vw 0 auto;
  margin-left: auto;
  padding: 20px;
  z-index: 9;
}

.box {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 10px;
  font-size: 28px;
}

.box a {
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s;
} 

.box:hover a {
    transform: scale(1.5);
}

.box a[href*="linkedin"] {
color: #0077b5; 
}

.flag-link {
  display: inline-block;
  padding: 10px; 
  cursor: pointer;
}

.flag-icon {
  font-size: 20px;
  display: inline-block;
  pointer-events: none; 
}

.project-card {
        flex-direction: row;
      }

.project-card .img-div {
        max-width: 35%;
      }

.project-card:hover {
        transform: scale(1.015);
        transition: transform 0.3s ease-in-out;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
      }


@media (max-width: 768px) {

    .video-project {
            position: relative;
            width: 50vw; 
            max-width: 250px; 
            aspect-ratio: 4 / 3; 
            float: right; 
            margin-left: 20px; 
            margin-bottom: 20px;
            border-radius: 10px; 
            overflow: hidden; 
            box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2); 
          }
    .video-banner {
        max-height: 250px;
          }

    .intro-description {
        margin-top: 2.75rem;
      }    

      .contact-sidebar {
        top:65%;
        right:1%;
      }
    
      .contact-sidebar .contact-item {
        width:38px;
        height:38px;
      }
    
      .contact-sidebar .contact-item svg{
        width:35%;
        height:35%;
      }
      table td,
      table th {
          font-size: clamp(0.75rem, 4vw, 0.95rem);
        }
      .table-wrapper {
            overflow-x: auto;
            max-width: 100%;
      }
}

@media (prefers-reduced-motion: reduce) {
  .video-bg {
    display: none;
  }

  .video-proj {
    display: none;
  }

  .video-project {
    background: #e8eef5;
  }

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}