/* duo.css - Combined and adapted Eleventy Duo CSS styled for dark mode */

:root {
  --accent: #38b6ff; /* Clean, modern vibrant blue/cyan */
  --background: #121212; /* Dark theme background */
  --color: #e0e0e0; /* Light theme content text */
  --color-80: rgba(224, 224, 224, .8);
  --color-30: rgba(224, 224, 224, .3);
  --color-10: rgba(224, 224, 224, .1);
  
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 5rem;
}

/* Global Styles */
html {
  box-sizing: border-box;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  background-color: var(--background);
  font-size: var(--text-lg);
  line-height: 1.54;
  color: var(--color);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-family: 'IBM Plex Sans', sans-serif;
  scrollbar-width: thin;
  scrollbar-color: var(--color-80) var(--background);
  height: 100%;
}

body::-webkit-scrollbar {
  width: 6px;
}

body::-webkit-scrollbar-track {
  background: var(--background);
}

body::-webkit-scrollbar-thumb {
  background-color: var(--color-80);
}

*,
*:before,
*:after {
  box-sizing: inherit;
  border-style: solid;
  border-width: 0;
  border-color: currentColor;
  margin: 0;
  padding: 0;
}

img,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
}

img,
video {
  max-width: 100%;
  height: auto;
}

hr {
  width: 100%;
  border: none;
  background: var(--color-10);
  height: 1px;
  margin-top: 2rem;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 200ms linear;
  text-decoration: underline;
}

a:hover {
  color: var(--accent);
}

ol {
  list-style-position: inside;
}

ol ol {
  list-style-type: lower-alpha;
}

ul {
  list-style-type: square;
  list-style-position: inside;
}

b,
strong {
  font-weight: 500;
}

table {
  border-collapse: collapse;
  caption-side: bottom;
  overflow-x: auto;
  min-width: 100%;
  border: 1px solid var(--color-30);
  margin-top: 1rem;
}

table caption {
  margin-top: 1rem;
}

td,
th {
  border: 1px solid var(--color-30);
  padding: 0.5rem;
  text-align: left;
}

th {
  font-weight: 500;
}

td:only-child {
  text-align: center;
}

* + h1,
* + h2 {
  margin-top: 5rem;
}

* + h3,
* + h4,
* + h5 {
  margin-top: 3rem;
}

* + p {
  margin-top: 2rem;
}

h2 + p,
h3 + p,
h4 + p {
  margin-top: 1rem;
}

iframe,
audio,
video {
  width: 100%;
  max-width: 100%;
  margin-top: 1rem;
}

.post-content img,
.post__content img {
  max-width: 100%;
  height: auto;
  margin-top: 1rem;
}

blockquote {
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  font-style: italic;
  color: var(--color-80);
}

pre {
  white-space: pre-wrap;
  tab-size: 2;
  font-size: 0.95rem;
  border: 1px solid var(--color-10);
  padding: 1rem;
  margin-top: 1rem;
  background-color: #1a1a1a;
  border-radius: 4px;
}

code,
kbd {
  color: var(--accent);
  background: var(--color-10);
  padding: 1px 6px;
  margin: 0 2px;
  font-size: 0.95rem;
  font-family: monospace;
}

pre {
  overflow: auto;
  max-width: 90vw;
  margin-left: auto;
  margin-right: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-80);
}

pre::-webkit-scrollbar {
  width: 6px;
  height: 8px;
}

pre::-webkit-scrollbar-track {
  background: var(--background);
}

pre::-webkit-scrollbar-thumb {
  background-color: var(--color-80);
}

pre,
code {
  font-family: "Inconsolata", monospace;
}

pre code {
  background: transparent;
  padding: 0;
  margin: 0;
}

mark {
  background: var(--accent);
  color: var(--background);
  padding: 1px 6px;
  margin: 0 2px;
  font-size: 0.95rem;
}

.visually-hidden {
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.3;
  font-weight: 400;
  color: var(--color);
}

h1 {
  font-size: var(--text-4xl);
}

h2 {
  font-size: var(--text-3xl);
}

h3 {
  font-size: var(--text-2xl);
}

h4 {
  font-size: var(--text-xl);
}

h5 {
  font-size: var(--text-lg);
}

p {
  font-size: var(--text-lg);
}

/* Layout Wrapper & Main */
.layout-wrapper {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100vh;
}

.main {
  display: flex;
  padding-bottom: 4rem;
  flex-direction: column;
  padding-left: 1rem;
  padding-right: 1rem;
  min-width: 0;
  max-width: 48.75rem;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Header */
.header {
  max-width: none;
  width: 100%;
  text-transform: uppercase;
  margin-bottom: 4rem;
}

.header__content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 48.75rem;
  padding: 1rem;
  margin-top: 1rem;
  border-bottom: 1px solid var(--color-10);
}

