/* ====== Reset & Base ====== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #0b0d17;
  color: #e1e4f0;
  line-height: 1.7;
  overflow-x: hidden;
}

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

/* ====== パーティクルキャンバス ====== */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ====== ヒーロー ====== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.hero__glitch-wrap {
  position: relative;
  display: inline-block;
}

.hero__title {
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
}

/* Glitch エフェクト */
.glitch {
  position: relative;
  animation: glitch-skew 4s infinite linear alternate-reverse;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.glitch::before {
  color: #ff3b9d;
  z-index: -1;
  animation: glitch-copy 2.4s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.glitch::after {
  color: #00e5ff;
  z-index: -2;
  animation: glitch-copy 2.4s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94) reverse both;
}

@keyframes glitch-skew {
  0%   { transform: skew(0deg); }
  20%  { transform: skew(-1deg); }
  40%  { transform: skew(0.5deg); }
  60%  { transform: skew(-0.3deg); }
  80%  { transform: skew(1deg); }
  100% { transform: skew(0deg); }
}

@keyframes glitch-copy {
  0%   { clip-path: inset(0 0 90% 0); transform: translate(-2px, 2px); }
  10%  { clip-path: inset(10% 0 80% 0); transform: translate(1px, -1px); }
  20%  { clip-path: inset(30% 0 50% 0); transform: translate(-3px, 1px); }
  30%  { clip-path: inset(50% 0 30% 0); }
  40%  { clip-path: inset(70% 0 10% 0); transform: translate(2px, -2px); }
  50%  { clip-path: inset(20% 0 60% 0); }
  60%  { clip-path: inset(80% 0 5% 0); transform: translate(-1px, 3px); }
  70%  { clip-path: inset(0 0 100% 0); }
  80%  { clip-path: inset(40% 0 40% 0); transform: translate(3px, 1px); }
  90%  { clip-path: inset(60% 0 20% 0); }
  100% { clip-path: inset(0 0 90% 0); transform: translate(0); }
}

.hero__sub {
  margin-top: 0.5rem;
  font-size: clamp(1.1rem, 3vw, 1.8rem);
  font-weight: 400;
  color: #a0a8c6;
  letter-spacing: 0.3em;
}

.hero__desc {
  margin-top: 1.2rem;
  max-width: 440px;
  color: #7880a0;
  font-size: 1rem;
}

.hero__actions {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ====== ボタン ====== */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn--primary {
  background: linear-gradient(135deg, #ff3b9d, #ff7a5a);
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 59, 157, 0.3);
}

.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(255, 59, 157, 0.5);
}

.btn--outline {
  border-color: #7880a0;
  color: #c8cde0;
}

.btn--outline:hover {
  border-color: #00e5ff;
  color: #00e5ff;
  transform: translateY(-3px);
}

.btn--small {
  padding: 0.45rem 1.25rem;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid #3a3f5c;
  border-radius: 50px;
  color: #c8cde0;
}

.btn--small:hover {
  border-color: #ff3b9d;
  color: #ff3b9d;
}

.btn--lg {
  padding: 1rem 3rem;
  font-size: 1.1rem;
}

/* ====== セクション ====== */
.section {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

.section--last {
  padding-bottom: 4rem;
}

.section__title {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 300;
  color: #5a6288;
  margin-bottom: 2.5rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.section__num {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ff3b9d;
  letter-spacing: 0.15em;
}

/* ====== プロジェクトカード ====== */
.project-card {
  display: flex;
  gap: 2.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  padding: 2rem;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.project-card:hover {
  border-color: rgba(255, 59, 157, 0.3);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.project-card__visual {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(255,59,157,0.12), rgba(0,229,255,0.08));
  border-radius: 20px;
  overflow: hidden;
}

.project-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card__icon svg {
  width: 60px;
  height: 60px;
  color: #ff3b9d;
}

.project-card__body {
  flex: 1;
  min-width: 0;
}

.project-card__title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50px;
  background: rgba(0, 229, 255, 0.1);
  color: #00e5ff;
  letter-spacing: 0.03em;
}

.project-card__desc {
  color: #8890b0;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* ====== スキルグリッド ====== */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.skill-chip {
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
  cursor: default;
}

.skill-chip:hover {
  background: rgba(255, 59, 157, 0.12);
  border-color: #ff3b9d;
  transform: scale(1.04);
}

/* 習熟度インジケーター (CSS擬似要素) */
.skill-chip[data-level]::after {
  content: "⋅" attr(data-level) "0";
  font-size: 0.7rem;
  color: #5a6288;
  margin-left: 0.4rem;
  vertical-align: super;
}

/* ====== コンタクト ====== */
.contact__text {
  color: #8890b0;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.contact__socials {
  display: flex;
  gap: 1.2rem;
  margin-top: 2rem;
  justify-content: center;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
  color: #a0a8c6;
}

.social-link:hover {
  background: rgba(0, 229, 255, 0.1);
  border-color: #00e5ff;
  color: #00e5ff;
  transform: translateY(-3px);
}

/* ====== フッター ====== */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  font-size: 0.85rem;
  color: #3a3f5c;
}

/* ====== レスポンシブ ====== */
@media (max-width: 600px) {
  .project-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.2rem;
  }

  .project-card__visual {
    width: 80px;
    height: 80px;
  }

  .project-card__icon svg {
    width: 44px;
    height: 44px;
  }

  .section {
    padding: 4rem 1.2rem;
  }

  .hero__actions {
    flex-direction: column;
    align-items: center;
  }
}
