body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #fff;
  color: #111;
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 20px;
}

.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 48px;
}

.intro-text {
  flex: 1;
}

.intro h1 {
  margin-bottom: 12px;
  font-size: 2.5rem;
}

.intro p {
  font-size: 1.1rem;
  line-height: 1.6;
}

.intro-images {
  display: flex;
  align-items: center;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 18px;
  flex-shrink: 0;
}

.intro-image {
  flex-shrink: 0;
}

.intro-image img {
  width: 220px;
  height: auto;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.projects h2 {
  margin-bottom: 20px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.card {
  display: block;
  padding: 20px;
  background: white;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
}

.project-button {
  display: inline-block;
  padding: 12px 22px;
  background: #111;
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  margin: 12px 0 24px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.project-button:hover {
  background: #333;
  transform: translateY(-1px);
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.project-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.project-hero-text {
  flex: 1;
}

.project-hero-emoji {
  font-size: 7rem;
  line-height: 1;
  flex-shrink: 0;
}

.project-hero-art {
  flex-shrink: 0;
}

.project-hero-art img {
  width: 180px;
  height: auto;
  display: block;
}

.project-page {
  background: #fff;
}

.project-main {
  max-width: 860px;
}

.back-link {
  display: inline-block;
  margin-bottom: 18px;
  color: #555;
  text-decoration: none;
  font-weight: 600;
}

.back-link:hover {
  color: #111;
}

.project-tagline {
  font-size: 1.2rem;
  line-height: 1.7;
  max-width: 620px;
  color: #444;
}

.project-subtitle {
  margin: -2px 0 10px;
  font-size: 1rem;
  line-height: 1.5;
  color: #7a3f3f;
  font-weight: 600;
}

.project-section {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  padding: 24px 26px;
  margin-bottom: 22px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.project-section h2 {
  font-size: 1.6rem;
  margin: 0 0 12px;
}

.project-section p {
  font-size: 1.1rem;
  line-height: 1.85;
  color: #222;
}

.project-figure {
  width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
}

.project-figure-caption {
  margin: 12px 0 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
}

.project-results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 18px 0 22px;
}

.project-results-figure {
  margin: 0;
}

.project-side-by-side {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.85fr);
  gap: 22px;
  align-items: start;
}

.project-side-by-side-text p {
  margin-top: 0;
}

.project-inline-figure {
  margin: 0;
}

.project-credit {
  margin-top: 18px;
  font-size: 0.9rem;
  color: #666;
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: 16px;
}

.video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 14px;
  display: block;
}

.pdf-wrapper {
  width: 100%;
  height: 720px;
  margin-top: 16px;
}

.pdf-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 14px;
  display: block;
}

.live-shell {
  padding: 28px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(112, 145, 89, 0.18);
  box-shadow: 0 20px 50px rgba(144, 167, 110, 0.16);
}

.live-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.live-note {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #4f5a47;
  margin-bottom: 22px;
}

.live-studio {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 18px;
}

.live-panel {
  padding: 18px;
  background: rgba(255, 252, 255, 0.92);
  border: 1px solid rgba(112, 145, 89, 0.18);
  border-radius: 24px;
}

.live-output {
  margin: 0;
  min-height: 380px;
  white-space: pre-wrap;
  line-height: 1.6;
  font-size: 0.96rem;
  font-family: "IBM Plex Mono", monospace;
  color: #31412b;
}

@media (max-width: 768px) {
  .intro {
    flex-direction: column;
    align-items: flex-start;
  }

  .intro-images {
    width: 100%;
    justify-content: flex-start;
  }

  .intro-image img {
    width: min(44vw, 200px);
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .project-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .project-hero-emoji {
    font-size: 5rem;
  }

  .project-hero-art img {
    width: 140px;
  }

  .project-section {
    padding: 20px;
  }

  .project-section p,
  .project-tagline {
    font-size: 1rem;
  }

  .project-results-grid {
    grid-template-columns: 1fr;
  }

  .project-side-by-side {
    grid-template-columns: 1fr;
  }

  .live-shell {
    padding: 20px;
  }

  .live-topbar,
  .live-studio,
  .controls {
    grid-template-columns: 1fr;
  }

  .live-topbar {
    flex-direction: column;
  }

  .live-output {
    min-height: 260px;
  }

  .pdf-wrapper {
    height: 520px;
  }
}
