html,
body.custom-front-page {
  margin: 0 !important;
  padding: 0 !important;
  background: #020407 !important;
}

html {
  scroll-behavior: smooth;
}

body.custom-front-page {
  overflow: hidden;
  font-family: "Oswald", "Noto Sans JP", sans-serif;
  color: #fff;
}

body.custom-front-page * {
  box-sizing: border-box;
}

a,
a:visited,
a:active {
  color: inherit;
  text-decoration: none;
}

/* =========================
   Color Variables
========================= */
:root {
  --accent: #4cc9f0;
  --accent-light: #90e0ef;
  --accent-deep: #00b4d8;
  --bg-dark: #020407;
  --white-soft: rgba(255, 255, 255, 0.82);
}

/* =========================
   Project Scroll
========================= */
.project-scroll-wrap {
  position: relative;
  margin-top: 40px;
  width: min(100%, 780px);
  overflow: hidden;
}

.project-scroll {
  display: flex;
  gap: 0;
  margin-top: 40px;
  padding-top: 30px;
  padding-bottom: 10px;
  overflow-x: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

.project-scroll::-webkit-scrollbar {
  display: none;
}

.project-slider-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  pointer-events: auto;
}

.project-scroll-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.project-nav-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font-family: "JetBrains Mono", monospace;
  font-size: 18px;
  line-height: 1;
  transition: border-color 0.25s, background 0.25s, color 0.25s, transform 0.25s;
}

.project-nav-button:hover,
.project-nav-button:focus-visible {
  border-color: var(--accent);
  background: rgba(76, 201, 240, 0.18);
  color: var(--accent-light);
  outline: none;
  transform: translateY(-2px);
}

.project-scroll-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: transform 0.25s, border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.project-scroll-dots button:hover,
.project-scroll-dots button:focus-visible {
  border-color: var(--accent-light);
  background: rgba(76, 201, 240, 0.36);
  outline: none;
}

.project-scroll-dots button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 14px rgba(76, 201, 240, 0.55);
  transform: scale(1.25);
}

.project-card {
  flex: 0 0 100%;
  min-height: 300px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  color: #fff;
  text-decoration: none;
  scroll-snap-align: start;
  transition: 0.35s;
  display: flex;
  align-items: stretch;
  gap: 28px;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  background:
    linear-gradient(145deg, rgba(76, 201, 240, 0.18), rgba(255, 255, 255, 0.03)),
    rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 28px rgba(76, 201, 240, 0.22);
}

.project-image {
  flex: 0 0 44%;
  min-width: 0;
}

.project-image-placeholder {
  width: 100%;
  height: auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(76, 201, 240, 0.28);
  background:
    linear-gradient(135deg, rgba(76, 201, 240, 0.16), rgba(255, 255, 255, 0.04)),
    rgba(0, 0, 0, 0.26);
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.project-image img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(76, 201, 240, 0.28);
  object-fit: cover;
}

.project-image-placeholder i {
  color: rgba(144, 224, 239, 0.84);
  font-size: 58px;
  text-shadow: 0 0 20px rgba(76, 201, 240, 0.42);
}

.project-card-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(76, 201, 240, 0.45);
  background: rgba(76, 201, 240, 0.08);
}

.project-icon i {
  font-size: 28px;
  color: var(--accent);
}

.project-card h3 {
  margin: 18px 0 10px;
  font-size: 22px;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.project-card p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.8;
}

.project-card.is-coming {
  opacity: 0.8;
}

/* =========================
   Boot Terminal Animation
========================= */
.boot-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  overflow: hidden;
}

.boot-panel {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  background: #000;
  z-index: 2;
  transition: transform 1.6s cubic-bezier(0.77, 0, 0.175, 1);
}

.boot-panel-top {
  top: 0;
}

.boot-panel-bottom {
  bottom: 0;
}

.boot-console {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", "SFMono-Regular", "Consolas", "Monaco", monospace;
  color: #fff;
  font-size: clamp(24px, 5vw, 56px);
  letter-spacing: 0.04em;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.28);
  transition: opacity 0.6s ease;
}

.console-line {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 15ch;
  max-width: calc(100vw - 48px);
}

.prompt {
  margin-right: 14px;
  color: #fff;
  opacity: 0.75;
}

.cursor {
  display: inline-block;
  width: 0.62em;
  height: 1.1em;
  margin-left: 8px;
  background: #fff;
  animation: cursorBlink 1s steps(1) infinite;
}

