html, body {
  height: 200vh;

}

p, a {
 font-family: Kite One, Arial;
 color: white;
 font-weight: 550;
 font-size: 4vh;
 text-shadow: 1.5px 1px 2px black;
 text-decoration: none;
}

body {
  height: 100%;
  width: 100%;
  background-color: rgb(136, 191, 241);
  margin: 0%;
  opacity: 100%;
}

#box{
  height: 260vh;
  width: 100%;
  display:grid;
  grid-template-columns: 10% 35% 10% 35% 10%;
  grid-template-rows: 100px 100px 1fr 125px 1fr 125px 1fr 125px 1fr 125px;
 
}

#pc-div {
  position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: -2;
      overflow: hidden;
}

#background-pc {
  position: fixed;
      top: 50%;
      left: 50%;
      min-width: 100%;
      min-height: 100%;
      width: auto;
      height: auto;
      transform: translate(-50%, -50%);
      object-fit: cover;
}

#background-mobile {
  opacity: 0%;
   z-index: -3;
}

.nav-bar {
  grid-row: 1;
  grid-column: 1/5;
  width: 100vw;
  height: 100px;
  background-color: rgb(18, 71, 131);
  display:flex;
  justify-content: space-around;
  align-items: center;
  z-index: 10;
  position: fixed;
  opacity: 95%;
}

.contacts {
  margin-right: 5vw;
  cursor: pointer;
}

.about-me {
  margin-left: 5vw;
  cursor: pointer;
}

.contacts, .about-me {
padding-left: 20px;
padding-right: 20px;
transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
border-radius: 50px;
}


.contacts:hover, .about-me:hover {
color:rgb(122, 122, 250);
background-color:rgb(255, 255, 255);
border-radius: 50px;
transform: scale(1.1);
}

.project-text {
  font-size: 3.5vh;
}


#project-1 {
  grid-row: 3/5; /* span image and text rows */
  grid-column: 2/3;
  height: 100%;
  z-index: 3; /* above image and text */
  background-color: transparent; /* invisible overlay */
}


#project-bild-1 {
  background-image: url("../bilder/figma.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center; /* keep centered within its box */
  height: clamp(220px, 40vh, 420px); /* don't scale beyond this box */
  width: 100%;
  margin-top: 80px; /* nudge image lower, closer to text */
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
  transition: transform 200ms ease, box-shadow 200ms ease;
  transform-origin: center center; /* keep animation centered on the image */
  will-change: transform, box-shadow;
  height: 60%;
  
  
}

#project-1:hover #project-bild-1 {
  transform: translateY(-3px) scale(1.005); /* subtler scale to match contained image */
  box-shadow: 0 0 10px rgba(122, 122, 250, 0.55), 0 6px 20px rgba(0,0,0,0.22);
}

#project-text-div-1 {
  grid-row: 4;
  grid-column: 2/3;
  z-index: 2;
  width: 100%;
  height: 100%;
  
  background-color: var(--glass-bg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  
}

#project-text-1 {
  margin-top: -5px;
}

/* Placeholder project cards base styles (desktop) */
/* Image boxes */
#project-bild-2, #project-bild-3, #project-bild-4 {
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center; /* keep centered within its box */
  height: clamp(220px, 40vh, 420px); /* don't scale beyond this box */
  width: 100%;
  margin-top: 80px; /* nudge image lower, closer to text */
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
  transition: transform 200ms ease, box-shadow 200ms ease;
  transform-origin: center center; /* keep animation centered on the image */
  will-change: transform, box-shadow;
  height: 60%;
  
  
}

#project-bild-3 {
background-image: url("../projects/bilder/logo.v2.png");
}

#project-bild-2 {
background-image: url("../bilder/Space.png");
}

/* Text containers */
#project-text-div-2, #project-text-div-3, #project-text-div-4 {
  background-color: var(--glass-bg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  width: 100%;
  height: 100%;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

/* Normalize project text spacing across cards */
#project-text-1, #project-text-2, #project-text-3, #project-text-4 {
  margin-top: -5px;
  text-align: center;
  margin-top: 30px;
  text-shadow: 1.5px 1px black;
}

/* Placement in desktop grid */
#project-2 { grid-row: 5/7; grid-column: 2/3; z-index: 1; }
#project-text-div-2 { grid-row: 6; grid-column: 2/3; z-index: 2; }

#project-3 { grid-row: 3/5; grid-column: 4/5; z-index: 1; }
#project-text-div-3 { grid-row: 4; grid-column: 4/5; z-index: 2; }

#project-4 { grid-row: 5/7; grid-column: 4/5; z-index: 1; }
#project-text-div-4 { grid-row: 6; grid-column: 4/5; z-index: 2; }

#project-2:hover #project-bild-2,
#project-3:hover #project-bild-3,
#project-4:hover #project-bild-4 {
  transform: translateY(-4px) scale(1.015);
  box-shadow: var(--card-glow);
}


@media (max-width: 768px) {
body {
  height: 100vh;
  }

   #background-pc {
    opacity: 0%;
  }
  #background-mobile {
  position: fixed; /* sit behind and cover viewport */
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover; /* fill and crop */
  object-position: center;
  opacity: 70%;
  z-index: 0;
  pointer-events: none; /* avoid intercepting taps */
  }
  
  /* Keep project image contained and centered on small screens */
  #project-bild-1 {
    background-size: contain;
    background-position: center;
    height: clamp(180px, 35vh, 360px);
    width: 100%;
    margin-top: 50px; /* nudge image lower on mobile */
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
  }
  /* Place the clickable overlay (and thus the image) in row 3/4, col 2 */
  #project-1 {
    grid-row: 3/5;
    grid-column: 2/3;
  }
  
  /* Mobile placeholder styles */
  #project-bild-2, #project-bild-3, #project-bild-4 {
    background-color: #ffffff;
    height: clamp(180px, 35vh, 360px); /* match project-bild-1 mobile height */
    width: 100%;
    margin-top: 50px; /* match spacing with project-bild-1 on mobile */
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
  }
  #project-text-div-2, #project-text-div-3, #project-text-div-4 {
    background-color: var(--glass-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    width: 100%;
    height: 100%;
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
  }

  /* Stack new projects one after another on mobile */
  #project-2 { grid-row: 5/6; grid-column: 2/3; }
  #project-text-div-2 { grid-row: 6; grid-column: 2/3; }

  #project-3 { grid-row: 7/8; grid-column: 2/3; }
  #project-text-div-3 { grid-row: 8; grid-column: 2/3; }

  #project-4 { grid-row: 9/10; grid-column: 2/3; }
  #project-text-div-4 { grid-row: 10; grid-column: 2/3; }
  #box{
  height: 100%;
  width: 100%;
  display:grid;
  grid-template-columns: 25% 50% 25% ;
  grid-template-rows: 75px 50px 1fr 175px 1fr 175px 1fr 175px 1fr 175px 1fr;
  min-height: 300vh; /* make the grid longer on mobile */
  row-gap: 16px;
}



.nav-bar {
  height: 75px;
}

  }

