/** Table of Contents
  -- Base Imports
  -- Layout Imports
  -- Component Imports
  -- Pages Imports
**/
/* Reset Styles*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Base Style */
html,
body {
  min-height: 100vh;
  font-family: "Inter", "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
  color: #0d0d0d;
  background-color: #ffffff;
  font-size: 0.9375rem;
}

h1,
h2,
h3 {
  font-family: "Inter", "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
}

a {
  text-decoration: none;
}

ul li {
  list-style-type: none;
}

/* Layout and Structure */
.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

.container {
  max-width: 1200px;
  width: 100%;
  padding: 0 1rem;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .container {
    padding: 1rem;
  }
}
/* Header */
.site-logo img {
  max-width: 150px;
  height: auto;
}

@media (min-width: 768px) {
  .site-logo img {
    max-width: 200px;
  }
}
nav .nav-menu {
  margin-top: 0;
}

.site-header {
  background-color: #ffffff;
  color: #0d0d0d;
  text-align: center;
  padding: 1.5rem 0;
  min-height: 4rem;
}

.site-title a {
  color: #0d0d0d;
  text-decoration: none;
  font-size: 1.5rem;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-header__menu {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 3rem;
  gap: 2rem;
  background: #fff;
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 250px;
  z-index: 1200;
  transform: translateX(100%);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
  pointer-events: none;
}
.site-header__menu.active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.site-header__menu .site-header__nav {
  text-align: left;
}
.site-header__menu .site-header__title {
  margin-top: 4rem;
}
.site-header__menu .site-header__title,
.site-header__menu .site-header__categories-title {
  font-size: 1.25rem;
  color: #0d0d0d;
  font-weight: bold;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #dddddd;
  text-align: left;
}
.site-header__menu .nav-menu {
  display: flex;
  flex-direction: column;
  text-align: left;
}
.site-header__menu .nav-menu a {
  font-size: 1rem;
  color: #0d0d0d;
  text-decoration: none;
  padding: 0.5rem 0;
  display: block;
}
.site-header__menu .nav-menu a:hover {
  text-decoration: underline #ccd0d6;
  text-underline-offset: 0.3rem;
  text-decoration-thickness: 1px;
}
@media (min-width: 768px) {
  .site-header__menu .site-header__menu {
    width: 280px;
    padding: 3rem;
  }
}
@media (min-width: 768px) {
  .site-header__menu .site-header__menu a {
    padding: 0.4rem 0;
  }
}
.site-header__menu .category-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  gap: 1.2rem;
  text-align: left;
  font-weight: bold;
}
.site-header__menu .category-menu a {
  font-size: 1rem;
  color: #0d0d0d;
  background-color: #d7dde5;
  border-radius: 4px;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  display: inline-block;
}
.site-header__menu .category-menu a:hover {
  background-color: #c4ccd6;
}

@media (min-width: 768px) {
  .site-header__menu .category-menu.category-menu {
    gap: 0.8rem;
  }
}
.hamburger {
  position: relative;
  width: 30px;
  height: 24px;
  cursor: pointer;
  z-index: 1300;
}
.hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #6c7a89;
  border-radius: 3px;
  transition: all 0.4s ease;
}
.hamburger span:nth-child(1) {
  top: 0;
}
.hamburger span:nth-child(2) {
  top: 10px;
}
.hamburger span:nth-child(3) {
  bottom: 0;
}
.hamburger.active span:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

body.menu-open .hamburger {
  position: fixed;
  top: 1rem;
  right: 2rem;
}

@media (min-width: 768px) {
  body.menu-open .hamburger {
    top: 1.5rem;
    right: 3rem;
  }
}
body.menu-open::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1100;
}

/* Footer */
.site-footer {
  background-color: #e3e6e9;
  color: #0d0d0d;
  text-align: center;
  padding: 1rem;
}

.footer-menu {
  display: flex;
  justify-content: center;
}

.footer-menu li {
  list-style: none;
}

.footer-menu a {
  color: #0d0d0d;
  text-decoration: none;
  padding: 0.5rem;
}

.footer-menu .menu-item-privacy-policy a {
  font-size: 0.75rem;
}

@media (min-width: 768px) {
  .footer-menu .menu-item-privacy-policy a {
    font-size: 0.8125rem;
  }
}
.copyright {
  margin-top: 0.25rem;
  font-size: 0.75rem;
}

