
/* Fancy pull from artwork color variable */
:root {
  color-scheme: light dark;

  --background-color: #ffffff;
  --background-image: url("/assets/white-paper.webp");
  --text-color: #333333;
  --heading-color: #222222;
  --artwork-text-color: #222222;
  --border-color: #f1f1f1;
  --footer-text-color: #666666;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #111111;
    --text-color: #dddddd;
    --heading-color: #ffffff;
    --artwork-text-color: #eeeeee;
    --border-color: #000;
    --footer-text-color: #363636;
  }
}
@font-face {
  font-family: 'uf';           /* reference name */
  src: url('/assets/shemarieland.otf') format('opentype'),
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  scroll-behavior: smooth;
}


body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  max-width: 640px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 2rem;
  padding-top: 0;
  color: var(--text-color);
  background-color: var(--background-color);
  }
body:has(.about-scatter), body:has(.feed) {
  background-image:
    var(--background-image),
    linear-gradient(var(--background-color), var(--background-color));
  background-blend-mode: luminosity, normal;
  background-size: 700px;
}
/*------–---------------------some pages shouldnt have bg image-----------------------------*/
body.tag-ink {
  background: var(--background-color);
}
/*----–-----------tralala-----------------*/
h1,
h2,
h3 {
  color: var(--header-color);
}


header {
/*  border-bottom: 1px solid var(--border-color);*/
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1,
header h1 a {
  flex-shrink: 0;
}

.logo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  visibility: hidden;
}

.logo[src] {
  visibility: visible;
}

body.tag-about .logo {
    border-radius: 0;
    object-fit: contain;
}


@media (prefers-color-scheme: dark) {
  body.tag-about .logo {
    filter: brightness(0) invert(1);
  }
  
  body:has(.about-scatter), body:has(.feed) {
  background-blend-mode: color-burn, normal;                      }
    .details-gallery img,
    .process-gallery img,
    .fullpiece,
    #lightbox .lightbox-content img {
      background: #f5f0e5;
    }
}

a {
  color: var(--artwork-text-color);
}

nav a {
  margin: 0 1rem;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  }

  
/* custom font places */
/* the labels between arrows when a piece is in two or more collections */
body.tag-sk:not(.tag-ink) :is(header nav a, .work-navigation .nav-label) {
  font-family: 'uf';
  text-transform: lowercase;
}

/* above, but also the main navigation */
body.tag-sk:not(.tag-ink) header nav a,
body.tag-sk:not(.tag-ink) .work-navigation .nav-label {
  font-size: 1.65rem;
  line-height: 1;
}

/*--------------------*/



h1 a {
  text-decoration: none;
}

nav a:hover {
  text-decoration: underline;
}

main {
  min-height: 50vh;
}

img {
  max-width: 100%;
 /* height: auto;*/
  display: block;
  margin: 1.5rem 0;
}

img.fullpiece, #featured img
{
  margin: 0.5em auto;
  margin-top: 0px !important;
  max-height: 80vh;
}

img.fullpiece + p, #featured img + p, .caption
{text-align: center;}

body.tag-goodnight * img.fullpiece + p, 
body.tag-goodnight * #featured img + p, 
body.tag-goodnight * .caption {
	display: none;
}


footer {
  text-align: right;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--footer-text-color);
}
footer a {color: oklch(
  from var(--artwork-text-color)
  calc(l * 0.80)
  calc(c * 1.2)
  h
);
text-decoration: none;
}

