* { margin: 0; padding: 0; box-sizing: border-box;
  
  --textcolor: #fafbf6;
  --bgcolor: #0f0f1b;
  --highlight: #c6b7be;
  --pre: #565a75 ;

}

@media (prefers-color-scheme: dark) {
  * {

    --textcolor:#d1cb95 ;
    --bgcolor:  #0a1a2f  ;
    --highlight:  #40985e  ;
    --pre: #1a644e ;
    
  }
}

@font-face {
  font-family: 'CommitMono-400-Regular';
  src: url('CommitMono-400-Regular.otf');
}
@font-face {
  font-family: 'DepartureMonoNerdFont-Regular';
  src: url('DepartureMonoNerdFont-Regular.otf');
}

body {
  font-size: 14px;
  font-family: 'CommitMono-400-Regular', sans-serif;
  line-height: 1.6;
  color: var(--textcolor);
  background-color: var(--bgcolor);
  position: relative;
  max-width: 45em;  /* remove this for a full-width layout */
  margin: 0 auto;  /* centers the layout */
}

/* ------- Sections ------- */

section {
  padding: calc(6em + 5vw) 5vw 8vw 5vw;
  /* ! Everything below is needed ! */
  display: none;
  position: absolute;
  top: 0;
  min-height: 100vh;
  width: 100%;
  background-color: var(--bgcolor);
}

section:target { /* Show section */
  display: block;
}

section#home { /* Show #home by default */
  display: block;
}

/* ------- Header ------- */

header {
  padding: 5vw 5vw 0 5vw;
  display: flex;
  flex-wrap: wrap;
  font-family: 'DepartureMonoNerdFont-Regular';
  position: absolute;
  width: 100%;
  z-index: 2;
}

header h1 {
  font-size: 1em;
  flex: 1; /* pushes nav to the right */
  white-space: nowrap;
  padding: 0 5vw .5em 0;
}

nav a:not(:last-of-type) {
  margin-right: 1.5vw;
}

/* ------- General ------- */

a {
  text-decoration: none;
  color: var(--highlight);
}

a:hover {
  border-bottom: 1px solid;
}

section h1 {
  font-size: 1em;
  margin: 0 0 1em 0;
}

h2, h3, h4 {
  font-family: 'CommitMono-400-Regular';
  font-size: 1em;
  font-weight: 600;
  margin: 1.6em 0 .6em 0;
}

p, ul, ol, article {
  max-width: 60ch; /* Limit line-length to 60 characters */
  margin-bottom: .6em;
}

ul {
  list-style-type: none;
}

ul li::marker {
  content: "\2022   ";
}

li {
  margin-bottom: .2em;
}

ul, ol {
  padding-left: 2ch;
}

b, strong {
  font-weight: 600;
}

small {
  font-size: .85em;
}

hr {
  height: 1px;
  border: 0;
  background: currentColor;
  opacity: .1;
  margin: 1.2em 0;
}

abbr {
  text-decoration: none;
}

abbr[title]:hover {
  opacity: .7;
  cursor: help;
}

blockquote {
  padding-left: 2ch;
  opacity: .7;
  margin-bottom: .6em;
  position: relative;
}

blockquote:before {
  content: "";
  position:absolute;
  left: 0;
  top: .3em;
  bottom: .3em;
  background: currentColor;
  width: 1px;
  opacity: .2;
}

img, svg, video, audio {
  display: block;
  max-width: 100%;
  height: auto;
  fill: currentColor;
}
  
code, textarea {
  font-family: 'DepartureMonoNerdFont-Regular' , ui-monospace, SF Mono, Menlo, Monaco, Andale Mono, monospace;
  font-size: .5em;
  opacity: .7;
}

a code {
  opacity:1;
}

 textarea { /* for code samples */
  font-size: .9em;
  color: inherit;
  line-height:inherit;
  padding:.6em .9em;
  margin: .8em 0 1em 0;
  position: relative;
  display: block;
  width: 100%;
  white-space: pre;
  border:0;
  border-radius: 4px;
  background:rgba(255,255,100,.075);
  box-shadow: inset 1px 1px 0 rgba(0,0,0,.2), inset -1px -1px 0 rgba(0,0,0,.04) ;
}