.title-wrapper {
  margin: 2rem 0;
  text-align: center;
}

@media (min-width: 768px) {
  .title-wrapper {
    margin: 3rem 0;
  }
}
.title {
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  position: relative;
  display: inline-block;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #dddddd;
}

@media (min-width: 1024px) {
  .title {
    font-size: 1.75rem;
  }
}
.blog-wrapper {
  min-height: 400px;
  padding: 0 0.5rem;
}

.blog-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.8rem;
}

@media (min-width: 768px) {
  .blog-list {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
  }
}
@media (min-width: 1024px) {
  .blog-list {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}
.blog-list__item {
  position: relative;
  background-color: #ffffff;
  border-radius: 4px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.blog-list__item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
  .blog-list__item {
    padding: 1.5rem;
  }
}
.blog-list__link {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* hide text but keep it accessible */
  text-indent: -9999px;
}

.post-list__thumbnail img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  margin-bottom: 0.5rem;
  border-radius: 2px;
}

.post-list__title,
.latest-blog__post-title {
  font-size: 1.125rem;
  margin: 1rem 0;
}

@media (min-width: 768px) {
  .post-list__title,
  .latest-blog__post-title {
    font-size: 1.25rem;
  }
}
.post-list__title a,
.latest-blog__post-title a {
  text-decoration: none;
  color: #0d0d0d;
}

.post-list__excerpt {
  font-size: 0.9375rem;
  line-height: 1.5;
}

.pagination {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

@media (min-width: 768px) {
  .pagination {
    margin: 2.5rem 0;
  }
}
.pagination a {
  text-decoration: none;
  background: #6c7a89;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  color: #ffffff;
  margin: 0 0.25rem;
  transition: background-color 0.3s ease;
}

.pagination a:hover,
.pagination .current {
  background: #a0a9b8;
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  margin: 0 0.25rem;
}

.post-list__meta,
.post__meta,
.latest-blog__meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8125rem;
  padding-top: 0.5rem;
}

.post-list__category,
.post__category,
.latest-blog__category {
  font-weight: bold;
}

/* this place it above the stretched link of .blog-list__link to make clickable again  */
.post-list__category a {
  position: relative;
  z-index: 2;
}

.post-list__category a,
.post__category a,
.latest-blog__category a {
  color: #0d0d0d;
  background-color: #d7dde5;
  border-radius: 4px;
  text-decoration: none;
  padding: 0.25rem 0.5rem;
}

.post-list__category a:hover,
.post__category a:hover,
.latest-blog__category a:hover {
  background-color: #c4ccd6;
}

.back-to-top {
  position: fixed;
  bottom: 5rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.8);
  color: #6c7a89;
  border: 1.8px solid #6c7a89;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
}
.back-to-top:hover {
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
}

/* Blog Page */
.blog-page {
  margin: 0 auto;
  padding: 0.5rem 0;
}

.single-layout {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 0.5rem;
}

.post__title {
  margin: 1rem 0 2rem 0;
}

.post__thumbnail img {
  width: 100%;
  height: auto;
  border-radius: 2px;
}

.wp-block-image img {
  border-radius: 2px;
}

.post__content {
  line-height: 1.7;
  margin: 2rem 0;
  font-size: 1rem;
}

.post-navigation {
  display: flex;
  justify-content: space-between;
  margin: 2.5rem 0 2.5rem 0;
}

.post-navigation a {
  text-decoration: none;
  background: #6c7a89;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  color: #ffffff;
}

.post-navigation a:hover {
  background: #a0a9b8;
}

/* Bullets style for post content lists */
.post__content ul li {
  list-style-type: disc;
  display: list-item;
  margin-left: 1.5em;
}

.post__content ol li {
  list-style-type: decimal;
  display: list-item;
  margin-left: 1.5em;
}

/* Spacing for lists */
.post__content ul,
.post__content ol {
  margin-top: 1em;
  margin-bottom: 1em;
}

.post__content ul li,
.post__content ol li {
  list-style-position: outside;
  margin-left: 1.5em;
}

/* Template Pages */
.page-default {
  padding: 0.5rem;
  font-size: 1rem;
  line-height: 1.7;
}