@media (prefers-color-scheme: dark) {
  footer a {
    color: oklch(
      from var(--artwork-text-color)
      calc(l * 0.8)
      calc(c * 0.7)
      h
    );
	  }
   footer a.secret {                                                                                                   
  color: color-mix(                                                                                                 
    in srgb,                                                                                                        
    var(--artwork-text-color, #000) 10%,                                                                            
    var(--footer-text-color, #fff)                                                                                  
    );                                                                                                              
  }                                                                                                                 
        
}

footer a.secret {
  color: color-mix(
    in srgb,
    var(--artwork-text-color, #000) 10%,
    var(--footer-text-color, #fff)
    );
  }


/* Gallery grid view */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

@media (min-width: 430px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  /*  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); */
  }
}

.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  margin: 0;
  padding: 0;
  display: block;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
  display: block;
  margin: 0;
  padding: 0;
}

.gallery-item:hover {
  z-index: 1;
}

.gallery-item:hover img {
  transform: scale(1.04);
}




/* Boundary between the initially-visible items and the revealed ones.
   Spans every column so it always forces a new row, at any breakpoint.
   Two variants exist (mobile / desktop) because the cutoff differs:
   mobile shows 8 before the break, desktop shows 9. */
.homegallery-break {
  display: none;
  grid-column: 1 / -1;
  height: 0.2rem;
}

.homegallery-piece-hidden {
  display: none;
}

#all-work:target .homegallery-piece-hidden { display: block; }
#all-work:target .homegallery-break-desktop { display: block; }

@media (max-width: 375px) {
  #all-work:target .homegallery-break-desktop { display: none; }
  #all-work:target .homegallery-break-mobile { display: block; }

  .homegallery-piece-mobile { display: none; }
  #all-work:target .homegallery-piece-mobile { display: block; }
}



.lilgallery {                                             
  display: grid;  
  grid-template-columns: repeat(auto-fill, minmax(min(45%, 150px), 1fr));                                        
  gap: 0px;                                                 

  /*
  max-width: 90%;
  margin: 0 auto;
  */                                        

  width: 100%;
  margin-inline: 0;

  /*
  rounded corners on lilgalleries
  background: color-mix(in srgb, var(--artwork-text-color) 20%, var(--background-color));
    border-radius: 12px;
    overflow: hidden;
  */
}

.lilgallery > .gallery-item:only-child {
  grid-column: 1 / -1;
  width: min(45%, 150px);
  justify-self: center;
}


/* align text and lilgalleries */

main:has(.lilgallery) > p,
main:has(.lilgallery) > small.label,
main:has(.lilgallery) > .lilgallery,
main:has(.lilgallery) > section {
  padding-inline: 5%;
}

/*
.lilgallery-bg {
  position: relative;
}

.lilgallery-bg::before {
  content: "";
  position: absolute;
  top: -2.4em;
  left: 50%;
  transform: translateX(-50%);
  width: 200vw;
  height: 200vh;
  background: color-mix(in srgb, var(--artwork-text-color) 100%, var(--background-color));
  z-index: -1;
  pointer-events: none;
}
*/

/* .lilgallery .gallery-item img {
  border-radius: 12px;
} */

/*the small text above lilgalleries*/                         
.label {
	display: block;
	text-align: center;
}



/* ▫️▫️▫️▫️▫️▫️ Lightbox ▫️▫️▫️▫️▫️▫️▫️▫️▫️▫️▫️▫️*/

#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;

  overflow-y: auto;
  overflow-x: hidden;

  align-items: flex-start;
  justify-content: center;

  padding: 2rem 3rem;

  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

#lightbox::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  background: color-mix(
    in srgb,
    var(--background-color) 50%,
    transparent
  );

  backdrop-filter: blur(60px);
  -webkit-backdrop-filter: blur(60px);
}

@media (max-width: 375px) {
  #lightbox {
  	padding: 0 !important;
  }
}

.lightbox-content {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: calc(100vh - 4rem);
  min-height: calc(100dvh - 4rem);

  padding-block: 0;
}

.lightbox-content img {
  display: block;
  width: auto;
  max-width: min(100%, 1500px);
  height: auto;
  max-height: none;
  object-fit: contain;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  z-index: 10000;

  color: var(--artwork-text-color);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;

  background: none;
  border: 0;
  padding: 0;
}

@media (max-width: 375px) {
  /*.lightbox-close,*/
  .lightbox-prev,
  .lightbox-next {
    display: none !important;
  }
}

.lightbox-close {
  top: 1rem;
  right: 1.25rem;
}

.lightbox-prev {
  top: 50%;
  left: 1.25rem;
  transform: translateY(-50%);
}

