/* =========================
 * Color tokens
 * ========================= */
:root {
  --color-retro-black: #111111;
  --color-retro-white: #fdfcf9;
  --color-retro-green: #7b8f4e;
  --color-retro-yellow: #e1ad01;
}

/* =========================
   * Navigation / Header
   * ========================= */
.gh-navigation {
  background-color: var(--color-retro-green);
  font-size: 1.5rem;
  font-weight: 500;
  height: 100px;
}

.gh-navigation-menu {
  color: var(--color-retro-white);
}

.gh-navigation-actions {
  color: var(--color-retro-white);
  background-color: transparent;
}

.gh-navigation::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 50%;
  pointer-events: none;
  background-image: url("../images/handwriting-bold.svg");
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: 140% auto;
  z-index: -1;
}

.gh-header.is-magazine .gh-header-inner > div {
  display: flex;
  flex-direction: column;
  gap: var(--grid-gap);
  grid-row: 1;
}

.gh-header.is-magazine .gh-header-inner > .gh-card .gh-card-title {
  font-weight: 500;
}

/* =========================
   * Cards / Images / Text
   * ========================= */
.gh-card-image img {
  border-radius: 48px;
}

.gh-article-image img {
  border-radius: 192px 192px 8px 8px;
}

.kg-image {
  border-radius: 8px;
}

.gh-card-title {
  line-height: 1.1;
  font-weight: 500;
}

.gh-card-excerpt {
  -webkit-line-clamp: 3;
}

.gh-container.is-grid .gh-feed {
  row-gap: calc(var(--grid-gap) * 1);
}

/* =========================
   * Tag list
   * ========================= */
.gh-card-tags {
  display: flex;
  flex-wrap: wrap;
  margin-top: 0;
  margin-bottom: 6px;
}

.gh-card-tag-list {
  color: var(--ghost-accent-color);
  font-weight: 500;
  margin-bottom: 2px;
  padding-right: 8px;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* =========================
   * Section titles (Featured / Latest / Read more)
   * ========================= */
/* Featured */
.gh-featured-title {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 4rem;
  font-weight: 400;
  letter-spacing: -0.04em;
  border-bottom: none;
}

/* Latest */
.gh-container-title {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 4rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  border-bottom: none;
}

/* Read more (on post template) */
.post-template .gh-container .gh-container-title {
  font-size: 3rem;
}

/* =========================
   * Featured section
   * ========================= */
.gh-featured {
  background-color: var(--color-retro-yellow);
  color: var(--color-retro-white);
  padding: 30px max(4vmin, 20px);
}

.gh-featured .gh-card-title.is-title {
  color: var(--color-retro-white);
}

/* Featured画像のみに白枠を付ける */
.gh-featured .post.featured .gh-card-image img {
  border: 2px solid var(--color-retro-white);
  box-sizing: border-box;
}

/* =========================
   * About card / Footer
   * ========================= */
.gh-about {
  position: relative;
  align-items: center;
  color: var(--color-retro-black);
  background-color: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 380px;
  padding: 48px 24px;
  text-align: center;
}

/* 外側の枠 */
.gh-about::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--color-retro-black);
  pointer-events: none;
}

/* 内側の枠 */
.gh-about::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid var(--color-retro-black);
  pointer-events: none;
}

.gh-about-title {
  font-weight: 450;
  font-size: 2rem;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.gh-card-link {
  gap: 10px;
}

.gh-button {
  padding: 14px 32px;
}

.gh-footer {
  background-color: var(--color-retro-black);
  color: var(--color-retro-white);
  font-size: 1.5rem;
  margin-top: 5vw;
  padding-top: 1vw;
}

/* =========================
   * About: social icons
   * ========================= */
.gh-about-social {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 12px;
}

.gh-about-x-icon,
.gh-about-github-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-color: var(--color-retro-green);
  color: #fff; /* SVG内部の fill=currentColor に適用される */
  text-decoration: none;
  transition: opacity 0.2s ease;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}

.gh-about-x-icon svg,
.gh-about-github-icon svg {
  width: 20px;
  height: 20px;
}

.gh-about-x-icon:hover,
.gh-about-github-icon:hover {
  opacity: 0.8;
}

/* =========================
   * Misc
   * ========================= */
.post-card-featured {
  color: red;
}

/* =========================
   * Media queries
   * ========================= */

/* ≥ 992px */
@media (min-width: 992px) {
  .gh-header {
    margin-top: 100px;
  }

  .gh-navigation.is-stacked .gh-navigation-menu {
    height: 150px;
    grid-column: 1 / 4;
    grid-row-start: 2;
    justify-content: center;
    margin: 0;
    background: var(--background-color);
    border-top-left-radius: 192px;
    border-top-right-radius: 192px;
  }

  .gh-navigation.is-stacked .gh-navigation-actions {
    height: 150px;
  }

  .gh-navigation.is-stacked .gh-navigation-menu::before,
  .gh-navigation.is-stacked .gh-navigation-menu::after {
    background-color: transparent;
    content: "";
    height: 1px;
    left: 0;
    position: absolute;
    top: 80px;
    width: 100%;
  }

  .gh-navigation-menu {
    color: var(--color-retro-black);
  }
}

/* ≤ 1199px */
@media (max-width: 1199px) {
  .gh-viewport > .gh-featured .gh-featured-feed .gh-card:nth-child(4) {
    display: grid;
  }
}

/* ≤ 767px */
@media (max-width: 767px) {
  #gh-navigation {
    height: 96px;
    color: var(--color-retro-white);
  }

  #gh-navigation .gh-navigation-inner {
    grid-template-rows: none;
  }

  .is-open#gh-navigation .gh-navigation-actions,
  .is-open#gh-navigation .gh-navigation-menu {
    padding: 20px;
    border-radius: 8px;
  }

  .gh-featured-feed .gh-card-link {
    padding: 0 10px;
  }

  .gh-featured {
    padding: 30px max(4vmin, 20px);
  }
}
