#inflearn {
  display: flex;
  flex-direction: column;
  align-items: center;
}
#inflearn img {
  width: 8.8rem;
}

/* Base styles */
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

body.dark {
  background-color: #121212;
  color: #e0e0e0;
}

#wrap {
  max-width: 1100px;
  margin: auto;
}

header,
section,
footer {
  padding: 40px 20px;
}

header,
.main,
footer {
  background-color: #ffffff;
}

body.dark header,
body.dark .main,
body.dark footer {
  background-color: #121212;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
}

body.dark header {
  border-bottom: 1px solid #333;
}

#logo_heading {
  margin: 0;
}

#logo {
  width: 100px;
  margin-right: 15px;
  vertical-align: middle;
}

body.dark #logo {
  filter: brightness(0) invert(1);
}

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

nav li {
  margin-left: 20px;
}

nav a {
  text-decoration: none;
  color: #444;
  font-weight: 500;
  transition: color 0.2s;
}

body.dark nav a {
  color: #ccc;
}

nav a:hover {
  color: #007bff;
}

aside {
  text-align: right;
  font-size: 0.9rem;
}

#words {
  font-style: italic;
  color: #666;
  max-width: 400px;
  margin-left: auto;
  margin-bottom: 10px;
}

body.dark #words {
  color: #aaa;
}

#mp4 a {
  color: #007bff;
  text-decoration: none;
}

#inflearn {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

#inflearn img {
  width: 120px;
  border-radius: 4px;
}

/* Section specific */
#zero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.content.small h3 {
  font-size: 2rem;
  margin-top: 0;
}

.content.small .latest {
  display: inline-block;
  padding: 8px 16px;
  background: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 20px;
  font-weight: bold;
}

/* Tag/Chip List Styling */
#posts, .box > ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

#posts li a, .box > ul li a {
  display: inline-block;
  padding: 6px 14px;
  background: #f0f2f5;
  color: #444;
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.2s;
  border: 1px solid transparent;
}

body.dark #posts li a, body.dark .box > ul li a {
  background: #2a2a2a;
  color: #e0e0e0;
}

#posts li a:hover, .box > ul li a:hover {
  background: #e7f3ff;
  color: #007bff;
  border-color: #007bff;
  transform: translateY(-2px);
}

body.dark #posts li a:hover, body.dark .box > ul li a:hover {
  background: #1e3a5f;
  color: #4a9eff;
  border-color: #4a9eff;
}

/* Forms */
#form input,
#form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-sizing: border-box;
  margin-bottom: 15px;
  background: #fff;
}

body.dark #form input,
body.dark #form textarea {
  background: #222;
  border-color: #444;
  color: #fff;
}

#theme-toggle {
  padding: 5px 12px;
  border-radius: 15px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  font-size: 0.8rem;
}

body.dark #theme-toggle {
  background: #333;
  color: #fff;
  border-color: #555;
}

/* Responsive */
@media (max-width: 850px) {
  header {
    flex-direction: column;
    text-align: center;
  }
  
  nav {
    margin: 20px 0;
  }
  
  aside {
    text-align: center;
  }
  
  #words {
    margin: 10px auto;
  }
  
  #inflearn {
    align-items: center;
  }
  
  #zero {
    grid-template-columns: 1fr;
  }
}
