/* src/styles.css */
:root {
  --buncss-light: initial;
  --buncss-dark: ;
  color-scheme: light;
  --paper: #fefded;
  --mint: #c6ebc5;
  --sage: #a1c398;
  --coral: #fa7070;
  --coral-link: #c0392b;
  --ink: #26332a;
  --ink-soft: #26332abf;
  --ink-faint: #26332aad;
  --rule: #26332a24;
  --rule-soft: #26332a12;
  --mint-tint: #c6ebc566;
  --sage-tint: #a1c39838;
  --marker-bg: #c6ebc5;
  --marker-ink: #22301f;
  --code-bg: #26332a;
  --code-fg: #fefded;
  --font-serif: "Fraunces Variable", Georgia, "Times New Roman", serif;
  --font-mono: "DM Mono", ui-monospace, "SFMono-Regular", monospace;
  --fx-display: "opsz" 144, "SOFT" 60, "WONK" 1;
  --fx-text: "opsz" 20, "SOFT" 0, "WONK" 0;
  --radius-card: 14px;
  --page: 72rem;
  --measure: 42rem;
  --gutter: clamp(1rem, 4vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --buncss-light: ;
    --buncss-dark: initial;
    color-scheme: dark;
    --paper: #1b211c;
    --ink: #e8ece0;
    --ink-soft: #e8ece0a8;
    --ink-faint: #e8ece08a;
    --rule: #e8ece029;
    --rule-soft: #e8ece014;
    --coral-link: #ff8a7a;
    --mint-tint: #c6ebc51a;
    --sage-tint: #a1c39824;
    --marker-bg: #3a5c40;
    --code-bg: #12160f;
    --code-fg: #e8ece0;
  }
}

:root[data-theme="dark"] {
  --buncss-light: ;
  --buncss-dark: initial;
  color-scheme: dark;
  --paper: #1b211c;
  --ink: #e8ece0;
  --ink-soft: #e8ece0a8;
  --ink-faint: #e8ece08a;
  --rule: #e8ece029;
  --rule-soft: #e8ece014;
  --coral-link: #ff8a7a;
  --mint-tint: #c6ebc51a;
  --sage-tint: #a1c39824;
  --marker-bg: #3a5c40;
  --code-bg: #12160f;
  --code-fg: #e8ece0;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-variation-settings: var(--fx-text);
  margin: 0;
  line-height: 1.6;
}

.site-nav {
  display: flex;
  max-width: var(--page);
  padding: 1.5rem var(--gutter);
  border-bottom: 1.5px solid var(--ink);
  flex-wrap: wrap;
  justify-content: space-between;
  align-items:  center;
  gap: 1rem 1.5rem;
  margin: 0 auto;
}

.site-nav__wordmark {
  display: inline-flex;
  font-family: var(--font-serif);
  font-variation-settings: var(--fx-display);
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
  align-items:  center;
  gap: .45rem;
  font-size: 1.5rem;
  font-weight: 560;
}

.site-nav__word {
  display: inline-block;
  transform: translateY(-1.75px);
}

.site-nav__wordmark .spoon {
  --disc-nudge: .5px;
  --spoon-cream: #fefded;
  color: var(--coral);
  transform: translateY(var(--disc-nudge));
  transform-origin: 50% 50%;
  flex: none;
  transition: transform .4s;
}

.site-nav__wordmark:hover .spoon {
  transform: translateY(var(--disc-nudge)) rotate(14deg);
}

.site-nav__wordmark .spoons {
  background-image: linear-gradient(var(--marker-bg), var(--marker-bg));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% .42em;
}

.site-nav__links {
  display: flex;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  align-items:  center;
  gap: 1.2rem;
  font-size: .72rem;
}

.site-nav__links a, .site-main a {
  text-decoration: none;
  background-image: linear-gradient(var(--coral), var(--coral));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 2px;
  transition: background-size .25s, color .2s;
}

.site-nav__links a {
  color: var(--ink-soft);
  padding-bottom: 2px;
  transform: translateY(2.75px);
}

.site-nav__links a:hover {
  color: var(--coral-link);
  background-size: 100% 2px;
}

.site-nav__links a:focus-visible {
  color: var(--coral-link);
  background-size: 100% 2px;
}

.theme-toggle {
  --icon-drop: 1.5px;
  display: inline-flex;
  color: var(--ink-soft);
  cursor: pointer;
  background: none;
  border: 0;
  justify-content: center;
  align-items:  center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  transition: color .2s, transform .3s;
}

.theme-toggle:hover {
  color: var(--coral);
  transform: rotate(18deg);
}

.theme-toggle:focus-visible {
  color: var(--coral);
  transform: rotate(18deg);
}