.site-title {
  font-size: var(--text-xl);
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.site-title a {
  color: var(--color);
  text-decoration: none;
}

.site-title a:hover {
  color: var(--accent);
}

.nav__list {
  display: flex;
  justify-content: space-around;
  list-style: none;
  font-size: var(--text-base);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.nav__list a {
  color: var(--color-80);
  text-decoration: none;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.nav__list li {
  margin-right: 2rem;
}

.nav__list li:last-child {
  margin-right: 0;
}

.nav__list a:hover {
  color: var(--accent);
}

/* Footer */
.footer {
  padding-bottom: 4rem;
  padding-left: 1rem;
  padding-right: 1rem;
  max-width: none;
  width: 100%;
}

.footer__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 48.75rem;
  width: 100%;
  font-size: var(--text-base);
  border-top: 1px solid var(--color-10);
}

.footer__content > * {
  margin-top: 2rem;
}

.footer__attribution {
  font-size: var(--text-sm);
  color: var(--color-80);
  text-align: center;
}

.footer ul {
  list-style: none;
  display: flex;
}

.footer li {
  margin-right: 2rem;
}

.footer li:last-child {
  margin-right: 0;
}

/* Hero */
.hero {
  display: flex;
  flex-direction: column;
}

.hero h1 {
  font-size: var(--text-5xl);
}

.hero p {
  font-size: var(--text-2xl);
  margin-top: 1rem;
  color: var(--color-80);
}

.hero__social-links {
  display: flex;
  flex-wrap: wrap;
  list-style-type: none;
  margin-top: 2rem;
  text-transform: uppercase;
}

.hero__social-links > li {
  margin-right: 2rem;
  margin-top: 1rem;
}

.hero__social-links a {
  text-decoration: underline;
}

/* Post List */
.post-list__wrapper {
  margin-top: 4rem;
}

.post-list__heading {
  font-size: var(--text-3xl);
  margin-bottom: 1rem;
}

.post-list {
  list-style: none;
}

.post-list__item {
  display: flex;
  flex-direction: column;
  padding-bottom: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-10);
}

.post-list__item:last-child {
  border-bottom: 1px solid var(--color-10);
}

.post-list__title {
  font-size: var(--text-2xl);
  margin-top: 0.5rem;
}

.post-list__title a {
  font-weight: normal;
  text-decoration: none;
  color: var(--color);
}

.post-list__title a:hover {
  color: var(--accent);
}

.post-list__meta {
  font-size: var(--text-sm);
  margin-top: 1rem;
  color: var(--color-80);
}

.post-list__meta > * + * {
  margin-left: 1rem;
}

.post-list__tags {
  text-decoration: none;
  font-size: var(--text-sm);
  margin-top: 0.5rem;
}

.post-list__tags a {
  text-decoration: none;
  color: var(--color-80);
}

.post-list__tags a:hover {
  color: var(--accent);
}

.post-list__tags > * + * {
  margin-left: 1rem;
}

.post-list__excerpt {
  margin-top: 1rem;
  color: var(--color-80);
}

.post-list__read-more {
  width: fit-content;
  font-size: 1rem;
  text-transform: capitalize;
  margin-top: 1rem;
  text-decoration: underline;
}

.post-list__read-more:hover {
  color: var(--accent);
}

.all-posts-link {
  margin-top: 4rem;
  width: fit-content;
  display: inline-block;
  margin-left: auto;
  margin-right: auto;
  font-size: var(--text-lg);
  text-decoration: underline;
  color: currentColor;
}

/* Post Details */
.post {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post > * + * {
  margin-top: 2rem;
}

.post__details {
  opacity: 0.8;
  font-size: 0.9rem;
  color: var(--color-80);
  margin-bottom: 2rem;
}

.post__details > * + * {
  margin-left: 0.5rem;
}

.post__content {
  word-wrap: break-word;
}

.post__aside {
  margin-top: 2rem;
}

.post__tags {
  opacity: 0.8;
  font-size: var(--text-sm);
}

.post__tags * + * {
  margin-left: 0.5rem;
}

.post__pagination {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.post__pagination > *:only-child {
  margin-right: auto;
  margin-left: auto;
}

.post__pagination a {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.post__pagination span {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* About Page */
.about h1 {
  margin-bottom: 2rem;
}

.about img {
  border: 4px solid var(--color-30);
  float: none;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
  max-width: 200px;
  border-radius: 4px;
}

@media (min-width: 35.9375em) {
  .about img {
    float: right;
    margin-left: 1rem;
    margin-top: 0.5rem;
  }
}

/* Fix inline favicon link icons from being stretched */
a i {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-right: 0.35em;
}
a i img {
  width: 1.1em !important;
  height: 1.1em !important;
  margin: 0 !important;
  display: inline-block !important;
  vertical-align: middle;
}
