/* Variables */
:root {
  --color-text: #292929;
  --color-text-light: #898989;
  --color-primary: #9e00ff;
  --color-secondary: #e21ecf;
  --color-nav-decorator: #dfdfdf;
  --color-border: #dfdfdf;
  --color-background: #fff;
  --color-pre-background: #231b1f;
  --color-code-background: #dfdfdf;
  --color-input-border: #ccc;
  --color-input-background: #fafafa;

  --size-container-max-witdh: 980px;
}

/* Reset */
* {
  box-sizing: border-box;
}

/* Main block */
body {
  font-family: "Nunito Sans", Arial, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
    sans-serif;
  line-height: 1.45;
  background-color: var(--color-background);
  color: var(--color-text);
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "header"
    "main"
    "footer";
  min-height: 100vh;
  margin: 0;
  transition: color 0.125s ease-in-out, background-color 0.125s ease-in-out;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: all 150ms ease-in-out;
}

a:hover {
  text-shadow: 0px 0px 3px rgba(226, 30, 20, 0.25);
}

/* Layout */
.block {
  max-width: var(--size-container-max-witdh);
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

.reset {
  margin: 0;
  padding: 0;
}

/* Header */
header.top {
  grid-area: header;
  text-align: center;
  margin: 2rem auto;
  padding: 0 2rem;
}

.top nav {
  margin: 1rem 0;
}

.top nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  flex-wrap: wrap;
  gap: .5rem 0;
}

.top nav li {
  display: flex;
  padding: 0 1rem;
}

.top nav li + li::before {
  content: "×";
  color: var(--color-nav-decorator);
  padding-right: 1.25rem;
  margin-left: -0.75rem;
}

.top nav li:last-child {
  padding-right: 0;
}

.top nav li a {
  color: var(--color-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: color .125s ease-in-out;
}

.top nav li a:hover {
  color: var(--color-secondary);
}

header.playground {
  width: 100%;
  padding: 0 1rem;
  margin: 0 0 1rem;
}

header.playground .navlogo-title,
header.playground .logo {
  vertical-align: middle;
}

header.playground .navlogo-title {
  position: relative;
  bottom: -2px;
  margin-left: 0.5rem;
}

@media screen and (min-width: 620px) {
  header.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
}

.logo-text {
  color: var(--color-text);
}

.logo-accent {
  color: var(--color-primary);
}

.mastodon-text {
  fill: var(--color-background);
}

/* Theme switcher */
.theme-button {
  background: transparent;
  border: 0;
  cursor: pointer;
  height: 23px;
  padding: 0;
}

.theme-button [class*="theme-icon"] {
  transition: fill .125s ease-in-out;
}

.theme-icon-bg {
  fill: var(--color-background);
  stroke: var(--color-text);
}

.theme-icon-fg {
  fill: var(--color-text);
}

.theme-button:hover .theme-icon-bg {
  fill: var(--color-secondary);
}


/* Main */
main {
  grid-area: main;
  max-width: 100vw;
}

/* Footer */
footer.bottom {
  grid-area: footer;
  margin: 3rem auto 2rem;
  padding: 0 2rem;
  color: var(--color-text-light);
  transition: color 0.125s ease-in-out;
}

footer.bottom:hover {
  color: var(--color-text);
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}

.footer-list li {
  margin-bottom: 0.75rem;
}

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

@media screen and (min-width: 620px) {
  .footer-list {
    display: flex;
    gap: 3rem;
  }

  .footer-list li {
    position: relative;
    margin-bottom: 0;
  }

  .footer-list li:before {
    content: "×";
    color: var(--color-nav-decorator);
    position: absolute;
    top: 0;
    left: -1.75rem;
  }

  .footer-list li:first-child:before {
    content: "";
  }
}

.soon {
  background-color: var(--color-text-light);
  border-radius: 2px;
  color: var(--color-background);
  display: inline-block;
  font-size: 0.7rem;
  padding: 0 0.2rem;
  position: relative;
  top: -1px;
}

/* Blog post */
.post-separator {
  height: 10px;
  margin-bottom: 2rem;
}

.post-header {
  margin: 3rem 0;
}

.post-header h1 {
  margin: 0;
  line-height: 1.1;
  font-size: 2rem;
  text-align: center;
}

@media screen and (min-width: 520px) {
  .post-header h1 {
    font-size: 3.5rem;
  }
}

.post-header-meta {
  text-align: center;
}

.post-header-meta p {
  margin: 0 0 0.5rem;
}

.post-header-meta date {
  color: var(--color-text-light);
}

.post-content {
  font-size: 1.2rem;
  word-spacing: 1px;
}

.post-content img {
  max-width: 100%;
}

/* quotes */
blockquote {
  margin: 2rem;
  font-size: 1.3rem;
  font-style: italic;
  border-left: 3px solid var(--color-border);
  padding-left: 1rem;
}

@media screen and (min-width: 560px) {
  blockquote {
    margin: 3rem;
  }
}

/* Code */
code,
textarea {
  font-family: "Hack", Consolas, "Courier New", monospace;
}

code {
  display: inline-block;
  font-size: 1rem;
  padding: 0.1rem 0.3rem;
  background: var(--color-code-background);
  border-radius: 5px;
  position: relative;
  top: -2px;
}

pre {
  background-color: var(--color-pre-background);
  padding: 0.5rem 0.75rem;
  border-radius: 2px;
}

pre code {
  font-size: 1rem;
  background: transparent;
  padding: 0;
  position: static;
  white-space: normal;
}

/* Okadia theme */

/**
 * okaidia theme for JavaScript, CSS and HTML
 * Loosely based on Monokai textmate theme by http://www.monokai.nl/
 * @author ocodia
 */
code[class*="language-"],
pre[class*="language-"] {
  color: #f8f8f2;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  line-height: 1.5;
  tab-size: 4;
  hyphens: none;
}

/* Code blocks */
pre[class*="language-"] {
  padding: 1em;
  margin: 1.5em 0;
  overflow: auto;
  border-radius: 0.3em;
  border: 1px solid var(--color-border);
}

/* Inline code */
:not(pre) > code[class*="language-"] {
  padding: .1em;
  border-radius: .3em;
  white-space: normal;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: slategray;
}

.token.punctuation {
  color: #f8f8f2;
}

.token.namespace {
  opacity: .7;
}

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
  color: #f92672;
}

