:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #f1f4f8;
  --text: #1f2937;
  --muted: #5f6b7a;
  --line: #d8e0ea;
  --accent: #d94a4a;
  --accent-deep: #b63e3e;
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  --container: 1040px;
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family:
    "Hiragino Sans",
    "Yu Gothic",
    "Meiryo",
    sans-serif;
  background:
    linear-gradient(180deg, rgba(217, 74, 74, 0.05), transparent 220px),
    var(--bg);
  line-height: 1.8;
}

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

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 248, 251, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(216, 224, 234, 0.8);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.site-logo {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.96rem;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

.section {
  padding: 38px 0 0;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  line-height: 1.2;
}

.section-note {
  margin: 8px 0 0;
  color: var(--muted);
}

.about-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.profile-card,
.skill-card,
.work-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.profile-card {
  padding: 28px;
}

.profile-avatar {
  display: block;
  width: 112px;
  height: 112px;
  padding: 8px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
  object-fit: contain;
}

.profile-list {
  margin: 0;
}

.profile-list div + div {
  margin-top: 18px;
}

.profile-list dt {
  color: var(--muted);
  font-size: 0.92rem;
}

.profile-list dd {
  margin: 6px 0 0;
  font-size: 1rem;
  font-weight: 700;
}

.about-body {
  padding-top: 6px;
}

.about-body p {
  margin: 0;
}

.about-body p + p {
  margin-top: 18px;
}

.skill-grid,
.works-grid {
  display: grid;
  gap: 20px;
}

.skill-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.skill-card {
  padding: 24px;
}

.skill-card h3,
.work-card h3 {
  margin: 0 0 14px;
  font-size: 1.2rem;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip-list li {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 0.92rem;
}

.chip-list .chip-accent {
  color: var(--accent);
  border-color: rgba(217, 74, 74, 0.25);
  background: rgba(217, 74, 74, 0.08);
  font-weight: 700;
}

.works-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.work-card {
  padding: 24px;
}

.work-gallery {
  position: relative;
  margin-bottom: 18px;
}

.work-image,
.work-image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
}

.work-image {
  display: block;
  object-fit: contain;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.gallery-next {
  position: absolute;
  top: 50%;
  right: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(216, 224, 234, 0.9);
  border-radius: 50%;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.gallery-next:hover,
.gallery-next:focus-visible {
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  transform: translateY(-50%) translateX(2px);
}

.work-image-placeholder {
  display: grid;
  place-items: center;
  border: 1px dashed #c9d4e0;
  background:
    linear-gradient(135deg, rgba(217, 74, 74, 0.07), rgba(255, 255, 255, 0.9)),
    var(--surface-soft);
}

.work-image-placeholder span {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.work-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.work-type {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  background: var(--surface-soft);
}

.work-card p {
  margin: 0;
  color: var(--muted);
}

.work-card .chip-list {
  margin-top: 16px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.contact-link:hover,
.contact-link:focus-visible {
  transform: translateY(-1px);
  border-color: #c2cedb;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-footer {
  padding: 56px 0 32px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 900px) {
  .about-layout,
  .skill-grid,
  .works-grid {
    grid-template-columns: 1fr;
  }

  .profile-card {
    max-width: 420px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(var(--container), calc(100% - 20px));
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 14px 0;
  }

  .site-nav {
    gap: 14px;
  }

  .work-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .contact-link {
    width: 100%;
  }
}
