/*
Theme Name: Ellen's Mood Board
Theme URI: http://ellen.li/ellen-theme
Description: A minimalist, single-column, responsive Wordpress theme originally built for https://ellen.li.
Version: 1.0
Author: Ellen Li
Tags: white, single-columns
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&family=Gothic+A1:wght@300;400;500;600;700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
/* selection is a little darker than code, var, etc */
::selection, mark {
    background-color: #f0e1be; 
    color: #1d1d1d;
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    /* outline: 1px solid red; */
    transition: 
        color 0.2s ease,
        text-decoration-color 0.2s ease,
        opacity 0.2s ease;
    line-height: 1.7;
}
html {
    height: 100%;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Gothic A1', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-weight: 400;
    letter-spacing: -0.008em;
    background-color: #f0f0ec; /* F4F3EE */
    color: #555;
    font-size: 16px;
    line-height: 1.7;
}
strong {
    font-weight: 600;
}
cite {
    font-family: 'Cormorant', serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-size: 1.2em;
    letter-spacing: -0.2px;
    line-height: 1em;
    font-style: italic;
}
strong, a, code, abbr, var, pre, blockquote, s, ul, ol, li {
    font-size: inherit !important;
}
sub,
sup {
  font-size: 0.75em;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
sup {
  top: -0.4em;
}
sub {
  bottom: -0.2em;
}
s {
    text-decoration: line-through;
    opacity: 0.5;
}
blockquote{
    display: block;
    border-left: 1px solid #555;
    padding: 0 0 0 2em;
    margin: 2em 0;
}
hr {
    border: none;
    height: 1px;
    border-top: 1px solid #999;
    margin: 2em 0;
    opacity: 0.5;
}
code, var, pre {
    font-family: 'Inconsolata', monospace;
    letter-spacing: 0;
    font-style: normal;
    /* color: #000; */
    /* background-color: #f6ebd3; */
    /* border-radius: 0.2em; */
    padding: 0px;
}
/* Fixed Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1em 1.5em 0.8em 1.5em;
    background-color: transparent;
    z-index: 1000;
    /* mix-blend-mode: difference !important; */
}

header h1 {
    font-size: 1em;
    margin: 0;
    font-weight: 400;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 0.3em;
    flex-wrap: wrap; /* optional, for responsiveness */
}

header h1 a {
    font-weight: 400 !important;
    color: #888 !important;
    text-decoration: none;
    position: relative;
}
header h1 a:hover {
    color: #000 !important;
}

/* Make first link darker, thicker */
header h1 a:first-of-type {
    font-weight: 500 !important;
    color: #555 !important;
}

/* Insert slash after each link except the last one */
header h1 a:not(:last-of-type)::after {
    content: "›";
    font-family: 'Inter', sans-serif;
    margin: 0 0.1em 0 0.5em;
    color: #bbb;
    font-weight: 400;
}

/* Navigation */
nav ul, .mood-filters {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5em;
}
button {
    border: 0;
    margin: 0;
    padding: 0;
    background-color: transparent;
    font-size: 1em;
    font-family: 'Gothic A1', sans-serif;
    line-height: normal !important;
}

 nav ul li a, #quote a, .button {
    text-decoration: none;
    color: #888;
    font-weight: 400;
    position: relative;
    transition: color 0.2s ease;
    /* background-color: #f0f0ec;
    padding: 3px;
    border-radius: 3px; */
}

nav a:hover, #quote a:hover, .button:hover {
    color: #000;
    cursor: pointer;
}

/* Active link with dot indicator */
header a.active,
header h1 a,
.current_page_item > a,
.current-menu-item > a,
.current-page-ancestor > a,
.current-page-parent > a,
.current-menu-ancestor > a,
.current-menu-parent > a,
.button:active,
.button.is-checked {
    font-weight: 500;
    color: #555;
    text-decoration: none;
    position: relative; /* required so the dot can be positioned relative to the link */
}

header a.active:hover,
.current_page_item > a:hover,
.current-menu-item > a:hover,
.current-page-ancestor > a,
.current-page-parent > a,
.current-menu-ancestor > a,
.current-menu-parent > a {
    text-decoration: none;
}

header a.active::after, 
.button.is-checked::after,
.current_page_item > a::after,
.current-menu-item > a::after,
.current-page-ancestor > a::after,
.current-page-parent > a::after,
.current-menu-ancestor > a::after,
.current-menu-parent > a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -7px; /* adjust spacing below text */
    transform: translateX(-50%);
    width: 3px;   /* size of the dot */
    height: 3px;
    background-color: #555; /* same as active color */
    border-radius: 50%;     /* makes it a circle */
}

