* {
  margin: 0;
  padding: 0;
}

body {
  font-family: monospace, 'Courier New', Courier, monospace;
  font-size: 18px;
  line-height: 1.5;
  background-color: #161617;
  color: white;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: #0c0c0c;
  color: #fff;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  width: 39px;
  height: 39px;
}

.logo h1 {
  font-size: 32px;
  font-weight: bold;
  margin-left: 10px;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-right: 20px;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 18px;
}

nav ul li a:hover {
  text-decoration: underline;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

@media screen and (max-width: 768px) {
  header {
    flex-direction: column;
  }

  .nav-toggle {
    display: flex;
  }

  nav ul {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    background-color: #121212;
    position: absolute;
    top: 60px;
    left: 0;
  }

  nav ul.nav-active {
    display: flex;
  }

  nav ul li {
    margin-bottom: 10px;
  }

  .logo h1 {
    margin: 10px 0;
  }
}

main {
  max-width: 1560px;
  margin: 0 auto;
  padding: 20px;
}

.content {
  margin-bottom: 50px;
}

article {
  margin-bottom: 40px;
}

a {
  text-decoration: none;
}
article h2 {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
}

article p {
  margin-bottom: 20;
}

footer {
  text-align: center;
  background-color: #333;
  color: #fff;
  padding: 20px;
}

footer p {
  font-size: 14px;
}

.posts-main {
  background-color: none;
  color: #fff;
  padding: 20px;
  margin: 0 auto;
}

.post {
  background-color: none;
  margin-bottom: 40px;
  border-radius: 8px;
}

.post h1 {
  position: relative;
  color: rgba(139, 92, 246, 0.7);
  text-decoration: none;
  overflow: hidden; 
}

.post h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%; 
  height: 1px;
  background-color: rgb(139, 92, 246); 
  transform: translateX(-100%);
  transition: transform 0.25s ease-out;
}

.post h1:hover::after {
  transform: translateX(0);
}


.meta-info {
  color: #aaa;
  margin-bottom: 10px;
}

.tag {
  background-color: transparent;
  color: #46768a;
  border: 1px solid #9b999f;
  padding: 1px 5px;
  margin: 3px;
  border-radius: 3px;
  font-size: 10px;
  display: inline-block;
  white-space: nowrap;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}


.post-author {
  display: flex;
  align-items: center;
  font-size: 18px;
  margin-bottom: 20px;
}

.post-author a {
  text-decoration: none;
  color: #ffffff;
  font-weight: bold;
  display: flex;
  align-items: center;
}

.post-author a:hover {
  text-decoration: underline;
}

.post-author img {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  margin-right: 10px;
}

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

body, html {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

footer {
  flex-shrink: 0;
}

.posts-main {
  margin: 0 auto;
  background-color: transparent;
  color: #fff;
  max-width: 1220px;
  box-sizing: border-box;
}

.toggle-container {
  height: 1px;
}

.readmore {
  display: flex;
  justify-content: flex-end;
  box-sizing: border-box;
  --default-border: 1px solid #33333375;
  border: var(--default-border);
  border-radius: 5rem;
  font-size: 1rem;
  opacity: 0.5;
  margin-top: auto;
  display: flex;
  margin-bottom: 7px;
}

.readmore-btn {
  display: inline-block;
  padding: 2px 8px;
  background-color: rgb(33 38 45);
  border: 1px solid rgb(139 92 246);
  text-decoration: none;
  border-radius: 20px;
  transition: background-color 0.3s ease;
}

.post-card .readmore-btn {
  color: #8b5cf6 !important;
}

.readmore-btn:hover {
  transform: scale(1.02);
  background-color: rgb(33 38 45);
}

.modules-container {
  display: grid;
  grid-template-columns: repeat(5, minmax(300px, 1fr));
  gap: 20px;
}

@media screen and (max-width: 1440px) {
  .modules-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media screen and (max-width: 1280px) {
  .modules-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media screen and (max-width: 1024px) {
  .modules-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (max-width: 768px) {
  .modules-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 480px) {
  .modules-container {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0 10px;
  }
  
  .post-card {
    padding: 8px;
    font-size: 0.85rem;
    min-height: 10vh;
    margin: 0 10px;
  }

  .logo h1 {
    font-size: clamp(20px, 5vw, 24px);
  }
  
  .logo {
    justify-content: center;
  }

  nav ul li a {
    font-size: clamp(14px, 4vw, 16px);
  }
  
  .modules-container {
    margin-top: 30px;
  }

  .post-card {
    background-size: cover;
    background-position: center;
  }

}
