/* ========================================
   CSS Reset & Base Styles
   ======================================== */

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans JP", sans-serif;
  color: #111111;
  background-color: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

ul {
  list-style: none;
}

/* ========================================
   CSS Variables
   ======================================== */

:root {
  --color-primary: #4C6FFF;
  --color-primary-hover: #3D5FE6;
  --color-text-primary: #111111;
  --color-text-secondary: #666666;
  --color-text-tertiary: #999999;
  --color-border: #EAEAEA;
  --color-bg-gray: #f9fafb;
  --max-width: 1200px;
}

/* ========================================
   Utility Classes
   ======================================== */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 1.5rem;
  border-top: 1px solid var(--color-border);
}

@media (min-width: 768px) {
  .section {
    padding: 5rem 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 5rem;
  }
  
  .section {
    padding: 5rem 5rem;
  }
}

/* ========================================
   Header
   ======================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: white;
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

.header.scrolled {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header__container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
}

.header__logo {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.header__logo:hover {
  color: var(--color-text-secondary);
}

.header__nav {
  display: none;
  gap: 3rem;
}

.header__nav-link {
  position: relative;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  transition: color 0.2s ease;
}

.header__nav-link:hover {
  color: var(--color-text-primary);
}

.header__nav-link.active {
  color: var(--color-text-primary);
}

.header__nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -0.25rem;
  left: 0;
  right: 0;
  height: 1px;
  background-color: var(--color-primary);
}

.header__menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--color-text-primary);
  transition: color 0.2s ease;
}

.header__menu-btn:hover {
  color: var(--color-text-secondary);
}

.header__mobile-nav {
  display: none;
  border-top: 1px solid var(--color-border);
  background-color: white;
}

.header__mobile-nav.open {
  display: block;
}

.header__mobile-nav-list {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.header__mobile-nav-link {
  padding: 0.75rem 0;
  font-size: 1rem;
  color: var(--color-text-secondary);
  transition: color 0.2s ease;
  display: block;
}

.header__mobile-nav-link:hover,
.header__mobile-nav-link.active {
  color: var(--color-text-primary);
}

@media (min-width: 768px) {
  .header__container {
    height: 6rem;
  }

  .header__logo {
    font-size: 1.25rem;
  }

  .header__nav {
    display: flex;
  }

  .header__nav-link {
    font-size: 1rem;
  }

  .header__menu-btn {
    display: none;
  }
}

/* ========================================
   Hero Section (トップページ)
   ======================================== */

.hero {
  padding: 8rem 1.5rem 9rem;
  margin-top: 5rem;
  text-align: center;
}

.hero__title {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
  line-height: 1.1;
}

.hero__subtitle {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
  line-height: 1.75;
}

.hero__description {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  max-width: 48rem;
  margin: 0 auto 2rem;
  line-height: 1.75;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 2rem;
  height: 3.5rem;
  background-color: var(--color-primary);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  margin-top: 2rem;
}

