/* ============================================
   blog.css — shared styles for blog pages
   audreysroom.neocities.org/blog/
   ============================================ */

/* @import MUST be first — before any other rules */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;600&display=swap');

@font-face {
  font-family: "Smalle";
  src: url("../fonts/smalle.woff2") format("woff2");
}
  
  :root {
    --font-main: 'Smalle', serif;
  
    --menu-panel-w:    220px;
    --menu-panel-h:    310px;
  
    --buttons-panel-w: 220px;
    --buttons-panel-h: 135px;
  
    --content-panel-w: 520px;
    --content-panel-h: 460px;
  
    --left-col-gap: 15px;
  
    --menu-pad-top:    72px;
    --menu-pad-left:   38px;
    --menu-pad-right:  22px;
    --menu-pad-bottom: 80px;
  
    --buttons-pad-top:    38px;
    --buttons-pad-x:      20px;
    --buttons-pad-bottom: 12px;
  
    --content-pad-top:    130px;
    --content-pad-x:      38px;
    --content-pad-bottom: 34px;
  }
  
  /* ---- Reset ---- */
  *, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  body {
    background-image: url('../images/blog/bg.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #faf8f3;
  
    font-family: var(--font-main);
    font-size: 15px;
    color: #3a3a3a;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 40px 20px 60px;
  }
  
  .blog-page {
    display: flex;
    align-items: flex-start;
    gap: 20px;
  }
  
  .left-column {
    display: flex;
    flex-direction: column;
    gap: var(--left-col-gap);
    flex-shrink: 0;
    width: var(--menu-panel-w);
    height: var(--content-panel-h);
  }
  
  /* ============================================
     PANELS
     ============================================ */
  
  .menu-panel {
    width: var(--menu-panel-w);
    height: var(--menu-panel-h);
    flex-shrink: 0;
    position: relative;
    background-image: url('../images/blog/menu-panel.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    /* paper-cutout shadow — traces the drawn border shape, not the box */
    filter:
      drop-shadow(2px 3px 0px rgba(0,0,0,0.12))
      drop-shadow(4px 7px 10px rgba(0,0,0,0.18));
  }
  
  .menu-inner {
    position: absolute;
    top:    var(--menu-pad-top);
    left:   var(--menu-pad-left);
    right:  var(--menu-pad-right);
    bottom: var(--menu-pad-bottom);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  /* ============================================
     NAV LINKS
     ============================================ */
  
  .blog-nav { list-style: none; flex: 1; }
  .blog-nav li { margin-bottom: 7px; }
  
  .blog-nav a {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-main);
    font-size: 15px;
    color: #3a3a3a;
    text-decoration: none;
    transition: color 0.18s ease;
  }

  .blog-nav a:hover { color: #3a3a3a; }

  /* bullet rotates on hover */
  .nav-bullet {
    font-size: 10px;
    flex-shrink: 0;
    display: inline-block;
    transition: transform 0.3s ease, color 0.18s ease;
    transform-origin: center;
  }

  .blog-nav a:hover .nav-bullet {
    transform: rotate(45deg) scale(1.4);
    color: #7a6452;
  }

  /* colored block lives on the label — exactly text-width */
  .nav-label {
    display: inline-block;
    width: max-content;
    padding: 2px 7px;
    border-radius: 2px;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  }

  .blog-nav a:hover .nav-label {
    background: #e2cdb0;       /* warm parchment — much lighter */
    color: #4a3520;            /* dark ink text instead of white */
    box-shadow:
      2px 2px 0 rgba(0,0,0,0.18),
      3px 4px 7px rgba(0,0,0,0.14);
  }

  /* active: block always visible, slightly deeper parchment */
  .blog-nav a.active .nav-bullet {
    transform: rotate(45deg) scale(1.2);
    color: #6b4e30;
  }

  .blog-nav a.active .nav-label {
    font-weight: bold;
    background: #cdb898;       /* one shade darker than hover */
    color: #3a2010;
    box-shadow:
      2px 2px 0 rgba(0,0,0,0.22),
      3px 4px 7px rgba(0,0,0,0.16);
  }
  
  /* ---- Home Icon ---- */
  .home-icon-wrap {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
  }
  
  .home-icon-wrap a { display: block; line-height: 0; }
  
  .home-icon-wrap img {
    width: 58px;
    height: auto;
    filter:
      drop-shadow(3px 5px 3px rgba(0,0,0,0.45))
      drop-shadow(6px 10px 14px rgba(0,0,0,0.2));
    transition: filter 0.18s, transform 0.18s;
  }
  
  .home-icon-wrap a:hover img {
    transform: translateY(-4px);
    filter:
      drop-shadow(3px 8px 4px rgba(0,0,0,0.4))
      drop-shadow(6px 14px 18px rgba(0,0,0,0.18));
  }
  
  /* ---- Buttons Panel ---- */
  .buttons-panel {
    width: var(--buttons-panel-w);
    height: var(--buttons-panel-h);
    flex-shrink: 0;
    position: relative;
    background-image: url('../images/blog/buttons-panel.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    filter:
      drop-shadow(2px 3px 0px rgba(0,0,0,0.12))
      drop-shadow(4px 7px 10px rgba(0,0,0,0.18));
  }
  
  .buttons-inner {
    position: absolute;
    top:    var(--buttons-pad-top);
    left:   var(--buttons-pad-x);
    right:  var(--buttons-pad-x);
    bottom: var(--buttons-pad-bottom);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
  }
  
  .buttons-inner::-webkit-scrollbar { width: 4px; }
  .buttons-inner::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }
  
  .button-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding-bottom: 4px;
  }
  
  .button-grid img {
    width: 88px;
    height: 31px;
    image-rendering: pixelated;
    display: block;
    transition: opacity 0.1s;
  }
  
  .button-grid img:hover { opacity: 0.8; }
  
  .site-button {
    width: 88px;
    height: 31px;
    image-rendering: pixelated;
    display: block;
    transition: opacity 0.1s;
  }
  .site-button:hover { opacity: 0.8; }
  
  .buttons-more-link {
    display: block;
    margin-top: 4px;
    font-family: var(--font-main);
    font-size: 12px;
    color: #555;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    text-align: center;
    transition: color 0.2s;
  }
  .buttons-more-link:hover { color: #6b5a45; }
  
  /* ============================================
     CONTENT PANEL
     ============================================ */
  
  .content-panel {
    width: var(--content-panel-w);
    height: var(--content-panel-h);
    position: relative;
    flex-shrink: 0;
    background-image: url('../images/blog/content-panel.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    filter:
      drop-shadow(2px 3px 0px rgba(0,0,0,0.12))
      drop-shadow(4px 7px 10px rgba(0,0,0,0.18));
  }
  
  .content-inner {
    position: absolute;
    top:    var(--content-pad-top);
    left:   var(--content-pad-x);
    right:  var(--content-pad-x);
    bottom: var(--content-pad-bottom);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
  }
  
  .content-inner::-webkit-scrollbar { width: 5px; }
  .content-inner::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
  
  /* ============================================
     CONTENT TYPOGRAPHY
     ============================================ */
  
  .welcome-title {
    font-family: var(--font-main);
    font-size: 24px;
    border: 2px solid #2a2a2a;
    display: inline-block;
    padding: 4px 14px 4px 12px;
    margin-bottom: 18px;
  }
  
  .welcome-body {
    font-family: var(--font-main);
    font-size: 15px;
    line-height: 1.75;
    color: #333;
    width: 100%;
  }
  
  .welcome-body p { margin-bottom: 10px; }
  
  /* ============================================
     WRITINGS PAGE
     ============================================ */
  
  .content-inner.writings-content {
    align-items: flex-start;
    text-align: left;
  }
  
  .month-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
  }
  
  .year-label {
    font-family: var(--font-main);
    font-size: 13px;
    color: #888;
    margin-right: 2px;
  }
  
  .month-tab {
    font-family: var(--font-main);
    font-size: 14px;
    background: none;
    border: 1.5px solid transparent;
    padding: 2px 9px;
    cursor: pointer;
    color: #555;
    transition: all 0.2s;
  }
  
  .month-tab:hover { color: #6b5a45; border-color: #6b5a45; }
  
  .month-tab.active {
    color: #2a2a2a;
    border-color: #2a2a2a;
    font-weight: bold;
    background: rgba(255,255,255,0.5);
  }
  
  .diary-entries { display: flex; flex-direction: column; width: 100%; }
  
  .diary-entry { padding: 12px 0; border-bottom: 1px solid #ddd; }
  .diary-entry:last-child { border-bottom: none; }
  
  .entry-date {
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: bold;
    color: #444;
    margin-bottom: 5px;
  }
  
  .entry-body { font-family: var(--font-main); font-size: 14px; line-height: 1.8; color: #333; text-align: left; }
  .entry-body p { margin-bottom: 8px; }
  
  .diary-entry.hidden { display: none; }
  
  /* ============================================
     LINKS & BUTTONS PAGE
     ============================================ */
  
  .content-inner.linksbtns-content {
    align-items: flex-start;
    text-align: left;
  }
  
  .buttons-page-section { margin-bottom: 24px; width: 100%; }
  
  .buttons-page-section h2 {
    font-family: var(--font-main);
    font-size: 17px;
    margin-bottom: 8px;
    border-bottom: 1.5px solid #ddd;
    padding-bottom: 4px;
  }

  .links-list {
    list-style: none;
    font-size: 14px;
    line-height: 2;
  }

  .links-list li::before {
    content: '⟡ ';
    font-size: 10px;
    color: #aaa;
  }

  .links-list a {
    color: #3a3a3a;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
  }

  .links-list a:hover {
    color: #6b5a45;
  }
  
  .section-note {
    font-size: 12px;
    color: #888;
    margin-bottom: 14px;
  }
  
  /* ── Embed block: button centered above a compact code box ── */
  .embed-block {
    display: flex;
    flex-direction: column;
    align-items: center;      /* centers both the image and the code box */
    gap: 10px;
    margin-bottom: 18px;
    width: 100%;
  }
  
  /* the 88×31 button preview */
  .embed-block > img {
    width: 88px;
    height: 31px;
    image-rendering: pixelated;
    display: block;
    /* soft lift shadow so it feels like a sticker */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.18));
  }
  
  /* wrapper that holds the label + textarea + copy button */
  .embed-code-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
    max-width: 280px;         /* keeps the box compact, not full-width */
  }
  
  /* little "✂ copy code" label above the box */
  .embed-label {
    font-family: var(--font-main);
    font-size: 11px;
    color: #aaa;
    letter-spacing: 0.03em;
    user-select: none;
  }
  
  /* the textarea + copy button sit side by side */
  .embed-row {
    display: flex;
    align-items: stretch;
    width: 100%;
    border: 1.5px dashed #c8b8a2;   /* warm dashed border — handmade feel */
    border-radius: 6px;
    overflow: hidden;
    background: #fffdf8;
  }
  
  .embed-textarea {
    font-family: monospace;
    font-size: 10px;
    line-height: 1.5;
    flex: 1;
    height: 48px;
    border: none;
    padding: 6px 8px;
    resize: none;
    background: transparent;
    color: #555;
    outline: none;
    cursor: text;
  }
  
  /* copy button */
  .copy-btn {
    flex-shrink: 0;
    width: 28px;
    border: none;
    border-left: 1.5px dashed #c8b8a2;
    background: transparent;
    color: #a08060;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .copy-btn:hover {
    background: #f5ede0;
    color: #6b5a45;
  }
  
  /* brief flash when code is copied */
  .copy-btn.copied {
    color: #7a9e7e;
    background: #edf5ed;
  }

/* ============================================
   PHOTOS PAGE
   ============================================ */

.content-inner.photos-content {
  align-items: flex-start;
  text-align: left;
  padding: 6px;
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
}

/* 3 columns → smaller photos */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  width: 100%;
}

.photo-item {
  position: relative;
  overflow: hidden;
  cursor: default;
  border-radius: 1px;
}

.photo-item img {
  width: 100%;
  aspect-ratio: 1 / 1;      /* square crop — tidy at small sizes */
  object-fit: cover;
  display: block;

  /* slight desaturation + warmth — feels like a developed film photo */
  filter: saturate(0.78) sepia(0.08) brightness(0.96);
  transition: filter 0.3s ease;
}

/* on hover: photo "wakes up" to full colour */
.photo-item:hover img {
  filter: saturate(1) sepia(0) brightness(1);
}

/* fixed-position overlay created by photos.js */
.photo-hover-overlay {
  position: fixed;
  pointer-events: none;
  z-index: 1000;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(0,0,0,0.32);
  transition: transform 0.22s ease, opacity 0.14s ease;
  transform-origin: center center;
  opacity: 0;
  /* overlay shows in full colour */
  filter: saturate(1) sepia(0) brightness(1);
}

.photo-hover-overlay.visible {
  opacity: 1;
}

/* full-screen blur+dim backdrop behind the enlarged photo */
.photo-backdrop {
  position: fixed;
  inset: 0;                             /* covers the whole viewport */
  z-index: 999;                         /* just below the overlay (1000) */
  background: rgba(255, 255, 255, 0.277);     /* dim */
  backdrop-filter: blur(4px);           /* blur everything behind it */
  -webkit-backdrop-filter: blur(4px);   /* Safari */
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.photo-backdrop.visible {
  opacity: 1;
}

/* ============================================
   EXTRA THEMATIC EFFECTS
   ============================================ */

/* 1. PAGE FADE-IN
   Every page gently fades in like turning a journal page.
   No JS needed — pure CSS animation on the body. */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0);   }
}

