/* CSS is how you can add style to your website, such as colors, fonts, and positioning of your
   HTML content. To learn how to do something, just try searching Google for questions like
   "how to change link color." */

@font-face {
  font-family: 'Atkinson';
  src: url('AtkinsonHyperlegible-Regular.ttf');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Atkinson';
  src: url('AtkinsonHyperlegible-Bold.ttf');
  font-weight: bold;
  font-style: normal;

}

@font-face {
  font-family: 'Atkinson';
  src: url('AtkinsonHyperlegible-Italic.ttf');
  font-weight: normal;
  font-style: italic;
}

@font-face { 
  font-family: 'Atkinson';
  src: url('AtkinsonHyperlegible-BoldItalic.ttf');
  font-weight: bold;
  font-style: italic;
}

@font-face {
  font-family: 'Atkinson-Mono';
  src: url('AtkinsonMonolegible.ttf');
}


:root {
  --background-col: #232c21;
  --header-col: #121b11;
  --header-text-col: #e4e4e4;
  --text-col: #dce9da;
  --link-under-col: #d7ecd3;
  --link-hover-col: #ffe1a8;
  --border-sep-a-col: #073200;
  --code-background-col: #152224;
  --code-identifier-col: #f6e1ca;
  --code-comment-col: #12c480;
  --code-number-col: #d4e7fb;
  --code-keyword-col: #e4e4e4;
  --code-string-col: #4fa078;
  --code-error-bg-col: #000;
  --strong-col: #b7cadd;
}

@supports (color: oklch(0% 0 0)) {
  :root {
    --background-col: oklch(28% 0.024 140);
    --header-col: oklch(21% 0.024 140);
    --header-text-col: oklch(92% 0 0);
    --text-col: oklch(92% 0.024 140);
    --link-under-col:   oklch(92% 0.04 140);
    --link-hover-col:   oklch(24% 0.01 140);
    --border-sep-a-col: oklch(28% 0.091 140.5);
    --code-background-col: oklch(24% 0.018 209.01);
    --code-identifier-col: oklch(92% 0.038 70);
    --code-number-col:   oklch(92% 0.034 250);
    --code-keyword-col:  oklch(92% 0 0); 
    --code-comment-col:  oklch(80% 0.1804 160);
    --code-string-col:   oklch(64.25% 0.101 160);
    --code-error-bg-col: oklch(0% 0 0);
    --strong-col: oklch(83.06% 0.0338 248.23);
  }
}

body {
  background-color: var(--background-col);
  color: var(--text-col);
  font-family: Atkinson;
  font-size: 13pt;
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

h1 {
  padding-top: 0.75rem;
  padding-left: 3rem;
  float: left;
}

h2::before {
  content: "፤ ";

  opacity: 50%;
}

h2::after {
  content: " ፤";
  opacity: 50%;
}

h2 {
  color: var(--header-text-col);
  font-size:default;
  opacity:100%;
}

h2::selection {
  background: var(--header-text-col);
  color: var(--background-col);
}

p {
  max-width: 70rem;
  clear: both;
}
.code {
  font-family: Atkinson-Mono;
  background-color: var(--code-background-col);
  border-color: var(--border-sep-a-col);
  border-radius: 2rem;
} 


a:link {
  color: var(--text-col);
  font-style: normal;
  border-bottom: .15rem solid var(--link-under-col);
  letter-spacing: 0.05rem;
  text-decoration: none;
}

/* visited link */
a:visited {
  color: var(--text-col);
  border-bottom: .15rem solid var(--link-under-col);
}

/* mouse over link */
a:hover {
  color: var(--text-col);
  border-bottom: .15rem solid var(--link-hover-col);
}

/* selected link */
a:active {
  color: var(--background-col);
  background-color: var(--text-col);
}

a img {
margin-top: 0.5rem;
}


@keyframes scale {
  to {
    transform: scale(1.015);
  }
}

a img:hover {
  margin-top: 0.5rem;
  transform-origin: top;
  animation: scale 200ms ease-in-out forwards;
}

ul {
  list-style: none;
}

li{
  padding: 0.25rem;  
}

#menu {
  list-style: none;
  width: 70rem;
  margin-left: 2rem;
  clear: both;
}

#menu li {
  display: block;
  float: left;
  font-size: 1.3rem;
  padding: 1rem;
  line-height: 3rem;
  border-left: 1.5px var(--link-under-col);
}

header {
  background-color: var(--header-col);
  color: var(--header-text-col);
  float: left;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  background-image: url("media/0-tick.svg");
  background-repeat: repeat-x;
  background-size: 10em;
}

::selection {
  color: var(--background-col);
  background: var(--text-col);
}

strong {
  color: var(--strong-col);
}
strong::selection {
  color: var(--background-col);
  background: var(--strong-col);
}

#article-content {
  width: fit-content;
  padding: 0.6666rem;
  display: flex;
  max-width: 70rem;
  margin: 0 2rem;
  flex-direction: column;
}

.small-embed {
  max-width: 10em;
  max-height: 12em;
}
.medium-embed {
  max-width: 20em;
  max-height:24em;
}
.bigger-embed {
  max-width: 30em;
  max-height:36em;
}

.large-embed {
  max-width: 80em;
  max-height: 96em;
}

.full-screen-embed {
  max-width: 100vw;
}

@media (orientation: landscape) {
.polygon-border {
  max-width: max(20rem, 100%);
  background-color: var(--header-col);
  position: relative;
  clip-path: polygon(0 0, calc(100% - 1rem) 0, 100% 1rem, 100% 100%, 1rem 100%, 0 calc(100% - 1rem));
 }

.polygon-border::before {
  width: 19.9rem;
  height: 29.9rem;
  background-color: var(--background-lite-col);
  clip-path: polygon(0 0, 95% 0, 100% 5%, 100% 100%, 5% 100%, 0 95%);
  top: 0.05rem;
  left: 0.05rem;
 }


#full-content {
  width: fit-content;
  display: flex;
  margin: 0 auto;
 }

#sidebar {
  margin-top: 2rem;
  min-height: 15rem;
  height: fit-content;
  padding: 0.666em;
 }

#main-content {
  
  max-width: 70rem;
  margin: 0 1rem;
  padding: 0.6666rem;
  flex-grow: 1;
 }
}

.grid { 
  table-layout: fixed;
  width: 100vw;
}

table tr td span {
    margin-right: 2rem;
    margin-bottom: 1rem; 
    width: max(25rem, 21%);
    display: inline-block;
}

span img {
 width: max(25rem, 100%); 
 height: auto;
}


@media (orientation: portrait) {
  .polygon-border {
  margin: 0.25rem 1rem;
  background-color: var(--header-col);
  position: relative;
  clip-path: polygon(0 0, calc(100% - 1rem) 0, 100% 1rem, 100% 100%, 1rem 100%, 0 calc(100% - 1rem));
 }


.polygon-border::before {
  margin: 0.25rem 1rem;
  background-color: var(--background-lite-col);
  clip-path: polygon(0 0, 95% 0, 100% 5%, 100% 100%, 5% 100%, 0 95%);
  top: 0.05rem;
  left: 0.05rem;
 }


#full-content {
  width: fit-content;
  clear: both;
  margin: 0 auto;
  display:flex;
  flex-direction: column-reverse;
 }

#sidebar {
  margin-top: 1rem;
  height: fit-content;
  padding: 0.666em;
 }

#main-content {
  width: 94%;
  max-width: 70rem;
  margin: 1rem;
  margin-left: 0.5rem;
  margin-right: 2rem;
  padding: 0.6666rem;
 } 
}