/* Homepage entry list */
#entryList {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

#entryList .card {
    text-decoration: none!important;
    flex: 40%;
    display: flex;
    position: relative;
    padding: 2rem 1rem 4rem 1rem;
    background-color: var(--darkest2);
    border-radius: 5px;
    text-align: center;
    box-shadow: 0 0 var(--blue3), 2px 6px 20px var(--darkest2);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    align-content: space-between;
    width: 100%;
    transition: transform 0.1s var(--ease), box-shadow 0.1s var(--ease)
}

img.smallImg {
    width: 50%;
    left: 25%;
    position: relative;
}
#entryList .small { margin: 0; padding: 1rem; }

.imgSideBySide {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.imgSideBySide p { flex: 50%; }

#entryList .date {
    position: absolute; 
    left: 1rem;
    bottom: 1rem;
    column-gap: 0.5rem; 
    margin: 0;
}

#entryList h1 { font-size: 2rem; }
#entryList .card:hover { transform: translateY(-3px); }
#entryList .card:active { transform: translateY(2px); }
#entryList .card:hover:not(:active) {
    box-shadow: 0 3px var(--blue3), 2px 6px 20px var(--darkest2);
}

@media(max-width: 750px) {
    #entryList { gap: 0; }
    #entryList .card { flex: 100%; }
    .smallImg { width: 100%; }
}

/**  Journal entry page  **/

.coverCard p { margin: 0; }

/* Different (and ligher) header font style */ 
article h1, article h2, article h3 {
    color: var(--lightest3)!important;
    text-shadow: 0px 2px 0.8rem var(--blue2) !important;
}

#entryInfo { display: flex; gap: 2rem; justify-content: space-between; }
#entryInfo p { margin: 0; color: var(--lightest3); }

.innerCard p:first-child { margin-top: 0; }

/* Ribbon styling */
.ribbon, header::before, article h1::before, article h2::before, article h3::before {
    width: 2rem;
    height: 3rem;
    background: linear-gradient(to top left, var(--blue2), var(--blue3));
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 8px), 0 100%);
}

header::before {
    content: '';
    display: block;
    position: absolute;
    right: 1.5rem;
    width: 2.5rem;
    height: 4rem;
}

/* Anchor elements with ribbon IDs */
article h1::before, article h2::before, article a:has(> h3) h3::before {
    content: '#';
    width: 1.5rem;
    height: 2.5rem;
    transition: margin-right .2s var(--ease);
    margin-right: 5px;
}

.ribbonAnchor, .ribbonAnchor h1, .ribbonAnchor h2 { text-decoration: none!important; }
h1:hover::before, h2:hover::before, h3:hover::before { margin-right: 8px; }
h1:active::before, h2:active::before, h3:active::before { margin-right: 3px; }

.imageCaption {
    font-style: italic;
    margin-top: -1rem;
    color: var(--lightest3);
    text-align: center;
    opacity: 0.8;
}

/* Default journal-style document styles */

body {
    margin: 25px auto;
    max-width: 1000px;
    background: var(--darkest1);
    overflow-x: hidden;
    line-height: 1; 
    font-family: var(--primaryFont);
}

#wrapper { /* min-height: calc(100vh - 50px); */
    padding: 25px 25px 0 25px;
    background-color: var(--darkest3); 
    box-shadow: 8px 14px 38px var(--darkest2), 1px 3px 8px var(--darkest1);
    border-radius: 5px;
}

a.button, button {
    min-width: 0%;
    text-decoration: none!important;
}

img, video { max-width: calc(100% - 10px); }

/* We use h1 subtexts so styling is a bit different */
.subtext {
    color: #7d899e;
    font-size: 1.5rem;
    margin-top: 5px;
}

/* Subtext headers shouldn't have spacing */
h1:has(+ .subtext) { margin: 0; }

/* Header styling */
.headerItems a:not(.selected):before {
    content: "";
    background: var(--darkest3);
    box-shadow: 0 0 6px 0 var(--darkest2);
    display: block;
    position: relative;
    margin-left: -10px;
    transition: scale .3s cubic-bezier(0, 1.4, 0.5, 1.3), box-shadow .3s cubic-bezier(0, 1.4, 0.5, 1.3);
    height: 55px;
    width: 55px;
    top: 20px;
    border-radius: 15px;
}