.blog-page {
  animation: pageFadeIn 0.5s ease both;
}

/* 2. ENTRY DATE HOVER — slides right slightly, like being underlined by hand */
.diary-entry:hover .entry-date {
  transform: translateX(4px);
  color: #6b4e30;
  transition: transform 0.2s ease, color 0.2s ease;
}

.entry-date {
  transition: transform 0.2s ease, color 0.2s ease;
}

/* 3. MONTH TAB — warmer active/hover colours to match the parchment palette */
.month-tab:hover {
  color: #6b4e30;
  border-color: #c4a47a;
  background: #f5ead8;
}

.month-tab.active {
  color: #3a2010;
  border-color: #b09060;
  font-weight: bold;
  background: #e2cdb0;
}

/* 4. WARM SCROLLBAR — matches the panel colour palette */
.content-inner {
  scrollbar-color: #c4a47a transparent;
}

.content-inner::-webkit-scrollbar-thumb {
  background: #c4a47a;
  border-radius: 3px;
}

/* 5. DIARY ENTRY HOVER — soft warm wash behind the whole entry */
.diary-entry {
  transition: background 0.2s ease;
  border-radius: 3px;
  padding-left: 4px;
  padding-right: 4px;
}

.diary-entry:hover {
  background: rgba(210, 185, 150, 0.15);
}
/* ============================================
   GIF OF THE DAY PAGE
   ============================================ */