@media (min-width: 768px) {
  .page-default {
    padding: 1rem;
    margin-bottom: 3rem;
  }
}
.page__content h2 {
  font-size: 1.125rem;
  margin: 1rem 0 0.5rem 0;
}

@media (min-width: 768px) {
  .page__content h2 {
    font-size: 1.25rem;
  }
}
.page__content > *:last-child {
  margin-bottom: 2rem; /* or padding-bottom if you prefer */
}

/* Custom Page / About Me */
.custom-page {
  padding: 0.5rem 0;
}

@media (min-width: 768px) {
  .custom-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
  }
}
.custom-page__profile {
  display: block;
  background: #f7f8fa;
  border-radius: 4px;
  padding: 1rem;
}

.custom-page__photo {
  text-align: center;
  margin: 2rem 0;
}
.custom-page__photo img {
  max-width: 180px;
  height: auto;
  border-radius: 2px;
}

.custom-page__content {
  line-height: 1.8;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .custom-page__profile {
    display: flex;
    flex-direction: row-reverse;
    gap: 2rem;
    align-items: center;
  }
  .custom-page__photo {
    flex: 0 0 250px;
    margin: 0;
  }
  .custom-page__photo img {
    max-width: 250px;
  }
  .custom-page__content {
    flex: 1;
    margin: 1rem;
  }
}
.latest-blog {
  margin: 3.5rem auto;
}

@media (min-width: 768px) {
  .latest-blog {
    max-width: 800px;
    margin: 5rem auto;
    padding: 0 1rem;
  }
}
.latest-blog__title {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

@media (min-width: 1024px) {
  .latest-blog__title {
    font-size: 1.5rem;
  }
}
.latest-blog__post {
  display: block;
  margin-bottom: 2rem;
}

.latest-blog__thumbnail,
.latest-blog__content {
  width: 100%;
}

@media (min-width: 768px) {
  .latest-blog__post {
    display: flex;
    gap: 1.5rem;
  }
  .latest-blog__thumbnail {
    flex: 1 1 300px;
  }
  .latest-blog__content {
    flex: 2;
  }
}
.latest-blog__post img {
  width: 100%;
  height: auto;
  object-fit: cover;
  max-height: 250px;
  border-radius: 2px;
}

@media (min-width: 768px) {
  .latest-blog__post img {
    max-height: none;
  }
}
.read-more {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: bold;
  text-decoration: none;
  color: #0d0d0d;
  cursor: pointer;
  padding: 0.25rem 0.5rem 0.25rem 0;
}
.read-more:hover {
  text-decoration: underline #ccd0d6;
  text-underline-offset: 0.3rem;
  text-decoration-thickness: 1px;
}

@media (min-width: 768px) {
  .read-more {
    margin-top: 1rem;
  }
}
/* Contact Page */
.contact-page {
  padding: 0.5rem;
}

@media (min-width: 768px) {
  .contact-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
  }
}
.contact-page__form {
  background-color: #f7f8fa;
  padding: 1.5rem;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.contact-page__form form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-page__field {
  margin-bottom: 1rem;
}

.contact-page__form label {
  font-weight: bold;
  display: block;
  margin-bottom: 0.3rem;
}

.contact-page__input {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ccd0d6;
  border-radius: 4px;
  font-size: 0.9375rem;
}

.contact-page__textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ccd0d6;
  border-radius: 4px;
  font-size: 0.9375rem;
}

.contact-page__btn,
.not-found__btn {
  background-color: #6c7a89;
  color: #ffffff;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-size: 0.9375rem;
  margin-top: 1rem;
}

.contact-page__btn:hover,
.not-found__btn:hover {
  background-color: #a0a9b8;
}

.contact-page__message {
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  font-weight: 500;
  border-left: 4px solid;
}

/* Success style */
.contact-page__message.success {
  background-color: #E6F4EA;
  color: #1B5E20;
  border-color: #81C784;
}

/* Error style */
.contact-page__message.error {
  background-color: #FDECEA;
  color: #B00020;
  border-color: #F44336;
}

.not-found {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  height: 60vh;
  gap: 1rem;
}

.not-found__title {
  font-size: 1.125rem;
  letter-spacing: 0.05em;
}

.not-found__content {
  text-align: center;
}
