/* ============================================
   COLOR CUSTOMIZATION
   ============================================
   Modify these color variables to customize 
   the appearance of your site. All colors 
   throughout the stylesheet reference these 
   variables for easy theming.
   ============================================ */

:root {
  /* Background colors */
  --color-bg-body: #FFFFFF;           /* Main page background (ivory/cream) */
  --color-bg-highlight: #FFFFb0;       /* Blockquote background (light yellow) */
  --color-bg-table-header: #f5f5f5;    /* Table header background */
  --color-bg-table-hover: #f9f9f9;     /* Table row hover background */
  
  /* Text colors */
  --color-text-primary: rgb(71, 71, 71);  /* Main text color (dark gray) */
  --color-text-secondary: #555;           /* Secondary text (blockquotes, inner voice) */
  --color-text-tertiary: #333;            /* Table text */
  --color-text-muted: gray;               /* Month headers */
  --color-text-link: black;               /* Link text color */
  --color-inner-voice: #555;           /*  Text inner voice */
  
  /* Accent colors */
  --color-accent-primary: #ffa5f0;     /* Primary accent (orange - used for link underlines, borders, icons) */
  --color-accent-quote: #ccc;          /* Blockquote decorative quotes */
  
  /* Border colors */
  --color-border-light: #e0e0e0;       /* Table borders */
  --color-border-dotted: rgba(0, 0, 0, 0.5);  /* Separator dotted line */
  --color-border-solid: rgba(0, 0, 0, 1);     /* Current/latest post separator */
}

/* ============================================
   FONT DECLARATIONS
   ============================================ */
@font-face {
  font-display: block;
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400;
  src: url(/fonts/caveat-v18-latin-regular.woff2) format('woff2');
}
@font-face {
  font-display: block;
  font-family: 'Caveat';
  font-style: bold;
  font-weight: 700;
  src: url(/fonts/caveat-v18-latin-700.woff2) format('woff2');
}
@font-face {
  font-family: 'Fantasque Sans Mono';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(/fonts/FantasqueSansMono-Regular.woff2) format('woff2');
}
@font-face {
  font-family: 'Fantasque Sans Mono';
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url(/fonts/FantasqueSansMono-Italic.woff2) format('woff2');
}
@font-face {
  font-family: 'Fantasque Sans Mono';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url(/fonts/FantasqueSansMono-Bold.woff2) format('woff2');
}
@font-face {
  font-family: 'Fantasque Sans Mono';
  font-style: italic;
  font-weight: 700;
  font-display: block;
  src: url(/fonts/FantasqueSansMono-BoldItalic.woff2) format('woff2');
}
@font-face {
  font-family: "Libertinus";
  font-style: bold;
  font-stretch: normal;
  font-weight: 400;
  font-display: block;
  src: url(/fonts/LibertinusSerif-Bold.woff2) format("woff2")
}
@font-face {
  font-family: "Libertinus";
  font-style: italic;
  font-stretch: normal;
  font-weight: 400;
  font-display: block;
  src: url(/fonts/LibertinusSerif-Italic.woff2) format("woff2")
}
@font-face {
  font-family: "Libertinus";
  font-style: normal;
  font-stretch: normal;
  font-weight: 400;
  font-display: block;
  src: url(/fonts/LibertinusSerif-Regular.woff2) format("woff2")
}

/* ============================================
   BASE STYLES
   ============================================ */

* {
  --column-width: 70ch;
  --font-family:"Libertinus", P052, serif;
  --font-family-sans:system-ui, sans-serif;
  --font-family-mono:"Fantasque Sans Mono", ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --font-size:clamp(15px, 0.40vw + 13px, 35px);
  --font-line-height:clamp(26px, 0.78vw + 22.488px, 42px);
  --font-style:normal;
  box-sizing: border-box;
}

body {
  background-color: var(--color-bg-body);
  margin: 0 auto;
  padding:  8em 1em 1em 1em;
  color: var(--color-text-primary);
  font-family:var(--font-family);
  font-size:var(--font-size);
  line-height: var(--font-line-height);
  font-style:var(--font-style);
  width: min(95%, var(--column-width));
  overflow-wrap: break-word;
}

a {
    text-decoration: none; 
}

a:not(h1 a, footer a, .listing a) {
    position: relative;
    font-size: 1.01rem;
    color: var(--color-text-link);
}

a:not(h1 a, footer a, .listing a):after {
    --deco-height: 0.2em;
    content: "";
    position: absolute;
    font-weight: bold;
    left: 0;
    right: 0;
    bottom: calc(var(--deco-height) * -0.225);
    height: var(--deco-height);
    background-color: var(--color-accent-primary);
    mask-image: url("data:image/svg+xml,%3Csvg width='100' height='20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 10 Q 25 0, 50 10 T 100 10' stroke='black' stroke-width='4'/%3E%3C/svg%3E%0A");
    mask-size: 300% 200%;
    mask-repeat: repeat-x;
}

h1 {
    font-size: 1.75rem;
}

h1 a {
  text-decoration: none;
  color: inherit;
}

summary {
  text-align: center;
  font-weight: 800;
  font-size: 0.9rem;
  list-style: none;
  cursor: pointer;
}

.latest-month-header {
  text-align: center;
}