/* Header branding */
#headtxt { 
    position: absolute; 
    margin-left: 28px;
    will-change: transform; 
    margin: 1rem 0 0 2rem;
    font-size: revert;
}

#headtxt a { 
    text-decoration: none!important;
    position: relative;
    top: -5px;
    line-height: 1.8;
    transition: text-shadow .1s var(--ease), top .1s var(--ease); 
    text-shadow: 0px 3px 1rem var(--blue1), 0 0 var(--darkest3); 
}
header img { width: 50px; position: absolute; transition: scale .4s cubic-bezier(0,1.4,.5,1.3) 0s; }

header {
    position: sticky;
    top: 10px;
    background-color: var(--darkest4);
    box-shadow: 8px 14px 38px var(--darkest2), 1px 3px 8px var(--darkest1);
    border-radius: 0.3rem;
    z-index: 3;
    height: 5rem;
}

.date::before {
    content: url('https://amazinaxel.com/media/icons/calendar.svg');
    width: 1.5rem;
}

/* Footer styling */

footer { 
    padding: 0 10px 20px 10px;
    display: flex;     
    align-items: center;
    justify-content: space-between;
}

footer p { line-height: 0.7rem; }
footer a, footer .link { color: var(--lightest1); text-decoration: none; }
footer a:hover { color: var(--lightest1); text-decoration: underline; }
footer a:active { color: var(--lightest2); }
footer #small { 
    color: var(--lightest3);
    font-size: 14px;
    margin: -1rem 0 0.5rem 0;
}

#footerButtons { display: flex; gap: 10px; }
footer a.link { 
    display: flex; 
    align-items: center; 
    gap: 2px; 
    padding: 0; 
    color: var(--lightest3);
    text-decoration: none!important;
}

@media(max-width: 700px) {
    footer { display: block; }
    #footerButtons { padding-top: 15px; justify-content: space-between; }
}

.link { 
    display: block; 
    color: var(--lightest1); 
    text-decoration: none; 
    padding-bottom: 50px; 
    transition: scale .3s cubic-bezier(0, 1.4, 0.5, 1.3), box-shadow .3s ease; 
    scale: 1; 
}

img.icon { width: 20px; position: relative; }
.time, .date, #entryInfo div {
    display: flex;
    column-gap: 4px;
}
.time::before {
    content: url("https://amazinaxel.com/media/icons/clock.svg");
}
.time p, .date p { line-height: 0.5; color: var(--lightest3); }

.list { box-shadow: 4px 4px 12px var(--darkest3), 1px 4px 20px var(--darkest1); }

.pageCard { text-align: center; padding: 2rem; margin-bottom: 1rem; }
.pageCard h2 {
    font-size: 1.7rem;
    color: #ccd0d6;
    text-shadow: none;
    margin: -0.8rem 0 0 0;
}
.pageCard h2 a { color: #ccd0d6!important; }

li {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

/* Page transitions */
#fadeAnim {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    background: var(--darkest1);
    animation: 150ms ease;
  }

  @keyframes fadeOut {
    from { opacity: 1 }
    to { opacity: 0 }
  }

  @keyframes fadeIn {
    from { opacity: 0 }
    to { opacity: 1 }
  }

  #fadeAnim.fadeOut {
    opacity: 0;
    animation-name: fadeOut;
  }

  #fadeAnim.fadeIn {
    opacity: 1;
    animation-name: fadeIn;
  }

/* Misc styling & extra features */

/* Header responsitivity */
@media(max-width: 600px) {
    #headtxt { padding-top: 15px; text-align: center; position: initial; margin: 0; }
}

#headtxt:hover a { text-shadow: 0px 3px 1.2rem var(--lightest2); text-decoration: underline!important; }

/* Fix text shadow visual cutoff */
h1, h2, h3, h4, p { overflow: unset; }
p:not(blockquote p) { line-height: 1.5rem; }

/* Fix card stacking on sticky header */
.coverCard { z-index: 0; }

/* Fix inline checkboxes */
.container .checkmark {
    position: relative;
    height: 40px;
    width: 40px;
    display: inline-block;
}
.container { padding-left: 0; }

.checkmark:after {
    left: 9px;
    top: 9px;
    width: 10px;
    height: 10px;
}
