/* ========================================
   Variables
   ======================================== */
:root {
  --color-bg: #0a0a0f;
  --color-bg-alt: #12121a;
  --color-surface: #1a1a26;
  --color-text: #f0f0f5;
  --color-text-muted: #8888a0;
  --color-accent-1: #ff3366;
  --color-accent-2: #6c5ce7;
  --color-accent-3: #00cec9;
  --color-accent-4: #fdcb6e;
  --font-ja: 'Noto Sans JP', sans-serif;
  --font-en: 'Space Grotesk', 'Noto Sans JP', sans-serif;
  --header-height: 72px;
  --container-width: 1120px;
  --radius: 12px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-ja);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.8;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

.container {
  width: min(100% - 48px, var(--container-width));
  margin-inline: auto;
}

/* ========================================
   Header
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background var(--transition);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: min(100% - 48px, var(--container-width));
  margin-inline: auto;
}

.header__logo {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.header__nav-list {
  display: flex;
  gap: 32px;
}

.header__nav-link {
  font-family: var(--font-en);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color var(--transition);
  position: relative;
}

.header__nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent-1);
  transition: width var(--transition);
}

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

.header__nav-link:hover::after {
  width: 100%;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  font-family: var(--font-en);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: border-color var(--transition);
}

.lang-toggle:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.lang-toggle__option {
  transition: color var(--transition);
  cursor: pointer;
}

.lang-toggle__option--active {
  color: var(--color-accent-3);
}

.lang-toggle__divider {
  opacity: 0.3;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ========================================
   Hero
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}

.hero__shape--1 {
  width: 500px;
  height: 500px;
  background: var(--color-accent-1);
  top: -10%;
  right: -5%;
  animation: float 8s ease-in-out infinite;
}

.hero__shape--2 {
  width: 400px;
  height: 400px;
  background: var(--color-accent-2);
  bottom: 10%;
  left: -10%;
  animation: float 10s ease-in-out infinite reverse;
}

.hero__shape--3 {
  width: 300px;
  height: 300px;
  background: var(--color-accent-3);
  top: 40%;
  left: 50%;
  animation: float 12s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, -30px); }
}

.hero__content {
  position: relative;
  z-index: 1;
  padding-block: 80px;
}

.hero__label {
  font-family: var(--font-en);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent-3);
  margin-bottom: 24px;
}

.hero__title {
  margin-bottom: 32px;
}

.hero__name {
  display: block;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-accent-4) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.hero__catch {
  display: block;
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.hero__desc {
  max-width: 540px;
  color: var(--color-text-muted);
  font-size: 1rem;
  margin-bottom: 40px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 999px;
  font-family: var(--font-en);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-accent-1), var(--color-accent-2));
  color: #fff;
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 51, 102, 0.35);
}

.btn--outline {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--color-text);
}

.btn--outline:hover {
  border-color: var(--color-accent-3);
  color: var(--color-accent-3);
  transform: translateY(-2px);
}

.hero__scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-en);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--color-accent-3), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ========================================
   Sections
   ======================================== */
.section {
  padding-block: 120px;
}

.section__header {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 64px;
}

.section__number {
  font-family: var(--font-en);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-accent-1);
  letter-spacing: 0.05em;
}

.section__title {
  font-family: var(--font-en);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ========================================
   About
   ======================================== */
.about {
  background: var(--color-bg-alt);
}

.about__grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 64px;
  align-items: start;
}

.about__avatar {
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--color-accent-2), var(--color-accent-1));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.about__avatar::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: calc(var(--radius) - 3px);
  background: var(--color-surface);
}

