#other-projects { background: var(--bg); color: var(--ink); padding: 80px 7% 80px; position: relative; }
#other-projects .other-projects-heading { margin: 0 0 clamp(44px, 4.5vw, 72px); text-align: center; }
#other-projects .other-projects-heading h2 { margin: 0; font: 600 clamp(44.8px, 5.6vw, 81.2px)/1.12 'Montserrat', Arial, sans-serif; letter-spacing: -.04em; text-transform: uppercase; color: var(--ice); }
#other-projects .other-project-meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
#other-projects .other-project-org { font-size: 18px; color: var(--ice); margin: 0 0 8px; }
#other-projects .other-project-meta h3 { font-size: clamp(24px, 2.5vw, 36px); font-weight: 600; letter-spacing: -.035em; margin: 0; line-height: 1.3; }
#other-projects .other-project-role { font-size: 17px; color: #bdb6a8; margin: 0; }
#other-projects .other-project-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 36px; }
#other-projects .other-project-photos[hidden] { display: none; }
#other-projects figure { margin: 0; min-width: 0; }
#other-projects figure img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #20201e; }
#other-projects figcaption { font-size: 16px; color: #bdb6a8; margin-top: 12px; }
#other-projects .other-project-release { display: block; max-width: 880px; margin-inline: auto; color: inherit; }
#other-projects .other-project-thumb { position: relative; background: #24231f; aspect-ratio: 16 / 9; overflow: hidden; }
#other-projects .other-project-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
#other-projects .other-project-thumb img[hidden] { display: none; }
#other-projects .other-project-thumb > span { position: absolute; right: 18px; bottom: 18px; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--ice); color: #25231f; font-size: 26px; transition: transform .2s; }
#other-projects .other-project-release:hover .other-project-thumb > span { transform: translate(2px, -2px); }
#other-projects .other-project-release:focus-visible { outline: 2px solid var(--ice); outline-offset: 6px; }
#other-projects .other-project-release-caption { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 18px; }
#other-projects .other-project-release-caption h4 { font-size: 20px; font-weight: 600; line-height: 1.4; margin: 0; }
#other-projects .other-project-release-caption p { font-size: 16px; margin: 6px 0 0; color: #bdb6a8; }
#other-projects .other-project-release-caption > span { font-size: 14px; font-weight: 500; color: var(--ice); white-space: nowrap; }
@media (max-width: 760px) {
  #other-projects { padding: 56px 6% 64px; }
  #other-projects .other-projects-heading h2 { font-size: clamp(39.2px, 6.3vw, 56px); }
  #other-projects .other-project-meta, #other-projects .other-project-release-caption { flex-direction: column; align-items: flex-start; gap: 14px; }
  #other-projects .other-project-photos { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { #other-projects .other-project-thumb > span { transition: none; } }

/* Layered photo folder, inspired by the reference and using the portfolio palette. */
#other-projects .photo-folder { position: relative; display: block; width: min(760px, 100%); height: clamp(330px, 43vw, 470px); margin: 36px auto 0; isolation: isolate; }
#other-projects .photo-folder::before { content: ''; position: absolute; inset: 23% 14% 4%; background: linear-gradient(145deg, #a28d66, #54452e); border-radius: 24px; box-shadow: 0 20px 40px #0004; z-index: -1; }
#other-projects .photo-folder figure { position: absolute; left: 50%; top: 14%; width: 46%; padding: 7px; background: #f2e9d9; border-radius: 15px; box-shadow: 0 7px 20px #0005; transform-origin: 50% 90%; transition: transform .5s cubic-bezier(.22,1,.36,1); }
#other-projects .photo-folder figure img { border-radius: 9px; }
#other-projects .photo-folder figure:nth-child(1) { transform: translateX(-90%) rotate(-19deg); z-index: 1; }
#other-projects .photo-folder figure:nth-child(2) { transform: translateX(-6%) rotate(18deg); top: 17%; z-index: 2; }
#other-projects .photo-folder figure:nth-child(3) { transform: translateX(-50%) rotate(-2deg); top: 3%; z-index: 4; }
#other-projects .photo-folder figure:nth-child(4) { transform: translateX(-47%) rotate(8deg); top: 10%; z-index: 3; }
#other-projects .photo-folder:not(.is-open) figcaption { display: none; }
#other-projects .photo-folder-front { position: absolute; z-index: 5; inset: 48% 13% 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 9px; padding: 42px 28px 26px; border-radius: 16px 22px 24px 24px; background: linear-gradient(165deg, #e8d7b560, #d8c6a498 40%, #f4ead7ed); backdrop-filter: blur(12px); box-shadow: inset 0 1px 0 #fff9, 0 15px 24px #0004; clip-path: polygon(0 0, 44% 0, 53% 18%, 100% 18%, 100% 100%, 0 100%); color: #25231f; }
#other-projects .photo-folder-front span { font-size: 14px; font-weight: 500; }
#other-projects .photo-folder-front strong { font: 600 clamp(22px, 3vw, 32px)/1.2 'Montserrat', Arial, sans-serif; letter-spacing: -.035em; }
#other-projects .photo-folder-toggle { display: block; margin: 28px auto 56px; padding: 13px 22px; background: transparent; border: 1px solid #e8d7b54d; border-radius: 999px; color: var(--ice); font-size: 14px; font-weight: 500; cursor: pointer; }
#other-projects .photo-folder-toggle:hover { background: #e8d7b510; }
#other-projects .photo-folder-toggle:focus-visible { outline: 2px solid var(--ice); outline-offset: 4px; }
#other-projects .photo-folder.is-open { height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
#other-projects .photo-folder.is-open::before, #other-projects .photo-folder.is-open .photo-folder-front { display: none; }
#other-projects .photo-folder.is-open figure { position: static; width: auto; transform: none; background: #25231f; padding: 7px; }
@media (max-width: 480px) {
  #other-projects .photo-folder figure { width: 50%; padding: 5px; }
  #other-projects .photo-folder-front { inset-inline: 6%; padding-inline: 22px; }
  #other-projects .photo-folder.is-open { grid-template-columns: 1fr; }
  #other-projects .photo-folder.is-open figure { width: auto; }
}
@media (prefers-reduced-motion: reduce) { #other-projects .photo-folder figure { transition: none; } }

/* Centered project identity and a larger folder with a simple release link. */
#other-projects .other-project-meta { flex-direction: column; align-items: center; gap: 14px; text-align: center; }
#other-projects .other-project-org { font-size: clamp(22px, 2vw, 27px); font-weight: 500; margin-bottom: 12px; }
#other-projects .photo-folder { width: min(960px, 100%); height: clamp(360px, 52vw, 600px); margin-top: 48px; }
#other-projects .photo-folder.is-open { height: auto; }
#other-projects .photo-folder-toggle { margin-bottom: 28px; }
#other-projects .other-project-release { width: fit-content; max-width: 100%; margin: 0 auto; padding: 8px 0; font-size: 18px; line-height: 1.5; font-weight: 500; color: var(--ice); text-align: center; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: #e8d7b54d; }
#other-projects .other-project-release:hover { text-decoration-color: var(--ice); }
@media (max-width: 480px) {
  #other-projects .photo-folder { height: 360px; }
  #other-projects .photo-folder.is-open { height: auto; }
  #other-projects .other-project-release { font-size: 16px; }
}

/* Soft Polaroid frames and a rounded folder tab. */
#other-projects .photo-folder figure,
#other-projects .photo-folder.is-open figure {
  padding: 13px 13px 38px; border: 1px solid #fff9; border-radius: 15px;
  background: linear-gradient(150deg, #faf9f6, #eae7e1);
  box-shadow: inset 0 1px 1px #fff, 0 3px 5px #0003, 0 18px 32px #0004;
}
#other-projects .photo-folder figure img {
  border-radius: 9px; border: 1px solid #0002;
  box-shadow: 0 1px 3px #0003; background: #20201e;
}
#other-projects .photo-folder.is-open figcaption { color: #655f54; font-size: 15px; margin-top: 14px; }
#other-projects .photo-folder::before { border-radius: 24px; }
#other-projects .photo-folder-front {
  clip-path: polygon(0 0, 44% 0, 53% 18%, 100% 18%, 100% 100%, 0 100%);
  border-radius: 16px 22px 24px 24px; inset-block-start: 48%;
  padding-top: 42px; box-shadow: inset 0 1px 0 #fff9, 0 15px 24px #0004;
}
#other-projects .photo-folder-front::before {
  content: none; position: absolute; top: -28px; left: 0;
  width: 46%; height: 36px; border-radius: 26px 24px 0 0;
  background: linear-gradient(160deg, #d5c5a5e6, #c6b48fe0);
  box-shadow: inset 0 1px 0 #fff7;
}
#other-projects .photo-folder-toggle:disabled { cursor: default; }
@media (max-width: 480px) {
  #other-projects .photo-folder figure, #other-projects .photo-folder.is-open figure { padding: 9px 9px 28px; border-radius: 15px; }
  #other-projects .photo-folder figure img { border-radius: 9px; }
}
/* Animate locally so documentation can never paint above the fixed header. */
#other-projects { isolation: isolate; z-index: 0; overflow: clip; }
#other-projects .photo-folder figure { transform-origin: center; transition: none; }
#other-projects .photo-folder.is-open { align-content: start; }
#other-projects .photo-folder-front { transform-origin: center bottom; pointer-events: none; }
#other-projects .photo-folder.is-open .photo-folder-front { display: flex; opacity: 0; }