.theme-toggle svg {
  display: block;
  transform: translateY(calc(.5px + var(--icon-drop)));
  width: 1rem;
  height: 1rem;
}

.theme-toggle .icon-moon {
  transform: translateY(calc(.9px + var(--icon-drop)));
}

.theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: block;
  }

  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: none;
  }
}

.site-main {
  max-width: var(--page);
  padding: 2.5rem var(--gutter) 3rem;
  margin: 0 auto;
}

.site-main > :-webkit-any(h1, h2, h3, h4, p, ul, ol, blockquote, pre, hr) {
  max-width: var(--measure);
  margin-inline-start: auto;
  margin-inline-end: auto;
}

.site-main > :-moz-any(h1, h2, h3, h4, p, ul, ol, blockquote, pre, hr) {
  max-width: var(--measure);
  margin-inline-start: auto;
  margin-inline-end: auto;
}

.site-main > :is(h1, h2, h3, h4, p, ul, ol, blockquote, pre, hr) {
  max-width: var(--measure);
  margin-inline-start: auto;
  margin-inline-end: auto;
}

.site-main > :-webkit-any(h1, h2, h3) {
  font-family: var(--font-serif);
  font-variation-settings: var(--fx-display);
  color: var(--ink);
  font-weight: 560;
  line-height: 1.15;
}

.site-main > :-moz-any(h1, h2, h3) {
  font-family: var(--font-serif);
  font-variation-settings: var(--fx-display);
  color: var(--ink);
  font-weight: 560;
  line-height: 1.15;
}

.site-main > :is(h1, h2, h3) {
  font-family: var(--font-serif);
  font-variation-settings: var(--fx-display);
  color: var(--ink);
  font-weight: 560;
  line-height: 1.15;
}

.post__body > :-webkit-any(h1, h2, h3) {
  font-family: var(--font-serif);
  font-variation-settings: var(--fx-display);
  color: var(--ink);
  font-weight: 560;
  line-height: 1.15;
}

.post__body > :-moz-any(h1, h2, h3) {
  font-family: var(--font-serif);
  font-variation-settings: var(--fx-display);
  color: var(--ink);
  font-weight: 560;
  line-height: 1.15;
}

.post__body > :is(h1, h2, h3) {
  font-family: var(--font-serif);
  font-variation-settings: var(--fx-display);
  color: var(--ink);
  font-weight: 560;
  line-height: 1.15;
}

.site-main > h1, .post__body > h1 {
  letter-spacing: -.02em;
  margin-block-start: 0;
  margin-block-end: .4rem;
  font-size: 2.3rem;
}

.site-main > h2, .post__body > h2 {
  margin-block-start: 2rem;
  margin-block-end: .6rem;
  font-size: 1.55rem;
  font-style: italic;
}

.site-main > h3, .post__body > h3 {
  margin-block-start: 1.5rem;
  margin-block-end: .5rem;
  font-size: 1.22rem;
  font-style: italic;
}

.site-main > p, .post__body > p {
  font-family: var(--font-serif);
  font-variation-settings: var(--fx-text);
  margin-block-start: 0;
  margin-block-end: 1.1rem;
  font-size: 1.1rem;
}

.site-main a {
  color: var(--coral-link);
}

.site-main a:hover {
  background-size: 100% 2px;
}

.site-main a:focus-visible {
  background-size: 100% 2px;
}

.site-main > :-webkit-any(ul, ol) {
  font-family: var(--font-serif);
  padding-left: 1.3rem;
}

.site-main > :-moz-any(ul, ol) {
  font-family: var(--font-serif);
  padding-left: 1.3rem;
}

.site-main > :is(ul, ol) {
  font-family: var(--font-serif);
  padding-left: 1.3rem;
}

.site-main > :-webkit-any(ul, ol) :-webkit-any(ul, ol) {
  font-family: var(--font-serif);
  padding-left: 1.3rem;
}

.site-main > :-moz-any(ul, ol) :-moz-any(ul, ol) {
  font-family: var(--font-serif);
  padding-left: 1.3rem;
}

.site-main > :is(ul, ol) :is(ul, ol) {
  font-family: var(--font-serif);
  padding-left: 1.3rem;
}

.post__body > :-webkit-any(ul, ol) {
  font-family: var(--font-serif);
  padding-left: 1.3rem;
}

.post__body > :-moz-any(ul, ol) {
  font-family: var(--font-serif);
  padding-left: 1.3rem;
}

.post__body > :is(ul, ol) {
  font-family: var(--font-serif);
  padding-left: 1.3rem;
}

.post__body > :-webkit-any(ul, ol) :-webkit-any(ul, ol) {
  font-family: var(--font-serif);
  padding-left: 1.3rem;
}

.post__body > :-moz-any(ul, ol) :-moz-any(ul, ol) {
  font-family: var(--font-serif);
  padding-left: 1.3rem;
}