@keyframes cursorBlink {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

.boot-loader.is-open .boot-console {
  opacity: 0;
}

.boot-loader.is-open .boot-panel-top {
  transform: translateY(-100%);
}

.boot-loader.is-open .boot-panel-bottom {
  transform: translateY(100%);
}

/* =========================
   Main Layout
========================= */
.space-portfolio {
  width: 100%;
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  background: var(--bg-dark);
}

/* =========================
   Header
========================= */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 100%;
  padding: 24px 8vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.logo,
.site-nav nav a {
  color: #fff;
  text-decoration: none;
  pointer-events: auto;
}

.logo {
  line-height: 1;
  letter-spacing: 0.04em;
}

.logo img {
  display: block;
  width: 180px;
  max-width: 42vw;
  height: auto;
}

.logo span {
  display: block;
  font-size: 10px;
  color: #777;
  letter-spacing: 0.45em;
  text-transform: uppercase;
}

.site-nav nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.site-nav nav a {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: 0.3s;
}

.site-nav nav a i {
  font-size: 26px;
}

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

/* =========================
   Language Toggle
========================= */
.lang-toggle {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 8px 14px;
  border: 1px solid rgba(76, 201, 240, 0.5);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
  font-family: "JetBrains Mono", "SFMono-Regular", "Consolas", "Monaco", monospace;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: 0.3s;
}

.lang-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(76, 201, 240, 0.1);
  box-shadow: 0 0 18px rgba(76, 201, 240, 0.18);
}

.lang-option {
  color: rgba(255, 255, 255, 0.58);
  transition: color 0.25s, text-shadow 0.25s;
}

.lang-toggle.is-ja .lang-ja,
.lang-toggle.is-en .lang-en {
  color: var(--accent);
  text-shadow: 0 0 12px rgba(76, 201, 240, 0.48);
}

.lang-divider {
  opacity: 0.45;
}

/* =========================
   Fixed Left Bar
========================= */
.fixed-side {
  position: fixed;
  left: 4vw;
  top: 50%;
  z-index: 60;
  transform: translateY(-42%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
}

.fixed-side span {
  color: var(--accent);
  font-size: 28px;
  line-height: 1;
}

.fixed-side small {
  margin-top: 6px;
  color: #aaa;
  font-size: 11px;
}

.fixed-dots {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 56px 0;
}

.fixed-dots a {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: 0.3s;
}

.fixed-dots a.active {
  background: var(--accent);
  transform: scale(1.35);
  box-shadow: 0 0 14px rgba(76, 201, 240, 0.7);
}

.fixed-side p {
  margin: 0;
  color: #aaa;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* =========================
   Sections
========================= */
.planet-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 13vw;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  opacity: 0.72;
  transform: scale(0.96);
  filter: brightness(0.82);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease,
    filter 0.8s ease;
}

.planet-section.is-active {
  opacity: 1;
  transform: scale(1);
  filter: brightness(1.08);
}

.planet-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.94) 0%,
      rgba(0, 0, 0, 0.64) 34%,
      rgba(0, 0, 0, 0.18) 70%,
      rgba(0, 0, 0, 0.58) 100%
    ),
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.35),
      rgba(0, 0, 0, 0.1)
    );
  z-index: 1;
}

.planet-section::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(
      circle at 68% 45%,
      rgba(76, 201, 240, 0.05) 0%,
      transparent 28%,
      rgba(0, 0, 0, 0.24) 56%,
      rgba(0, 0, 0, 0.72) 100%
    );
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.planet-section.is-active::after {
  opacity: 1;
}

.section-01 {
  background-image: url("../img/place-01.png");
}

.section-02 {
  background-image: url("../img/place-02.png");
}

.section-03 {
  background-image: url("../img/place-03.png");
}

.section-04 {
  background-image: url("../img/place-04.png");
}

.section-05 {
  background-image: url("../img/place-05.png");
}

/* =========================
   Content
========================= */
.section-content {
  position: relative;
  z-index: 4;
  opacity: 0;
  transform: translateY(44px);
  transition:
    opacity 0.8s ease 0.18s,
    transform 0.8s ease 0.18s;
}

.planet-section.is-active .section-content {
  opacity: 1;
  transform: translateY(0);
}