.hero__cta:hover {
  background-color: var(--color-primary-hover);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

.hero__cta svg {
  transition: transform 0.3s ease;
}

.hero__cta:hover svg {
  transform: translateX(4px);
}

@media (min-width: 768px) {
  .hero {
    padding: 10rem 1.5rem 12rem;
    margin-top: 6rem;
  }

  .hero__title {
    font-size: 4.5rem;
  }

  .hero__subtitle {
    font-size: 1.25rem;
  }

  .hero__description {
    font-size: 1rem;
  }

  .hero__cta {
    font-size: 1rem;
  }
}

/* ========================================
   Works Section
   ======================================== */

.works__title {
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 4rem;
}

.works__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.work-card {
  display: block;
  transition: all 0.3s ease;
  border-radius: 1rem;
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.work-card__image-wrapper {
  aspect-ratio: 4/3;
  background-color: var(--color-bg-gray);
  margin-bottom: 1.25rem;
  overflow: hidden;
  border-radius: 1rem;
}

.work-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.work-card:hover .work-card__image {
  transform: scale(1.03);
}

.work-card__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  transition: color 0.2s ease;
}

.work-card:hover .work-card__title {
  color: var(--color-primary);
}

.work-card__category {
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (min-width: 768px) {
  .works__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .work-card__category {
    font-size: 0.875rem;
  }
}

@media (min-width: 1024px) {
  .works__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========================================
   About & Skills Section
   ======================================== */

.about__content,
.skills__content {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
}

.about__text {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.skills__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.skills__item {
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  border-radius: 0.5rem;
  transition: border-color 0.2s ease;
}

.skills__item:hover {
  border-color: var(--color-primary);
}

/* ========================================
   Contact Section
   ======================================== */

.contact__content {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
}

.contact__text {
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.contact__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 2rem;
  height: 3.5rem;
  border: 2px solid var(--color-text-primary);
  color: var(--color-text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.contact__btn:hover {
  background-color: var(--color-text-primary);
  color: white;
  opacity: 0.95;
}

@media (min-width: 768px) {
  .contact__btn {
    font-size: 1rem;
  }
}

/* ========================================
   Footer
   ======================================== */

.footer {
  background-color: var(--color-bg-gray);
  border-top: 1px solid var(--color-border);
  padding: 4rem 1.5rem;
}

.footer__container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.footer__nav-link {
  font-size: 0.875rem;
  color: #6b7280;
  transition: color 0.2s ease;
}

.footer__nav-link:hover {
  color: var(--color-primary);
}

.footer__contact {
  text-align: center;
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 3rem;
}

.footer__contact-link {
  color: var(--color-primary);
  transition: color 0.2s ease;
}

.footer__contact-link:hover {
  color: var(--color-primary-hover);
}

.footer__copyright {
  text-align: center;
  font-size: 0.75rem;
  color: #9ca3af;
}

@media (min-width: 768px) {
  .footer__nav {
    flex-direction: row;
    gap: 2.5rem;
  }
}

/* ========================================
   Detail Page - Hero
   ======================================== */

.detail-hero {
  padding: 4rem 1.5rem 6rem;
  margin-top: 5rem;
}

.detail-hero__category {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.detail-hero__title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.detail-hero__subtitle {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.detail-hero__image {
  margin-top: 3rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.detail-hero__image-wrapper {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
}

.detail-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 768px) {
  .detail-hero {
    padding: 6rem 1.5rem 8rem;
    margin-top: 6rem;
  }

  .detail-hero__category {
    font-size: 0.875rem;
    margin-bottom: 2rem;
  }

  .detail-hero__title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
  }

  .detail-hero__subtitle {
    font-size: 1.25rem;
  }

  .detail-hero__image {
    margin-top: 6rem;
  }
}

@media (min-width: 1024px) {
  .detail-hero__title {
    font-size: 4.5rem;
  }
}

/* ========================================
   Detail Page - Project Overview
   ======================================== */

.project-overview__title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 3rem;
}

.project-overview__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.project-overview__info-group {
  margin-bottom: 2rem;
}

.project-overview__info-group:last-child {
  margin-bottom: 0;
}

.project-overview__info-label {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.project-overview__info-text {
  font-size: 0.875rem;
  color: var(--color-text-primary);
  line-height: 1.75;
}

.project-overview__cards {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.info-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.75rem;
  background-color: var(--color-bg-gray);
  border: 1px solid #f3f4f6;
  border-radius: 0.75rem;
}

.info-card__icon {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.info-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.info-card__text {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.75;
}

@media (min-width: 768px) {
  .project-overview__title {
    margin-bottom: 5rem;
  }

  .project-overview__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
  }

  .project-overview__info-group {
    margin-bottom: 2.5rem;
  }

  .project-overview__info-label {
    font-size: 0.875rem;
  }

  .project-overview__info-text {
    font-size: 1rem;
  }

  .info-card__title {
    font-size: 1.125rem;
  }

  .info-card__text {
    font-size: 1rem;
  }
}

/* ========================================
   Detail Page - Case Study
   ======================================== */

.case-study__content {
  max-width: 760px;
  margin: 0 auto;
}

.case-study__section {
  margin-bottom: 3.5rem;
}

.case-study__section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.case-study__text {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.case-study__text:last-child {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .case-study__section {
    margin-bottom: 5rem;
  }

  .case-study__section-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
  }

  .case-study__text {
    font-size: 1rem;
  }
}

/* ========================================
   Detail Page - Analytics
   ======================================== */

.analytics__content {
  max-width: 900px;
  margin: 0 auto;
}

.analytics__text-block {
  margin-bottom: 3rem;
  max-width: 760px;
}

.analytics__images {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.analytics__image-card {
  width: 100%;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  background-color: white;
  border: 1px solid var(--color-border);
  margin-bottom: 1rem;
}

.analytics__image-wrapper {
  aspect-ratio: 16/9;
  width: 100%;
  overflow: hidden;
}

.analytics__image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
}

.analytics__image-caption {
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
  text-align: center;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .analytics__text-block {
    margin-bottom: 5rem;
  }

  .analytics__images {
    gap: 6rem;
  }

  .analytics__image-caption {
    font-size: 0.875rem;
  }
}

/* ========================================
   Detail Page - Impact
   ======================================== */

.impact__content {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.impact__statement {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .impact__statement {
    font-size: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .impact__statement {
    font-size: 3rem;
  }
}

/* ========================================
   Icons (SVG)
   ======================================== */

.icon {
  width: 1.25rem;
  height: 1.25rem;
  display: inline-block;
  vertical-align: middle;
}

.icon--large {
  width: 1.75rem;
  height: 1.75rem;
}
.project-overview__link {
  margin-top: 24px;
}

.external-button {
  display: inline-block;
  padding: 12px 22px;
  background: #111;
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1;
  transition: 
    transform .18s ease,
    box-shadow .18s ease,
    opacity .18s ease;
}

/* hover：少し浮かせる */
.external-button:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* クリック時 */
.external-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

/* キーボード操作対応 */
.external-button:focus-visible {
  outline: 2px solid #4c6fff;
  outline-offset: 2px;
}

.external-button {
  letter-spacing: 0.02em;
}
.hero__role {
  margin-top: 8px;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: #666;
}
.detail-hero__role {
  margin-top: 12px;
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}