* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  font-family: sans-serif;
  background: #111;
  color: #fff;
  overflow-x: hidden;
}

h2 {
  font-size: 40px;
}

h2 a {
  color: inherit;
  text-decoration: none;
}

h2 a:hover {
  text-decoration: underline;
}

h2.sticky {
  position: fixed;
  top: 50px;
  left: 0;
  right: 0;
  background: #000;
  z-index: 999;
  width: 100%;
  margin: 0;
  padding: 2px;
  border-bottom: 1px solid #333;
}
h3{
  padding: 20px 30px 0 30px;
  font-size: 30px;
  display: block;
}

/* ===== ヘッダー ===== */
header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 60px;
  background: #000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  z-index: 1000;
  font-size: 20px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-link img {
  width: 40px;
  height: 40px;
  display: block;
  transition: transform 0.2s ease;
}

.logo-link svg {
  width: 40px;
  height: 40px;
  display: block;
  transition: transform 0.2s ease;
}

.logo-link i {
  font-size: 40px;
  color: #fff;
  display: inline-block;
  transition: transform 0.2s ease;
}

.logo-link:hover img,
.logo-link:hover i,
.logo-link:hover svg {
  transform: scale(1.15);
}

/* ===== ヘッダーメニュー ===== */
.header-nav {
  display: flex;
  gap: 16px;
}

.header-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 20px;
  padding: 6px 8px;
  border-radius: 4px;
}

.header-nav a:hover {
  background: #222;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
  margin-left: auto;
}

.menu-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .logo {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
  }

  .logo-area {
    flex: 1;
    min-width: 0;
  }

  .logo-link svg,
  .logo-link i {
    width: 30px;
    height: 30px;
    font-size: 30px;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .header-nav {
    position: absolute;
    top: 60px;
    right: 0;
    left: 0;
    background: #000;
    flex-direction: column;
    gap: 0;
    display: none;
    border-top: 1px solid #222;
    z-index: 999;
  }

  .header-nav.is-open {
    display: flex;
  }

  .header-nav a {
    padding: 12px 20px;
    border-radius: 0;
    border-bottom: 1px solid #222;
  }
}

/* ===== モーダル ===== */
#video-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

#video-modal iframe {
  width: 80vw;         /* 画面幅の80% */
  max-width: 960px;    /* 最大幅 */
  aspect-ratio: 16 / 9;
  height: auto;  
}

/* ===== メイン ===== */
main {
  padding-top: 0px;
}

#top-video {
  padding-top: 60px;
}

#top-video .video-wrap {
  width: 100%;
  margin: 0;
}

#top-video video {
  width: 100%;
  height: auto;
  display: block;
}
section {
  padding: 20px 20px;
  scroll-margin-top: 80px;
}

#about {
  padding: 20px 20px 20px 20px;;
  background-image: url('asset/img/KatsuyaYamaguchi.png');
  background-size: 50% auto;
  background-position: right center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  position: relative;
  min-height: 600px;
}

@media (max-width: 768px) {
  #about {
    background-attachment: scroll;
    background-position: right 60px;
  }
}

#about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

#about .about-container {
  position: relative;
  z-index: 1;
}

.about-container {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.about-content {
  flex: 1;
}

.about-image {
  flex-shrink: 0;
  width: 1000px;
  position: relative;
}

.about-image img {
  width: 50vw;
  height: auto;
  border-radius: 8px;
}

#parallax-image {
  position: sticky;
  top: 100px;
}

myname {
  padding: 0 30px;
  font-size: 70px;
  display: block;
  margin-top: 10px;
}

explanation {
  padding: 0 50px;
  font-size: 24px;
  display: block;
  color: #aaa;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
  white-space: normal;
}

skillIcon {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 50px;
  max-width: 100%;
}

skillIcon i {
  font-size: 60px;
  display: inline-block;
  color: #cecece;
  transition: transform 0.2s ease;
}

skillIcon i:hover {
  transform: scale(1.15);
}

skillStr {
  padding: 0 50px;
  display: block;
  font-size: 24px;
  line-height: 1.7;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
  white-space: normal;
}