.label {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-content h1,
.section-content h2 {
  margin: 0;
  font-size: clamp(52px, 7vw, 96px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.text {
  max-width: 620px;
  margin: 28px 0 0;
  color: var(--white-soft);
  font-size: 15px;
  line-height: 2;
  letter-spacing: 0.08em;
}

.line-link {
  display: inline-flex;
  gap: 56px;
  align-items: center;
  margin-top: 42px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(76, 201, 240, 0.55);
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: 0.3s;
}

.line-link span:last-child {
  color: var(--accent);
}

.line-link:hover {
  color: var(--accent);
  gap: 72px;
}

.arrow-link {
  position: absolute;
  right: 4vw;
  top: 50%;
  z-index: 4;
  color: #fff;
  font-size: 54px;
  line-height: 1;
  text-decoration: none;
  font-weight: 100;
  transition: 0.3s;
}

.arrow-link:hover {
  color: var(--accent);
  transform: translateX(8px);
}

.section-down-link {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 5;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 42px;
  text-decoration: none;
  pointer-events: auto;
  transform: translateX(-50%);
  transition: color 0.25s, text-shadow 0.25s, transform 0.25s;
}

.section-down-link:hover,
.section-down-link:focus-visible {
  color: var(--accent-light);
  text-shadow:
    0 0 8px rgba(144, 224, 239, 0.95),
    0 0 18px rgba(76, 201, 240, 0.78),
    0 0 32px rgba(76, 201, 240, 0.48);
  outline: none;
  transform: translate(-50%, 4px);
}

/* =========================
   Project / Social Links
========================= */
.project-links,
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.project-links a,
.social-links a {
  min-width: 150px;
  padding: 14px 22px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  transition: 0.3s;
}

.social-links a {
  display: flex;
  align-items: center;
  gap: 16px;
}

.social-links a i {
  width: 38px;
  color: #ffffff;
  font-size: 34px;
  text-align: center;
  transition: 0.3s;
}

.project-links a:hover,
.social-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(76, 201, 240, 0.08);
  transform: translateY(-3px);
}

.social-links a:hover i {
  transform: translateY(-3px) scale(1.12);
  text-shadow: 0 0 18px rgba(76, 201, 240, 0.65);
}

/* =========================
   Footer
========================= */
.site-footer {
  position: absolute;
  left: 13vw;
  right: 13vw;
  bottom: 28px;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  color: rgba(255, 255, 255, 0.58);
  font-family: "JetBrains Mono", "SFMono-Regular", "Consolas", "Monaco", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  gap: 22px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  transition: color 0.25s, text-shadow 0.25s;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent-light);
  text-shadow: 0 0 14px rgba(76, 201, 240, 0.5);
  outline: none;
}

/* =========================
   Mobile
========================= */
@media (max-width: 900px) {
  .site-nav {
    padding: 20px;
    align-items: center;
  }

  .site-nav nav {
    display: flex;
    gap: 0;
  }

  .site-nav nav a {
    display: none;
  }

  .site-nav nav a[aria-label="GitHub"] {
    display: inline-flex;
    margin-right: 12px;
  }

  .lang-toggle {
    min-height: 32px;
    padding: 8px 12px;
    font-size: 11px;
  }

  .fixed-side {
    left: 10px;
  }

  .fixed-side span,
  .fixed-side small {
    display: none;
  }

  .fixed-dots {
    gap: 16px;
    margin: 0;
  }

  .planet-section {
    min-height: 100svh;
    padding: 110px 24px 80px 35px;
  }

  .section-content h1,
  .section-content h2 {
    font-size: 42px;
  }

  .text {
    font-size: 14px;
  }

  .arrow-link {
    right: 24px;
    font-size: 38px;
  }

  .section-down-link {
    bottom: 18px;
    width: 56px;
    height: 56px;
    font-size: 32px;
  }

  .project-card {
    flex-direction: column;
    gap: 20px;
    flex-basis: 100%;
    min-height: 220px;
    padding: 20px;
  }

  .project-scroll-wrap {
    width: min(100%, 340px);
	 margin-top:0;
  }
  .project-scroll {
	 margin-top:10px;
  }

  .project-image {
    flex-basis: auto;
  }

  .project-image-placeholder {
    min-height: 150px;
    aspect-ratio: 16 / 9;
  }

  .project-image img {
    min-height: 150px;
    aspect-ratio: 16 / 9;
  }

  .project-card-body {
    justify-content: flex-start;
  }

  .project-icon {
    width: 48px;
    height: 48px;
  }

  .project-icon i {
    font-size: 22px;
  }

  .project-links a,
  .social-links a {
    min-width: 130px;
  }

  .social-links a i {
    font-size: 30px;
  }

  .site-footer {
    left: 24px;
    right: 24px;
    bottom: 16px;
    flex-direction: column-reverse;
    gap: 10px;
    font-size: 10px;
    text-align: center;
  }

  .site-footer nav {
    gap: 16px;
    justify-content: center;
  }

  .boot-console {
    font-size: clamp(24px, 8vw, 42px);
  }
}
