/* ==========================================================================
   TOKENS
   ========================================================================== */
:root {
  --paper: #EDE6D6;
  --paper-deep: #E3DAC6;
  --ink: #1C1A17;
  --stamp: #C8432A;
  --folder-blue: #3B5871;
  --muted: #6B6258;
  --line: #D2C7AF;
  --white: #FBF9F4;

  --font-display: 'Archivo Black', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-body: 'Inter', sans-serif;

  --max-width: 760px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  position: relative;
  background-color: #FFFFFF;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Cpath d='M 20 0 L 0 0 0 20' fill='none' stroke='%2382C0E0' stroke-width='0.6'/%3E%3C/svg%3E");
  background-size: 20px 20px;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Doodle background layer — scrolls with page, sits between graph paper and content */
.doodle-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
}

.doodle {
  position: absolute;
  max-width: 180px;
}

.site-header,
.log,
.site-footer {
  position: relative;
  z-index: 1;
}

a { color: var(--folder-blue); }
a:hover { color: var(--stamp); }

.muted { color: var(--muted); }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 24px 32px;
  border-bottom: 2px solid var(--ink);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stamp);
  margin: 0 0 8px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: clamp(34px, 7vw, 52px);
  line-height: 1.02;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.intro {
  font-size: 16px;
  color: var(--muted);
  max-width: 50ch;
  margin: 0;
}

/* ==========================================================================
   LOG / ENTRIES
   ========================================================================== */
.log {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.entry {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 24px;
  padding: 40px 0;
  border-bottom: 1px solid var(--ink);
}

.entry:last-child { border-bottom: none; }

.entry-meta {
  padding-top: 4px;
}

.stamp {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--stamp);
  border: 1.5px solid var(--stamp);
  border-radius: 3px;
  padding: 4px 8px;
  transform: rotate(-2deg);
  white-space: nowrap;
}

.location {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--folder-blue);
  margin-top: 10px;
  letter-spacing: 0.01em;
}

.entry-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 3.4vw, 26px);
  line-height: 1.15;
  margin: 0 0 10px;
}

.entry-notes {
  font-size: 15px;
  color: var(--ink);
  margin: 0 0 18px;
  max-width: 56ch;
}

.photo-grid + .entry-notes {
  margin-top: 14px;
}

.notes-link {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

/* ==========================================================================
   PHOTO GRID
   ========================================================================== */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.photo-hero {
  grid-column: span 5;
  height: 320px;
  background-color: var(--paper-deep);
  background-size: cover;
  background-position: center;
  border-radius: 3px;
  display: block;
  transition: opacity 0.15s ease;
}

.photo-hero:hover { opacity: 0.88; }

.photo-thumb {
  display: block;
  height: 106px;
  background-color: var(--paper-deep);
  background-size: cover;
  background-position: center;
  border-radius: 2px;
  transition: opacity 0.15s ease;
}

.photo-thumb:hover { opacity: 0.78; }

.photo-thumb--hidden { display: none; }

.more-btn {
  grid-column: 1 / -1;
  height: 38px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0 10px;
  cursor: pointer;
}

.more-btn:hover { border-color: var(--ink); color: var(--ink); }

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */
.empty-state {
  padding: 80px 0;
  text-align: center;
}

.empty-state p { margin: 4px 0; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 80px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.site-footer a { text-decoration: none; }

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(28, 26, 23, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.lightbox[hidden] { display: none; }

.lightbox-img {
  max-width: 88vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 2px;
}

.lightbox-caption {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 12px;
}

.lightbox-close { top: 16px; right: 16px; font-size: 28px; }
.lightbox-prev { left: 8px; top: 50%; transform: translateY(-50%); font-size: 44px; }
.lightbox-next { right: 8px; top: 50%; transform: translateY(-50%); font-size: 44px; }

@media (hover: hover) {
  .lightbox-close:hover,
  .lightbox-prev:hover,
  .lightbox-next:hover {
    color: var(--stamp);
  }
}

/* ==========================================================================
   ADMIN (shared with assets/admin.css additions)
   ========================================================================== */
.admin-shell {
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 24px 100px;
}

.admin-shell .eyebrow { margin-bottom: 6px; }

.admin-shell h1 {
  font-family: var(--font-display);
  font-size: 30px;
  margin: 0 0 28px;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="date"],
.field input[type="password"],
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 10px 12px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  background: var(--white);
  color: var(--ink);
}

.field textarea { resize: vertical; min-height: 180px; }

.field input[type="file"] {
  font-family: var(--font-mono);
  font-size: 13px;
}

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--white);
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  padding: 11px 20px;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover { background: var(--stamp); border-color: var(--stamp); color: var(--white); }

.btn-secondary {
  background: transparent;
  color: var(--ink);
}

.btn-secondary:hover { background: transparent; color: var(--stamp); border-color: var(--stamp); }

.btn-danger {
  background: transparent;
  color: var(--stamp);
  border-color: var(--stamp);
}

.btn-danger:hover { background: var(--stamp); color: var(--white); }

.admin-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.admin-list .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.admin-list .title {
  font-weight: 500;
}

.admin-actions { display: flex; gap: 8px; flex-shrink: 0; }
.admin-actions a { font-family: var(--font-mono); font-size: 12px; text-decoration: none; }

.notice {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 3px;
  margin-bottom: 20px;
}

.notice-error { background: #F3D9D1; color: #7A2A18; }
.notice-success { background: #DCE6DB; color: #2E4A2D; }

.existing-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.photo-item {
  position: relative;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 4px;
  padding: 6px;
}

.photo-item.dragging {
  opacity: 0.45;
  border-color: var(--stamp);
}

.photo-item img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

.reorder-buttons {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.move-btn {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1;
  padding: 6px 0;
  background: var(--ink);
  color: var(--white);
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

.move-btn:active { background: var(--stamp); }

.remove-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--stamp);
  margin-top: 6px;
  cursor: pointer;
}

.top-nav {
  font-family: var(--font-mono);
  font-size: 12px;
  margin-bottom: 24px;
}

.top-nav a { text-decoration: none; margin-right: 16px; }

.copy-hint {
  display: block;
  width: 100%;
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 12px 14px;
  background: var(--paper-deep);
  border: 1.5px solid var(--line);
  border-radius: 3px;
  color: var(--folder-blue);
  text-align: left;
  cursor: pointer;
  letter-spacing: 0.01em;
}

.copy-hint:active { background: var(--line); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 600px) {
  .entry {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .entry-meta {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .photo-hero { grid-column: span 3; height: 220px; }
  .photo-thumb { height: calc((100vw - 60px) / 3); }
  .photo-thumb--mobile-hide { display: none; }
  .lightbox-prev { left: 0; font-size: 32px; }
  .lightbox-next { right: 0; font-size: 32px; }
}
