

/* Automatic dark mode from OS/browser preference */
@media (prefers-color-scheme: dark) {
  :root {
    --text-color: white;
    --bg-color: rgb(32, 33, 36);
  }
}

/* Manual overrides */
:root.light, :root {
  --text-color: black;
  --bg-color: white;
}

:root.dark {
  --text-color: white;
  --bg-color: rgb(32, 33, 36);
  /* 2. Modern Standard Method (Firefox & modern Chrome/Edge) */
  /* Syntax: scrollbar-color: [Thumb Color] [Track Color]; */
  scrollbar-color: grey var(--bg-color);

}

#navbar{
    top: 0;
    left: 0;
    right: 0;
    position:fixed;
    height: 50px;
    border-bottom: 3px solid grey;
    display: flex;
    justify-content: space-between;
}
nav, body{
    background-color: var(--bg-color);
    color: var(--text-color);

    transition:  var(--bg-color) 0.3s ease,
      var(--text-color) 0.3s ease;
}
/* 冒頭でimport */
@import url(https://fonts.googleapis.com/earlyaccess/notosansjp.css);
/* フォントを指定したいところで */

body{
    padding: 50px;
    font-family: 'Noto Sans JP';

}

a{
  text-decoration-color: red;
  color: red;
}




/* For Chrome, Safari, and newer Edge versions */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* For Firefox */
.no-scrollbar {
  scrollbar-width: none;
}

/* For Internet Explorer and older Edge */
.no-scrollbar {
  -ms-overflow-style: none;
}

.menu, #navbar{
  z-index: 1000;
}


.name-header-container{
    display: grid;
    place-items: center;
   white-space: -moz-pre-wrap; /* Firefox */
    white-space: -o-pre-wrap; /* Opera */
    white-space: pre-wrap; /* Chrome */
    word-wrap: break-word; /* IE */
    text-decoration: none;
    color: inherit;
}

.menu{
    position: fixed;
    top: 50px;
    height: fit-content;
    background-color:  var(--bg-color);
    display: none;
    left: 0;
    right: 0;
    border-bottom: 1px solid black;
}
.menu.active{
    display: block;
    font-size: 20px;
    border: 1px solid grey;
}

.menu > a{
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid var(--text-color);
    display: block;
    width: 100%;
    padding: 1rem;
    box-sizing: border-box;
}


.menu a {
  display: flex;
  justify-content: space-between;
  align-items: center;

  width: 100%;
}


@font-face {
    font-family: "nasa";
    src: url(../fonts/NASALIZA.TTF) format('truetype')
         url(../fonts/NASALIZA.woff) format("woff");
}
@font-face {
    font-family: "nasa";
    src: url("../fonts/NASALIZA.TTF") format("truetype"),
        url("../fonts/NASALIZA.woff") format("woff");
}

.nasa-font {
    font-family: 'nasa';
    font-weight: 10;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: var(--bg-color);
}



.name-header {
    color:  rgb(239, 2, 2); 
    font-size: 40px;
    padding: 0;
    padding-left: 30px;
    line-height: 1;      /* reduces space between lines */
    margin: 0;  
    font-weight: 15;
    text-wrap: nowrap;
}

.hamburger-btn {
    aspect-ratio: 1/1;
    height: 50px;
    justify-content: space-evenly;
    display: flex;
    flex-direction: column;
    cursor: pointer;

    margin: 10px;
    margin-right: 25px;
}

.hamburger-btn .bar {
    height: 5px;
    width: 40px;
    background-color: var(--text-color);
}

.hamburger-btn {
  width: 40px;
  height: 30px;
  position: relative;
  cursor: pointer;
}

.bar {
  width: 100%;
  height: 4px;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* normal hamburger positions */
.first {
  top: 0;
}

.second {
  top: 13px;
}

.third {
  bottom: 0;
}

/* ACTIVE STATE */
.hamburger-btn.active .first {
  transform: rotate(45deg);
  top: 13px;
}

.hamburger-btn.active .second {
  opacity: 0;
}

.hamburger-btn.active .third {
  transform: rotate(-45deg);
  bottom: 13px;
}

.hamburger-menu{
    display: grid;
    place-items: center;
    padding: 20px;
}



html, body {
    overflow: auto;
}

.hide-scrollbar {
    overflow: auto; /* Or auto if you still want scrolling but invisible scrollbar */
}

#navbar {
  /* existing rules ... */
  align-items: center;
}

.navbar-menu {
  display: flex;
  align-items: center;
  height: 100%;
}

.lang-btn {
  display: flex;
  align-items: center;
  height: auto;          /* was 50% */
  margin: 0 10px;        /* was 9% */
}

.flag-img {
  display: block;
  height: 24px;          /* was 100% */
  width: auto;
  border: 1px solid black;
}


/* for mobile */
@media screen and (max-width: 431px) {
  .name-header{
      font-size: 35px;
  }
}