/* =========================
   Header Base
========================= */

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 64px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  transition: transform 0.3s ease, height 0.3s ease, box-shadow 0.3s ease;
  z-index: 900;
}

html[data-theme="dark"] .site-header {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.site-header.hide {
  transform: translateY(-100%);
}

.site-header.shrink {
  height: 48px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}


/* =========================
   Inner Layout
========================= */

.header-inner {
  max-width: 1100px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}


/* =========================
   Logo
========================= */

.site-logo {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--text-main);
}

.site-logo:visited,
.site-logo:hover,
.site-logo:active {
  text-decoration: none;
  color: var(--text-main);
}


/* =========================
   Navigation (PC)
========================= */

.site-nav {
  display: flex;
  gap: 20px;
  z-index: 1000; /* 確実にmenu-toggleより下 */
}

.site-nav a {
  font-size: 13px;
  text-decoration: none;
  color: var(--text-sub);
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--text-main);
}


/* =========================
   Hamburger Button
========================= */

.menu-toggle {
  display: none;
  font-size: 26px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-main);
  position: relative; /* 追加 */
  z-index: 1001;      /* navより上に表示 */
}


/* =========================
   Mobile
========================= */

@media (max-width: 768px) {

  .site-nav {
    position: fixed;
    top: 64px;
    right: 0;
    width: 220px;
    height: calc(100vh - 64px);
    background: var(--bg);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -4px 0 12px rgba(0,0,0,0.08);
  }

  html[data-theme="dark"] .site-nav {
    box-shadow: -4px 0 12px rgba(0,0,0,0.4);
  }

  .site-nav.open {
    transform: translateX(0);
  }

  .menu-toggle {
    display: block;
  }
}
