/* Base Styles */
body, html {
  margin: 0;
  padding: 0;
  font-family: 'Arvo', serif;
}

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

main {
  flex: 1;
}

a {
  color: #2185FF;
  transition: color 0.3s ease;
}

a:hover {
  color: #0d7fe6;
}

/* Header and Navigation */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(255,255,255,0.95);
  padding: 10px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 1000;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 120px;
}

/* Updated logo styles for consistent scaling */
.logo {
  display: flex;
  align-items: center;
  height: 60px;
}

.logo a {
  display: flex;
  align-items: center;
  height: 100%;
}

.logo img {
  height: 60px;
  width: auto;
  object-fit: contain;
}

nav ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
}

nav ul li {
  margin-left: 20px;
}

nav ul li a {
  color: #333;
  text-decoration: none;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: #2185FF;
}

/* Section Common Styles */
section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 20px 20px;
  text-align: center;
}

section h2 {
  margin-bottom: 20px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
}

section p {
  max-width: 800px;
  line-height: 1.6;
}

/* Home Section */
#home {
  background-color: white;
  color: #333;
  padding: 0;
}

.home-content {
  display: flex;
  width: 100%;
  max-width: 1800px;
  height: 100vh;
  box-sizing: border-box;
  padding: 0 clamp(24px, 8vw, 140px);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  margin: 0 auto;
}

.home-text {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.home-badge {
  margin-bottom: 1px;
}

.home-badge img {
  width: 15vw;
  max-width: 160px;
  min-width: 50px;
  height: auto;
}

.home-text h1 {
  font-size: 2em;
  line-height: 1.4;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  max-width: 600px;
  color: #2185FF;
}

.home-content .home-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  max-height: min(60vh, 600px);
  max-width: 600px;
  width: 100%;
  margin: 0;
  position: relative;
  overflow: visible;
}

.home-content .home-image canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 12px;
  background-color: #000;
}

.simulation-controls {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 540px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(13, 20, 32, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 20px 40px rgba(6, 12, 21, 0.45);
  color: #f3f6fb;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.simulation-controls.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.simulation-controls__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.simulation-controls__buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.simulation-controls__group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 4px 8px;
}

.simulation-button {
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: inherit;
  border-radius: 8px;
  padding: 6px 12px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.simulation-button:hover {
  background: rgba(33,133,255,0.25);
  box-shadow: 0 6px 12px rgba(6, 12, 21, 0.25);
}

.simulation-button:active {
  transform: translateY(1px);
}

.simulation-button--primary {
  background: #2185FF;
  border-color: #2185FF;
  color: #fff;
  box-shadow: 0 6px 18px rgba(33,133,255,0.35);
}

.simulation-button--primary:hover {
  background: #0d7fe6;
}

.simulation-angle {
  min-width: 110px;
  text-align: center;
  font-family: 'Nunito', sans-serif;
  font-size: 0.75rem;
  line-height: 1.3;
  color: rgba(243,246,251,0.9);
}

.simulation-status {
  font-family: monospace;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  line-height: 1.3;
  color: rgba(243,246,251,0.8);
  margin-left: auto;
  text-align: right;
}

/* Services Section */
#services {
  background-color: white;
  color: #333;
}

#services ul {
  list-style-type: disc;
  padding-left: 20px;
  text-align: left;
}

#services li {
  margin-bottom: 10px;
}

/* Projects Section */
#projects {
  background-color: white;
  color: #333;
}

.project-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #333;
  margin-top: 20px;
}

.project-logo {
  width: 30vw;
  max-width: 600px;
  min-width: 50px;
  height: auto;
  margin-bottom: 10px;
}

#projects .project-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

#projects .project-logo {
  width: 25vw;
  max-width: 400px;
  min-width: 200px;
  height: auto;
}

#projects .project-description {
  flex: 1;
  text-align: left;
  line-height: 1.6;
}

/* About Section */
#about {
  background-color: white;
  color: #333;
  text-align: left;
}

.about-image {
  width: 40vw;
  max-width: 1200px;
  min-width: 50px;
  height: auto;
  margin-top: 30px;
  margin-bottom: 20px;
}

/* Contact Section */
#contact {
  background-color: white;
  color: #333;
}

/* Footer */
footer {
  background-color: white;
  color: #333;
  text-align: center;
  padding: 0 0;
  font-size: 0.9em;
  border-top: 1px solid rgba(0,0,0,0.1);
}


/* Responsive Styles */
@media screen and (max-width: 768px) {
  /* Header */
  .header-content {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
  }

  .logo {
    height: 50px;
  }

  .logo img {
    height: 50px;
  }

  /* Navigation */
  nav {
    display: flex;
    align-items: center;
  }

  .menu-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-left: auto;
  }

  .menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #2185FF;
    margin: 5px 0;
    transition: 0.4s;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }

  .nav-links.show {
    display: flex;
  }

  nav ul li {
    margin: 10px 0;
  }

  /* Home Section */
  .home-content {
    flex-direction: column;
    height: auto;
    padding: 30px 24px 48px;
    background-color: white;
    gap: 32px;
  }

  .home-text {
    padding: 10px 20px 20px;
  }

  .home-badge img {
    width: 20vw;
    max-width: 160px;
    padding-top: 60px;
  }

  /* .home-image {
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 0; 
    width: 100%; Ensure it takes full width of its container
  } */

  .home-content .home-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
    max-height: 60vh;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  /* Projects Section */
  #projects .project-container {
    flex-direction: column;
  }

  #projects .project-logo {
    width: 90%;
    height: auto;
    max-width: 400px;
    margin-bottom: 0px;
  }

  #projects .project-description {
    text-align: center;
  }

  /* Simulation Controls */
  .simulation-controls {
    bottom: 8px;
    width: calc(100% - 48px);
    padding: 8px 10px;
  }

  .simulation-controls__inner {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
  }

  .simulation-controls__buttons {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    flex: 0 1 auto;
  }

  .simulation-controls__group {
    justify-content: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
    padding: 4px 6px;
  }

  .simulation-button {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .simulation-angle {
    min-width: 70px;
    font-size: 0.7rem;
  }

  .simulation-status {
    margin-left: auto;
    text-align: right;
    font-size: 0.65rem;
    line-height: 1.2;
    flex-shrink: 1;
    min-width: 0;
  }

  /* About Section */
  .about-image {
    width: 90%;
    max-width: 1200px;
  }
}

@media screen and (min-width: 769px) {
  .menu-toggle {
    display: none;
  }

  .nav-links {
    display: flex !important;
  }

  .home-content {
    flex-direction: row;
  }
}
