/* Global layout & defaults */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: #F8F4EC;
  color: #f5f5f5;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Top bar */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 6px solid rgba(168, 67, 67, 0.06);
}

.logo {
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #0f0f10;
  text-transform: uppercase;
  font-size: 22px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.logo:hover {
  opacity: 0.7;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.tagline {
    color: #0f0f10;
  font-size: 14px;
  opacity: 0.9;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.tagline:hover {
  opacity: 0.7;
}

/* Header menu button */
.menu-btn {
  width: 26px;
  height: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.menu-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.menu-btn .line {
  width: 100%;
  height: 3px;
  background: #0f0f10;
  border-radius: 3px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* X animation when menu open */
.menu-btn.open .line:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-btn.open .line:nth-child(2) {
  opacity: 0;
}

.menu-btn.open .line:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Canvas area */
.canvas-section {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px 16px 40px;
}

.canvas-frame {
  max-width: 1600px; /* Increased to accommodate wider canvas */
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Style the p5 canvas */
canvas {
  display: block;
  background: #0f0f10;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  width: 100% !important;
  height: auto !important;
}

/* Responsive adjustments */

/* Tablet and below */
@media (max-width: 1024px) {
  .site-header {
    padding: 16px 24px;
  }

  .logo {
    font-size: 20px;
  }

  .header-right {
    gap: 20px;
  }

  .tagline {
    font-size: 13px;
  }

  .canvas-section {
    padding: 24px 12px 32px;
  }

  canvas {
    border-radius: 16px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
  }
}

/* Mobile */
@media (max-width: 768px) {
  .site-header {
    padding: 14px 16px;
  }

  .logo {
    font-size: 18px;
  }

  .header-right {
    gap: 16px;
  }

  .tagline {
    font-size: 12px;
  }

  .menu-btn {
    width: 24px;
    height: 20px;
  }

  .menu-btn .line {
    height: 2.5px;
  }

  .menu-btn.open .line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .menu-btn.open .line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .canvas-section {
    padding: 16px 8px 20px;
  }

  canvas {
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .site-header {
    padding: 12px;
  }

  .logo {
    font-size: 16px;
    letter-spacing: 0.05em;
  }

  .header-right {
    gap: 12px;
  }

  .tagline {
    font-size: 11px;
  }

  .canvas-section {
    padding: 12px 4px 16px;
  }

  canvas {
    border-radius: 10px;
  }
}