/* Compact folder, horizontal contact sheet and stable animation geometry. */
#other-projects .folder-layout { display: flow-root; position: relative; overflow-anchor: none; isolation: isolate; }
#other-projects .photo-folder { width: min(760px, 100%); height: clamp(340px, 43vw, 470px); }
#other-projects .photo-folder.is-open {
  display: flex; width: 100%; height: auto; gap: 22px;
  align-items: flex-start; overflow-x: auto; overflow-y: hidden;
  padding: 12px 4px 24px; scroll-snap-type: x proximity;
}
#other-projects .photo-folder.is-open figure {
  flex: 0 0 calc((100% - 66px) / 4); min-width: 230px;
  scroll-snap-align: start;
}
#other-projects .photo-folder.is-animating { overflow: visible; scroll-snap-type: none; }
#other-projects .photo-folder-toggle {
  background: linear-gradient(#f7ebd0, #e8d7b5 55%, #cfb98d);
  border: 1px solid #f5e5c0; color: #30291e; font-weight: 600;
  box-shadow: inset 0 2px 1px #fff9, 0 5px 0 #8b754e, 0 10px 18px #0004;
  transition: transform .18s ease, box-shadow .18s ease;
}
#other-projects .photo-folder-toggle:hover {
  background: linear-gradient(#fff2d7, #eddfbf 55%, #dbc69b);
  transform: translateY(-2px);
  box-shadow: inset 0 2px 1px #fff9, 0 7px 0 #8b754e, 0 12px 20px #0004;
}
#other-projects .photo-folder-toggle:active {
  transform: translateY(4px);
  box-shadow: inset 0 1px 2px #fff6, 0 1px 0 #8b754e, 0 4px 8px #0003;
}
@media (max-width: 480px) {
  #other-projects .photo-folder { height: 340px; }
  #other-projects .photo-folder.is-open { height: auto; gap: 16px; }
  #other-projects .photo-folder.is-open figure { flex-basis: 82%; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { #other-projects .photo-folder-toggle { transition: none; } }

/* Flat button using the existing cream palette. */
#other-projects .photo-folder-toggle {
  background: var(--ice); color: #25231f; border-color: #f3e5c8;
  box-shadow: none; transform: none; transition: background .18s ease;
}
#other-projects .photo-folder-toggle:hover,
#other-projects .photo-folder-toggle:active { background: #f6e8cb; box-shadow: none; transform: none; }

/* Open documentation becomes a restrained horizontal photo tray. */
#other-projects .photo-folder.is-open {
  width: 100%; max-width: 1280px; padding: 26px 22px 30px;
  border-radius: 22px; background: transparent;
  box-shadow: none; border: 0; outline: 0;
  scrollbar-width: none;
}
#other-projects .photo-folder.is-open::-webkit-scrollbar { display: none; }
#other-projects .photo-folder.is-open figure {
  box-shadow: inset 0 1px 1px #fff, 0 4px 12px #0003;
}
#other-projects .photo-folder.is-open figcaption { font-size: 14px; line-height: 1.5; }
@media (max-width: 480px) {
  #other-projects .photo-folder.is-open { padding: 20px 16px 24px; border-radius: 18px; }
}

/* Keep the photo frame geometry consistent as captions fade back into the folder. */
#other-projects .photo-folder figcaption {
  display: block; font-size: 14px; line-height: 1.5; margin-top: 14px;
  color: #655f54; opacity: 1; transition: opacity .18s ease;
}
#other-projects .photo-folder:not(.is-open) figcaption {
  display: block; opacity: 0; visibility: hidden;
}
@media (prefers-reduced-motion: reduce) { #other-projects .photo-folder figcaption { transition: none; } }