.post__body > :is(ul, ol) :is(ul, ol) {
  font-family: var(--font-serif);
  padding-left: 1.3rem;
}

.site-main li {
  margin: .3rem 0;
}

.site-main > ul > li::marker {
  content: "◆ ";
  color: var(--coral);
  font-size: .72em;
}

.site-main > ul ul > li::marker {
  content: "◆ ";
  color: var(--coral);
  font-size: .72em;
}

.post__body > ul > li::marker {
  content: "◆ ";
  color: var(--coral);
  font-size: .72em;
}

.post__body > ul ul > li::marker {
  content: "◆ ";
  color: var(--coral);
  font-size: .72em;
}

.site-main > blockquote, .post__body > blockquote {
  border-left: 3px solid var(--coral);
  background: var(--mint-tint);
  color: var(--ink-soft);
  border-radius: 0 8px 8px 0;
  padding: .7rem 1rem .7rem 1.1rem;
  font-style: italic;
}

.site-main code {
  font-family: var(--font-mono);
  background: var(--sage-tint);
  border-radius: 4px;
  padding: .1rem .3rem;
  font-size: .85em;
}

.site-main > pre, .post__body > pre {
  background: var(--code-bg);
  color: var(--code-fg);
  overflow-x: auto;
  border-radius: 10px;
  padding: 1rem 1.2rem;
}

.site-main pre code {
  color: inherit;
  background: none;
  padding: 0;
}

.site-main > hr, .post__body > hr {
  border: 0;
  border-top: 2px dashed var(--sage);
  margin-block-start: 2rem;
  margin-block-end: 2rem;
}

.post__body > :-webkit-any(h1, h2, h3, h4, p, ul, ol, blockquote, pre, hr) {
  max-width: 100%;
  margin-inline-start: 0;
  margin-inline-end: 0;
}

.post__body > :-moz-any(h1, h2, h3, h4, p, ul, ol, blockquote, pre, hr) {
  max-width: 100%;
  margin-inline-start: 0;
  margin-inline-end: 0;
}

.post__body > :is(h1, h2, h3, h4, p, ul, ol, blockquote, pre, hr) {
  max-width: 100%;
  margin-inline-start: 0;
  margin-inline-end: 0;
}

.site-main > p > img, .post__body > p > img {
  display: block;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-card);
  max-width: min(300px, 100%);
  height: auto;
  margin: .5rem 0 1.5rem;
}

.post--side-image {
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) minmax(14rem, 26rem);
  justify-content: center;
  align-items:  start;
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

.post--side-image .post__body {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.post--side-image .post__side {
  grid-column: 2;
  grid-row: 1;
  align-self:  center;
  margin: 0;
}

.post--side-image[data-side="left"] {
  grid-template-columns: minmax(14rem, 26rem) minmax(0, var(--measure));
}

.post--side-image[data-side="left"] .post__body {
  grid-column: 2;
}

.post--side-image[data-side="left"] .post__side {
  grid-column: 1;
}

.post__side {
  position: relative;
}

.post__side:before {
  content: "";
  position: absolute;
  background: var(--sage);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-card);
  z-index: 0;
  inset: .6rem -.6rem -.6rem .6rem;
}

.post__side img {
  position: relative;
  z-index: 1;
  display: block;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-card);
  width: 100%;
  height: auto;
  transition: transform .3s;
  transform: rotate(-2deg);
}

.post__side:hover img {
  transform: rotate(0);
}

@media (max-width: 48rem) {
  .post--side-image, .post--side-image[data-side="left"] {
    display: block;
  }

  .post--side-image .post__body {
    max-width: var(--measure);
  }

  .post--side-image .post__side {
    max-width: min(240px, 100%);
    margin: 0 0 1.5rem;
  }
}

.post-list__title:first-letter, .post-list__summary:first-letter {
  text-transform: uppercase;
}

.site-main > :-webkit-any(h1, h2, h3):first-letter {
  text-transform: uppercase;
}

.site-main > :-moz-any(h1, h2, h3):first-letter {
  text-transform: uppercase;
}

.site-main > :is(h1, h2, h3):first-letter {
  text-transform: uppercase;
}

.post__body > :-webkit-any(h1, h2, h3):first-letter {
  text-transform: uppercase;
}

.post__body > :-moz-any(h1, h2, h3):first-letter {
  text-transform: uppercase;
}

.post__body > :is(h1, h2, h3):first-letter {
  text-transform: uppercase;
}

.site-footer {
  max-width: var(--page);
  padding: 1.5rem var(--gutter);
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-faint);
  margin: 0 auto;
  font-size: .68rem;
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from {
      transform: translateY(10px);
    }

    to {
      transform: none;
    }
  }
}
