:root {
    --red: #f72472;
    --green: #a3e22c;
    --orange: #ff6f29;
    --blue: #5fd5ef;
    --purple: #987dfd;
    --link: #2ea672;
    --head: #f5f5f5;
    --bg: #222222;
    --fg: #fdfdfd;
    --third: #adadad;
    --border: #333333;
    --pre: #adadad;
}

.red {
    color: var(--red);
}

.green {
    color: var(--green);
}

.orange {
    color: var(--orange);
}

.blue {
    color: var(--blue);
}

.purple {
    color: var(--purple);
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
}

#maintitle {
    margin-top: 6vh;
    display: flex;
	color:var(--fg);
    text-align: justify;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#greeting {
    display: block;
    font-weight: var(--medium);
    max-width: 90vw;
}

#reroll {
    font-size: 1rem;
}

#reroll:hover {
    font-weight: var(--medium);
}

#reroll:active {
    font-weight: var(--medium);
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Fira Code', monospace;
    background: var(--bg);
    color: var(--fg);
  }
  nav {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background: var(--head);
  border-bottom: 1px solid var(--border);
  width: 100%;
  }
  .nav-center {
  display: flex;
  gap: 2rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  }
  nav a:hover {
  color: var(--fg);
  }
  .sun-button {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: auto;
  }
  header {
    padding: 2rem 1rem 1rem;
    text-align: center;
  }
  h1 {
    margin: 0;
    font-size: 2.25rem;
    font-weight: normal;
  }
  h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
  }
  p.description {
    font-size: 1rem;
    color: #888;
    margin-top: 0.5rem;
  }
  .container {
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1.25rem;
    flex: 1;
    text-align: center;
  }
  .intro {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
  }
  .home-posts-section {
    margin-top: 3rem;
  }
  .home-post-item {
    margin-bottom: 1rem;
  }
  .home-post-title {
    font-size: 1.1rem;
    margin: 0;
  }
  .home-post-date {
    font-size: 0.9rem;
    color: #777;
  }
  .post {
    margin-bottom: 2rem;
  }
  .post-description {
    text-align: center;
  }
  .post-description p {
    margin: 0.2rem 0;
  }
  .project {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 4rem;
    text-align: left;
  }
  .project img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
  }
  .project-content {
    flex: 1;
  }
  .project-title {
    font-size: 1.375rem;
    margin: 0 0 0.5rem;
    color: var(--fg);
  }
  .project-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--third);
    max-width: 750px;
  }
  a {
    display: inline-block;
    text-decoration: none;
    color: var(--link);
  }
  a::before {
    content: '[';
  }
  a::after {
    content: ']';
  }
  a:hover {
    color: var(--fg);
    text-decoration: underline;
  }
  .blog-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--fg);
  }
  .blog-content p, .blog-content li {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: var(--third);
    text-align: left;
  }
  pre {
    background: #f0f0f0;
    padding: 1rem;
    overflow-x: auto;
    border-radius: 4px;
    text-align: left;
  }
  figure {
    margin: 2rem auto;
    text-align: center;
  }
  figure img {
    max-width: 100%;
    height: auto;
  }
  figcaption {
    font-size: 0.9rem;
    color: var(--third);
    margin-top: 0.5rem;
  }
  footer {
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
    color: #777;
    border-top: 1px solid var(--border);
    width: 100%;
    margin-top: auto;
  }
  * {
    box-sizing: border-box;
  }
  
  .container {
    flex: 1;
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  p {
    line-height: 1.6;
    word-break: break-word;
  }

  pre {
    max-width: 90vw;
    overflow-x: auto;
    background: var(--pre);
    padding: 1rem;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    box-sizing: border-box;
    margin: 1rem 0;
  }
  
  code {
    display: block;
    white-space: pre;
    word-wrap: normal;
  }

  @media (max-width: 600px) {
    body {
        max-width:100%;
    }
    .nav-center {
      flex-direction: row;
      justify-content: center;
      gap: 1rem;
    }
    nav {
      flex-direction: row;
      justify-content: space-between;
      align-items: center;
      flex-wrap: nowrap;
    }
    .nav-center a {
      font-size: 0.8rem;
    }
    .sun-button {
      font-size: 1rem;
      margin-left: auto;
      order: 2;
    }
    #maintitle {
        text-align: center;
    }
    .project {
        flex-direction: column;
    }
    iframe { 
        max-width: 90vw;;
    }
  }