@font-face {
  font-family: 'Amstrad';
  src: url('../../fonts/Ac437_Amstrad_PC-2y.ttf') format('truetype');
}

html, body {
  overflow-y: auto !important;
  height: auto !important;
}

#backbutton {
  position: fixed;
  top: 16px;
  left: 20px;
  font-family: 'Amstrad', monospace;
  font-size: 1rem;
  color: #000;
  text-decoration: none;
  z-index: 999;
  background: rgba(255,255,255,0.6);
  padding: 4px 10px;
  border: 1.5px solid #333;
}

#backbutton:hover {
  background: rgba(255,255,255,0.9);
}

#project-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 30px 80px 30px;
  font-family: 'Amstrad', monospace;
}

#project-page h1 {
  font-size: 1.6rem;
  margin-bottom: 40px;
  text-transform: lowercase;
  letter-spacing: 0.05em;
}

/* ── section headings ── */
section {
  margin-bottom: 48px;
}

section h2 {
  font-size: 1.1rem;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  border-bottom: 1.5px solid #333;
  padding-bottom: 6px;
  margin-bottom: 20px;
}

/* ── project photos placeholder ── */
#photo-placeholder {
  border: 1.5px dashed #aaa;
  background: rgba(255,255,255,0.4);
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #999;
}

/* ── description ── */
#project-description {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #222;
}

#description-placeholder {
  color: #999;
  font-style: italic;
}

/* ── sock grid ── */
#sock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  align-items: center;
}

.sock-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sock-cell:hover {
  transform: rotate(3deg);
}

.sock-cell img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── sock modal ── */
#sock-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
}

#sock-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1001;
  background: rgba(255,255,255,0.96);
  border: 2px solid #333;
  padding: 24px;
  max-width: 680px;
  width: 90%;
  display: none;
  flex-direction: column;
  gap: 12px;
  font-family: 'Amstrad', monospace;
}

#sock-modal-close {
  align-self: flex-end;
  font-family: 'Amstrad', monospace;
  font-size: 0.8rem;
  border: 1.5px solid #333;
  background: transparent;
  padding: 2px 8px;
  cursor: pointer;
}

#sock-modal-close:hover {
  background: #000;
  color: #fff;
}

#sock-modal-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 300px;
  max-height: 65vh;
  cursor: grab;
  border: 1px solid #eee;
}

#sock-modal-img-wrap.dragging {
  cursor: grabbing;
}

#sock-modal-img {
  max-height: 65vh;
  object-fit: contain;
  transform-origin: center center;
  user-select: none;
  pointer-events: none;
}

/* ── zoom controls ── */
#modal-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

#zoom-label {
  font-family: 'Amstrad', monospace;
  font-size: 0.8rem;
  color: #444;
  min-width: 40px;
}

#zoom-slider {
  flex: 1;
  accent-color: #333;
  cursor: pointer;
}

#zoom-reset {
  font-family: 'Amstrad', monospace;
  font-size: 0.8rem;
  border: 1.5px solid #333;
  background: transparent;
  padding: 2px 10px;
  cursor: pointer;
}

#zoom-reset:hover {
  background: #000;
  color: #fff;
}

.hidden {
  display: none !important;
}