*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  -webkit-tap-highlight-color: transparent;
  font-size: 18px;
}

html {
  margin: 0;
  width: 100%;
  background: white;
  overflow-x: hidden;
}

body {
  margin: 0;
  width: 100%;
  min-width: 0;
  font-family: sans-serif;
  background: white;
  overflow-x: hidden;
}

.navbar {
  --navbar-height: 80px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  position: fixed;
  top: calc(-1 * env(safe-area-inset-top));
  left: 0;
  right: 0;

  height: calc(var(--navbar-height) + (env(safe-area-inset-top) * 2));
  padding-top: calc(env(safe-area-inset-top) * 2);

  background: linear-gradient(
    to bottom,
    #ffff00 0,
    #ffff00 10%,
    lightblue 100%
  );
  border-bottom: solid gray 1px;
  padding-left: 16px;
  padding-right: 16px;

  z-index: 10;
  box-sizing: border-box;
}

@media (max-width: 500px) {
  .navbar {
    --navbar-height: 50px;
  }
}
  
  .navbar-items {
    display: flex;
    align-items: center;
    gap: 1.5em;
    margin: 0;
    padding: 0;
    min-width: 0;
    font-size: 18px;
  }

@media (max-width: 500px) {
  .navbar {
    padding-left: 8px;
    padding-right: 1em;
  }

  .navbar-items {
    gap: 1em;
  }

}
  
  .navbar-items a {
    color: green;
    text-decoration: none;
  }
  
  
  ul li {
    list-style: none;
    display: inline;
  }
  
.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
}

.welcome-section {
  padding: 24px 20px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100dvh;
  margin-top: 5dvh;
}

.welcome-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.welcome-content h1,
.welcome-content p {
  margin-left: 0;
  margin-right: 0;
}

.profile-picture {
  width: clamp(180px, 35vh, 320px);
  height: auto;
  display: block;
  border-radius: 50%;
  margin-top: 30px;
}

  h1, h2 {
    text-align: center;
    font-size: 1.5em;
  }
  
  .welcome-section p {
    font-weight: bold;
    text-align: center;
  }
  
  #welcome-section {
    scroll-margin-top: 100px;
  }
  
  p.info-text {
    color: green;
    padding: 1em;
    padding-left: 4em;
    padding-right: 4em;
  }
  
  .projects h2{
    padding-top: 100px;
    margin: 0.5em;
  }
  
  .project-tile img {
    border: 2px solid gray;
    border-radius: 10px;
    padding: 8px;
    background-color: white; /* optional */
    box-shadow: 6px 6px 8px rgb(0 0 0 / 71%);
    width: 192px;
    height: auto;
  }

.project-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
}

.project-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(400px, 100%);
  padding: 2em 4em 2em 4em;
}
  
  .project-label {
    font-weight: bold;
  }
  
  .projects-comment {
    font-size: 28px;
    text-align: center;
  }
  
  .contact-section {
    padding-bottom: 40px;
    text-align: center;
  }
  
  .contacts {
    
    font-size: 18px;
    display: flex;
    gap: 1.5em;
    align-items: flex-end;
    justify-content: center;
    flex-wrap: wrap;
  }
    
  .icon.github {
    height: auto;
    width: 20px;
  }
  
  .icon.buymeacoffee {
    height: auto;
    width: 36px;
    transform: translate(12px, 5px)
  }
  
  .icon.youtube {
    height: auto;
    width: 26px;
    transform: translate(0px, 6px);
  }

  .project-list a {
    color: green;
    text-decoration: none;
  }
  
@media (hover: hover) and (pointer: fine) {
  .navbar-items a:hover {
    color: blue;
  }

  .project-list a:hover {
    color: blue;
  }

  .contacts a:hover {
    color: blue;
  }

  .lang-btn:hover {
    background: #eee;
  }
}

  .contacts a {
    color: green;
    text-decoration: none;
  }
  
  .comment {
    font-style: italic;
  }

  .lang-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
}

.panel {
  position: fixed;
  top: calc(50px + env(safe-area-inset-top));
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  padding: 20px;
  z-index: 9;
  overflow-y: auto;
  padding-top: 64px;
}

.language-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.lang-btn {
  padding: 12px 16px;
  font-size: 1em;
  background: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.lang-btn.selected {
  background: #ccc;
}

.hidden {
  display: none !important;
}

#languageButton {
  display: flex;
  align-items: center;     /* ✅ Vertically center icon */
  justify-content: center; /* ✅ Horizontally center icon */
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 1001;
}

#languageButton img {
  display: block;
  width: 100%;          /* force fill */
  height: 100%;         /* force fill */
  object-fit: contain;
}

.worksheet-tile img {
  background-color: lightgray;
}

.info-section {
  padding-top: calc(80px + env(safe-area-inset-top));
}

.logo {
  height: 100px;
}
