/* THINGS I THINK — interactive wooden file drawer
   This file only styles things-i-think.html; the rest of the portfolio is untouched. */
.think-page .thought-main {
  padding: clamp(.5rem, 1.5vw, 1.25rem) 0 0;
}
.thought-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.thought-system {
  padding: 0 var(--gutter);
}
.thought-scene {
  position: relative;
  width: min(100%, 1080px);
  margin: 0 auto;
  overflow: visible;
  isolation: isolate;
}
.thought-drawer-photo {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}
.thought-file-tabs {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}
.thought-file-tab {
  position: absolute;
  display: block;
  border: 0;
  border-radius: 7px 7px 2px 2px;
  padding: 0;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
  transition: background 180ms ease, box-shadow 180ms ease, transform 240ms ease;
  -webkit-tap-highlight-color: transparent;
}
/* Each hit area sits over a visible tab in the drawer photo. */
.thought-file-tab--misc { left: 23%; top: 5.4%; width: 14.5%; height: 5.6%; }
.thought-file-tab--objects { left: 27.7%; top: 10.8%; width: 15.2%; height: 5.4%; }
.thought-file-tab--body { left: 30.9%; top: 16.4%; width: 15%; height: 5.4%; }
.thought-file-tab--belonging { left: 35.2%; top: 22.2%; width: 15%; height: 5.4%; }
.thought-file-tab--home { left: 40.5%; top: 28%; width: 13%; height: 5.4%; }
.thought-file-tab--memory { left: 43%; top: 33.8%; width: 10.5%; height: 5.2%; }
.thought-file-tab:hover,
.thought-file-tab:focus-visible {
  background: rgba(255, 247, 224, .2);
  box-shadow: 0 0 0 1px rgba(117, 82, 43, .2), 0 3px 7px rgba(37, 25, 14, .12);
  transform: translateY(-2px);
  outline: none;
}
.thought-note-sheet {
  position: absolute;
  z-index: 3;
  left: 54.1%;
  top: 1.4%;
  width: 36.2%;
  height: 43.2%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 12.5% 10% 3.2%;
  border: 1px solid rgba(153, 121, 73, .32);
  border-radius: 8px 8px 3px 3px;
  color: #262017;
  background-color: #f4e6c8;
  background-image:
    linear-gradient(112deg, rgba(255,255,255,.25), rgba(255,255,255,0) 45%),
    repeating-linear-gradient(0deg, rgba(127,91,47,.025) 0, rgba(127,91,47,.025) 1px, transparent 1px, transparent 4px);
  box-shadow: 0 3px 9px rgba(35, 25, 13, .06);
  transform: translateY(0) rotate(.2deg);
  transform-origin: bottom center;
  transition: transform 420ms cubic-bezier(.2,.72,.2,1), box-shadow 300ms ease;
}
.thought-note-sheet.is-pulled,
.thought-scene.has-active-note .thought-note-sheet {
  transform: translateY(-15px) rotate(-.25deg);
  box-shadow: 0 17px 28px rgba(35, 25, 13, .17);
}
.thought-note-meta {
  position: absolute;
  top: 6.5%;
  left: 10%;
  right: 10%;
  display: flex;
  justify-content: space-between;
  gap: .6rem;
  width: auto;
  margin: 0;
  color: #655643;
  font-size: clamp(.48rem, .75vw, .7rem);
  letter-spacing: .055em;
  line-height: 1.15;
}
.thought-note-meta span:last-child { text-align: right; }
.thought-note-sheet h2 {
  margin: 0 0 .65rem;
  max-width: 100%;
  font-size: clamp(.9rem, 1.55vw, 1.45rem);
  font-weight: 400;
  line-height: 1.05;
}
.thought-note-sheet > p:not(.thought-note-meta) {
  margin: 0;
  width: 100%;
  color: #352c21;
  font-size: clamp(.62rem, .95vw, .9rem);
  line-height: 1.36;
}
.thought-note-read {
  margin: auto 0 0;
  padding: .25rem 0 0;
  border: 0;
  border-top: 1px solid rgba(93, 69, 39, .27);
  background: transparent;
  color: #4c3926;
  font-size: clamp(.55rem, .8vw, .76rem);
  line-height: 1.2;
  cursor: pointer;
}
.thought-note-read:hover:not(:disabled) { text-decoration: underline; text-underline-offset: .2em; }
.thought-note-read:disabled { opacity: .4; cursor: default; }
.thought-instruction {
  margin: -.15rem auto 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
}
.thought-reading-dialog {
  width: min(760px, calc(100% - 2rem));
  max-height: min(84vh, 900px);
  overflow: auto;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(0,0,0,.2);
}
.thought-reading-dialog::backdrop { background: rgba(20, 20, 18, .42); }
.thought-dialog-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: .8rem;
}
.thought-dialog-number { margin: .2rem 0; color: var(--muted); font-size: .86rem; letter-spacing: .04em; }
.thought-dialog-close { border: 0; background: transparent; padding: .2rem; cursor: pointer; font-size: 1rem; }
.thought-dialog-date { margin: 1.5rem 0 .7rem; color: var(--muted); font-size: .9rem; }
.thought-reading-dialog h2 { margin: 0 0 1.8rem; font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 400; line-height: .98; }
.thought-dialog-text { max-width: 58ch; white-space: pre-line; font-size: 1.2rem; line-height: 1.7; }

@media (max-width: 760px) {
  .think-page .thought-main { padding-top: .35rem; }
  .thought-system { padding: 0 .5rem; }
  .thought-scene { width: 100%; }
  .thought-note-meta { font-size: clamp(.36rem, 1.45vw, .55rem); letter-spacing: .02em; }
  .thought-note-sheet { padding: 12.5% 3.5% 2.8%; }
  .thought-note-sheet h2 { font-size: clamp(.67rem, 2vw, .92rem); margin-bottom: .25rem; }
  .thought-note-sheet > p:not(.thought-note-meta) { font-size: clamp(.45rem, 1.5vw, .68rem); line-height: 1.18; }
  .thought-note-read { font-size: clamp(.43rem, 1.3vw, .6rem); }
  .thought-instruction { padding: 0 .6rem; font-size: .82rem; }
}
@media (max-width: 420px) {
  .thought-note-meta { display: none; }
  .thought-note-sheet { padding: 14% 3.5% 3%; }
  .thought-note-sheet h2 { font-size: .64rem; margin-bottom: .15rem; }
  .thought-note-sheet > p:not(.thought-note-meta) { font-size: .43rem; line-height: 1.1; }
  .thought-note-read { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .thought-file-tab, .thought-note-sheet { transition: none; }
}