skillStr span:not([title]) {
  display: block;
}

skillStr span[title] {
  display: inline;
}

explanation span {
  display: block;
}

@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
    gap: 20px;
  }

  .about-image {
    width: 100%;
    position: static;
  }

  .about-image img {
    width: 100%;
  }

  #parallax-image {
    position: static;
  }

  myname {
    padding: 0 20px;
    font-size: 40px;
  }

  explanation {
    padding: 0 20px;
    font-size: 16px;
  }

  skillIcon {
    padding: 0 20px;
  }

  skillIcon i {
    font-size: 40px;
  }

  skillStr {
    padding: 0 20px !important;
    font-size: 16px !important;
  }

  h3 {
    padding: 20px 20px 0 20px !important;
    font-size: 24px !important;
  }
}

skillStr {
  padding: 0 50px;
  display: block;
  font-size: 24px;
  line-height: 1.7;
}

#custom-content {
  padding: 0 !important;
  margin: 0 !important;
}

#works {
  padding: 20px;
}

.works-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 20px;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .works-container {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    gap: 20px;
    margin: 20px 0;
    padding: 0;
  }
}

.works {
  background: #1a1a1a;
  border-radius: 8px;
  padding: 20px;
  transition: transform 0.2s ease;
}

.works.is-expanded {
  grid-column: 1 / -1;
}

.works:hover {
  transform: translateY(-5px);
}

.works-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.works h3 {
  padding: 0;
  margin: 0;
  flex: 1;
}

.works-title {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease;
}

.works-title:hover {
  color: #4285f4;
}

.works-title::before {
  content: "+";
  display: inline-block;
  font-size: 18px;
  line-height: 1;
  color: #ccc;
  transition: color 0.2s ease;
}

.works-title:hover::before {
  color: #4285f4;
}

.works.is-expanded .works-title::before {
  content: "-";
}

.works-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 15px;
  width: 100%;
}

.works-thumb {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  cursor: pointer;
  object-fit: cover;
}

.works-summary {
  margin: 0;
  padding: 0;
  color: #aaa;
  line-height: 1.6;
  font-size: 14px;
}

.works-header .logo-link svg {
  width: 28px;
  height: 28px;
  transition: transform 0.2s ease;
}

.works-header .logo-link:hover svg {
  transform: scale(1.15);
}

.works iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  margin: 0 0 15px 0;
  border-radius: 8px;
}

.works-details {
  display: none;
}

.works.is-expanded .works-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: 100%;
}

@media (max-width: 768px) {
  .works.is-expanded .works-details {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.works.is-expanded .works-preview {
  display: none;
}

.works-details-left {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.works-details-right {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.works-description {
  margin: 0;
  padding: 0;
  color: #aaa;
  line-height: 1.6;
  font-size: 14px;
}

.works .docswell-iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 620 / 349;
  margin: 0 0 15px 0;
  border: 1px solid #333;
  border-radius: 6px;
}

.works p {
  margin: 0;
  color: #aaa;
  line-height: 1.6;
}

/* ===== フッター ===== */
footer {
  background: #000;
  border-top: 1px solid #333;
  padding: 40px 20px 20px;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 30px;
}

.footer-section h4 {
  color: #fff;
  margin-bottom: 15px;
  font-size: 18px;
}

.footer-section p {
  color: #aaa;
  margin: 0;
  line-height: 1.6;
}

.footer-section p a {
  color: #aaa;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-section p a:hover {
  color: #fff;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section ul li a {
  color: #aaa;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-section ul li a:hover {
  color: #fff;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #222;
  color: #666;
  font-size: 14px;
}

.footer-bottom p {
  margin: 5px 0;
}

.footer-license a {
  color: #888;
  text-decoration: none;
}

.footer-license a:hover {
  color: #fff;
}

/* ===== 自己紹介動画 ===== */
.intro-video {
  width: 100%;
  max-width: 620px;
  margin: 20px 0;
}

.intro-video iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 8px;
  background: #000;
}