/* The main culprits: ------------------------------------------------------------ */

html {
  /* enable scrolling and shit  */
  scroll-behavior: smooth;
  scroll-snap-type: none;
  margin: 0;
  overflow: hidden;
}

#section1 {
  /* the landing page */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* height: 100dvh; */
  overflow: hidden;
  height: calc(var(--vh) * 100);
  position: relative; /* for absolute children like star if needed */
  /* outline: 3px solid red;  debug */
}


#section2 {
  height: calc(var(--vh) * 100);
  width: 100vw;

  background-image: linear-gradient(to bottom, #52e368, #5293e3);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

  overflow: hidden;
  padding-top: 20px;
}

body {
  background-color: #52e368;
  height: 100vh;
  width: 100vw;
  margin: 0;
  overflow: hidden;
  pointer-events: auto;

}

  
h1, h2 {
    position: relative;   /* inside normal flow, can stack */
    align-self: flex-start; /* override parent flex alignment */
    font-family: "Courier New";
    font-size: xx-large;
    top: 4vh;
    left: 1vw;
    color: #e352e1;
    filter: drop-shadow(blue 0.1rem 0.1rem 2px);
    text-align: left;
    margin: 0;
}

h2 {
  color: yellow;
  margin-top: 6px;     /* space below h1 */
  font-size: large;
  left: 1vw;
}

p {
  font-family: "Courier New";
  font-weight: bold;
  font-size: 20px;
  white-space: pre-line;
}

.hero-layout {
  display: flex;
  align-items: left;
  justify-content: left;
  gap: 40px;
  width: 100%;
}

/* everything in the modal / pop up thingy: -------------------------------------- */
.popup {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal {
  background: #6dd4e4;
  width: min(900px, 90vw);
  max-height: 90vh;

  border-radius: 8px;
  padding: 24px;

  position: relative;
  overflow-y: auto;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.modal-grid img {
  width: 100%;
  height: auto;
  /* border-radius: 4px; */
  margin: 0 auto;
}

.text-block h1 {
  color: #dc3545;
  text-align: left;
  position: static;
  top: 0;
  left: 0;
}
.text-block h2 {
  color: black;
  text-align: right;
  position: static;
  top: 10rem;
  left: 0;
}

.project-link {
  display: inline-block;
  font-family: "Courier New";
  grid-column: 1 / -1; /* span full width */
  margin: 10px auto;
  padding: 8px 14px;
  background: #4977b0;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  text-align: center;
}

.project-link:hover {
  opacity: 0.85;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px blue;
}

.text-block p {
  text-align: left;
  white-space: pre-line;
}

.description {
  grid-column: 1 / -1; /* span full width */
  white-space: pre-line;
}

.titleImg {
  grid-column: 1 / -1; /* span full width */
  margin: 0 auto;
}

.close-btn {
  position: fixed;
  top: 2vh;
  right: 2vw;

  width: 36px;
  height: 36px;

  cursor: pointer;
  border: none;
  border-radius: 50%;
  background: #f71212;
  color: white;
  font-size: 18px;
  filter: drop-shadow(blue 0rem 0rem 3px);
  z-index: 100;

}

/* Style for the video gallery container */
#popVideoGallery {
    display: flex;
    flex-direction: column; /* Align videos vertically */
    gap: 15px; /* Space between each video */
    width: 100%; /* Can adjust width as needed */
    padding: 10px; /* Add some padding for aesthetics */
    box-sizing: border-box; /* Include padding in total width */
}

/* Style for each video iframe */
#popVideoGallery iframe {
    width: 100%; /* Ensure iframe takes up available width */
    height: 315px; /* Standard height; adjust as necessary */
    border: none; /* Remove default iframe border */
}

/* this is for the image gallery inside the popup thingy */
#popGallery {
    display: flex;
    flex-wrap: wrap; /* Enables multiple rows if necessary */
    gap: 10px; /* Space between images */
    justify-content: center; /* Centers images within container */
}

#popGallery img {
    max-width: 100%;
    height: auto; /* Maintains aspect ratio */
    object-fit: contain; /* Ensures images are not distorted */
}


/* js friendly opening and closing of the modal thingy */
.popup.active {
  display: flex;
}

/* i have no idea what this is for: */
.popup-content {
  display: grid;
  grid-template-columns: auto auto;
  background: #6dd4e4;
  width: 75%; height: 75%;
  padding: 20px;
  border-radius: 5px;
  text-align: left;
  overflow-y: auto;
}