.token.boolean,
.token.number {
  color: #ae81ff;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
  color: #a6e22e;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
  color: #f8f8f2;
}

.token.atrule,
.token.attr-value,
.token.function,
.token.class-name {
  color: #e6db74;
}

.token.keyword {
  color: #66d9ef;
}

.token.regex,
.token.important {
  color: #fd971f;
}

.token.important,
.token.bold {
  font-weight: bold;
}
.token.italic {
  font-style: italic;
}

.token.entity {
  cursor: help;
}

/* Collections page */
.search-container {
  margin: 2rem 0;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--color-input-border);
  border-radius: 4px;
  background-color: var(--color-input-background);
  color: var(--color-text);
  transition: border-color 0.2s ease-in-out;
}

.search-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.collections-content {
  margin-top: 2rem;
}

.collection-section {
  margin-bottom: 2rem;
}

.collection-header {
  cursor: pointer;
  padding: 0.5rem 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.collection-header::before {
  content: '▶';
  display: inline-block;
  transition: transform 0.2s ease-in-out;
  font-size: 0.8em;
}

details[open] .collection-header::before {
  transform: rotate(90deg);
}

.collection-header h2 {
  margin: 0;
}

/* Links section */
.links-list {
  margin-top: 1rem;
  padding: 0;
}

.link-item {
  margin-bottom: 0.25rem;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  padding-right: 0.5rem;
  transition: border-color 0.2s ease-in-out;
}

.link-item:hover {
  border-left-color: var(--color-primary);
  border-right-color: var(--color-primary);
}

.link-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0 0.25rem 0.5rem;
}

.link-title {
  color: var(--color-text);
  transition: color 0.2s ease-in-out;
}

.link-title:hover {
  color: var(--color-primary);
}

.link-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.link-domain-tag {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--color-text);
  transition: border-color 0.2s ease-in-out;
}

.link-domain-tag:hover {
  border-color: var(--color-text);
  color: var(--color-primary);
}

.link-feed {
  opacity: 0;
  transition: all 0.2s ease-in-out;
}

.link-item:hover .link-feed {
  opacity: 1;
}

/* Projects section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.project-card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.project-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.project-title {
  margin: 0 0 0.75rem 0;
}

.project-title a {
  color: var(--color-text);
}

.project-title a:hover {
  color: var(--color-primary);
}

.project-description {
  margin: 0 0 1rem 0;
  line-height: 1.5;
  flex: 1;
}

.project-status {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: transparent;
  witdh: auto;
  border: 1px solid;
}

.project-status-to-try {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.project-status-tested {
  color: var(--color-secondary);
  border-color: var(--color-secondary);
}

.project-status-favorite {
  color: #00c853;
  border-color: #00c853;
}

.no-results {
  text-align: center;
  padding: 2rem;
  grid-column: 1 / -1;
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .link-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .link-domain {
    margin-top: 0.25rem;
  }
}
