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

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

#features h3 {
  text-align: center;
  font-weight: 100;
}

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;
  }
  
  
  .navbar 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;
  }
  
  .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;
  }

    .intro-box {
    border: 2px solid gray;
    border-radius: 10px;
    padding: 8px;
    background-color: white; /* optional */
    box-shadow: 6px 6px 8px rgb(0 0 0 / 71%);
    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;
}

.lang-icon-btn:active {
  transform: scale(0.95);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) inset;
}

.lang-icon-btn:focus {
  outline: none;
  box-shadow: none;
}

.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, #homeButton {
  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, #homeButton 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;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, 310px);
  justify-content: center;
  gap: 30px;
  padding: 0 20px;
}

.feature-shot {
  display: block;
  width: fit-content;
  height: 280px;
  margin: 30px auto;
  padding: 0;
  overflow: hidden;
  background: none;
  border: none;
  cursor: pointer;
}

.feature-shot img {
  display: block;
  width: 307px;
  height: auto;
}

.feature-shot, .demo-card, .project-tile img {
  transition: transform 0.15s ease;
}

.feature-shot:active, .demo-card:active, .project-tile img:active {
  transform: scale(0.94);
}

@media (hover: hover) and (pointer: fine) {
  .feature-shot:hover, .demo-card:hover, .project-tile img:hover {
    transform: scale(0.97);
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 30px;
  background: rgba(0, 0, 0, 0.75);
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  display: block;
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: pointer;
}

.demo-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 3em;
}

.demo-card {
  height: 60vh;
  width: auto;
  border: 2px solid gray;
  border-radius: 10px;
  background-color: white;
  box-shadow: 6px 6px 8px rgb(0 0 0 / 71%);
}

#demo {
  height: 100vh;
}

.demo-text {
  padding-top: 120px;
}

.product-info-text {
    color: green;
    padding: 1em;
    padding-left: 4em;
    padding-right: 4em;
    line-height: 1.5;
}

#introduction h3 {
  font-weight: bold;
  padding-top: 2em;
}

.badge-area {
  text-align: center;
}

.app-store-badge {
  width: 200px;
  height: auto;
  display: block;
  padding-top: 20px;
}

.app-store-link {
  display: inline-block;
}