/* ===== Museum section ===== */
.museum { position: relative; z-index: 20; background: var(--bg); }

.museum-border { position: absolute; left: 0; right: 0; width: 100%; overflow: hidden; line-height: 0; z-index: 30; }
.museum-border--top { top: -1px; }
.museum-border--bottom { bottom: -1px; }
.museum-border svg { display: block; width: 100%; height: 60px; }
.museum-border--bottom svg { transform: rotate(180deg); }
.museum-border path { fill: var(--bg); }
@media (min-width: 768px) { .museum-border svg { height: 100px; } }

.museum-body {
  position: relative; width: 100%; padding: 8rem 1rem; overflow: hidden;
  background-color: #f5e6c8;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.15'/%3E%3C/svg%3E");
  box-shadow: inset 0 0 150px rgba(0,0,0,.4);
}
@media (min-width: 768px) { .museum-body { padding: 10rem 1.5rem; } }
.museum-vignette { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(2,6,23,.2), transparent, rgba(2,6,23,.2)); pointer-events: none; z-index: 0; }
.museum-particles { position: absolute; inset: 0; z-index: 10; pointer-events: none; overflow: hidden; }

.museum-inner { position: relative; z-index: 10; }
.museum-head { text-align: center; margin-bottom: 6rem; }
.museum-plaque {
  display: inline-flex; align-items: center; justify-content: center; gap: 1.5rem;
  padding: 2.5rem 3rem; position: relative; margin-bottom: 1rem;
}
.museum-plaque::before, .museum-plaque::after,
.museum-plaque > .corner-tl, .museum-plaque > .corner-tr { content: ''; }
.museum-plaque { border: none; }
.museum-plaque::before {
  position: absolute; top: 0; left: 0; width: 2rem; height: 2rem;
  border-top: 2px solid #8b4513; border-left: 2px solid #8b4513;
}
.museum-plaque::after {
  position: absolute; bottom: 0; right: 0; width: 2rem; height: 2rem;
  border-bottom: 2px solid #8b4513; border-right: 2px solid #8b4513;
}
.museum-ankh { font-size: 1.5rem; color: #8b4513; opacity: .6; }
.museum-title { font-family: 'Cinzel', serif; font-weight: 700; font-size: 2.5rem; color: #3c2a1e; }
@media (min-width: 768px) { .museum-title { font-size: 3.75rem; } }
.museum-subtitle { color: #5d4037; font-family: 'Playfair Display', serif; font-style: italic; font-size: 1.1rem; letter-spacing: .2em; text-transform: uppercase; }

.projects-status { text-align: center; color: #5d4037; font-family: 'Playfair Display', serif; }
.projects-status.is-hidden { display: none; }
.projects-status.is-error { color: #b91c1c; }

.projects-grid { max-width: 72rem; margin: 0 auto; padding-bottom: 5rem; display: grid; grid-template-columns: 1fr; gap: 3rem 3rem; }
@media (min-width: 768px) { .projects-grid { grid-template-columns: 1fr 1fr; } }

.project-card { position: relative; cursor: pointer; opacity: 0; transform: translateY(50px); transition: opacity .6s ease, transform .6s ease; }
.project-card.is-visible { opacity: 1; transform: translateY(0); }
.project-card.is-offset { }
@media (min-width: 768px) { .project-card.is-offset { margin-top: 6rem; } }
.project-card:hover .project-frame { transform: rotate(1deg); }
.project-card:hover .project-thumb { transform: scale(1.05); filter: sepia(0); opacity: 1; }

.project-frame {
  position: relative; z-index: 10; background: #e8dbc3; padding: .75rem;
  box-shadow: 0 10px 40px rgba(60,40,10,.2);
  transition: transform .5s ease;
}
.project-frame-inner { border: 1px solid rgba(139,69,19,.3); padding: .25rem; }
.project-thumb-wrap { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #2a2a2a; }
.project-thumb { width: 100%; height: 100%; object-fit: cover; filter: sepia(.4); opacity: .9; transition: all .7s ease; }
.project-thumb-shine { position: absolute; inset: 0; background: linear-gradient(to top right, rgba(255,255,255,.1), transparent); opacity: .5; pointer-events: none; }

.project-plaque {
  position: absolute; bottom: -2rem; left: 50%; transform: translateX(-50%); width: 90%;
  background: #2c1a12; color: #f5e6c8; padding: 1rem; border: 2px solid #b49b5c; text-align: center;
  box-shadow: 0 10px 25px rgba(0,0,0,.3);
}
.project-era { color: #b49b5c; font-size: .65rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; font-family: 'Cinzel', serif; display: block; margin-bottom: .25rem; }
.project-title { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 500; }

.museum-glyphs { text-align: center; opacity: .2; margin-top: 2.5rem; }
.museum-glyphs p { color: #3e2723; font-family: 'Cinzel', serif; font-size: 2rem; letter-spacing: 1em; user-select: none; }

/* Museum particles */
.egyptian-particle {
  position: absolute; font-family: 'Times New Roman', serif; font-weight: bold;
  pointer-events: none; white-space: nowrap; text-shadow: 0 0 3px rgba(139,69,19,.4);
  color: rgba(60,40,10,.3); animation: float-hieroglyph 25s infinite ease-in-out;
}
.egyptian-particle.is-medium { font-size: 24px; animation-duration: 30s; }
.egyptian-particle.is-small { font-size: 16px; }
.gold-dust-particle {
  position: absolute; width: 3px; height: 3px; background: #FFD700; border-radius: 999px;
  box-shadow: 0 0 5px #FFD700; opacity: .6; animation: float-dust 15s infinite linear;
}

/* Contact floating particle */
.contact-dust {
  position: absolute; border-radius: 999px; background: #7cff7c; pointer-events: none;
  animation-name: float-contact-particle; animation-iteration-count: infinite; animation-timing-function: ease-in-out;
}

/* ===== Project detail modal ===== */
.project-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
  opacity: 0; transition: opacity .3s ease;
}
.project-modal-overlay.is-open { opacity: 1; }
.project-modal-backdrop { position: absolute; inset: 0; background: rgba(2,6,23,.95); backdrop-filter: blur(10px); cursor: pointer; }
.project-modal {
  position: relative; width: 100%; max-width: 64rem; background: #1c1917; border: 1px solid rgba(180,155,92,.3);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.6);
  display: flex; flex-direction: column; max-height: min(85vh, 100% - 1rem); overflow: hidden;
  z-index: 2;
  transform-origin: top left;
}
.project-modal-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 20; padding: .5rem;
  background: rgba(0,0,0,.4); border-radius: 999px; color: #fff; border: 1px solid rgba(255,255,255,.1);
  display: flex; transition: background-color .2s, color .2s;
}
.project-modal-close:hover { background: #b49b5c; color: #2c1a12; }
.project-modal-media { width: 100%; height: 16rem; position: relative; border-bottom: 1px solid rgba(180,155,92,.2); overflow: hidden; }
.project-modal-media img { width: 100%; height: 100%; object-fit: cover; transition: opacity .15s ease; }

.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 2.25rem; height: 2.25rem; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.45); color: #fff; border: 1px solid rgba(255,255,255,.15); border-radius: 999px;
  transition: background-color .2s, transform .2s;
}
.carousel-arrow:hover { background: rgba(180,155,92,.85); color: #2c1a12; transform: translateY(-50%) scale(1.08); }
.carousel-arrow--prev { left: .75rem; }
.carousel-arrow--next { right: .75rem; }
.carousel-dots { position: absolute; bottom: .75rem; left: 0; right: 0; display: flex; justify-content: center; gap: .4rem; z-index: 5; }
.carousel-dot { width: .5rem; height: .5rem; border-radius: 999px; background: rgba(255,255,255,.4); border: none; cursor: pointer; transition: background-color .2s, transform .2s; padding: 0; }
.carousel-dot:hover { background: rgba(255,255,255,.7); }
.carousel-dot.is-active { background: #b49b5c; transform: scale(1.3); }
.project-modal-body { width: 100%; padding: 2rem; overflow-y: auto; background: #1c1917; position: relative; }
.project-modal-era { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.5rem; }
.project-modal-era-rule { height: 1px; width: 3rem; background: #b49b5c; }
.project-modal-era span { color: #b49b5c; font-size: .7rem; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; font-family: 'Cinzel', serif; }
.project-modal-title { font-family: 'Playfair Display', serif; font-size: 1.75rem; font-weight: 700; color: #f5f5f4; margin-bottom: 2rem; }
.project-modal-desc { color: #a8a29e; line-height: 1.7; margin-bottom: 2rem; font-weight: 300; font-size: 1.05rem; }
.project-modal-stack-label { font-size: .7rem; font-weight: 700; color: #57534e; text-transform: uppercase; letter-spacing: .2em; margin-bottom: 1rem; }
.project-modal-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.5rem; }
.project-modal-tag { padding: .3rem .75rem; font-size: .75rem; font-weight: 500; color: #b49b5c; background: rgba(180,155,92,.05); border: 1px solid rgba(180,155,92,.2); }
.project-modal-actions { display: flex; gap: 1rem; }
.project-modal-actions a, .project-modal-actions button {
  flex: 1; padding: 1rem; display: flex; align-items: center; justify-content: center; gap: .5rem;
  text-transform: uppercase; letter-spacing: .2em; font-size: .7rem; font-weight: 700; transition: all .2s;
  background: transparent; font-family: inherit; cursor: pointer;
}
.project-modal-btn-code { border: 1px solid #44403c; color: #a8a29e; }
.project-modal-btn-code:hover { border-color: #b49b5c; color: #b49b5c; }
.project-modal-actions .project-modal-btn-view {
  background: linear-gradient(135deg, #10b981, #059669); color: #fff;
  box-shadow: 0 10px 25px -8px rgba(16,185,129,.55);
}
.project-modal-actions .project-modal-btn-view:hover { background: linear-gradient(135deg, #34d399, #10b981); box-shadow: 0 14px 32px -8px rgba(16,185,129,.75); }
@media (min-width: 768px) {
  .project-modal { flex-direction: row; }
  .project-modal-media { width: 50%; height: auto; border-bottom: none; border-right: 1px solid rgba(180,155,92,.2); }
  .project-modal-body { width: 50%; padding: 3rem; }
}
