/* 1. リセット & 全体設定 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #2b2d42;
  background-color: #ffffff;
  line-height: 1.6;
}

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

ul {
  list-style: none;
}

.container {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
}

.text-center {
  text-align: center;
}

/* 2. ヘッダー */
.header {
  position: sticky;
  top: 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  border-bottom: 1px solid #edf2f7;
  z-index: 100;
  padding: 1rem 0;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;                  /* マークと文字の間隔 */
  text-decoration: none;
}

.logo-mark {
  height: 36px;
  width: 36px;
  background-color: #ffffff;
  border-radius: 6px;
  padding: 4px;
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.logo-main {
  font-size: clamp(0.85rem, 3.2vw, 1.05rem);
  font-weight: 600;
  color: #1d4ed8;
  letter-spacing: 0.05em;
  white-space: nowrap;
  line-height: 1.2;
}

.nav ul {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: #4b5563;
  transition: color 0.2s;
}

.nav a:hover {
  color: #2563eb;
}

/* 3. ヒーローセクション */
.hero {
  padding: 5rem 0 4rem;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

.hero-text .sub-title {
  color: #2563eb;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.hero-text h2 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.hero-text .description {
  color: #4b5563;
  max-width: 600px;
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

/* 4. ボタン・共通パーツ */
.btn {
  display: inline-block;
  background-color: #2563eb;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 500;
  transition: background-color 0.2s;
}

.btn:hover {
  background-color: #1d4ed8;
}

.btn-sm {
  display: inline-block;
  background-color: #2563eb;
  color: #ffffff;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}

.btn-outline {
  background-color: transparent;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-outline:hover {
  background-color: #f3f4f6;
}

.section {
  padding: 4rem 0;
}

.bg-light {
  background-color: #f8fafc;
}

.section-title {
  font-size: 1.75rem;
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background-color: #2563eb;
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

/* 5. セクション別スタイル */

/* About */
.about-text h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.about-text p {
  color: #4b5563;
  margin-bottom: 1rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-links a {
  color: #2563eb;
  font-weight: 500;
  text-decoration: underline;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.skill-card h3 {
  font-size: 1.1rem;
  color: #1e293b;
  margin-bottom: 1rem;
  border-bottom: 2px solid #eff6ff;
  padding-bottom: 0.5rem;
}

.skill-card li {
  color: #475569;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* Works */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.work-card {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
}

.work-img-placeholder {
  width: 100%;
  height: 180px;
  background-color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 0.85rem;
  text-align: center;
}

/* 画像枠の設定 */
.work-img {
  width: 100%;
  height: 180px; /* 画像を表示する高さ */
  overflow: hidden;
}

/* 画像自体のトリミング設定 */
.work-img img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 枠に合わせて自動で縦横比を維持しつつトリミング */
  display: block;
}

.work-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.tag {
  font-size: 0.75rem;
  color: #2563eb;
  background-color: #eff6ff;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  align-self: flex-start;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.work-content h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.work-content p {
  font-size: 0.9rem;
  color: #4b5563;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.tech-stack span {
  font-size: 0.75rem;
  background-color: #f1f5f9;
  color: #475569;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.work-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.work-links a:first-child {
  flex: 1 1 100%;    /* 1つ目のボタンを幅100%にして上に配置 */
  text-align: center;
}

.work-links a:nth-child(2),
.work-links a:nth-child(3) {
  flex: 1 1 calc(50% - 0.25rem); /* 残り2つのボタンを横並び均等（50%）に配置 */
  text-align: center;
}

/* Footer */
.footer {
  padding: 2rem 0;
  border-top: 1px solid #edf2f7;
  color: #94a3b8;
  font-size: 0.85rem;
}

/* 6. スマホ表示 */
@media (max-width: 640px) {
  .hero-text h2 {
    font-size: 1.75rem;
  }
  
  .header-container {
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav ul {
    gap: 1rem;
  }
}