/* 基本スタイル */
:root {
  --primary-color: #6c5ce7;
  --secondary-color: #00cec9;
  --text-color: #2d3436;
  --light-text: #636e72;
  --background: #ffffff;
  --dark-background: #f5f5f5;
  --transition: all 0.3s ease;
  --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --gradient: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans JP", "Poppins", sans-serif;
  color: var(--text-color);
  background-color: var(--background);
  overflow-x: hidden;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  padding: 0 20px;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ナビゲーション */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 25px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: var(--transition);
}

nav.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 15px 50px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.logo {
  display: flex;
  align-items: center;
}

.logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.logo-img {
  width: auto;
  height: 30px;
  margin-right: 10px;
  background: transparent;
}

.logo-text {
  font-family: "Montserrat", sans-serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-color);
}

/* Google Fontsの読み込み */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap");

.nav-links {
  display: flex;
}

.nav-links li {
  margin-left: 30px;
}

.nav-links a {
  position: relative;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-color);
  transition: var(--transition);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  z-index: 2000;
}

.menu-toggle span {
  width: 30px;
  height: 3px;
  background-color: var(--text-color);
  margin: 3px 0;
  transition: var(--transition);
}

/* ハンバーガーメニューのアクティブ状態（×印） */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -8px);
}

/* メニューオープン時のオーバーレイ */
body.menu-open::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 990;
}

/* ヒーローセクション */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: url("../img/bg-top.jpg") no-repeat center center;
  background-size: cover;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 0 20px 200px;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s forwards 0.5s;
}

.highlight {
  color: var(--primary-color);
  position: relative;
  display: inline-block;
}

.highlight::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 8px;
  background: rgba(108, 92, 231, 0.2);
  z-index: -1;
}

.subtitle {
  font-size: 1.2rem;
  color: var(--light-text);
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s forwards 0.8s;
}

.cta-button {
  display: inline-block;
  padding: 12px 30px;
  background: var(--gradient);
  color: white;
  border-radius: 30px;
  font-weight: 500;
  letter-spacing: 1px;
  transition: var(--transition);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s forwards 1s;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.cta-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--primary-color)
  );
  z-index: -1;
  transition: var(--transition);
  opacity: 0;
}

.cta-button:hover::before {
  opacity: 1;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  animation: fadeIn 1s forwards 1.5s;
}

.scroll-indicator span {
  font-size: 0.8rem;
  margin-bottom: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background-color: var(--text-color);
  position: relative;
}

.scroll-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background-color: var(--primary-color);
  animation: scrollDown 1.5s infinite;
}

/* About セクション */
.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 30px;
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--gradient);
}

.about {
  padding: 100px 0;
}

.about-content {
  display: flex;
  align-items: center;
  gap: 50px;
}

.about-image {
  flex: 1;
}

.image-container {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.image-container::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  right: 10px;
  bottom: 10px;
  border: 2px solid var(--primary-color);
  border-radius: 10px;
  z-index: -1;
}

.about-image img {
  width: 100%;
  transition: var(--transition);
}

.about-text {
  flex: 1;
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.about-text p {
  margin-bottom: 15px;
  color: var(--light-text);
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--dark-background);
  color: var(--text-color);
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--gradient);
  color: white;
  transform: translateY(-3px);
}

/* Works セクション */
.works {
  padding: 100px 0;
  background-color: var(--dark-background);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.work-item {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.work-item:hover {
  transform: translateY(-10px);
}

.work-image {
  position: relative;
  overflow: hidden;
}

.work-image img {
  width: 100%;
  transition: var(--transition);
}

.work-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.work-image:hover .work-overlay {
  opacity: 1;
}

.work-image:hover img {
  transform: scale(1.05);
}

.work-info {
  text-align: center;
  color: white;
}

.work-info h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.work-info p {
  margin-bottom: 20px;
}

.view-project {
  display: inline-block;
  padding: 8px 20px;
  background: white;
  color: var(--primary-color);
  border-radius: 30px;
  font-weight: 500;
  transition: var(--transition);
}

.view-project:hover {
  background: var(--secondary-color);
  color: white;
}

/* Skills セクション */
.skills {
  padding: 100px 0;
}

.skills-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px;
}

.skill-category h3 {
  font-size: 1.5rem;
  margin-bottom: 30px;
  position: relative;
  padding-left: 15px;
}

.skill-category h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 25px;
  background: var(--gradient);
}

.skill-bars {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.skill-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.skill-name {
  width: 100px;
  font-weight: 500;
}

.skill-progress {
  flex: 1;
  height: 8px;
  background-color: var(--dark-background);
  border-radius: 10px;
  margin: 0 15px;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: var(--gradient);
  border-radius: 10px;
  width: 0;
  transition: width 1.5s ease-in-out;
}

.skill-percent {
  font-size: 0.9rem;
  font-weight: 500;
  width: 40px;
  text-align: right;
}

/* Contact セクション */
.contact {
  padding: 100px 0;
  background-color: var(--dark-background);
}

.contact-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contact-form {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.contact-info {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.contact-info p {
  margin-bottom: 30px;
  color: var(--light-text);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-details li {
  display: flex;
  align-items: center;
  gap: 15px;
}

.contact-details i {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 50%;
  color: var(--primary-color);
  box-shadow: var(--box-shadow);
}

.form-group {
  margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: none;
  border-radius: 5px;
  background-color: white;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group textarea {
  height: 150px;
  resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-color);
}

.submit-btn {
  display: block;
  width: fit-content;
  margin: 0 auto;
  padding: 12px 30px;
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: 30px;
  font-family: inherit;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
}

/* フッター */
footer {
  padding: 60px 0 20px;
  background-color: #2d3436;
  color: white;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
  position: relative;
}

.footer-logo a {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: "Poppins", sans-serif;
}

.footer-links {
  display: flex;
  gap: 20px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.footer-links a {
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--secondary-color);
}

.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--gradient);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* アニメーション */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes scrollDown {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(30px);
  }
  100% {
    transform: translateY(0);
  }
}

/* レスポンシブデザイン */
@media screen and (max-width: 992px) {
  .hero h1 {
    font-size: 3.5rem;
  }

  .about-content {
    flex-direction: column;
  }

  .about-image,
  .about-text {
    width: 100%;
  }

  .works-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media screen and (max-width: 768px) {
  nav {
    padding: 20px 30px;
  }

  nav.scrolled {
    padding: 15px 30px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background: white;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    transition: var(--transition);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding-top: 80px;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li {
    margin: 15px 0;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .footer-links {
    position: static;
    transform: none;
    justify-content: center;
  }

  .work-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.5);
  }

  .work-info {
    transform: none;
  }

  .work-image img {
    transform: none;
  }

  .skills-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }

  .back-to-top i {
    font-size: 16px;
  }
}

@media screen and (max-width: 576px) {
  nav {
    padding: 15px 20px;
  }

  nav.scrolled {
    padding: 10px 20px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .about-content,
  .skills-content,
  .contact-content {
    gap: 30px;
  }

  .works-grid {
    grid-template-columns: 1fr;
  }
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
}

.back-to-top i {
  font-size: 20px;
}