.lightbox-next {
  top: 50%;
  right: 1.25rem;
  transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--heading-color);
}

.lightbox-prev,
.lightbox-next {
  display: none;
  /* revert any padding/min-width/min-height you added */
}

.lightbox-prev::before,
.lightbox-next::before {
  content: "";
  position: absolute;
  inset: -204px -40px;
}

#lightbox.has-navigation .lightbox-prev,
#lightbox.has-navigation .lightbox-next {
  display: block;
}


@media (min-width: 375px) {
  #lightbox .lightbox-content img[src*="/details/"],
  #lightbox .lightbox-content img[src*="/process/"] {
    max-height: calc(100dvh - 4rem);
  }
}

.lightbox-content video {
  display: none;
  width: auto;
  max-width: min(100%, 1500px);
  max-height: calc(100dvh - 4rem);
  object-fit: contain;
  background: #000;
  touch-action: pan-y;
}

.gallery-item video {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #000;
}

.gallery-item.has-video {
  position: relative;
}

.gallery-item.has-video::after {
  content: "▶";
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
  background: rgba(0, 0, 0, 0.55);
  border-radius: 99%;
  pointer-events: none;
  padding-left: 1px;
  padding-bottom: 1px;
  z-index: 2;
}

.lightbox-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
  max-width: 100%;
}

#lightbox-counter {
  margin-top: 1em;
  padding: 4px 10px;
  background: rgb(from var(--text-color) r g b / 0.4);
  color: var(--background-color);
  font-size: 12px;
  font-weight: bold;
  line-height: 1;
  border-radius: 2px;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

#lightbox-counter {
  display: none;
}

#lightbox.has-navigation #lightbox-counter {
  display: inline-block;
}

/*---------------------------the nav buttons on art pages-------------------*/

/* old
.work-navigation {
  display: flex;
  justify-content: flex-end;
  margin-top: 3rem;
}

.work-navigation .previous {
  margin-right: auto;
}

*/

/* Navigation between pieces within a collection */

.work-navigation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  max-width: 80%;
  margin: 0 auto;
  margin-top: 1rem;
}

.work-navigation .previous {
  grid-column: 1;
  justify-self: start;
  font-size: 1.5rem;
  line-height: 1;
  text-decoration: none;
}

.work-navigation .next {
  grid-column: 3;
  justify-self: end;
  font-size: 1.5rem;
  line-height: 1;
  text-decoration: none;
}

.work-navigation .nav-label {
  grid-column: 2;
  text-align: center;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  line-height: 1;
  color: var(--footer-text-color);
}

.work-navigation .nav-label, nav a {
  text-transform: lowercase;
}

.work-navigation a:hover {
  color: var(--heading-color);
}

/* --------chat bubblez---------------------------*/


.chat-bubble {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin: 0;
  margin-bottom: 2px;
}

.chat-body {
  background: oklch(from var(--artwork-text-color)
    calc(l * 0.90)
    calc(c * 0.5)
    h
  );
  border-radius: 20px;
  padding: 0.5rem 0.9rem;
  max-width: 70%;
  color: #fff;
}

.chat-body a {
  color: oklch(from var(--artwork-text-color) 1.5 0.2 calc(h - 70));
  text-decoration: none;
  font-weight: 500;
}

@media (prefers-color-scheme: dark) {
  .chat-body {
      background: oklch(from var(--artwork-text-color)                                                    
    calc(l * 0.41)                                                                                    
    calc(c * 1)                                                                                              
    calc(h - 5)                                                            
  ); 
  }
}

.chat-body a:hover {
    text-decoration:underline;
}

.chat-body p:first-child { margin-top: 0; }
.chat-body p:last-child  { margin-bottom: 0; }


.chat-group {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  max-width: 70%;
}

.chat-messages .chat-body {
  max-width: 100%;
}

/* this is def the best place for this */
img.fullpiece,
.details-gallery img,
.process-gallery img,
html.view-feed img[data-alt-src].feed-solo {
  cursor: zoom-in;
}