@charset "UTF-8";

/* =========================================
   1. View Transitions MPAの基本設定
========================================= */
@view-transition {
  navigation: auto;
}

:root {
  --ease--quint-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease--quint-in-out: cubic-bezier(0.83, 0, 0.17, 1);
  --animation-enter: fade-in;
  --animation-exit: fade-out;
}

body {
  view-transition-name: --body;
  background-color: #fafafa;
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  color: #2d3748;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

::view-transition-old(--body) {
  animation: var(--animation-exit) 400ms var(--ease--quint-out) both;
}
::view-transition-new(--body) {
  animation: var(--animation-enter) 500ms var(--ease--quint-in-out) 50ms both;
}

/* =========================================
   2. アニメーションパターン
========================================= */
:root[data-theme="slide-blur"] {
  --animation-enter: slide-blur-in;
  --animation-exit: slide-blur-out;
}
@keyframes slide-blur-out {
  from {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: translateX(-30px);
    filter: blur(10px);
  }
}
@keyframes slide-blur-in {
  from {
    opacity: 0;
    transform: translateX(30px);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

:root[data-theme="fade"] {
  --animation-enter: fade-in;
  --animation-exit: fade-out;
}
@keyframes fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

:root[data-theme="slide-up"] {
  --animation-enter: slide-up-in;
  --animation-exit: slide-up-out;
}
@keyframes slide-up-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-40px);
  }
}
@keyframes slide-up-in {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

:root[data-theme="slide-x"] {
  --animation-enter: slide-x-in;
  --animation-exit: slide-x-out;
}
@keyframes slide-x-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-40px);
  }
}
@keyframes slide-x-in {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

:root[data-theme="scale"] {
  --animation-enter: scale-in;
  --animation-exit: scale-out;
}
@keyframes scale-out {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.97);
  }
}
@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(1.03);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

:root[data-theme="blur"] {
  --animation-enter: blur-in;
  --animation-exit: blur-out;
}
@keyframes blur-out {
  from {
    opacity: 1;
    filter: blur(0);
  }
  to {
    opacity: 0;
    filter: blur(12px);
  }
}
@keyframes blur-in {
  from {
    opacity: 0;
    filter: blur(12px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

:root[data-theme="flip"] {
  --animation-enter: flip-in;
  --animation-exit: flip-out;
}
@keyframes flip-out {
  from {
    opacity: 1;
    transform: perspective(1000px) rotateY(0deg);
  }
  to {
    opacity: 0;
    transform: perspective(1000px) rotateY(-90deg);
  }
}
@keyframes flip-in {
  from {
    opacity: 0;
    transform: perspective(1000px) rotateY(90deg);
  }
  to {
    opacity: 1;
    transform: perspective(1000px) rotateY(0deg);
  }
}

:root[data-theme="clip"] {
  --animation-enter: clip-in;
  --animation-exit: clip-out;
}
@keyframes clip-out {
  from {
    opacity: 1;
    clip-path: circle(150% at 50% 50%);
  }
  to {
    opacity: 0;
    clip-path: circle(0% at 50% 50%);
  }
}
@keyframes clip-in {
  from {
    opacity: 0;
    clip-path: circle(0% at 50% 50%);
  }
  to {
    opacity: 1;
    clip-path: circle(150% at 50% 50%);
  }
}

/* =========================================
   3. 共通レイアウト & コンポーネント
========================================= */
header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-size: 24px;
  font-weight: 800;
  text-decoration: none;
  color: #1a202c;
  letter-spacing: -0.05em;
}
.global-nav {
  display: flex;
  gap: 30px;
}
.global-nav a {
  text-decoration: none;
  color: #4a5568;
  font-weight: 600;
  font-size: 15px;
  transition: color 0.2s;
}
.global-nav a:hover,
.global-nav a.active {
  color: #2b6cb0;
}

main {
  flex: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 20px;
  width: 100%;
  box-sizing: border-box;
}
footer {
  text-align: center;
  padding: 40px;
  font-size: 14px;
  color: #a0aec0;
}
h1 {
  font-size: 48px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 40px;
  color: #1a202c;
}
h2 {
  font-size: 28px;
  margin-bottom: 30px;
  border-bottom: 2px solid #edf2f7;
  padding-bottom: 10px;
}

/* テーマスイッチャー */
.theme-switcher {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #1a202c;
  padding: 6px 6px 6px 14px;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 1000;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  min-width: 220px;
}
.theme-switcher-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  padding-top: 4px;
}
.theme-switcher-label svg {
  color: #63b3ed;
  flex-shrink: 0;
}
.theme-switcher-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 4px;
}
.theme-switcher select {
  appearance: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  outline: none;
  padding: 8px 36px 8px 12px;
  flex: 1;
  transition:
    background 0.2s,
    border-color 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.theme-switcher select:hover {
  background-color: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.25);
}
.theme-switcher select option {
  background: #1a202c;
  color: #fff;
}

/* =========================================
   4. 各ページ固有のスタイル
========================================= */

/* --- Home (index.html) --- */
.hero {
  text-align: center;
  padding: 60px 0 100px;
}
.hero h1 {
  margin-bottom: 20px;
}
.hero p {
  font-size: 20px;
  color: #718096;
  max-width: 600px;
  margin: 0 auto 40px;
}
.btn {
  display: inline-block;
  background: #1a202c;
  color: #fff;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 600;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}
.feature-card {
  background: #fff;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}
.feature-card h3 {
  margin-top: 0;
  font-size: 20px;
  color: #1a202c;
}

/* --- About (about.html) --- */
.profile-section {
  display: flex;
  gap: 50px;
  align-items: flex-start;
  margin-bottom: 60px;
}
.profile-image {
  flex: 0 0 300px;
  height: 400px;
  background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e0;
  font-size: 14px;
}
.profile-content {
  flex: 1;
}
.profile-content p {
  font-size: 16px;
  margin-bottom: 20px;
}
.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
}
.skill-list li {
  background: #e2e8f0;
  color: #4a5568;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}

/* --- Service (service.html) --- */
.service-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.service-item {
  background: #fff;
  border-radius: 24px;
  padding: 50px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.02);
  display: flex;
  gap: 40px;
  align-items: center;
}
.service-icon {
  width: 80px;
  height: 80px;
  background: #ebf8ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
}
.service-text h2 {
  margin-top: 0;
  font-size: 24px;
  border: none;
  padding: 0;
  margin-bottom: 15px;
}
.service-text p {
  margin: 0;
  color: #4a5568;
  font-size: 16px;
}

/* --- Works (works.html) --- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 40px;
}
.work-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}
.work-thumb {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  font-weight: bold;
}
.work-info {
  padding: 24px;
}
.work-info h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
}
.work-info p {
  margin: 0;
  color: #718096;
  font-size: 14px;
}
.tags {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}
.tag {
  background: #edf2f7;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #4a5568;
  font-weight: 600;
}
.grad-1 {
  background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
}
.grad-2 {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
}
.grad-3 {
  background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
}
.grad-4 {
  background: linear-gradient(135deg, #cfd9df 0%, #e2ebf0 100%);
  color: #4a5568;
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
  .profile-section {
    flex-direction: column;
  }
  .profile-image {
    flex: auto;
    width: 100%;
    height: 300px;
  }
  .service-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 30px;
  }
}
