/* ---------------------------------------------
   ベーススタイルと変数定義
--------------------------------------------- */
:root {
  --bg-gradient: linear-gradient(120deg, #e0f7ff, #ffffff);
  --primary: #1080cf;
  --secondary: #5ad7ff;
  --accent: #1b365d;
  --text: #1f2a37;
  --muted: #5f6b7c;
  --card: rgba(255, 255, 255, 0.85);
  --shadow: 0 20px 60px rgba(16, 128, 207, 0.15);
  --radius: 20px;
  --work-gap: 16px;
  --flash-duration: 80ms;
  --ring-duration: 0.533s;
  --ring-stack-duration: calc(var(--ring-duration) * 2);
  --burst-duration: 0.7s;
  --recovery-duration: 0.85s;
  --particle-duration: 1.1s;
  --particle-count: 90;
  --burst-scale: 1.15;
  --ring-target-scale: calc((var(--hero-orb-size, 320px) + 30px) / var(--hero-orb-size, 320px));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg-gradient);
  line-height: 1.7;
  width: 100%;
}

body.modal-open {
  overflow: hidden;
}

html {
  scroll-behavior: smooth; /* ナビゲーションからのスムーズスクロールを適用 */
}

img {
  max-width: 100%;
  display: block;
  border-radius: calc(var(--radius) - 8px);
}

a {
  text-decoration: none;
  color: inherit;
}

.section {
  padding: 80px 6vw 20px 6vw;
}

.section-header {
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 8px;
}

.section-header p {
  margin: 0;
  color: var(--muted);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--shadow);
}

.cta:hover {
  transform: scale(1.05) translateY(-2px);
}

/* ---------------------------------------------
   ナビゲーション
--------------------------------------------- */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  width: 100%;
  padding: 18px 6vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px rgba(16, 128, 207, 0.12);
}

.main-nav .logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.main-nav .logo a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0px;
}

.main-nav .logo img {
  width: 100%;
  height: 100%;
  display: block;
}

.main-nav .logo-text {
  display: none;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: uppercase;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0px;
}

.main-nav a {
  font-weight: 600;
  color: var(--accent);
  padding: 13px 14px 12px 14px;
  transition: color 0.3s ease;
}

.main-nav a:hover {
  color: var(--primary);
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.menu-btn {
  display: none;
}

@media (max-width: 640px) {
  .main-nav {
    padding: 12px 5vw;
  }

  .main-nav ul {
    display: none;
  }

  .main-nav .logo-text {
    display: inline-flex;
    font-size: 1.05rem;
  }

  .menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    position: absolute;
    right: 5vw;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    border-radius: 10px;
    z-index: 1001;
    gap: 6px;
  }

  .menu-btn .bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--accent);
    margin: 0;
    transition: transform 0.25s ease, opacity 0.2s ease;
  }

  .nav-toggle:checked + .menu-btn .bar:nth-child(1) {
    transform: translateY(8px) rotate(135deg);
  }

  .nav-toggle:checked + .menu-btn .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle:checked + .menu-btn .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-135deg);
  }

  .nav-toggle:checked ~ ul {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: fixed;
    top: calc(12px + 60px);
    right: 5vw;
    width: min(170px, 80vw);
    padding: 14px;
    border-radius: 14px;
    background: var(--card);
    box-shadow: 0 14px 40px rgba(16, 128, 207, 0.16);
    backdrop-filter: blur(6px);
    z-index: 1000;
  }

  .main-nav ul li a {
    display: block;
    padding: 10px 12px;
    font-size: 14px;
  }
}

/* ---------------------------------------------
   オープニングアニメーション
--------------------------------------------- */
.intro-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.8), rgba(16, 128, 207, 0.85));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 9999;
  width: 100vw;
  animation: overlayFade 1s ease forwards;
  animation-delay: 2.2s;
}

.intro-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.05);
}

.door {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, #102a43, #134074);
  z-index: 1;
}

.door-left {
  left: 0;
  animation: doorOpenLeft 1.2s ease-in-out forwards;
  animation-delay: 1.2s;
}

