article,
aside,
details,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}

@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: "OffBit-Dot";
  src: url("../fonts/OffBit-Dot.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: optional;
}

:root {
  --background: #EEEEE7;
  --text: #111111;
  --text-mid: #333333;
  --text-mid-low: #444444;
  --text-low: #555555;
  --line: #999999;
  --f-size: 1rem;
  --scale-s: 0.8;
  --scale-m: 0.96;
  --scale-ml: 0.995;
  --max-width: 560px;
  --photo-height: 100vh;
}



@media (min-width: 250px) {
  :root {
    --f-size: 1.05rem;
    --max-width: 560px;
  }
}

@media (min-width: 500px) {
  :root {
    --f-size: 1.075rem;
    --max-width: 590px;
  }
}

@media (min-width: 1000px) {
  :root {
    --f-size: 1.115rem;
    --max-width: 610px;
  }
}

@media (min-width: 1500px) {
  :root {
    --f-size: 1.15rem;
    --max-width: 640px;
  }
}

@media (min-width: 2000px) {
  :root {
    --f-size: 1.25rem;
    --max-width: 710px;
  }
}

@media (min-width: 2250px) {
  :root {
    --f-size: 1.35rem;
    --max-width: 760px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #111;
    --text: #c7c8ca;
    --text-mid-low: #a2a2a2;
    --text-mid: #a4a6a8;
    --text-low: #737476;
    --line: #656565;
  }
}

::selection {
  background: var(--text);
  color: var(--background);
}

body {
  line-height: 1.8;
  display: flex;
  flex-direction: column; /* stack main content and footer vertically */
  align-items: center;    /* keep everything centred horizontally */
  justify-content: flex-start; /* natural flow from top to bottom */
  font-family: "Geist", system-ui, -apple-system, BlinkMacSystemFont, 
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--f-size);
  color: var(--text);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-kerning: normal;
}

p {
  margin: 0;
  padding: 0;
}

.wrap {
  position: relative;
  width: 90%;
  max-width: var(--max-width);
  margin: 5vw;
}


a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

a:hover {
  border-bottom: 1px solid var(--text);
}




.section {
  padding-top: 10%;
  padding-bottom: 1.5%;
  font-size: calc(var(--f-size) * var(--scale-s));
  color: var(--text-low);
}








h1,
h2,
h3 {
  font-weight: normal;
}

blockquote + p {
  text-indent: 1.5em;
}

blockquote {
  margin-left: 0;
  margin-top: 2rem;
  margin-bottom: 2rem;
  border-left: 1.5px solid var(--text-mid);
}

blockquote p {
  font-size: calc(var(--f-size) * var(--scale-m));
  margin-left: 1rem;
}



.grid-container {
  margin: 0;
}

figure {
  margin: 0;
  padding: 0;
  display: flex;
}

.img-wrap {
  display: flex;
  height: var(--photo-height);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  margin-bottom: 30px;
}



img {
  max-width: 85%;
  max-height: 85%;
  border-radius: 5px;
}

figcaption {
  max-width: calc(100% - 15%);
  padding-top: 15px;
  color: var(--text-low);
  font-style: italic;
  font-size: calc(var(--f-size) * var(--scale-s));
}
.horizontal-image img {
  max-height: 55vh; /* Slightly smaller than vertical images */
  width: auto;
  object-fit: contain;
}

.tools-section {
  font-family: "OffBit-Dot";
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  cursor: pointer;
}


/* Letter Swap Animation Styles */
.letter-swap-container {
  cursor: pointer;
  display: inline-flex;
}

.letter-swap-active {
  position: relative;
  display: inline-block;
}

.letter-container {
  position: relative;
  /* use inline-flex so the box shrinks to the exact glyph width and kerning feels natural */
  display: inline-flex;
  overflow: hidden;
  line-height: 1em;
  vertical-align: baseline;
}

.letter {
  position: absolute;
  top: 0;
  left: 0;
  width: auto; /* let the glyph itself define the width */
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.6s ease;
  transform-origin: center;
}

.letter-original {
  position: relative; /* Keep it in the layout flow */
  transform: translateY(0);
  opacity: 1;
}

.letter-target {
  position: absolute;
  transform: translateY(100%);
  opacity: 0;
}

/* Smooth spring-like animation */
.letter-container:hover .letter {
  transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
}



