body {
  background-color: black;
  color: white;
  font-family: "Fira Code", monospace;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}
.site-header .header-inner {
  padding: 10px;
  margin-right: 35vw; 
}

h1 {
  font-size: 26px;
}

/* Make sizing predictable across elements */
*, *::before, *::after { box-sizing: border-box; }

/* Media defaults for media elements */
img, video { max-width: 100%; height: auto; }
iframe { max-width: 100%; }

body.writing-page {
  background-color:white;
  color: black;
}

.intro {
  display: grid; 
  font-size: 15px;
  padding: 0 5px; 
  margin-top: 5px; 
  margin-left: 40px; 
  margin-right: 350px; 
  align-items:start;

}

.top-intro {
  display: grid; 
  font-size: 15px;
  margin-top: 5px; 
  margin-bottom: 10px;
  align-items:start;
}

.videostrip {
  position:fixed;
  right: 5px;
  top: 20x;
  height: 98vh;
  max-height: 98vh;
  border-style: dashed;
  border-width: 0px 15px;
  border-color:rgb(174, 174, 174);
}

.videostrip iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@media (max-width: 900px) {
  .page { grid-template-columns: 1fr; }
  /* Let the video strip stack and shrink */
  .videostrip {
    position: static;
    height: auto;
    max-height: none;
    border-width: 0 12px; 
    margin: 0 16px 24px;
  }
  .videostrip iframe { height: min(35vh, 320px); }
}

a.link {
  background-color: blue;
  color: white;
}

.works {
  display: grid; 
  padding-top: 10px;
  padding-bottom: 100px;
  margin-right: 300px;
  justify-content: center;
}

.key {
  justify-content: center;
  color: greenyellow;
}

.exchange {
  background-image: url(images/satmap.png); 
  background-size: contain; 
  background-position: center; 
  background-repeat: no-repeat;
}

.exchange-content {
  display: grid;
  margin-left: 150px;
  margin-right: 150px;
  gap: 10px;
}

.exchange-text-block {
  margin-left: 150px;
  margin-right: 150px;
}


.performance {
  display: block;
  margin-top: 60px;
  margin-left: 200px; 
  margin-right: 200px;
}

.VPN {
  display: grid;
  justify-items: center;
  margin-top: 10px;
}

.AI {
  display: flex;
  margin-top: 60px;
  margin-left: 200px; 
  margin-right: 200px;
}

.physical {
  display: grid;
  justify-items: center;
  margin-top: 60px;
  margin-left: 300px; 
  margin-right: 300px;
}

.exhibition {
  margin-top: 20px;
  margin-left: 200px; 
  margin-right: 200px;
}


.lighthouse {
  margin-top: 60px;
  margin-left: 200px; 
  margin-right: 200px;
}

.home-highlight {
  display: block;
  margin-top: 20px;
  margin-left: 20px;
  margin-right: 500px;
  margin-bottom: 100px;
}

.home-links {
  float: right;
  text-align: end;
  margin-top: 40px;
}

.home-arrows { font-size: 30px; }

.home-teaching {
  display: block;
  text-align: end;
  margin-right: 150px;
}

.home-teaching-details { display: inline-block; margin-right: 80px; }
.home-teaching-summary { font-size: 20px; }

.home-works-label {
  position: absolute;
  left: 400px;
  margin-top: 25px;
  padding-top: 25px;
  font-size: 30px;
}

.page-texts {
  display: grid;
  justify-items: start;
  margin-top: 30px;
  margin-left: 150px;
  margin-right: 700px;
  line-height: 1.5;
}

.capture {
  display: inline-block;
  justify-items: start;
  margin-left: 150px;
  margin-right: 200px;
  line-height: 1.5;
}

.capture h3 {
  scroll-margin-top: 20vh;
}

.capture-atlas {
  display: flex;
  margin-left: 300px;
  margin-right: 500px;
  line-height: 1.5;
}

.page-texts h2 {
  scroll-margin-top: 25vh;
}

.page-texts li {
  font-size: 14px;
  line-height: 2;

}