.about__avatar-text {
  position: relative;
  font-family: var(--font-en);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  background: linear-gradient(135deg, var(--color-accent-3), var(--color-accent-4));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about__heading {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.about__content p {
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.about__stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.about__stat-num {
  display: block;
  font-family: var(--font-en);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent-3);
  line-height: 1.2;
}

.about__stat-label {
  font-family: var(--font-en);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ========================================
   Skills
   ======================================== */
.skills__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.skills__group {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color var(--transition);
}

.skills__group:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.skills__group--wide {
  grid-column: 1 / -1;
}

.skills__group-title {
  font-family: var(--font-en);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-2);
  margin-bottom: 20px;
}

.skills__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skills__tags li {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  font-family: var(--font-en);
  font-size: 0.85rem;
  font-weight: 500;
  transition: background var(--transition), transform var(--transition);
}

.skills__tags li:hover {
  background: rgba(108, 92, 231, 0.2);
  transform: translateY(-2px);
}

.skills__strengths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 32px;
}

.skills__strength {
  display: flex;
  gap: 16px;
}

.skills__strength-icon {
  flex-shrink: 0;
  font-family: var(--font-en);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-accent-1);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 51, 102, 0.3);
  border-radius: 50%;
}

.skills__strength strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.skills__strength p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ========================================
   Works
   ======================================== */
.works {
  background: var(--color-bg-alt);
}

.works__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.work-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.work-card__thumb {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-en);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  overflow: hidden;
}

.work-card__thumb-label {
  position: relative;
  z-index: 2;
  transition: opacity var(--transition);
}

.work-card__thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 0;
}

.work-card__thumb.has-image .work-card__thumb-img {
  opacity: 1;
}

.work-card__thumb.has-image .work-card__thumb-label {
  opacity: 0;
}

.work-card__thumb.is-loading .work-card__thumb-label::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  animation: thumbPulse 1s ease-in-out infinite;
}

@keyframes thumbPulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

.work-card__thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent 55%);
  z-index: 1;
  pointer-events: none;
  transition: opacity var(--transition);
}

.work-card__thumb.has-image::after {
  opacity: 0.85;
}

.work-card__body {
  padding: 24px;
}

.work-card__category {
  font-family: var(--font-en);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-3);
  margin-bottom: 8px;
}

.work-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.work-card__desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.work-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.work-card__tags li {
  font-family: var(--font-en);
  font-size: 0.7rem;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  color: var(--color-text-muted);
}

.work-card__link {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-en);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent-3);
  transition: opacity var(--transition);
}

.work-card__links {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
}

.work-card__links .work-card__link {
  margin-top: 0;
  font-size: 0.75rem;
  line-height: 1.4;
}

.work-card--wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
}

.work-card--wide .work-card__thumb {
  aspect-ratio: auto;
  min-height: 220px;
}

@media (max-width: 900px) {
  .work-card__links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .work-card--wide {
    grid-template-columns: 1fr;
  }

  .work-card--wide .work-card__thumb {
    aspect-ratio: 16 / 10;
    min-height: auto;
  }
}

.work-card__link:hover {
  opacity: 0.75;
}

/* ========================================
   Contact
   ======================================== */
.contact__content {
  text-align: center;
  max-width: 600px;
  margin-inline: auto;
}

.contact__lead {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 32px;
}

.contact__email {
  display: inline-block;
  font-family: var(--font-en);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-accent-1), var(--color-accent-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 40px;
  transition: opacity var(--transition);
}

.contact__email:hover {
  opacity: 0.8;
}

.contact__links {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.contact__sns {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  font-family: var(--font-en);
  font-size: 0.875rem;
  font-weight: 500;
  transition: border-color var(--transition), transform var(--transition);
}

.contact__sns:hover {
  border-color: var(--color-accent-1);
  transform: translateY(-2px);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  padding: 32px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer__inner {
  text-align: center;
  font-family: var(--font-en);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ========================================
   Animations
   ======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 900px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about__visual {
    max-width: 240px;
  }

  .skills__grid {
    grid-template-columns: 1fr;
  }

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

  .works__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header__nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.97);
    backdrop-filter: blur(12px);
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transform: translateY(-120%);
    opacity: 0;
    transition: transform var(--transition), opacity var(--transition);
    pointer-events: none;
  }

  .header__nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .header__nav-list {
    flex-direction: column;
    gap: 20px;
  }

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

  .menu-toggle {
    display: flex;
  }

  .about__stats {
    flex-direction: column;
    gap: 24px;
  }

  .hero__scroll {
    display: none;
  }

  .skills__strengths {
    grid-template-columns: 1fr;
  }

  .section {
    padding-block: 80px;
  }
}
