/* suCSS THEME */

@import url("/giallo-dark.css") (prefers-color-scheme: dark);
@import url("/giallo-light.css") (prefers-color-scheme: light);

:root,
::backdrop {
  /* set sans-serif & mono fonts */
  --sans-font: -apple-system, BlinkMacSystemFont, "Avenir Next", Avenir,
    "Nimbus Sans L", Roboto, "Noto Sans", "Segoe UI", Arial, Helvetica,
    "Helvetica Neue", sans-serif;
  --mono-font: Consolas, Menlo, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
  --standard-border-radius: 5px;

  /* default colors */
  --bg: #EEEEEE;
  --bg-light: #CBCDCD;
  --text: #222529;
  --text-light: #4e5151;
  --accent: #d6007d;
  --accent-light: #ff48b3;
  --accent-text: var(--bg);
  --border: #646868;
  --link: var(--accent);
  --link-visited: #b900d6;
}

/* theme media queries */
@media (prefers-color-scheme: dark) {
  :root,
  ::backdrop {
    color-scheme: dark;
    --bg: #222529;
    --bg-light: #464949;
    --text: #D6D6D6;
    --text-light: var(--text);
    --accent: #d6007d;
    --accent-light: #ff48b3;
    --accent-text: var(--bg);
    --border: #DBD5BC;
    --link: var(--accent);
    --link-visited: #b900d6;
  }
  img,
  video {
    opacity: 0.8;
  }
}

@media (prefers-color-scheme: light) {
  :root,
  ::backdrop {
    color-scheme: light;
    --bg: #EEEEEE;
    --bg-light: #CBCDCD;
    --text: #222529;
    --text-light: #4e5151;
    --accent: #d6007d;
    --accent-light: #ff48b3;
    --accent-text: var(--bg);
    --border: #646868;
    --link: var(--accent);
    --link-visited: #b900d6;
  }
}

[data-theme="light"]{
  /* default (light) theme */
  color-scheme: light;
  --bg: #EEEEEE;
  --bg-light: #CBCDCD;
  --text: #222529;
  --text-light: #4e5151;
  --accent: #d6007d;
  --accent-light: #ff48b3;
  --accent-text: var(--bg);
  --border: #646868;
  --link: var(--accent);
  --link-visited: #b900d6;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #222529;
  --bg-light: #464949;
  --text: #D6D6D6;
  --text-light: var(--text);
  --accent: #d6007d;
  --accent-light: #ff48b3;
  --accent-text: var(--bg);
  --border: #DBD5BC;
  --link: var(--accent);
  --link-visited: #b900d6;
}




/* GENERAL */

html {
  color-scheme: light dark;
  font-family: var(--sans-font);
  scroll-behavior: smooth;
  font-size: 20px;
}

body{
  padding: 10px 15px;
  line-height: 1.5;
}

@media (min-width: 600px) {
  body{
    padding: 10px;    
  }
}


/* HEADERS */

h1, h2,
h3, h4,
h5, h6 {
  font-family: var(--mono-font);
}

h1::before, h2::before,
h3::before, h4::before,
h5::before, h6::before {
  color: none;
  content: none;
}


h1 {
  font-size: 2.25rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.75rem;
}
h4 {
  font-size: 1.5rem;
}
h5 {
  font-size: 1.25rem;
}
h6 {
  font-size: 1rem;
}


@media only screen and (max-width: 720px) {
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.75rem;
  }
  h3 {
    font-size: 1.5rem;
  }
  h4 {
    font-size: 1.25rem;
  }
  h5 {
    font-size: 1rem;
  }
  h6 {
    font-size: 1rem;
  }
}

/* FOOTER */
footer{
  text-align: center;
}

/* LINKS */

a{
  text-decoration: underline;
  color: var(--link);
}

a:hover, a:active{
  text-decoration: none;
  background-color: unset;
  color: var(--link);
}