.content-inner.gif-content {
  align-items: flex-start;
  text-align: left;
}

.gif-page-header {
  width: 100%;
  text-align: center;
  margin-bottom: 18px;
}

/* override the default welcome-title border/dark color for gif page only */
.gif-page-header .welcome-title {
  border: none;
  color: #606060;        /* soft gray, clearly darker than description (#888) */
  padding: 0;
  margin-bottom: 8px;
}

.gif-page-desc {
  font-family: var(--font-main);
  font-size: 12px;
  color: #888;
  line-height: 1.65;
  margin-top: 0;
  padding: 0 4px;
}

/* 3-column grid — gifs are small */
.gif-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
}

.gif-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
}

.gif-item img {
  max-width: 100%;
  max-height: 75px;
  width: auto;
  height: auto;
  display: block;
  /* traces the actual gif shape including transparent cutouts */
  filter: drop-shadow(2px 3px 5px rgba(0,0,0,0.32));
  transition: filter 0.2s ease;
}

.gif-item:hover img {
  filter: drop-shadow(3px 4px 8px rgba(0,0,0,0.44));
}

/* hidden in HTML — JS reads it to populate the floating tooltip */
.gif-info { display: none; }

/* mouse-following tooltip — created and moved by gif-of-the-day.js */
.gif-tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 1000;
  background: #fffdf8;
  border: 1.5px dashed #c8b8a2;
  border-radius: 3px;
  padding: 7px 10px;
  font-family: var(--font-main);
  font-size: 11px;
  color: #4a3520;
  line-height: 1.5;
  box-shadow: 1px 2px 6px rgba(0,0,0,0.12);
  max-width: 150px;
  white-space: normal;
  text-align: left;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.gif-tooltip.visible { opacity: 1; }

