/* ++++++ HOME PAGE STYLES ++++++ */


/* Title and subheader styles */
/* Border box sizing fix */
*, *:before, *:after { box-sizing: border-box; }

/* Some global style resets */

*, *:before, *:after { box-sizing: border-box; }
body {
    background-color: #ff948f;
}

/* Globals */
h1, h2, h3, h4, p, ol, ul, li, a, figure, p:last-child, ul:last-child, ol:last-child {
    font-family:'Courier New', monospace;
    font-size: 14px;
    margin: 0;
    padding: 0;
    overflow-wrap: anywhere;   /* modern, nice */
    word-break: break-word;
}


 a:hover {
    border:2px dashed #ff948f;
    transform: scale(1.05);
}
 

h1 {
    font-size: 150%;
}

h2 {
    font-size: 125%;
}

h1, h3, h4 {
    margin-bottom: .3em;
}

p .section-description {
    background-color: #ff948f;
    border: 1px solid #969696;
    border-radius: 5px;
    padding: 8px;
}

ul, ol {
    position: relative;
    list-style: none;
    margin-left: 0;
    padding-left:.5em;
}

li:before {
    content: "»";
    position: absolute;
    left: 0;
/*   padding-left: .5em;
    display: block;
    float: left;
    width: 1.2em;
    color: #000; */
}


li {
    list-style-position: inside;
    padding-left: 1em;
}


p, ul, ol {
    margin-bottom: 1em;
    line-height: 1.3;
}

img {
    max-width: 100%;
    height: auto;
}

header, section, aside, footer {
    background-color: #ff948f;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;  /* desktop: avatar aligns with top of text */
    gap: 10px;
    border-top: none;
}

/* The status note at the top of the home page */

#status {
    width: 100%;
    max-width: 500px;
    height: 110px;
    color: gray;
    background-color: #ff948f;
    /* transform: rotate(4deg); */
    border-radius: 10px;
    padding: 10px;
    margin-top: 20px;
}
#status p {
    font-size: 16px;
    line-height: 18px;
    margin-bottom: 12px;
}

/* Notebook subsections */
section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    padding-top:5px;
    overflow-y: scroll;
    max-height: 500px;
    align-items: flex-start;
    gap: 10px;
    place-items: center;
}

section a {
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    align-items: center;
    /* color: var(--pencil); */
    text-decoration: none;
    text-align: center;
    font-size: 14px;
    width: 100px;
    height: 90px;
    background-color: var(--note);
    border-radius: 20px;
    transform: rotate(4deg);
    margin-bottom: 20px;
    border: 4px solid transparent;
}

/* LOG page: default + use tag color for card background */
.log-left section a {
    --tag-color: var(--tag-writing);   /* fallback if no tag-* class */
    background-color: var(--tag-color);
}


/*.log-left section a:hover {
    border-color: rgb(230, 226, 193);
}*/

.log-left section a::before {
    /* keep all your existing positioning / size / border styles */
    background-color: var(--tag-color);
}

/* The little start in the corner of entry icons */
.favorite::after {
    content: '*';
    font-size: 32px;
    display: block;
    position: absolute;
    top: 58px;
    right: 1px;
    color: #ff948f;
    z-index: 1;
}

/* Entry icon palettes */


/* Tag → color mapping using global vars */
.log-left section a.tag-music {
    --tag-color: var(--tag-music);
}

.log-left section a.tag-writing {
    --tag-color: var(--tag-writing);
}

.log-left section a.tag-politics {
    --tag-color: var(--tag-politics);
}

.log-left section a.tag-culture {
    --tag-color: var(--tag-culture);
}

.log-left section a.tag-internet {
    --tag-color: var(--tag-internet);
}

.log-left section a.tag-life {
    --tag-color: var(--tag-life);
}

.log-left section a.tag-other {
    --tag-color: var(--tag-other);
}



/* ===== LOG LAYOUT: board + side viewer ===== */

/* mobile-first: one column */
.log-layout {
    display: block;
}

/* show viewer on mobile too (below the bar) */
.log-right {
    display: block;
    margin-top: 0px;
}

/* viewer box */
.log-viewer {
    background-color: #fffbfa;
    border: 1px solid #969696;
    border-radius: 10px;
}

.log-viewer-placeholder {
    font-size: 0.9rem;
    opacity: 0.7;
    margin: 0.75rem;
}

/* entries inside viewer */
.log-viewer #meta {
    display: flex;
    font-size: 12px;
    margin-bottom: 12px;
    color: rgba(0, 0, 0, 0.5);
}

.log-viewer #tags {
    display: flex;
    gap: 12px;
    text-align: center;
}

.log-viewer #meta time {
    margin-left: auto;
}

.log-viewer article {
    background-color: #fffbfa;
    color: var(--cursor);
    border-radius: 5px;
    padding: 8px;
    max-width: none;
}

.log-viewer article h1 {
    font-size: 17px;
    font-weight:bold;
    margin-bottom: .3em;
}

.log-viewer article h2 {
    font-size: 13px;
    font-weight:bold;
    margin-bottom: .3em;
}

.log-viewer article p {
    font-size: 13px;
    line-height: 1.4;
}



/* Mobile layout: horizontal strip, viewer in normal flow */
@media (max-width: 599px) {

  /* Top horizontal bar of entries */
  .log-left {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 0;
    background-color: #ff948f;
  }

  .log-left > h2 {
    margin: 0 0 6px;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
  }

  .log-left > section {
    display: flex;              /* horizontal strip */
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 10px;
    padding-bottom: 0px;
      padding-top: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .log-left > section a {
    flex: 0 0 auto;             /* little sticky-note cards in a row */
  }

  .log-viewer iframe {
    width: 100%;
    height: 72vh;
    /* border: 1px solid #969696; */
    /*border-radius: 5px;*/
    display: block;
    background: transparent;
    /* max-height: fit-content; */
   }

}


/* Desktop */
@media (min-width: 600px) {
    .log-layout {
        display: grid;
        grid-template-columns: minmax(0, 150px) minmax(0, 1fr);
        column-gap: 10px;
        align-items: flex-start;
    }

    .log-right {
        display: block;
    }

    .log-viewer {
        position: sticky;
        top: 40px;
        height; 490px;
    }

    .log-viewer iframe {
    width: 100%;
    height: 95vh;
    /* border: 1px solid #969696; */
    /*border-radius: 5px;*/
    display: block;
    background: transparent;
    /* max-height: fit-content; */
    }


    .log-layout.log-has-selection .log-viewer-placeholder {
        display: none;
    }
    
}

/* Hide placeholder once something is loaded (all viewports) */
.log-layout.log-has-selection .log-viewer-placeholder {
    display: none;
}

/* Keep the iframe hidden until an entry is selected,
   so the empty viewer can be small */
.log-layout:not(.log-has-selection) .log-viewer iframe {
    display: none;
}

/*.log-viewer iframe {
  width: 100%;
  min-height: 60vh;
  border: none;
  display: block;
  background: transparent;
}*/

/* Active note highlight */
.log-left section a.log-note-active {
    font-weight: bold;
    border: 2px dashed rgba(255, 148, 143, 1);
    box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.2);
    transform: translateY(-3px) rotate(0deg);
    z-index: 2;
}

/* woohooo */