a:visited{
  color: var(--link-visited);
}


/* LISTS */

ul li::marker {
  content: '- ';
  color: var(--accent);
}

ul li:hover::marker {
  content: '» ';
  font-weight: 700;
  color: var(--link);
}

/* CODE */

kbd{
  padding: 0 .125rem 0 .125rem;
  border-radius: 3px;
  color: var(--bg);
  background-color: var(--text);
}

pre {
  margin: 1rem 0;
}

/* MISC */

blockquote {
  margin-left: 0;
  /* margin-trim: block; */
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-color: var(--accent);
}

blockquote > p:first-of-type{
  margin-top: 0;
}

blockquote > p:last-of-type{
  margin-bottom: 0;
}

time{
  /* background-color: var(--b-focus); */
  border: 0.1rem dotted;
  border-color: var(--accent);
  border-radius: 10rem;
  padding: 0 0.5rem;
  margin: 0 0 0 0.5rem;
}

/* CUSTOM CLASSES */

/* ZOLA SYNTAX HIGHLIGHTING */

.giallo-l {
    display: inline-block;
    min-height: 1lh;
    width: 100%;
}
.giallo-ln {
    display: inline-block;
    user-select: none;
    margin-right: 0.4em;
    padding: 0.4em;
    min-width: 3ch;
    text-align: right;
    opacity: 0.8;
}

/* UTILITY */

/* Screen reader only */
.sr-only {
	border: 0 !important;
	clip: rect(1px, 1px, 1px, 1px) !important;
	-webkit-clip-path: inset(50%) !important;
	clip-path: inset(50%) !important;
	height: 1px !important;
	overflow: hidden !important;
	margin: -1px !important;
	padding: 0 !important;
	position: absolute !important;
	width: 1px !important;
	white-space: nowrap !important;
}

/* Screen reader only - focusable (skip link) */
.sr-only-focusable{
  border: 0 !important;
	clip: rect(1px, 1px, 1px, 1px) !important;
	-webkit-clip-path: inset(50%) !important;
	clip-path: inset(50%) !important;
	height: 1px !important;
	overflow: hidden !important;
	margin: -1px !important;
	padding: 0 !important;
	position: absolute !important;
	width: 1px !important;
	white-space: nowrap !important;
}

.sr-only-focusable:focus,
.sr-only-focusable:active {
	clip: auto !important;
	-webkit-clip-path: none !important;
	clip-path: none !important;
	height: auto !important;
	overflow: visible !important;
	width: auto !important;
	white-space: normal !important;
  background-color: var(--bg);
}

/* MENU */

.menu-main{
  padding: 0.625rem 0 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono-font);
  font-size: 1.25rem;
}

.menu-site {
  padding: 0 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-end;
  align-items: center;
}

.menu-site ul{
  list-style: none;
  padding: 0 0;
  margin-top: 0;
}

@media only screen and (max-width: 720px) {
  .menu-main{
    font-size: 1.25rem;
  }
}

/* ZOLA ANCHOR */

a.zola-anchor{
  margin-left: -1em;
  margin-right: 0;
  text-decoration: none;
  position: absolute;
}

a.zola-anchor:hover, a.zola-anchor:active{
  text-decoration: underline;
}

a.zola-anchor:visited{
  color: var(--link);
}


@media only screen and (max-width: 720px) {
  a.zola-anchor{
    margin-left: -0.75em;
    /* margin-right: 0;
    text-decoration: none;
    position: absolute; */
  }
}

/* TOC */

.details-toc > details{
  background-color: var(--bg);
  padding: .50rem;
  border: dashed 2px var(--accent);
  border-radius: 15px;
}

/* THEME SELECT */

label.theme-select{
  display: inline;
}

select#theme-select{
  border-style: none;
  padding: 0;
}

select#theme-select:hover{
  cursor: pointer;
}

.theme-select{
  width: auto;
}