kbd, code {
  font-family:var(--font-family-mono);
	font-weight: bold;
  font-size: 1rem;
}

pre {
  font-family:var(--font-family-mono);
  max-width: 100%;
  overflow: auto;
  padding: 0.25rem 1rem;
}

body > section > h1:nth-child(1) {
  margin-top: 2.5rem;
}

.p-name {
    margin-top: 0.5rem;
    margin-bottom: 2.5rem;
    cursor: pointer;
}

time sup {
  font-size: 0.75em;
  vertical-align: super;
}

.date, .tag {
  display: flex;
  justify-content: flex-end;
}

.tag {
  flex-wrap: wrap;
}

.dt-published, .u-category {
    font-weight: 800;
    font-size: 0.9rem;
}

.u-category:before {
  content: "#";
}

.u-category {
  padding-inline: 0.1rem;
  margin: 0;
  line-height: 0.9rem;
}


.listing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0;
  font-size: 0.9rem;
  gap: 0.5rem;
}

.listing a {
  text-decoration: none;
  color: inherit;
  flex-grow: 1;
  white-space: nowrap;
}

.listing time {
  white-space: nowrap;
}

.separator {
  flex-grow: 1000;
  height: 1px;
  border-bottom: 1px dotted var(--color-border-dotted);
}

.date-header {
  display: flex;
  justify-content: space-between;
  font-size: 1.25rem;
  font-weight: bold;
  margin-top: 1rem;
}

.year-header {
  text-align: left;
  font-size: 1.25rem;
  font-weight: bold;
  margin-top: 1.5rem;
}

.month-header {
  text-align: right;
  font-size: 1rem;
  font-weight: bold;
  margin-top: 1.5rem;
  color: var(--color-text-muted);
}

footer {
  display: flex;
  justify-content: space-around;
  margin: 8rem 0 2.5rem 0;
}

footer a {
  text-decoration: none;
  color: inherit;
  padding: 0 1rem;
  font-weight: 800;
  font-size: 0.9rem;
}

hr {
  border: 0;
  height: 0;
  overflow: visible;
  text-align: center;
  margin: 1em 0 2em 0;
}

hr::before {
  content: '***';
  display: inline-block;
  position: relative;
  background: white;
  font-size: 2em;
}

.latest-post, .current-post {
  .separator {
    border-bottom: 1px solid var(--color-border-solid);
  }
}

.previous-months-accordion {
  margin: 5rem 0;
}

.next {
  text-align: center;
  font-style: italic;
  font-size: 0.9em;
}

.spacing {
  margin: 6rem 0 0 0;
}

blockquote {
    padding: 10px 25px;
    margin: 5px 0;
    font-style: italic;
    color: var(--color-text-secondary);
    background-color: var(--color-bg-highlight);
    border-radius: 0.5rem;
    position: relative;
}

blockquote::before,
blockquote::after {
    font-size: 2rem;
    color: var(--color-accent-quote);
    position: absolute;
}

blockquote p {
  padding: 0;
  margin: 0.2rem;
}

blockquote::before {
    content: open-quote;
    left: 2.5px;
    top: 3.5px;
}

blockquote::after {
    content: close-quote;
    right:10px;
    bottom: -12.5px;
}

img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 80%;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--color-text-tertiary);
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--color-border-light);
}

th {
    background-color: var(--color-bg-table-header);
    font-weight: bold;
}

tr:hover {
    background-color: var(--color-bg-table-hover);
}

@media (max-width: 600px) {
    th, td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

.interaction-box {
    display: flex;
    flex-wrap: wrap;
	  justify-content: center;
    gap: 0.25rem;
	  .mention-profile {
			padding: 0;
	  }
}

.mention-profile {
	display: grid;
  position: relative;
  margin: 0 5px 0 0;
	img {
		border-style: solid;
		border-width: 1.5px;
		min-width: 1.5rem;
    max-width: 1.5rem;
    min-height: 1.5rem;
    max-height: 1.5rem;
		border-radius: 50%;
    border-color: var(--color-accent-primary);
		position: relative;
	}
}

.mention-profile::after {
    position: absolute;
    top: 2px;
    right:-8px;
    font-size: 1.1rem;
    border-radius: 50%;
    padding: 0.1rem;
}

/* Different icons for likes and reposts */
.mention-profile.like::after {
    content: "♡";
    color: var(--color-accent-primary);
    font-weight: bold;
}
.mention-profile.link::after {
    content: "⁎";
    color: var(--color-accent-primary);
    font-weight: bold;
}
.mention-profile.reply::after {
    content: "✉";
    color: var(--color-accent-primary);
    font-size: 1rem;
    font-weight: bold;
}

.inner-voice code, .inner-voice {
  position: relative;
  font-family: "Caveat", serif;
  font-size: 1rem;
  color: var(--color-inner-voice);

  &:after {
    --deco-height: 0.3125em;
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(var(--deco-height) * -0.625);
    height: var(--deco-height);
    background-color: var(--color-inner-voice);
    mask-image: url("data:image/svg+xml,%3Csvg width='100' height='20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 10 Q 25 0, 50 10 T 100 10' stroke='black' stroke-width='2'/%3E%3C/svg%3E%0A");
    mask-size: 300% 200%;
    mask-repeat: repeat-x;
    mask-position: 0 50%;
  }
}