header li.toggle {
    display: none;
}

/* Main Content Area */
main {
    flex: 1;
    width: 100%;
    max-width: 700px;
    margin: 0px auto 0; /* Remove bottom margin since footer will handle spacing */
    padding-top: 0em;
    padding: 1em 1.5em;
}
#page-mood {
    max-width: 100% !important;
    padding: 0 0.45em 1em 0.45em;
    margin: 0 0 1em 0 !important;
}
#mood-container{
    margin:0 !important;
    padding: 0 !important;;
}
main p, figure, h1, h2, h3, h4, ul {
    margin: 1em 0;
    line-height: 1.7;
    font-weight: 400;
}
h1 {
    font-size: 1.5em;
    font-weight: 400;
    text-align: left;
    margin: 2em 0 1em 0;
    padding: 0;
}
h2 {
    font-size: 1.2em;
    font-weight: 500;
    text-align: left;
    margin: 2em 0 1em 0;
}
h3, h4, h5, h6 {
    font-size: 1em;
    font-weight: 500;
    text-align: left;
    margin: 2em 0 0em 0;
}
main {
    margin-top: 4em;
}
.page-title {
    margin-bottom: 0 !important;
}
.page-title a {
    text-decoration: none !important;
}
.page-subtitle {
    opacity: 0.7;
    font-weight: 400;
    margin: 0.2em 0 2em 0;
}
ol, ul {
    padding: 0em;
    margin: 0;
}
ol > li {
    margin: 0 0 0 1.5em;
    padding: 0.1rem 0.5em;
    /* &::marker {
        color: #ccc;
    } */
}
main ul {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

main ul > li {
    position: relative;
    padding: 0 0 0 1.5em; /* enough room for bullet */
    margin: 0.2em 0;
    line-height: 1.7;
}

main ul > li::before {
    content: '•';
    position: absolute;
    left: 0.5em;
    top: 0.7em; /* vertical alignment */
    font-size: 0.6em;
    color: #999;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--auto-grid-min-size, 300px), 1fr));
    grid-gap: 1em;
}
.gallery figure, .gallery figure img {
  padding: 0;
  margin: 0;
  text-align: center;
  /* background-color: #ccc;
  color: #ffffff; */
}
figure {
    padding: 1em 0;
}
figure img, iframe {
  width: 100%;
  height: auto !important;
  border: 0;
}
figcaption, small {
    margin: 1em 0 0 0;
    font-size: 0.9em !important;
    opacity: 0.7;
    text-align: center;
}
main a, #quotes-container a {
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: #bbb;
    color: #555;
    position: relative;
    display: inline;
    transition: color 0.2s ease;
    font-size: inherit !important;
}

main a:hover {
    color: #555;
    text-decoration-color: #555;
    transition: text-decoration-color 0.2s ease;
}

/* Posts */

.posts-container {
    display: flex;
    flex-direction: column;
    gap: 0em; /* between years */
}
.posts-container .year {
    display: flex;
    flex-direction: column;
}
.month {
    margin-bottom: 1rem;
}
.posts-container .cell {
    display: flex;
    flex-direction: row;
    align-items: baseline; /* correct property */
    gap: 0.3em;
    padding: 0.3em 0px;
    text-decoration: none;
}
.posts-container .cell .title {
    word-break: break-all; /* Keep the aggressive breaking you want */
    overflow-wrap: anywhere; /* Keep original setting */
    display: block;
}
.posts-container .cell .line {
    min-width: 2rem;
    flex-grow: 1;
    background-image: repeating-linear-gradient(to right, #ccc, /* Dot color */ #ccc 1.5px, /* Dot width */ transparent 1px, /* Gap starts */ transparent 0.4em /* Gap width */);
    height: 1.5px;
    margin: 0px 0.1em;
    position: relative;
    bottom: 0px; /* align w link underline */
}
.posts-container a .cell .date {
    color: #999;
    display: inline-block;
    white-space: nowrap; /* ← prevents line break */
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: #f0f0ec; /* invisible */
}

/* External link styling */
a[target="_blank"],
a.external-link {
    text-decoration: none !important;
    display: inline;
}

a[target="_blank"] span,
a.external-link span {
    font-size: inherit !important;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: #bbb;
}

a[target="_blank"]:hover span,
a.external-link:hover span {
    text-decoration-color: #555;
}

a[target="_blank"]::after,
a.external-link::after {
    content: "↓"; 
    font-family: 'Inter', sans-serif !important;
    font-size: 0.7em;
    opacity: 0.5;
    margin-left: 0.1em;
    margin-top: calc(1rem - 1.7em);
    vertical-align: super;
    line-height: 1;
    display: inline-block;   /* allow transform lol */
    transform: rotate(225deg); /* rotate so ↓ points ↗ */
}

.avatar {
    display:block;
    float: right;
    width: 25%;
    margin: 0 0 1em 1em;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* Footer */
footer {
    position: relative;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 6em 0 0 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    padding: 1.5em;
    background-color: transparent;    background-color: transparent;
}

footer p, footer span {
    color: #999;
    margin: 0;
    padding: 0;
}

footer nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2em;
    align-items: baseline;
}
.toggle {
    font-family: 'Inter', sans-serif;
}

/* External link indicator */
.external-indicator {
    position: absolute;
    top: -0.15em;
    right: -0.5em;
    font-size: 1em;
    margin-left: 10px;
    line-height: 1;
}

/* Quote attribution */

#quote-text:hover {
    color: #555;
    cursor: pointer; /* Shows hand pointer on hover */
    user-select: none; /* Prevents text selection */
}

