@media (orientation: landscape) {
  #container {
    max-width: 55%;
  }
}

@media (orientation: portrait) {
  #container {
    max-width: unset;
  }
}

:root {
  --background: #1a170f;
  --foreground: #eceae5;
  --accent: #eec35e;
  --second-accent: #FFA86A;
  --font-size: 1.2rem;
  --line-height: 1.54em;
  --radius: 0;

  --first-tone: var(--accent);
  --second-tone: color-mix(in srgb, var(--accent) 70%, transparent);
  --comment: color-mix(in srgb, var(--foreground) 50%, transparent);
  --code-border: color-mix(in srgb, var(--foreground) 10%, transparent);
}

body {
  background: conic-gradient(from 90deg at 1px 1px,#000 90deg,#085c47 0) 
    0 0/16px 16px;
  margin: 0;
  padding: 0;
  background-attachment: fixed;
  font-family: fira code,Monaco,Consolas,ubuntu mono,monospace;
  font-size: var(--font-size);
  line-height: var(--line-height);
  color: var(--foreground);
  text-rendering: optimizelegibility;
  -webkit-font-smoothing: antialiased;
  -webkit-overflow-scrolling: touch;
  text-size-adjust: 100%;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, img, figure, video, table {
  margin: 25px 0;
}

#container {
  background-color: var(--background);
  display: flex;
  flex-direction: column;
  padding: 40px;
  border-right: 1px solid color-mix(in srgb, var(--accent) 10%, transparent);
}

*, ::before, ::after {
  box-sizing: inherit;
  word-break: break-word;
}

header {
  display: flex;
  flex-direction: column;
  position: relative;

  .header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .header__logo {
    display: flex;
    flex: 1;
  }

  .header__logo a {
    flex: none;
    max-width: 100%;
    text-decoration: none;
  }

  .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    background: var(--accent);
    color: var(--background);
    font-weight: 700;
    padding: 5px 10px;
    white-space: nowrap;
  }

  .header__logo::after {
    content: "";
    background: repeating-linear-gradient(
      90deg,
      var(--accent),
      var(--accent) 2px,
      transparent 0,
      transparent 10px
    );
    display: block;
    width: 100%;
    right: 10px;
  }
}

nav {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin: 20px 1px;

  ul {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;

    & > li {
      flex: none;
      white-space: nowrap;

      &:not(:first-child)::before {
        content: "::";
        margin: 0 8px;
        color: var(--accent);
      }
    }
  }
}

a, a.button.inline {
  color: var(--second-accent);
}

ul, ol {
  margin-left: 4ch;
  padding: 0;

  li {
    position: relative;
  }
}

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

main {
  display: flex;
  flex-direction: column;
}

#posts {
  width: 100%;

  section:not(:last-of-type) {
    border-bottom: 1px solid color-mix(in srgb,var(--foreground) 10%,transparent);
  }

  h2 {
    position: relative;
    color: var(--accent);
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 3px dotted var(--accent);
    text-decoration: none !important;
  }

  h2::after {
    content: "";
    position: absolute;
    bottom: 2px;
    display: block;
    width: 100%;
    border-bottom: 3px dotted var(--accent);
  }

  ul {
    padding-left: 0;
    margin-left: 0;
    list-style-type: none;
  }

  li {
    margin-bottom: 8px;
  }

  a {
    text-decoration: none;
  }

  time, .meta {
    font-size: inherit;
    color: color-mix(in srgb,var(--foreground) 65%,transparent);
  }

  .meta {
    text-align: right;
  }

  time::after, .meta::before {
    content: "::";
  }

  time::after {
    margin-left: 8px;
  }

  .meta::before {
    margin-right: 8px;
  }
}

img {
  display: block;
  max-width: 100%;
  border: 8px solid var(--accent);
  border-radius: var(--radius);
  padding: 8px;
  overflow: hidden;
}

