/* Mobile First CSS for Documentation/Project Site */
html {
  box-sizing: border-box;
  background: #f8f8f8;
}
*, *:before, *:after {
  box-sizing: inherit;
}
body {
  font-family: 'Inter', 'Montserrat', 'Segoe UI', Arial, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  color: #222;
  background: #f8f8f8;
  display: flex;
  flex-direction: column;
  align-items: center;
}
header {
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #eee;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  text-align: center;
  padding: 1.2rem 0 0.7rem 0;
  margin: 0;
}
header h1 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #222;
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}
header h2 {
  font-size: 1.05rem;
  color: #666;
  margin-bottom: 1rem;
  font-weight: 400;
}
footer {
  width: 100%;
  background: #fff;
  border-top: 1px solid #eee;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.04);
  text-align: center;
  padding: 0.7rem 0;
  color: #aaa;
  font-size: 0.9rem;
  margin-top: 2rem;
}
main {
  width: 100%;
  max-width: 100vw;
  margin: 0.7rem auto;
  background: none;
  padding: 0.7rem 0.2rem;
  border-radius: 0;
  box-shadow: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  font-size: 1.05rem;
}
main + main {
  margin-top: 0.7rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid #eee;
  padding: 0.7rem 0.2rem;
}
ul {
  list-style: none;
  padding: 0;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: stretch;
}
li {
  width: 100%;
  margin: 0;
}
a {
  display: block;
  text-decoration: underline;
  color: #d32f2f;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 4px;
  padding: 0.7rem 0.5rem;
  background: none;
  box-shadow: none;
  width: 100%;
  box-sizing: border-box;
  transition: background 0.2s;
}
a:hover {
  color: #b71c1c;
  background: #f8f8f8;
}
.github-link {
  text-align: center;
  margin: 2rem auto 1rem auto;
  display: block;
  background: none;
  border-radius: 0;
  box-shadow: none;
  border: none;
  max-width: 100vw;
  padding: 0.7rem 0.2rem;
  font-size: 1rem;
}
.github-link a {
  color: #d32f2f;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: underline;
  background: none;
  border-radius: 6px;
  padding: 0.3rem 0.2rem;
}
.project-image {
  display: block;
  margin: 1.5rem auto 0.7rem auto;
  max-width: 100vw;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  border: 1px solid #e0e0e0;
}
.image-caption {
  display: block;
  text-align: left;
  font-size: 1.08rem;
  color: #333;
  margin: 0.4rem 0 0 0;
  padding: 0.2rem 0.1rem;
  max-width: 100%;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.link-box {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 0.7rem 0.5rem;
  margin: 0.7rem 0;
  display: flex;
  align-items: flex-start;
  width: 100%;
  max-width: 100vw;
  transition: box-shadow 0.2s;
  overflow: hidden;
}
.link-box:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.link-preview-img {
  display: block;
  width: 120px;
  height: 120px;
  max-width: 120px;
  max-height: 120px;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 16px;
  margin: 0 1rem 0 0;
  background: #eee;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.link-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}
.link-box a {
  display: block;
  width: fit-content;
  max-width: 100%;
  word-break: break-word;
  font-size: 1.25rem;
  font-weight: 700;
  color: #d32f2f;
  text-decoration: underline;
  background: none;
  border-radius: 6px;
  padding: 0.3rem 0.4rem;
  margin-left: 0;
  margin-right: auto;
}
.text-box {
  background: none;
  border: 1px solid #eee;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  padding: 1.2rem 1.5rem;
  margin: 1.5rem auto;
  max-width: 700px;
  width: 100%;
  font-size: 1.12rem;
  color: #222;
  display: block;
}
@media (min-width: 600px) {
  header {
    padding: 2rem 0 1.2rem 0;
    border-radius: 0 0 18px 18px;
  }
  header h1 {
    font-size: 2rem;
  }
  header h2 {
    font-size: 1.15rem;
  }
  main {
    max-width: 700px;
    font-size: 1.1rem;
    padding: 1.2rem 1.5rem;
  }
  main + main {
    margin-top: 1.5rem;
    padding: 1.2rem 1.5rem;
    border-radius: 18px;
  }
  .github-link {
    max-width: 420px;
    font-size: 1.1rem;
    padding: 1rem 0.5rem;
  }
  .project-image {
    max-width: 420px;
    border-radius: 18px;
  }
  .image-caption {
    max-width: 350px;
    font-size: 1.08rem;
    margin: 0.5rem 0 0 0;
    padding: 0.3rem 0.2rem;
  }
  .link-box {
    max-width: 420px;
    border-radius: 14px;
    padding: 1rem 1.2rem;
    margin-left: auto;
    margin-right: auto;
  }
  .link-preview-img {
    width: 160px;
    height: 160px;
    max-width: 160px;
    max-height: 160px;
    margin: 0 1.5rem 0 0;
    border-radius: 20px;
  }
  .link-content {
    justify-content: flex-start;
  }
  .link-box a {
    font-size: 1.35rem;
    padding: 0.35rem 0.6rem;
  }
}
@media (min-width: 900px) {
  main {
    max-width: 820px;
    font-size: 1.15rem;
    padding: 1.5rem 2rem;
  }
  main + main {
    margin-top: 2.5rem;
    padding: 2rem;
  }
}
