@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&display=swap');

/* ============================================
   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: #FFFBE6;              /* Soft warm yellow (main background) */
  --color-bg-highlight: #FFF2B3;         /* Light yellow highlight (blockquote bg) */
  --color-bg-table-header: #FFE27A;      /* Stronger yellow for table header */
  --color-bg-table-hover: #FFF6CC;       /* Gentle yellow hover */

  /* Text colors */
  --color-text-primary: #2B2B2B;         /* Dark text for readability on yellow */
  --color-text-secondary: #4A4A4A;       /* Secondary text */
  --color-text-tertiary: #1F1F1F;        /* Table text */
  --color-text-muted: #6B5E2E;           /* Muted warm brown-yellow */
  --color-text-link: #1A1A1A;            /* Link text color */
  --color-inner-voice: #7A4E00;          /* Warm amber-brown for inner voice */

  /* Accent colors */
  --color-accent-primary: #FFD000;       /* Main accent yellow (underlines, borders, icons) */
  --color-accent-quote: #C9A400;         /* Quote decoration (darker yellow-gold) */

  /* Border colors */
  --color-border-light: #E6D37A;         /* Light yellow-gold borders */
  --color-border-dotted: rgba(122, 78, 0, 0.55); /* Warm dotted separator */
  --color-border-solid: rgba(122, 78, 0, 1);     /* Strong 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: 1rem;
    font-weight: bold;
    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: 0.9rem;
}

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: '*****';
  font-family: "Caveat", serif;
  display: inline-block;
  position: relative;
  background: transparent;
  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 {
  position: relative;
  margin: 30px auto;
  padding: 29px 20px 20px 45px;
  line-height: 30px;
  text-shadow: 0 1px 1px white;
  background-color: var(--color-bg-highlight);
  background-image: radial-gradient(circle at center, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.1) 90%), repeating-linear-gradient(to bottom, transparent 0%, transparent 29px, rgba(0, 0, 0, 0.1) 29px, rgba(0, 0, 0, 0.1) 30px);
  border: 1px solid var(--color-accent-primary);
  border-color: rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.5), inset 0 0 5px rgba(255, 255, 176, 0.8), 0 0 1px rgba(0, 0, 0, 0.1), 0 2px rgba(0, 0, 0, 0.02);
}
blockquote:before, blockquote:after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
}
blockquote:before {
  left: 28px;
  width: 2px;
  border: solid var(--color-accent-primary);
  border-color: rgba(0, 0, 0, 0.2);
  border-width: 0 1px;
}
blockquote:after {
  z-index: -1;
  left: 0;
  right: 0;
  background-color: var(--color-bg-highlight);
  border: 1px solid rgba(0, 0, 0, 0.2);
  transform: rotate(2deg);
}

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;
  padding: 0rem 0.314rem;
  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%;
  }
}