/* diary.css — Diary page styles */

/* Layer stack:
   -1 — body background image (sunset photo)
   0  — #bg-canvas (decorative 3D layer)
   1  — page content
   100 — #transition-overlay
*/

body {
  background-color: #000;
  background-image: url('../../3dmodels/IMG_20220702_214248_1.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #fff;
}

/* Dark overlay on body so text stays readable over the photo */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 0;
  pointer-events: none;
}

/* 3D model viewer — full-viewport canvas, frames float independently */
#model-viewer-wrap {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* Single canvas spans the full wrap */
#bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Frames float freely over the canvas — no backdrop-filter (it was blurring the 3D canvas) */
.model-frame {
  position: fixed;
  border-radius: 14px;
  border: 1px solid rgba(74, 143, 168, 0.30);
  background: rgba(13, 31, 45, 0.10);
  overflow: hidden;
  pointer-events: none;
}

#frame-brawl {
  right: 39rem;
  top: 50%;
  transform: translateY(-50%);
  width: 14rem;
  height: 18rem;
}

#frame-raton {
  right: 22rem;
  top: calc(50% - 9rem);
  transform: translateY(-50%);
  width: 12rem;
  height: 16rem;
}

/* Corner accent pieces */
.model-viewer-corner {
  position: absolute;
  width: 1rem;
  height: 1rem;
  z-index: 10;
  border-color: rgba(74, 143, 168, 0.65); /* --c3 */
  border-style: solid;
}
.model-viewer-corner.tl { top: 8px; left: 8px;  border-width: 1px 0 0 1px; border-radius: 3px 0 0 0; }
.model-viewer-corner.tr { top: 8px; right: 8px; border-width: 1px 1px 0 0; border-radius: 0 3px 0 0; }
.model-viewer-corner.bl { bottom: 8px; left: 8px;  border-width: 0 0 1px 1px; border-radius: 0 0 0 3px; }
.model-viewer-corner.br { bottom: 8px; right: 8px; border-width: 0 1px 1px 0; border-radius: 0 0 3px 0; }

/* Floating "3D" badge */
.model-viewer-label {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: rgba(142, 198, 197, 0.75); /* --c4 */
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  z-index: 10;
  text-transform: uppercase;
}

@media (max-width: 860px) {
  #frame-raton {
    display: none;
  }
  #frame-brawl {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 13rem;
    height: 16rem;
  }
}

#transition-overlay {
  position: fixed;
  inset: 0;
  background: #000000;
  opacity: 1;
  transition: opacity 0.6s ease;
  z-index: 100;
  pointer-events: none;
}

.top-banner,
nav,
main,
footer {
  position: relative;
  z-index: 2;
}

/* Blog feed — anchored to the left, with notebook margin line (idea 5) */
.blog-feed {
  position: relative;
  z-index: 2;
  max-width: 560px;
  margin: 2rem 0 2rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-left: 1.8rem;
  border-left: 2px solid rgba(74, 143, 168, 0.18);
}

/* Blog entry — corner brackets via CSS gradient (idea 2), folded corner ::before (idea 1), margin dot ::after (idea 5) */
.blog-entry {
  position: relative;
  overflow: visible;
  background:
    /* ── top-left bracket ── */
    linear-gradient(rgba(74,143,168,0.55), rgba(74,143,168,0.55)) top left  / 14px 1px no-repeat,
    linear-gradient(rgba(74,143,168,0.55), rgba(74,143,168,0.55)) top left  / 1px 14px no-repeat,
    /* ── top-right bracket ── */
    linear-gradient(rgba(74,143,168,0.55), rgba(74,143,168,0.55)) top right / 14px 1px no-repeat,
    linear-gradient(rgba(74,143,168,0.55), rgba(74,143,168,0.55)) top right / 1px 14px no-repeat,
    /* ── bottom-left bracket ── */
    linear-gradient(rgba(74,143,168,0.55), rgba(74,143,168,0.55)) bottom left  / 14px 1px no-repeat,
    linear-gradient(rgba(74,143,168,0.55), rgba(74,143,168,0.55)) bottom left  / 1px 14px no-repeat,
    /* ── bottom-right bracket ── */
    linear-gradient(rgba(74,143,168,0.55), rgba(74,143,168,0.55)) bottom right / 14px 1px no-repeat,
    linear-gradient(rgba(74,143,168,0.55), rgba(74,143,168,0.55)) bottom right / 1px 14px no-repeat,
    rgba(13, 31, 45, 0.60);
  border-radius: 3px;
  padding: 1.4rem 1.6rem;
  backdrop-filter: blur(6px);
}

/* Folded corner — top right (idea 1) */
.blog-entry::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 18px;
  height: 18px;
  background: linear-gradient(225deg, rgba(142,198,197,0.14) 50%, transparent 50%);
  border-radius: 0 3px 0 0;
  pointer-events: none;
}

/* Margin dot aligned with the notebook border-left (idea 5) */
.blog-entry::after {
  content: '';
  position: absolute;
  left: -1.95rem;
  top: 1.5rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid rgba(74, 143, 168, 0.5);
  background: rgba(13, 31, 45, 0.9);
  pointer-events: none;
}

/* Handwritten date stamp — Caveat font, slight tilt (idea 3) */
.entry-date {
  display: inline-block;
  font-family: 'Caveat', cursive;
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(142, 198, 197, 0.78);
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
  transform: rotate(-1.5deg);
  transform-origin: left center;
}

.entry-title {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  font-weight: 700;
}

.entry-body p {
  font-size: 0.95rem;
  line-height: 1.7;
  opacity: 0.85;
}