.page-img {
  display: grid; 
  float: right;
  margin-right: 100px;
  margin-top: 80px;
}

.page-gallery {
  display: flex;
  margin-left: 150px;
  margin-bottom: 100px;
  margin-top: 10px;
}

.page-gallery-scroll {
  display: flex;
  margin-left: 150px;
  margin-bottom: 150px;
  margin-top: 10px;
  margin-right: 240px;
  overflow-x: auto;           /* enable horizontal scrolling */
  gap: 10px;                  /* space between images */
  padding: 20px;
  scroll-behavior: smooth;    /* smooth scroll effect */
}

.page-gallery-scroll img {
  flex-shrink: 0;             /* prevent images from shrinking */
  max-height: 300px;          /* optional: control height */
  border-radius: 3px;         /* optional: rounded corners */
}

.video-player {
  display: grid;
  margin-left: 150px;
  margin-bottom: 20px;
  margin-top: 20px;
}

.back{
  position: fixed;
  right: 400px;
  top: 80px;
}

.top{
  position: fixed;
  right: 200px;
  bottom: 80px;
}

nav {
  border-bottom: 0.2px dashed black;
  margin-left: 100px;
  margin-top: 60px;
  margin-right: 400px;
}

.thoughts ol {
  list-style-type: none;
  padding-left: 0;
}

.thoughts {
  display: inline-block;
  margin-bottom: 20px;
}

.thoughts a::after {
  display: inline-block;
  color: black;
  content: "...";
  font-size: 80%;
  font-weight: bold;
  padding: 0 3px;
}

@media (max-width: 900px) {
  body { padding: 0 10px; }

  .intro,
  .performance,
  .AI,
  .physical,
  .exhibition,
  .lighthouse,
  .works,
  .page-texts,
  .capture,
  .capture-atlas,
  .page-gallery,
  .page-gallery-scroll,
  .video-player,
  nav {
    margin-left: 16px !important;
    margin-right: 16px !important;
  }

  .page-img { float: none; margin: 20px 0; }

  .site-header .header-inner { margin-right: 16px !important; }

  h1 { font-size: clamp(18px, 6vw, 28px); }
  .key { font-size: clamp(16px, 4.5vw, 22px); }

  .back, .top { right: 16px; }

  /* Make the intro highlight area full-width and stacked */
  .home-highlight { margin: 16px; }
  .home-links { float: none; text-align: left; margin-top: 16px; }
  .home-arrows { font-size: clamp(16px, 5vw, 24px); }
  .home-teaching { text-align: left; margin: 12px 0; }
  .home-teaching-details { display: block; margin: 0; }
  .home-teaching-summary { font-size: clamp(16px, 4.5vw, 20px); }
  .home-works-label { position: static; font-size: clamp(20px, 5.5vw, 28px); margin-top: 12px; }
}

@media (max-width: 900px) {
  .exchange-content,
  .exchange-text-block {
    margin-left: 16px;
    margin-right: 16px;
  }
  .exchange-text-block img {
    float: none !important;
    margin: 12px 0 !important;
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 900px) {
  .back {
    position: static;
    right: auto;
    top: auto;
    margin: 8px 16px 0;
    display: grid;
    justify-items: end; 
    gap: 6px;           
  }
  .back h2 { margin: 0; }
  .back a { margin: 0 !important; }

  .page-img { display: grid; justify-items: center; margin: 16px !important; }
  .page-img img {
    width: 100% !important;     
    max-width: 700px;           
    height: auto;
    padding: 8px 0 !important;  
  }

  .video-player iframe,
  .page-texts iframe {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
  }

  .page-gallery { flex-direction: column; margin: 16px !important; }
  .page-gallery img {
    width: 100% !important;
    height: auto;
    padding: 8px 0 !important;
  }
  
  .capture-atlas { display: block; margin: 16px !important; }
  .capture-atlas img {
    float: none !important;
    width: auto !important;
    max-width: 100%;
    height: auto !important;
    padding: 8px 0 !important;
    margin: 0 auto;
  }
}
