/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: #eeecec;
  font-family: monospace;
  color: #151414;
}

/* ASCII background animation */
#ascii-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}
.ascii {
  position: absolute;
  font-size: 1rem;
  opacity: 0.3;
  animation: float 20s linear infinite;
}
@keyframes float {
  0% { transform: translateY(100vh); }
  100% { transform: translateY(-100vh); }
}

/* Intro section */
.intro-section {
  height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 5vh 5vw;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}
.intro-text h1 {
  font-size: 4rem;
  margin: 0;
  line-height: 1;
}
.intro-text p {
  font-size: 1.2rem;
  margin: 0.5rem 0 0;
  opacity: 0.8;
}
#scroll-down-arrow {
  font-size: 2rem;
  margin-top: 1rem;
  cursor: pointer;
  animation: bounce 1.5s infinite;
  opacity: 0.6;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* Responsive grid layout */
.grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2vw;
  padding: 5vh 5vw;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.grid.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Tablet layout */
@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile layout */
@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

/* Canvas/iframe containers */
.canvas-container {
  background: rgba(116, 115, 115, 0.05);
  border: 1px solid #575757;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 100%;
}

.description {
  padding: 1rem;
  font-size: 0.85rem;
  background-color: rgba(159, 159, 159, 0.5);
  border-top: 1px solid #333;
}

/* Expandable window wrapper */
.canvas-wrapper {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  transition: all 0.4s ease;
  z-index: 1;
}
.canvas-inner {
  width: 100%;
  height: 100%;
}

/* Expand/collapse buttons */
.expand-btn,
.collapse-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 1rem;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 3px;
  z-index: 5;
}
.collapse-btn {
  display: none;
}

/* Fullscreen canvas */
.canvas-wrapper.expanded {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 90vw;
  height: 80vh;
  transform: translate(-50%, -50%);
  z-index: 999;
  background: #000;
  border: 2px solid white;
  border-radius: 8px;
}
.canvas-wrapper.expanded .expand-btn {
  display: none;
}
.canvas-wrapper.expanded .collapse-btn {
  display: block;
}

/* Responsive iframe */
iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Optional: Better text overflow control */
.description h3,
.description p {
  margin: 0 0 0.5rem 0;
  word-break: break-word;
}


.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 40px;
  padding: 60px 40px;
}

.canvas-container {
  display: flex;
  flex-direction: column;
  background: #f0f0f0; /* add background here if not already */
  height: 100%;
}

.canvas-wrapper {
  flex-grow: 1;
  background-color: #f0f0f0;
  position: relative;}

.description {
  padding: 20px;
  background: white;
}