.popup-content-div {
  background-color: #f1f1f1;
  border: 1px solid black;
  padding: 10px;
  font-size: 30px;
  text-align: right;
}

.popup:target {
  display: flex;
}

/* navigation buttons: ----------------------------------------------------------- */
.nav-button {
  position: fixed;      /* float above everything */
  top: 20px;            /* distance from top */
  right: 20px;          /* distance from right */
  z-index: 2000;        /* above all content */
  background-color: #28a745;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 10px 15px;
  cursor: pointer;
  font-family: "Courier New";
  font-weight: bold;
  text-decoration: none; /* if using <a> tag */
  transition: 
    background 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}


/* hover */
.nav-button:hover {
  background: #23923d;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px blue;
}

/* click */
.nav-button:active {
  transform: translateY(1px);
  box-shadow: none;
}

/* about me stuff: -------------------------------------------------------------- */

.about-grid {
  width: 80%;
  max-width: 1100px;
  margin: auto;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;

  align-items: start;
  overflow-y: auto;
}


.about-grid img {
  width: 50%;
  border-radius: 100%;
  object-fit: cover;
}

.about-text h1 {
  /* color: #dc3545; */
  text-align: left;
  position: static;
  top: 0;
  left: 0;
}

/* achtung: ist inherited von p! */
.about-text p {
  background: rgba(255,255,255,0.15);
  padding: 20px;
  border-radius: 12px;
  text-align: left;
  font-weight:normal;
  white-space: pre-line;
  overflow-y: auto;
  margin-bottom: 20px;
}

#btnMail {
  position: static;
  margin-top: 10%;
  justify-self: center;
  width: 40%; top: 70%;
  background-color: #4977b0;
  display:none;
}

/* for the canvas renderer: ------------------------------------------------------ */
.renderer-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh; /* full viewport height for landing page */
  position: relative;
  overflow: hidden; /* prevents extra scrollbars */
}

#myCoolRenderer {
  max-width: 90vw;
  max-height: 90vh;
}

/* accessible mode features:  ---------------------------------------------------- */
.accessible-active #renderer-container {
  display: none;
}

.accessible-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 20px;
  max-width: 1000px;
}

.project-entry {
  font-size: 18px;
  padding: 14px;
  border-radius: 8px;
  border: 2px solid black;
  background: white;
  cursor: pointer;
}

.projectBtn {
  background-color: #28a745;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 10px 15px;
  cursor: pointer;
  font-family: "Courier New";
  font-weight: bold;
  text-decoration: none; /* if using <a> tag */
  transition: 
    background 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}


/* for the background rotation of the star: -------------------------------------- */
.star {
  position: absolute;      /* detach from flow */
  top: 2vh;             /* adjust vertical placement */
  left: 2vw;            /* adjust horizontal placement */
  width: 150px;
  height: 150px;
  z-index: 0;           /* behind everything else */
}

.rotate {
  animation: rotation 15s;
}

.linear {
  animation-timing-function: linear;
}

.infinite {
  animation-iteration-count: infinite;
}

@keyframes rotation {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(359deg);
  }
}

/* mobile mode: -------------------------------------------------------------------------------- */
/* THIS MUST BE LAST IN THE FILE:  */
@media (max-width: 850px) {
  .about-grid {
    grid-template-columns: 1fr;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
  }
  .about-grid img{
    width: 60%;
    justify-self: center;
    align-self: center;
  }
  #btnMail {
    width: 70%;
    justify-self: center;
    align-self: center;
  }

  .modal-grid {
    grid-template-columns: 1fr;
  }
  .hero-layout {
    grid-template-columns: 1fr;
    flex-direction: column;
    justify-content: center;
  }
  .renderer-container {
    grid-template-columns: 1fr;
    align-items: center;
    justify-content: center;
  }

  #myCoolRenderer {
    justify-self: center;
    align-self: center;
  }
}

/* my colors: -------------------------------------------------------------------- */
/* this is not a proper color scheme (and unused), just some colors i like that i want to use. */
#redy
{
    color: #e35252
}

#greeny
{
    color: #52e368
}

#softblue
{
    color: #5293e3
}

/* gradient pink: */

#purple-used-in-h1
{
    color: #e352e1
}

#pinky
{
    color: #ff50b1
}

#purplange
{
    color: #ff7383
}

#orange
{
    color: #ffa261
}

#yellorange
{
    color: #ffd057
}

#yellow
{
    color: #f9f871
}