#quote-text {
    line-height: 1.7em;
    display: inline-block; /* Ensures proper spacing */
    color: #999;
}
/* Prevent bad line breaks in quotes */
#quote-text {
    white-space: pre-wrap; /* Preserve spaces but allow wrapping */
    /* word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto; */
}

/* Special treatment for the attribution line */
#quote-text::after {
    content: "\200B"; /* Zero-width space */
    font-family: 'Inter', sans-serif;
    display: inline;
}

/* Non-breaking behavior for em dash and what follows */
#quote-text .attribution {
    white-space: nowrap;
    display: inline-block;
}
/* #quote span::before { content: ' – ';  — longer */

.cols-2--md-1 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0rem;
    padding: 0;
    margin: 0;
  }


.latte-gallery {
	display: grid;
	grid-template-columns: repeat(4, 1fr); /* columns for mobile */
	gap: 2px;
	transition: opacity 0.5s ease-in-out;
}
.latte-gallery img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	aspect-ratio: 1 / 1; /* square aspect ratio */
	transition: opacity 0.5s ease-in-out;
}
@media screen and (min-width: 568px) {
	.latte-gallery {
		grid-template-columns: repeat(5, 1fr); /* columns on bigger screens */
	}
}

/* admin bar */
body.admin-bar header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar header {
        top: 46px;
    }
}

/* moodboard */

img {
vertical-align: middle;
}

.img-responsive {
display: block;
width: 100%;
max-width: 100%;
height: auto;
}

.mood article {
background-color: transparent;
display: block;
float: left;
margin: 0.2%;
width: 24.6%;
}

.mood article img {
    border-radius: 4px;
}

/* Tablet breakpoint */
@media (max-width: 1024px) {
    main {
        max-width: 100%;
        margin-top: 2em;
    }
    #page-mood {
        max-width: 100% !important;
        padding: 0 0.5%;
        margin-top: -0.4em !important;
    }
    /*moodboard*/
    .mood article {
        width: 32.93%;
    }
    header {
        position: relative;
    }
    footer nav ul {
        padding: 0 0 0 1em;
        gap: 2em;
    }
    footer nav li.toggle {
        display: none;
    }
    header nav li.toggle {
        display: none;
    }
}

/* Mobile breakpoint */
@media (max-width: 600px) {
    *, body p, a {
        /* font-size: 14px !important; */
    }
    header,
    main,
    footer {
        padding: 1.5em;
    }
    #quote {
        margin-bottom: 1em;
        display: block;
        width:100%;
    }
    .cols-2--md-1 {
        grid-template-columns: 1fr;
      }
/* hide breadcrumb nav */
    header h1 a {
        font-weight: 500 !important;
        color: #999 !important;
        text-decoration: none;
        position: relative;
        display: none;
    }
        header h1 a:first-of-type {
        display: block !important;
    }
    header h1 a:not(:last-of-type)::after {
        display: none;
    }
    /* moodboard*/
    #page-mood {
        max-width: 100% !important;
        padding: 0 0.5%;
        margin-top: -0.3em !important;
    }
    .mood article {
        margin: 0.5%;
        width: 49%; /* 100% for single column */
    }
    .mood article img {
        border-radius: 4px;
    }
}