.ascii {
  font-size: 0.9vw;
  line-height: .87vh;
  letter-spacing: .05vw;
  display: inline-block;
  left: -15px;
  position: fixed;
  color:var(--pre);
}

/* Inline footnotes */

label {
  cursor: pointer;
  vertical-align: super;
  line-height: 1;
  font-size: .75em;
  padding-left: .1em;
}

label:hover {
  color: var(--highlight);
}

label:before {content:"[";}
label:after {content:"]";}

label + input,
label + input + small {
  display: none;
}

input:checked + small {
  display: block;
  padding: .8em 0 1em 2.5vw;;
}

/* Figures */

figure {
  margin: 2em 0 1.5em 0;
}

figure figcaption, figcaption {
  margin: 0.8em 0 0 0;
  font-family: 'DepartureMonoNerdFont-Regular';
  font-size: 12px;
  opacity: .7;
}



/* File links */

a:before { 
  font-size: .7em;
  margin-right: .4em;
}

.card, .box .card {
    border-image:  url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAgElEQVQ4T2NkQAI5NZH/p7QsZ0QWI4aNrg9sAEwQnSZkIC59cFeBFMAMweZaXL7Apo8RWRDdZTDDsWnEp482LqVpmCIbTiiC0OWxxj6phhBST3KaJGQgSB7FUKomflh44kunuFyINZ3SLJsSE06kqBliETVaSoELaqqVp0OmlAIAfVbclkpkUXIAAAAASUVORK5CYII=') 7 /  7px / 0 round;
    border-width:  7px;
    border-style:  solid; 
    display: inline-block;
    font-family: 'DepartureMonoNerdFont-Regular';
    font-size: 14px;
    padding: 1em;
    text-align: center;
}
.card:hover {
  border-bottom: solid 7px;
  color:var(--textcolor);
}
.box {
  display: grid;
  align-items: start;
  grid-gap: 1em;
  grid-row: none;
  padding: 1em;
}

.oculto {
  cursor: help;
}
.oculto:hover::before {
  background-color:var(--pre);
  border-radius:4px;
  content: attr(tooltip);
  color:var(--textcolor);
  font-family: 'CommitMono-400-Regular';
  font-size: 12px;
  padding:6px 10px;
  position: absolute;
  transform: translate(calc(-20% + 10px), 100%);
  white-space: nowrap;
}

/* Add more filetypes here if you want */

a[href$=".pdf"]:before { content: "PDF"; }
a[href$=".txt"]:before { content: "TXT"; }
a[href$=".mp3"]:before { content: "MP3"; }
a[href$=".zip"]:before { content: "ZIP"; }
a[href$=".rar"]:before { content: "RAR"; }
a[href$=".jpeg"]:before,
a[href$=".jpg"]:before,
a[href$=".gif"]:before,
a[href$=".png"]:before { content: "IMG"; }

/* ------- News ------- */

article + article {
  margin-top: 4.5em;
}

article h2 {
  font-weight: 700;
  margin: 0 0 1em 0;
}

article time {
  margin-left: .6em;
  font-size: .8em;
  font-weight: 400;
  opacity: .7;
}

/* ------- Images Grid ------- */

.grid {
  display: grid;
  grid-gap: 5vmin;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* 150px = minimum image size */
  grid-auto-flow: dense;
  padding: 2em 0;
}

.grid a {
  position: relative;
  border: 0;
}

.grid a:hover {
  transform: scale(.975);
}

/* For a square ratio */
.grid a:before {
  content: "";
  display: block;
  padding-top: 100%;
}

.grid a img {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}


/* ------- Smaller screens ------- */

@media only screen and (max-width: 680px) {
  body { font-size: 14px; }
}

@media only screen and (max-width: 540px) {
  nav { width: 100%; } /* Fix for older webkit versions */
}

/* ------- Print ------- */

@media print {
  
  nav, .lightbox:target:after { display: none; }
  
  article, figure, img {
    page-break-inside: avoid;
    break-inside: avoid;
  }
  
  /* Inline footnotes */
  
  label + input + small { display: inline; }
  label + input + small:before { content: "["; }
  label + input + small:after { content: "]"; }
  
    
}