.gif-title {
  font-weight: bold;
  margin-bottom: 3px;
  font-size: 11px;
}

.gif-desc {
  font-size: 10px;
  opacity: 0.82;
}
/* ============================================
   WELCOME TITLE IMAGE (blog/index.html)
   ============================================ */

/* gentle continuous float — like it's hovering in place */
@keyframes welcomeFloat {
  0%, 100% { transform: translateY(0px);  }
  50%       { transform: translateY(-7px); }
}

/* subtle shimmer pulse for extra magic */
@keyframes welcomeShimmer {
  0%, 100% { filter: drop-shadow(0 2px 6px rgba(180,150,100,0.0)); }
  50%       { filter: drop-shadow(0 4px 14px rgba(180,150,100,0.45)); }
}

.welcome-image {
  width: 200px;       /* display size — draw the PNG at 400px wide */
  height: auto;
  display: block;
  margin-bottom: 20px;
  cursor: default;

  /* at rest: still */
  transition: transform 0.3s ease;
}

.welcome-image:hover {
  /* on hover: floats up and down continuously with a warm glow */
  animation:
    welcomeFloat   1.6s ease-in-out infinite,
    welcomeShimmer 1.6s ease-in-out infinite;
}
/* ============================================
   WELCOME PAGE — ASCII ART
   ============================================ */

.welcome-ascii {
  font-family: 'Times New Roman', Times, serif;
  font-size: 10px;          /* small enough for ASCII art to fit the frame */
  line-height: 1.25;        /* tight vertical spacing — standard for ASCII art */
  color: #4a4040;
  white-space: pre;         /* preserves every space and newline exactly */
  overflow-x: hidden;       /* hides any accidental horizontal overflow */
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}