.door-right {
  right: 0;
  animation: doorOpenRight 1.2s ease-in-out forwards;
  animation-delay: 1.2s;
}

.keyhole {
  position: relative;
  width: 140px;
  height: 140px;
  border: 3px solid #fff;
  border-radius: 0;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  z-index: 2;
  background: rgba(16, 128, 207, 0.18);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.key-piece {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150px;
  height: 150px;
  background: linear-gradient(135deg, #5ad7ff, #0f6cbe);
  border-radius: 18px;
  transform: translate(-50%, -50%);
  z-index: 3;
  opacity: 0;
  box-shadow: 0 20px 35px rgba(16, 128, 207, 0.45);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.piece-left {
  clip-path: polygon(0 50%, 50% 0, 50% 100%);
  animation: leftKeyTravel 1s linear forwards;
}

.piece-right {
  clip-path: polygon(50% 0, 100% 50%, 50% 100%);
  animation: rightKeyTravel 1s linear forwards;
}

.intro-text {
  position: absolute;
  bottom: 80px;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  color: #fff;
  text-transform: uppercase;
  z-index: 4;
  opacity: 0;
  animation: textReveal 0.8s ease forwards;
  animation-delay: 1.3s;
}

@keyframes leftKeyTravel {
  0% {
    transform: translate(-260%, -50%);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

@keyframes rightKeyTravel {
  0% {
    transform: translate(160%, -50%);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

@keyframes doorOpenLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-105%);
  }
}

@keyframes doorOpenRight {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(105%);
  }
}

@keyframes overlayFade {
  0% {
    opacity: 1;
    visibility: visible;
  }
  100% {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

@keyframes textReveal {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-content {
  opacity: 0;
  animation: contentShow 1.2s ease forwards;
  animation-delay: 2.2s;
}

@keyframes contentShow {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------------------------------------
   Heroセクション
--------------------------------------------- */
.hero {
  min-height: 90vh;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  align-items: center;
  position: relative;
}

.hero-text h1 {
  font-size: clamp(2.8rem, 8vw, 4.5rem);
  margin: 0;
  color: var(--accent);
}

.hero-text .eyebrow {
  letter-spacing: 0.2em;
  font-size: 1.1rem;
  color: var(--muted);
  text-transform: uppercase;
}

.catch-copy {
  font-size: 1.5rem;
  margin: 16px 0;
  color: var(--primary);
}

.hero-visual {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-orb-shell {
  width: min(320px, 70vw);
  height: min(320px, 70vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 6s ease-in-out infinite;
}

.hero-orb {
  --hero-orb-size: min(320px, 70vw);
  --burst-start-delay: 0ms;
  width: var(--hero-orb-size);
  height: var(--hero-orb-size);
  border-radius: 50%;
  position: relative;
  /* overflow: hidden; */
  background: transparent;
  box-shadow: 0 30px 120px rgba(15, 107, 190, 0.45);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
  isolation: isolate;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.hero-orb.is-bursting {
  animation:
    orbBlast var(--burst-duration) ease-out forwards,
    orbRecovery var(--recovery-duration) ease-out forwards;
  animation-delay: var(--burst-start-delay), calc(var(--burst-start-delay) + var(--burst-duration));
  animation-fill-mode: forwards;
  will-change: transform, opacity;
}

.hero-orb.is-reduced-feedback {
  box-shadow: 0 35px 140px rgba(90, 215, 255, 0.45);
}

.hero-orb:hover {
  transform: scale(1.03);
  box-shadow: 0 40px 150px rgba(15, 107, 190, 0.55);
}

.hero-orb:focus-visible {
  outline: 3px solid rgba(90, 215, 255, 0.8);
  outline-offset: 6px;
}

.orb-core,
.orb-halo,
.orb-glow,
.orb-flash {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.orb-surface {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #e9f7ff, #195bb1 70%, #031227 100%);
  pointer-events: none;
  z-index: 0;
}

.orb-core {
  inset: 28%;
  background: radial-gradient(circle, #ffffff, rgba(255, 255, 255, 0.05));
  filter: blur(1px);
  animation: heartbeat 3.2s ease-in-out infinite;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
}

.orb-halo {
  inset: 8%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-left-color: rgba(90, 215, 255, 0.6);
  border-right-color: rgba(15, 107, 190, 0.2);
  filter: blur(0.5px);
  animation: rotate 14s linear infinite;
}

.orb-glow {
  inset: -5%;
  background: radial-gradient(circle, rgba(58, 204, 255, 0.25), rgba(7, 18, 38, 0.2));
  filter: blur(12px);
  opacity: 0.7;
}

.orb-flash {
  inset: 0;
  opacity: 0;
}

.orb-flash {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(120, 224, 255, 0.4), rgba(4, 16, 48, 0));
  transform: scale(0.2);
}

.orb-rings {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orb-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.6px solid rgba(255, 255, 255, 0.85);
  opacity: 0;
  transform: scale(0.4);
  mix-blend-mode: screen;
  filter: blur(0.2px);
  --ring-delay: 0s;
}

.orb-ring:nth-child(2) {
  --ring-delay: calc(var(--ring-duration) * 0.2);
}

.orb-ring:nth-child(3) {
  --ring-delay: calc(var(--ring-duration) * 0.4);
}

.hero-orb.is-bursting .orb-flash {
  animation: orbFlash var(--flash-duration) ease-out forwards;
}

.hero-orb.is-bursting .orb-ring {
  animation: orbRing var(--ring-duration) cubic-bezier(0.4, 0, 1, 1) forwards;
  animation-delay: var(--ring-delay);
}

.orb-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.orb-particles.is-active {
  opacity: 1;
}

.orb-code {
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 20%, rgba(7, 15, 32, 0.7), rgba(1, 5, 12, 0.85));
  padding: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.hero-orb:hover .orb-code,
.hero-orb:focus-visible .orb-code {
  opacity: 0.85;
}

.code-stream {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: "JetBrains Mono", "Fira Code", "SFMono-Regular", Consolas, monospace;
  font-size: 0.68rem;
  line-height: 1.5;
  color: rgba(160, 234, 255, 0.6);
  text-shadow: 0 0 8px rgba(58, 255, 255, 0.6);
  animation: codeFlow 10s linear infinite;
  animation-play-state: paused;
  will-change: transform;
  width: 90vw;
}

.code-stream span {
  white-space: nowrap;
  letter-spacing: 0.03em;
}

.hero-orb:hover .code-stream,
.hero-orb:focus-visible .code-stream {
  animation-play-state: running;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-30px);
  }
}

@keyframes swirl {
  to {
    transform: rotate(360deg);
  }
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(0.95);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes codeFlow {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50%);
  }
}

@keyframes orbFlash {
  0% {
    opacity: 0;
    transform: scale(0.2);
  }
  20% {
    opacity: 1;
    transform: scale(0.6);
  }
  100% {
    opacity: 0;
    transform: scale(1.4);
  }
}

@keyframes orbRing {
  0% {
    opacity: 0.9;
    transform: scale(0.4);
  }
  70% {
    opacity: 0.4;
    transform: scale(calc(var(--ring-target-scale) - 0.15));
  }
  100% {
    opacity: 0;
    transform: scale(var(--ring-target-scale));
  }
}

@keyframes orbBlast {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  45% {
    transform: translateY(-4px) scale(var(--burst-scale));
    opacity: 0.2;
  }
  60% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 0;
  }
}

@keyframes orbRecovery {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-orb-shell {
    animation: none;
  }

  .code-stream {
    animation: none;
  }
}

@keyframes glow {
  0%,
  100% {
    opacity: 0.2;
  }
  50% {
    opacity: 1;
  }
}

/* ---------------------------------------------
   About & 学習内容
--------------------------------------------- */
.about-content {
  background: var(--card);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.timeline h3,
.quick-facts h3 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  color: var(--accent);
}

.timeline ul,
.quick-facts ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.timeline ul li {
  margin-bottom: 8px;
  line-height: 1.5;
  padding-left: 105px;
  position: relative;
}

.timeline ul li span {
  font-weight: 700;
  color: var(--primary);
  margin-right: 0px;
  position: absolute;
  left: 0;
  top: 0;
  width: 110px;
}

.quick-facts ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-facts li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  align-items: flex-start;
}

.quick-facts .fact-label {
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.quick-facts .fact-label::after {
  content: "：";
  margin-left: 2px;
  color: var(--muted);
}

.quick-facts .fact-value {
  color: var(--text);
  min-width: 0;
}

.learning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
}

.learning-card {
  background: var(--card);
  padding: 12px 6px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.learning-card:hover {
  transform: scale(1.05);
  box-shadow: 0 30px 70px rgba(16, 128, 207, 0.25);
}

.learning-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(16, 128, 207, 0.15);
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 4px;
}

.learning-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.learning-card h3 {
  margin: 0;
  width: 100%;
  font-size: 0.9rem;
}

/* ---------------------------------------------
   Certifications
--------------------------------------------- */
.cert-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 36px;
}

.cert-card {
  background: var(--card);
  padding: 0px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(16, 128, 207, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.cert-card.spacer {
  visibility: hidden;
}

.cert-card:hover {
  transform: scale(1.05);
  box-shadow: 0 30px 70px rgba(16, 128, 207, 0.25);
}

.other-cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.mini-cert {
  background: rgba(255, 255, 255, 0.9);
  padding: 12px 16px;
  border-radius: 999px;
  font-size: 0.92rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(16, 128, 207, 0.1);
  transition: transform 0.3s ease;
}

.mini-cert:hover {
  transform: scale(1.05);
}

/* ---------------------------------------------
   Worksセクションとモーダル
--------------------------------------------- */
.works-grid {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  padding: 32px 16px 32px 16px;
  scrollbar-width: thin;
}

.works-grid::-webkit-scrollbar {
  height: 8px;
}

.works-grid::-webkit-scrollbar-track {
  background: rgba(16, 128, 207, 0.08);
  border-radius: 4px;
}

.works-grid::-webkit-scrollbar-thumb {
  background: rgba(16, 128, 207, 0.35);
  border-radius: 4px;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

.slider-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(16, 128, 207, 0.25);
  transition: transform 0.2s ease, background 0.2s ease;
  position: relative;
}

.slider-dots span.neighbor {
  background: rgba(16, 128, 207, 0.5);
  transform: scale(1.1);
}

.slider-dots span::before {
  content: "";
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
}

.slider-dots span::before {
  cursor: pointer;
}

.slider-dots span.active {
  background: var(--primary);
  transform: scale(1.35);
}

.works-group {
  margin-bottom: 48px;
}

.works-group h3 {
  margin: 0 0 0px;
  color: var(--accent);
  font-size: 1.0rem;
}

.work-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.work-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  flex: 0 0 calc((100% - 224px) / 5.5);
  max-width: none;
  height: 360px;
  max-height: 400px;
  overflow: hidden;
}

.work-card:hover {
  transform: scale(1.05);
  box-shadow: 0 30px 70px rgba(16, 128, 207, 0.3);
}

.work-card img {
  width: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius) - 8px) calc(var(--radius) - 8px) 0 0;
}

.work-body {
  padding: 20px 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.footer {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  padding: 0px 6vw;
}

.footer a {
  color: var(--primary);
  text-decoration: underline;
}

@media (max-width: 1200px) {
  .work-card {
    flex: 0 0 calc((100% - 160px) / 4.2);
  }
}

.work-modal {
  position: fixed;
  inset: 0;
  background: rgba(11, 26, 51, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 999;
  padding: 40px 20px;
  overflow-y: auto;
  width: 100vw;
}

.work-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  max-width: min(90vw, 1024px);
  max-height: 90vh;
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.modal-content img {
  margin: 0 auto 24px;
}

.modal-image-link {
  display: block;
}

.close-modal {
  position: fixed;
  top: clamp(16px, 3vh, 32px);
  right: clamp(16px, 3vw, 32px);
  border: none;
  background: rgba(99, 82, 255, 0.8);
  color: #fff;
  font-size: 1.8rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.3s ease;
  z-index: 1001;
}

.close-modal:hover {
  transform: scale(1.05);
}

/* ---------------------------------------------
   Contactセクション
--------------------------------------------- */
/* .section.contact {
  overflow-x: hidden;
} */

.contact-wrapper {
  /* display: grid;
  grid-template-columns: 1fr; */
  gap: 32px;
  max-width: 650px;
  margin: 0 auto;
}

form {
  background: var(--card);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
}

input,
textarea {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(16, 128, 207, 0.3);
  font-size: 1rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.9);
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(16, 128, 207, 0.4);
}

.required-badge {
  font-size: 0.8rem;
  color: #fff;
  background: var(--primary);
  padding: 0 4px;
  border-radius: 4px;
  margin-left: 6px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  align-self: flex-start;
}

.thank-you {
  background: rgba(16, 128, 207, 0.08);
  border: 1px dashed rgba(16, 128, 207, 0.5);
  border-radius: var(--radius);
  padding: 32px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.thank-you.is-visible {
  display: flex;
}

.social-links {
  margin: 32px auto 0 auto;
  display: flex;
  gap: 20px;
  max-width: 650px;
}

.social-links a {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(16, 128, 207, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.social-links a:hover {
  transform: scale(1.05);
}

.social-links svg {
  width: 24px;
  height: 24px;
  fill: var(--primary);
}

/* ---------------------------------------------
   スクロールフェード用の基本設定
--------------------------------------------- */
[data-animate] {
  opacity: 0;
  transform: translateX(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-animate="left"] {
  transform: translateX(-40px);
}

[data-animate="right"] {
  transform: translateX(40px);
}

.in-view {
  opacity: 1;
  transform: translateX(0) !important;
}

/* ---------------------------------------------
   レスポンシブ対応
--------------------------------------------- */
@media (max-width: 960px) {
  .section {
    padding: 40px 20px 20px 20px;
  }

  .main-nav {
    padding: 0px 2vw;
  }

  .main-nav a {
  padding: 9px 14px 8px 14px;
  }

  .main-nav .logo img {
    width: 40px;
    height: 40px;
    padding: 4px 0px;
  }

  .main-nav .logo a {
    width: 40px;
    height: 40px;
  }

  .hero {
    padding-top: 100px;
  }

  .hero-orb {
  clip-path: circle(50%);
  }

  .works-grid {
    padding-bottom: 10px;
  }

  .work-card {
    flex: 0 0 min(220px, 55vw);
    height: 280px;
  }

  [data-animate="left"],
  [data-animate="right"] {
    transform: translateX( -20px );
  }
}

@media (max-width: 640px) {
  .main-nav {
    flex-direction: row;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
  }

  .main-nav ul {
    flex-wrap: nowrap;
    justify-content: flex-end;
    width: auto;
    gap: 0px;
    flex: 1;
  }

  .main-nav li {
    font-size: 0.65rem;
    white-space: nowrap;
  }

  .main-nav a {
    padding: 10px 5px;
  }

  form,
  .about-content {
    padding: 24px;
  }

  .modal-content {
    padding: 24px;
  }

  .social-links {
    justify-content: center;
  }

  .learning-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
  }

  .learning-card {
    padding: 8px 4px;
    border-radius: 10px;
    gap: 4px;
  }

  .learning-icon {
    width: 36px;
    height: 36px;
  }

  .learning-card h3 {
    font-size: 0.68rem;
    word-break: break-word;
    text-align: center;
  }

  .other-cert-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .cert-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
  }

  .cert-card {
    padding: 16px;
    min-height: 100px;
    font-size: 0.70rem;
  }

  .cert-card h3 {
    margin: 0;
  }

  .mini-cert {
    padding: 8px 10px;
    border-radius: 10px;
    min-height: 46px;
    font-size: 0.55rem;
  }

  .works-grid {
    gap: 10px;
    padding: 10px 10px 16px;
  }

  .work-card {
    flex: 0 0 calc((100% - 30px) / 3.5);
    min-width: 140px;
    height: 240px;
    font-size: 0.7rem;
  }

  .work-card h3 {
    font-size: 0.85rem;
  }

  .work-card p {
    font-size: 0.7rem;
  }
}