article {
  width: 100%;
  text-align: left;

  h1.title {
    font-size: calc(var(--font-size) * 1.45);
    letter-spacing: 0;
    position: relative;
    color: var(--accent);
    margin-top: 0 !important;
    margin-bottom: 15px !important;
    padding-bottom: 15px;
    border-bottom: 3px dotted var(--accent);
    text-decoration: none !important;

    a {
      text-decoration: none;
    }

    &::after {
      content: "";
      position: absolute;
      bottom: 2px;
      display: block;
      width: 100%;
      border-bottom: 3px dotted var(--accent);
    }
  }

  .subtitle {
    font-size: inherit;
    margin-bottom: 10px;
    color: color-mix(in srgb,var(--foreground) 65%,transparent);

    & > :not(:first-child)::before {
      content: "::";
      display: inline-block;
      margin-right: 8px;
    }
  }

  .tags {
    display: block;
    margin-bottom: 20px;
    font-size: inherit;
    color: var(--accent);
  }

  ul {
    list-style: none;

    li:not(:empty)::before {
      content: "-";
      position: absolute;
      left: -20px;
      color: var(--accent);
    }
  }

  .footnotes {
    border-top: 2px solid color-mix(in srgb,var(--foreground) 50%,transparent);
    color: color-mix(in srgb,var(--foreground) 50%,transparent);
  }
}

/* For the 'with_background' shortcode */
with-background {
  display: block;
  text-align: center;
  margin-bottom: 0.75rem;
  border-radius: var(--radius);
  border-color: var(--accent);
  border-width: 0.5rem;
  border-style: solid;
  padding: 0.5rem;

  p {
    background-color: var(--background);
    border-radius: 0.5rem;
    padding: 0.2rem;
  }
}

code {
  color: var(--accent);
  text-size-adjust: 100%;
}

code, kbd {
  font-family: fira code,Monaco,Consolas,ubuntu mono,monospace;
  font-feature-settings: normal;
  background: color-mix(in srgb,var(--foreground) 5%,transparent);
  border: 1px solid var(--code-border);
  padding: 1px 6px;
  margin: 0 2px;
  font-size: calc(var(--font-size) * .95);
}

pre {
  tab-size: 4;
  background: color-mix(in srgb,var(--foreground) 5%,transparent) !important;
  color: var(--foreground);
  padding: 20px 10px;
  font-size: calc(var(--font-size) * .95) !important;
  overflow: auto;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb,var(--foreground) 10%,transparent);

  &:not(.chroma) {
    padding: 10px;
  }

  code {
    color: var(--foreground);
    background: 0 0 !important;
    margin: 0;
    padding: 0;
    border: none;
  }
}

blockquote {
  position: relative;
  border-left: 5px solid var(--accent);
  padding-left: 30px;
  margin-left: 20px;

  &::before {
    content: ">";
    display: block;
    position: absolute;
    left: 10px;
    color: var(--accent);
  }
}

footer {
  padding-top: 40px;
  flex-grow: 0;
  border-top: 3px solid var(--accent);

  .copyright {
    text-align: center;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    max-width: 100%;
    opacity: 0.65;

    & > :first-child:not(:only-child)::after {
      margin-left: 8px;
      content: "::";
    }

    span {
      white-space: nowrap;
    }
  }

  a {
    color: inherit;
  }

  .stamps {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;

    a {
      text-decoration: none;
    }
  }

  img {
    border: none;
  }
}

table {
  table-layout: auto;
  border-collapse: collapse;
}

table, th, td {
  border: 2px solid var(--foreground);
  padding: 10px;
}

th {
  border-style: solid;
  color: var(--foreground);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .04em;
}

browser-window {
  container-type: inline-size;
  overflow: clip;

  display: block;
  border-radius: var(--radius);
  border-color: var(--accent);
  border-width: 0.5rem;
  border-style: solid;
  padding: 0.5rem;
  margin: 1rem 0;
}

palestine-stamp {
  display: block;
  background-color: #d0cccc;
  border-top: solid 0.3rem #fffdfd;
  border-left: solid 0.3rem #fffdfd;
  border-right: solid 0.3rem #000000;
  border-bottom: solid 0.3rem #000000;
  height: 3rem;
  width: 8.5rem;

  .free_palestine {
    display: block;
    color: #3600ff;
    font-size: 0.9rem;
    margin: -0.1rem 0.6rem;
    letter-spacing: -0.03rem;
  }

  palestine-stamp-flex {
    display: flex;
    flex-direction: row;
    align-items: center;

    .now {
      display: inline;
      color: #fa0404;
      font-size: 1.2rem;
      margin: 0 0.3rem;
      letter-spacing: -0.06rem;
      font-style: italic;
      font-weight: bold;
    }

    .palestinian-flag {
      height: 1.8rem;
    }
  }
}
