:root {
  --max: 1100px;
  --gap: 20px;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0,0,0,.18);
}

body {
  margin: 0;
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: #111;
  background: #fff;
}

.page, .footer {
  max-width: var(--max);
  margin: 48px auto;
  padding: 0 24px;
}

.header h1 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  margin: 0 0 10px;
}


.subtitle {
  margin: 0 0 28px;
  font-size: 18px;
  max-width: 70ch;
  opacity: .85;
}

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

.tile {
  position: relative;
  isolation: isolate; /* keeps blending/filters contained */
  height: min(42vh, 360px);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: white;

  /* background image + fallback gradient */
  background-image:
    linear-gradient(135deg, rgba(0,0,0,.55), rgba(0,0,0,.15)),
    var(--bg, none);
  background-size: cover;
  background-position: center;
  transform: translateZ(0); /* smoother animations */
}

.tile__content {
  position: absolute;
  inset: auto 22px 22px 22px;
  z-index: 2;
}
.tile__title {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: .2px;
}
.tile__artist {
  margin: 0;
  opacity: .9;
}

.tile {
  transition: transform .35s cubic-bezier(.2,.8,.2,1),
              box-shadow .35s cubic-bezier(.2,.8,.2,1),
              filter .35s cubic-bezier(.2,.8,.2,1);
}

.tile__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(1200px 500px at 10% 10%, rgba(255,255,255,.18), transparent 60%),
              linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.16), rgba(255,255,255,0));
  transform: translateX(-35%);
  opacity: 0;
  transition: transform .55s ease, opacity .35s ease;
  mix-blend-mode: screen;
}

.tile:hover {
  transform: translateY(-10px) scale(1.01);
  box-shadow: var(--shadow);
  filter: saturate(1.05) contrast(1.05);
}
.tile:hover .tile__overlay {
  opacity: 1;
  transform: translateX(35%);
}



@media (max-width: 860px) {
  .grid { 
    grid-template-columns: 1fr;
}
}

/* Project pages */
.project-meta {
  margin: 0 0 18px;
  opacity: .8;
  max-width: 80ch;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: 26px;
}

.gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  box-shadow: 0 12px 35px rgba(0,0,0,.12);
}

@media (max-width: 860px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}

/* Embedded project canvas (for Breath Box and similar sketches) */
.project-canvas {
  margin-top: 32px;
}

.project-section-title {
  font-size: 20px;
  margin: 0 0 12px;
}

.project-canvas__frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: radial-gradient(circle at top, rgba(255,255,255,.08), #000);
  box-shadow: var(--shadow);
}

.project-canvas__frame canvas {
  display: block;
  width: 100%;
  height: auto;
}

.project-canvas__hint {
  margin-top: 10px;
  font-size: 14px;
  opacity: .75;
  max-width: 60ch;
}

/* Project link/button */
.project-link {
  font-size: 14px;
  text-decoration: none;
  opacity: .8;
}

.project-link:hover {
  text-decoration: underline;
}

.project-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  margin-top: 16px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.12);
  background: #111;
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  letter-spacing: .03em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}

.project-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(0,0,0,.22);
  background: #fff;
  color: #111;
}

/* Fullscreen layout for Breath Box play page */
body.breath-box-play {
  margin: 0;
  background: #000;
  color: #fff;
}

body.breath-box-play a {
  color: inherit;
}

.breath-box-fullscreen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.breath-box-fullscreen h1 {
  margin-top: 8px;
  margin-bottom: 12px;
}

.breath-box-fullscreen .project-canvas {
  flex: 1;
  margin-top: 16px;
}

.breath-box-fullscreen .project-canvas__frame {
  height: 100%;
  border-radius: 0;
  box-shadow: none;
}

.breath-box-fullscreen .project-canvas__hint {
  margin: 5px auto 0;
  text-align: center;
}

.breath-box-fullscreen .breath-box-subheading {
  text-align: center;
  margin: 20px 0 12px;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.03em;
}