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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  color-scheme: light dark;
}

[data-theme="light"] {
  color-scheme: light;
}

[data-theme="dark"] {
  color-scheme: dark;
}

/* ============================================================
   CSS VARIABLES — LIGHT THEME (default)
   ============================================================ */
:root {
  /* === フォント === */
  --font-base: 'Zen Kaku Gothic New', system-ui, -apple-system, sans-serif;
}

:root,
[data-theme="light"] {
  /* === ブランドカラー (Apple HIG) === */
  --accent:      #0A84FF;              /* Apple Blue */
  --accent-2:    #30D158;              /* Apple Green */
  --accent-rgb:  10, 132, 255;
  --accent-2-rgb: 48, 209, 88;

  /* === バックグラウンド === */
  --bg:          #FFFFFF;
  --bg-rgb:      255, 255, 255;
  --bg-secondary: #F2F2F7;             /* Apple systemGray6 */
  --bg-card:     #FFFFFF;
  --bg-tertiary: #EFEFF4;

  /* === テキスト === */
  --text:        #000000;
  --text-muted:  rgba(60, 60, 67, 0.60);
  --text-tertiary: rgba(60, 60, 67, 0.30);

  /* === ボーダー === */
  --border:      rgba(60, 60, 67, 0.12);

  /* === シャドウ (Apple Elevation) === */
  --shadow:      0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg:   0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-xl:   0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-brand: 0 0 0 3px rgba(10, 132, 255, 0.30);

  /* === ヘッダー === */
  --header-bg:   rgba(255, 255, 255, 0.72);

  /* === テーマトグル === */
  --toggle-track:        #EDE9E0;
  --toggle-track-border: rgba(200, 160, 80, 0.25);
  --toggle-thumb:        #FF9F0A;
  --toggle-thumb-glow:   rgba(255, 159, 10, 0.35);

  /* === 角丸 (Apple Continuous Corners) === */
  --radius-xs:   4px;
  --radius-sm:   8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* === イージング (Apple HIG曲線) === */
  --ease-default: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1.00);
  --ease-in:      cubic-bezier(0.55, 0.00, 1.00, 0.45);
  --ease-out:     cubic-bezier(0.00, 0.55, 0.45, 1.00);

  /* === デュレーション === */
  --duration-fast:   150ms;
  --duration-normal: 250ms;
  --duration-slow:   400ms;
  --duration-reveal: 600ms;

  /* === スペーシング (8pt grid) === */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
}

/* ============================================================
   CSS VARIABLES — DARK THEME
   ============================================================ */
[data-theme="dark"] {
  /* === バックグラウンド (Apple Dark) === */
  --bg:          #000000;
  --bg-rgb:      0, 0, 0;
  --bg-secondary: #1C1C1E;             /* Apple systemGray6 Dark */
  --bg-card:     #1C1C1E;
  --bg-tertiary: #2C2C2E;

  /* === テキスト === */
  --text:        #FFFFFF;
  --text-muted:  rgba(235, 235, 245, 0.60);
  --text-tertiary: rgba(235, 235, 245, 0.30);

  /* === ブランド (Adaptive Color — ダークでも同値) === */
  --accent:      #0A84FF;
  --accent-2:    #30D158;
  --accent-rgb:  10, 132, 255;
  --accent-2-rgb: 48, 209, 88;

  /* === ボーダー === */
  --border:      rgba(84, 84, 88, 0.60);

  /* === シャドウ (ダークは薄く、ボーダーで層を表現) === */
  --shadow:      0 1px 3px rgba(0,0,0,0.30);
  --shadow-lg:   0 4px 6px rgba(0,0,0,0.40);
  --shadow-xl:   0 10px 15px rgba(0,0,0,0.50);
  --shadow-brand: 0 0 0 3px rgba(10, 132, 255, 0.30);

  /* === ヘッダー === */
  --header-bg:   rgba(28, 28, 30, 0.72);

  /* === テーマトグル === */
  --toggle-track:        #1A1744;
  --toggle-track-border: rgba(124, 58, 237, 0.30);
  --toggle-thumb:        #7C3AED;
  --toggle-thumb-glow:   rgba(124, 58, 237, 0.45);
}

/* ============================================================
   GLOBAL TRANSITION FOR THEME SWITCH
   ============================================================ */
body,
.header,
.nav-overlay-inner,
.section,
.kpi-item,
.work-card,
.media-card,
.service-card,
.contact-card,
.about-card,
.skill-category,
.footer {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ============================================================
   BODY
   ============================================================ */
body {
  font-family: var(--font-base);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition:
    transform var(--duration-normal) var(--ease-default),
    box-shadow var(--duration-normal) var(--ease-default),
    background var(--duration-normal) var(--ease-default);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #0071E3;
  color: #fff;
  box-shadow: var(--shadow-brand);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0) scale(0.97);
  box-shadow: none;
}

.btn-outline {
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-outline:hover {
  background: rgba(var(--accent-rgb), 0.16);
  color: var(--accent);
  transform: translateY(-1px);
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
}

/* ============================================================
   SCROLL REVEAL ANIMATION
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity   var(--duration-reveal) var(--ease-out),
    transform var(--duration-reveal) var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delay for child elements */
.reveal.visible:nth-child(1) { transition-delay: 0ms; }
.reveal.visible:nth-child(2) { transition-delay: 80ms; }
.reveal.visible:nth-child(3) { transition-delay: 160ms; }
.reveal.visible:nth-child(4) { transition-delay: 240ms; }
.reveal.visible:nth-child(5) { transition-delay: 320ms; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background 0.4s var(--ease-default),
    border-color 0.4s var(--ease-default);
}

.header.scrolled {
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom-color: var(--border);
}

.nav {
  display: flex;
  align-items: center;
  height: 64px;
  gap: 0;
}

/* ---- Logo ---- */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: auto;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  flex-shrink: 0;
}

.nav-logo-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.nav-logo:hover .nav-logo-text {
  color: var(--accent);
}

/* ---- Nav Links ---- */
.nav-links {
  display: flex;
  list-style: none;
  gap: 4px;
  margin: 0 auto;
}

.nav-links a {
  position: relative;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.01em;
  transition:
    color 0.2s var(--ease-default),
    background 0.2s var(--ease-default);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
  transition: transform 0.25s var(--ease-spring);
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(var(--accent-rgb), 0.06);
}

.nav-links a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

/* ---- Nav Actions (theme toggle + hamburger) ---- */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ---- Lang Toggle ---- */
.lang-toggle {
  background: none;
  border: 1.5px solid var(--border);
  padding: 0 10px;
  height: 24px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  border-radius: var(--radius-full);
  outline: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  transition:
    color 0.2s var(--ease-default),
    border-color 0.2s var(--ease-default);
}

.lang-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
}

.lang-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.35);
}

/* ---- Theme Toggle ---- */
.theme-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  outline: none;
}

.theme-toggle:focus-visible .toggle-track {
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.35);
}

.toggle-track {
  display: block;
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--toggle-track);
  border: 1.5px solid var(--toggle-track-border);
  transition:
    background 0.4s var(--ease-default),
    border-color 0.4s var(--ease-default);
  flex-shrink: 0;
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--toggle-thumb);
  box-shadow: 0 0 8px var(--toggle-thumb-glow), 0 1px 3px rgba(0, 0, 0, 0.20);
  transition:
    transform 0.35s var(--ease-spring),
    background 0.4s var(--ease-default),
    box-shadow 0.4s var(--ease-default);
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .toggle-thumb {
  transform: translateX(20px);
}

.toggle-icon {
  width: 10px;
  height: 10px;
  color: #fff;
  flex-shrink: 0;
  transition: transform 0.4s var(--ease-spring);
}

[data-theme="dark"] .toggle-icon {
  transform: rotate(180deg);
}

/* ---- Hamburger Button ---- */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}

.nav-hamburger:hover {
  background: rgba(var(--accent-rgb), 0.07);
}

/* Wrapper – fixed size container for precise absolute positioning */
.hamburger-icon {
  position: relative;
  width: 22px;
  height: 13px;
  display: block;
}

/* 3 bars via absolute positioning */
.hamburger-icon span {
  position: absolute;
  left: 0;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition:
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity    0.28s ease,
    width      0.3s  cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 開く時はスプリング感のあるeasing */
.nav-hamburger.open .hamburger-icon span {
  transition:
    transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity    0.22s ease,
    width      0.3s  cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hamburger-icon span:nth-child(1) { top: 0;     width: 22px; }
.hamburger-icon span:nth-child(2) { top: 5.75px; width: 14px; }
.hamburger-icon span:nth-child(3) { top: 11.5px; width: 22px; }

/* Open: bar 1 rotates down to center, bar 2 fades, bar 3 rotates up to center */
.nav-hamburger.open .hamburger-icon span:nth-child(1) {
  transform: translateY(5.75px) rotate(45deg);
}
.nav-hamburger.open .hamburger-icon span:nth-child(2) {
  opacity: 0;
  width: 22px;
  transform: scaleX(0);
}
.nav-hamburger.open .hamburger-icon span:nth-child(3) {
  transform: translateY(-5.75px) rotate(-45deg);
}

/* ============================================================
   MOBILE NAV OVERLAY
   ============================================================ */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 190;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s linear 0.45s; /* スライドアウト完了後に非表示 */
}

.nav-overlay.open {
  pointer-events: all;
  visibility: visible;
  transition: visibility 0s;
}

.nav-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.4s var(--ease-default);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.nav-overlay.open::before {
  opacity: 1;
}

.nav-overlay-inner {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 82vw);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding: 88px 32px 40px;
  transform: translateX(100%);
  transition: transform 0.45s var(--ease-spring);
  border-left: 1px solid var(--border);
}

[data-theme="dark"] .nav-overlay-inner {
  background: #111111;
}

.nav-overlay.open .nav-overlay-inner {
  transform: translateX(0);
}

.nav-overlay-nav {
  flex: 1;
}

.nav-overlay-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-overlay-nav li {
  overflow: hidden;
}

.nav-overlay-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  font-weight: 600;
  padding: 12px 0;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--border);
  transition:
    color 0.2s ease,
    padding-left 0.25s var(--ease-default);
  transform: translateY(24px);
  opacity: 0;
  transition:
    color 0.2s ease,
    padding-left 0.25s var(--ease-default),
    transform 0.4s var(--ease-spring),
    opacity 0.4s ease;
}

.nav-overlay-link::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 12px;
  opacity: 0;
  transform: scale(0);
  transition:
    opacity 0.2s ease,
    transform 0.25s var(--ease-spring);
  flex-shrink: 0;
}

.nav-overlay-link:hover {
  color: var(--text);
  padding-left: 4px;
}

.nav-overlay-link:hover::before {
  opacity: 1;
  transform: scale(1);
}

.nav-overlay.open .nav-overlay-link {
  transform: translateY(0);
  opacity: 1;
}

/* Stagger delays */
.nav-overlay.open .nav-overlay-nav li:nth-child(1) .nav-overlay-link { transition-delay: 0.08s; }
.nav-overlay.open .nav-overlay-nav li:nth-child(2) .nav-overlay-link { transition-delay: 0.13s; }
.nav-overlay.open .nav-overlay-nav li:nth-child(3) .nav-overlay-link { transition-delay: 0.18s; }
.nav-overlay.open .nav-overlay-nav li:nth-child(4) .nav-overlay-link { transition-delay: 0.23s; }
.nav-overlay.open .nav-overlay-nav li:nth-child(5) .nav-overlay-link { transition-delay: 0.28s; }
.nav-overlay.open .nav-overlay-nav li:nth-child(6) .nav-overlay-link { transition-delay: 0.33s; }

.nav-overlay-footer {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: 0.02em;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.nav-version {
  display: inline-block;
  margin-left: 6px;
  opacity: 0.5;
  font-weight: 400;
  font-size: 0.65rem;
  vertical-align: middle;
}

.cache-clear-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.65rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  opacity: 0.7;
}

.cache-clear-btn:hover {
  background: rgba(var(--accent-rgb), 0.05);
  border-color: var(--accent);
  color: var(--accent);
  opacity: 1;
}

.cache-clear-btn:active {
  transform: scale(0.95);
  background: rgba(var(--accent-rgb), 0.1);
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding: 96px 0;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 48px;
  max-width: 600px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 160px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
  z-index: 2;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(var(--accent-rgb), 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.6) 12%, rgba(0,0,0,1) 40%, rgba(0,0,0,1) 65%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.6) 12%, rgba(0,0,0,1) 40%, rgba(0,0,0,1) 65%, transparent 100%);
}


.hero-content {
  position: relative;
  z-index: 3;
}

.hero-text {
  max-width: 620px;
  display: flex;
  flex-direction: column;
}

.hero-photo {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 72%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.hero-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(to right, var(--bg) 0%, rgba(var(--bg-rgb), 0.94) 12%, rgba(var(--bg-rgb), 0.7) 35%, transparent 75%, rgba(var(--bg-rgb), 0.4) 90%, var(--bg) 100%),
    linear-gradient(to bottom, var(--bg) 0%, transparent 20%, transparent 80%, var(--bg) 100%);
  pointer-events: none;
}

.hero-photo-img {
  position: absolute;
  top: -25%;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 150%;
  object-fit: cover;
  object-position: center 55%;
  display: block;
  opacity: 0.58;
  will-change: transform;
}

@media (max-width: 768px) {
  .hero {
    padding-bottom: 200px;
  }

  .hero-photo {
    width: 100%;
    left: 0;
    top: auto;
    bottom: 0;
    height: 65%;
    overflow: hidden;
  }

  .hero-photo::after {
    background: linear-gradient(
      to bottom,
      var(--bg) 0%,
      transparent 75%,
      var(--bg) 100%
    );
  }

  .hero-photo-img {
    opacity: 0.7;
    object-position: center 30%;
  }

  .hero .hero-tagline {
    font-size: 0.95rem;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 100px;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 24px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: badge-blink 2s ease-in-out infinite;
}

@keyframes badge-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero-name {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 600;
  line-height: 1.05;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  color: color-mix(in srgb, var(--text), transparent 40%);
  text-shadow: 0 2px 4px rgba(var(--bg-rgb), 0.8), 0 1px 1px rgba(0,0,0,0.05);
}

.hero-tagline {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 500;
  color: color-mix(in srgb, var(--text), transparent 50%);
  margin-bottom: 20px;
  min-height: 2em;
  text-shadow: 0 1px 2px rgba(var(--bg-rgb), 0.6);
}

.hero-mission {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  color: color-mix(in srgb, var(--text), transparent 40%);
  max-width: 580px;
  margin-bottom: 40px;
  line-height: 1.8;
  text-shadow: 0 1px 2px rgba(var(--bg-rgb), 0.4);
}

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

.hero-scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 3;
}

.hero-scroll-indicator span {
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--accent));
  animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-flex {
  display: flex;
  gap: 48px;
  align-items: start;
  margin-top: 48px;
  margin-bottom: 64px;
}

.about-bio {
  flex: 1;
}

.about-bio p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 1rem;
}

.about-block {
  margin-bottom: 40px;
}

.about-subtitle {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}

.about-bio strong {
  color: var(--text);
  font-weight: 600;
}

/* ============================================================
   ABOUT — Timeline V2: 左装飾トラック + 右寄せ項目
   ============================================================ */
.about-timeline-wrap {
  margin-top: 48px;
  display: flex;
  gap: 24px;
  align-items: stretch;
  position: relative;
}

/* — 中央: 装飾アニメーショントラック (PC: 絶対配置で中央) — */
.timeline-visual-track {
  width: 56px;
  position: absolute;
  /* about-timeline-wrap の 50% + career-label(48px) + gap(24px) の半分 = 50% + 36px で中央 */
  /* バー幅56px の半分 28px を引く → 50% + 8px */
  left: calc(50% + 8px);
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
}

/* 背景ライン */
.tvt-bg-line {
  position: absolute;
  left: 50%;
  top: 5px;
  bottom: 5px;
  width: 2px;
  transform: translateX(-50%);
  background: var(--border);
  border-radius: 2px;
}

/* アニメーション塗りライン */
.tvt-fill-line {
  position: absolute;
  left: 50%;
  top: 5px;
  width: 2px;
  height: calc(100% - 10px);
  transform: translateX(-50%);
  background: linear-gradient(to bottom, var(--accent), var(--accent-2));
  border-radius: 2px;
  z-index: 1;
}


/* ノードコンテナ */
.tvt-nodes {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  position: relative;
  z-index: 2;
}

/* 個別ノード */
.tvt-node {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--accent);
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18);
  z-index: 2;
}

/* — 左: Career ラベル — */
.timeline-career-label {
  width: 48px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  position: relative;
}

/* パルス dot */
.career-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: career-dot-pulse 2.4s ease-in-out infinite;
}

@keyframes career-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1);   box-shadow: 0 0 0 0   rgba(var(--accent-rgb), 0.5); }
  50%       { opacity: 0.8; transform: scale(1.1); box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0); }
}

/* CAREER 縦テキスト — シマーグラジェント */
.career-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  background: linear-gradient(
    180deg,
    var(--text-muted)  0%,
    var(--accent)      30%,
    var(--accent-2)    70%,
    var(--text-muted) 100%
  );
  background-size: auto 300%;
  background-position: 0 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: career-shimmer 4s ease-in-out infinite alternate;
}

@keyframes career-shimmer {
  0%   { background-position: 0 100%; }
  100% { background-position: 0 0%; }
}

/* 年範囲 縦テキスト */
.career-range {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.55rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  white-space: nowrap;
}


/* — タイムライン項目: PC は flex 縦並びで互い違い — */
.about-timeline {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 0;
  max-width: none;
}

.about-timeline::before {
  display: none;
}

/* 奇数アイテム → 左半分・右揃え（バー方向へ） */
.timeline-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-end;
  text-align: right;
  width: calc(50% - 40px); /* 中央バー半幅28px + 余白12px */
  margin-right: auto;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  position: relative;
  transition: background 0.2s ease, transform 0.2s ease;
}

.timeline-item:hover {
  background: rgba(var(--accent-rgb), 0.04);
  transform: translateX(-3px);
}

/* 偶数アイテム → 右半分・左揃え（バー方向へ） */
.timeline-item:nth-child(even) {
  align-items: flex-start;
  text-align: left;
  margin-right: 0;
  margin-left: auto;
}

.timeline-item:nth-child(even):hover {
  transform: translateX(3px);
}

.timeline-item::before {
  display: none;
}

.timeline-year {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  letter-spacing: 0.06em;
}

.timeline-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* 現在項目を強調 */
/* 強調表示解除 */
.timeline-item-current .timeline-desc {
  color: var(--text-muted);
  font-weight: 400;
}

.timeline-item-current .timeline-year {
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  background-clip: initial;
  color: var(--accent);
}

.about-card {
  width: 340px;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
}

.about-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.about-info-item:last-child {
  border-bottom: none;
}

.about-info-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

/* ============================================================
   NUMBERS — Editorial Strip
   ============================================================ */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 56px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.kpi-item {
  padding: 40px 32px 36px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background-color var(--duration-normal) var(--ease-default);
}

.kpi-item:last-child {
  border-right: none;
}

.kpi-item:hover {
  background: rgba(var(--accent-rgb), 0.03);
}

.kpi-metric {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  line-height: 1.3;
}

.kpi-number-row {
  display: flex;
  align-items: baseline;
  gap: 3px;
  line-height: 1;
}

.count-up {
  font-size: clamp(2.8rem, 5.5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent);
  transition: transform var(--duration-fast) var(--ease-spring);
  display: inline-block;
}

.kpi-item:hover .count-up {
  transform: scale(1.03);
}

.kpi-unit {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.kpi-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .kpi-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .kpi-item:nth-child(2) { border-right: none; }
  .kpi-item:nth-child(1),
  .kpi-item:nth-child(2) { border-bottom: 1px solid var(--border); }
  .kpi-item:nth-child(3) { border-right: 1px solid var(--border); }
  .kpi-item:last-child { border-right: none; }
  .kpi-item { padding: 32px 24px 28px; }
}

@media (max-width: 480px) {
  .kpi-strip {
    grid-template-columns: 1fr;
    border-bottom: none;
  }
  .kpi-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 28px 0;
  }
  .kpi-item:last-child { border-bottom: none; }
  .count-up {
    font-size: clamp(2.6rem, 12vw, 3.6rem);
  }
}


/* ============================================================
   WORKS
   ============================================================ */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

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


.work-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform var(--duration-normal) var(--ease-default),
    box-shadow var(--duration-normal) var(--ease-default),
    border-color var(--duration-normal) var(--ease-default);
}

@media (hover: hover) {
  .work-card:hover {
    box-shadow: var(--shadow-xl);
    border-color: var(--accent);
  }

  .work-card:hover::after {
    opacity: 1;
  }
}

.work-card::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(
    260px circle at var(--cx, 50%) var(--cy, 50%),
    rgba(var(--accent-rgb), 0.10),
    transparent 70%
  );
  transition: opacity 0.35s ease;
  pointer-events: none;
  border-radius: inherit;
  z-index: 0;
}

.work-card > * {
  position: relative;
  z-index: 1;
}

.work-number {
  position: absolute;
  top: 20px;
  right: 22px;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-tertiary);
  letter-spacing: -0.04em;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.work-category {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.work-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.10);
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.work-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  margin-bottom: 14px;
  flex-shrink: 0;
}


.work-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.work-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
  flex: 1;
}

.work-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

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

.work-status {
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  align-self: flex-start;
}

.work-status.live {
  color: #10B981;
}

.work-status.wip {
  color: #F59E0B;
}

.work-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  height: 40px;
  padding: 0 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  background: #000000;
  border: none;
  border-radius: var(--radius-full);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
  transition:
    opacity var(--duration-fast) var(--ease-default),
    transform var(--duration-fast) var(--ease-default),
    filter var(--duration-fast) var(--ease-default);
}

[data-theme="dark"] .work-link {
  background: #ffffff;
  color: #000000;
}

.work-link:hover {
  color: #ffffff;
  opacity: 0.82;
  transform: translateY(-2px);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.28));
}

[data-theme="dark"] .work-link:hover {
  color: #000000;
}

.work-link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.work-link::after {
  content: '';
  display: inline-block;
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.work-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.work-link--wp {
  background: #3858e9;
}

[data-theme="dark"] .work-link--wp {
  background: #3858e9;
  color: #ffffff;
}

[data-theme="dark"] .work-link--wp:hover {
  color: #ffffff;
}

.store-badges {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.store-badge {
  display: inline-block;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: transform var(--duration-fast) var(--ease-default);
}

.store-badge:hover {
  transform: translateY(-2px);
}

.store-badge:hover .store-badge__img {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.28));
}

.store-badge:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.store-badge__img {
  display: block;
  height: 40px;
  width: auto;
  transition: filter var(--duration-fast) var(--ease-default);
}

.store-badge__img--google {
  height: 60px;
  /* Google Play PNG の内部余白を相殺（縦方向は-10px、横方向は-8px） */
  margin: -10px -8px;
}

@media (prefers-reduced-motion: reduce) {
  .store-badge,
  .store-badge__img {
    transition: none;
  }
  .store-badge:hover {
    transform: none;
  }
}

/* ============================================================
   MEDIA
   ============================================================ */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.media-card {
  position: relative;
  background: color-mix(in srgb, var(--bg-card) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition:
    transform var(--duration-normal) var(--ease-default),
    box-shadow var(--duration-normal) var(--ease-default),
    border-color var(--duration-normal) var(--ease-default);
}

.media-card:hover {
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 20px 60px rgba(var(--accent-rgb), 0.1), var(--shadow-xl);
  transform: translateY(-4px);
}

/* ---- Image Section ---- */
.media-card-img-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.media-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease-default);
}

.media-card:hover .media-card-img {
  transform: scale(1.07);
}

.media-card-img-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.18) 50%, transparent 100%);
  pointer-events: none;
  transition: opacity 0.3s var(--ease-default);
}

.media-card:hover .media-card-img-gradient {
  opacity: 0.75;
}

.media-card-img-tags {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.media-card-img-tags .tag {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  border-color: rgba(255,255,255,0.2);
}

/* Hover overlay */
.media-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.18);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.3s var(--ease-default);
  pointer-events: none;
}

.media-card:hover .media-card-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* タッチデバイス用 Visit ボタン: デスクトップでは非表示 */
.media-touch-visit-btn {
  display: none;
}

/* 全状態でリンク色を白に固定 */
.media-touch-visit-btn,
.media-touch-visit-btn:hover,
.media-touch-visit-btn:visited,
.media-touch-visit-btn:active {
  color: #fff;
}

/* タッチデバイス: オーバーレイ非表示、フッターにVisitボタン表示 */
@media (hover: none) {
  .media-card-overlay {
    display: none;
  }

  .media-touch-visit-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: var(--radius-md);
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--accent);
    box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.3);
  }

  .media-card-footer {
    justify-content: space-between;
  }
}

.media-hover-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.45);
  transition: transform 0.2s var(--ease-default), box-shadow 0.2s var(--ease-default);
}


.media-hover-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 28px rgba(var(--accent-rgb), 0.6);
}

@media (prefers-reduced-motion: reduce) {
  .media-card-img,
  .media-card-overlay,
  .media-hover-btn {
    transition: none;
  }
  /* reduced-motion でも常に表示 */
  .media-card-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

/* ---- Card Body ---- */
.media-card-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.media-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  transition: color 0.2s var(--ease-default);
}

.media-card:hover .media-card-title {
  color: var(--accent);
}

.media-domain {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
}

.media-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 4px;
}

.media-card-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 2px;
}

.media-card-author {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.media-icon-sm-wrap {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1), rgba(var(--accent-2-rgb), 0.1));
}

.media-icon-sm-wrap img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.media-card-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.media-card-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ============================================================
   SERVICES
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
  margin-bottom: 64px;
}

@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow);
  transition:
    transform var(--duration-normal) var(--ease-default),
    box-shadow var(--duration-normal) var(--ease-default),
    border-color 0.3s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.13);
  border-color: rgba(var(--accent-rgb), 0.25);
}

/* カーソルスポットライト */
.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(
    300px circle at var(--cx, 50%) var(--cy, 50%),
    rgba(var(--accent-rgb), 0.07),
    transparent 70%
  );
  transition: opacity 0.35s ease;
  pointer-events: none;
  border-radius: inherit;
}

.service-card:hover::after {
  opacity: 1;
}


.service-card__inner {
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.service-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

/* アイコンラッパー */
.service-card__icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(var(--accent-rgb), 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  transition: background 0.3s ease, transform 0.3s var(--ease-spring);
}

.service-card:hover .service-card__icon-wrap {
  background: rgba(var(--accent-rgb), 0.18);
  transform: scale(1.08);
}

/* サービス番号 */
.service-card__num {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  padding-top: 4px;
}

.service-card__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.service-card__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
}

.service-card__footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.service-card__cta {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.25s var(--ease-default);
}

.service-card:hover .service-card__cta {
  gap: 10px;
}

/* タッチデバイス: タップフィードバック */
@media (hover: none) {
  .service-card__cta {
    gap: 10px;
  }
  .service-card:active {
    transform: scale(0.97);
    box-shadow: var(--shadow);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
  }
  .service-card:active .service-card__icon-wrap {
    background: rgba(var(--accent-rgb), 0.18);
    transform: scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-card:hover {
    transform: none;
  }
  .service-card:hover .service-card__icon-wrap {
    transform: none;
  }
}

/* ============================================================
   SKILLS — BENTO GRID
   ============================================================ */

/* @property で --glow-start を補間可能な数値として登録（Contact カードでも使用） */
@property --glow-start {
  syntax: '<number>';
  initial-value: 0;
  inherits: true;
}
.skills-bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-top: 48px;
  margin-bottom: 40px;
  list-style: none;
  padding: 0;
}

/* Bento layout: asymmetric 7/5 · full · 5/7 */
.skills-bento .skill-category:nth-child(1) { grid-column: span 7; }
.skills-bento .skill-category:nth-child(2) { grid-column: span 5; }
.skills-bento .skill-category:nth-child(3) { grid-column: span 12; }
.skills-bento .skill-category:nth-child(4) { grid-column: span 5; }
.skills-bento .skill-category:nth-child(5) { grid-column: span 7; }

@media (max-width: 900px) {
  .skills-bento { grid-template-columns: 1fr; }
  .skills-bento .skill-category:nth-child(n) { grid-column: span 1; }
}

/* ── Category-specific color tokens ── */
.skill-category:nth-child(1) { --cat-r: 123; --cat-g: 97;  --cat-b: 255; } /* AI – purple */
.skill-category:nth-child(2) { --cat-r: 48;  --cat-g: 209; --cat-b: 88;  } /* Mobile – green */
.skill-category:nth-child(3) { --cat-r: 10;  --cat-g: 132; --cat-b: 255; } /* Web – blue */
.skill-category:nth-child(4) { --cat-r: 255; --cat-g: 159; --cat-b: 10;  } /* Backend – orange */
.skill-category:nth-child(5) { --cat-r: 255; --cat-g: 55;  --cat-b: 95;  } /* Marketing – pink */

.skill-category {
  --cat-rgb: var(--cat-r), var(--cat-g), var(--cat-b);
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 180px;
  box-shadow: var(--shadow);
  transition:
    transform var(--duration-normal) var(--ease-default),
    box-shadow var(--duration-normal) var(--ease-default),
    border-color var(--duration-normal) var(--ease-default);
}

/* カテゴリカラーのグラジェントアクセントライン */
.skill-category::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    rgba(var(--cat-rgb), 0.8) 0%,
    rgba(var(--cat-rgb), 0.3) 60%,
    transparent 100%
  );
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* 背景に大きくフェードしたカテゴリ番号 */
.skill-cat-num {
  position: absolute;
  top: -8px;
  right: 18px;
  font-size: 5.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
  color: rgb(var(--cat-rgb));
  opacity: 0.06;
  pointer-events: none;
  user-select: none;
  font-feature-settings: "tnum";
}

@media (hover: hover) {
  .skill-category:hover {
    box-shadow:
      0 0 0 1px rgba(var(--cat-rgb), 0.22),
      0 12px 40px rgba(var(--cat-rgb), 0.09),
      var(--shadow-xl);
    border-color: rgba(var(--cat-rgb), 0.3);
    transform: translateY(-3px);
  }
  .skill-category:hover .skill-cat-num {
    opacity: 0.1;
  }
}

.skill-cat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.skill-cat-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(var(--cat-rgb), 0.85);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-cat-title::before {
  content: '';
  display: block;
  width: 16px;
  height: 2px;
  background: rgba(var(--cat-rgb), 0.7);
  border-radius: 2px;
  flex-shrink: 0;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.skill-badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 13px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.skill-badge.main {
  background: rgba(var(--cat-rgb), 0.08);
  border-color: rgba(var(--cat-rgb), 0.25);
  color: rgb(var(--cat-rgb));
  font-weight: 600;
  letter-spacing: 0.02em;
}

.skill-badge.main::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
  vertical-align: middle;
  opacity: 0.7;
}

.skill-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--cat-rgb), 0.15);
  border-color: rgba(var(--cat-rgb), 0.45);
  background: rgba(var(--cat-rgb), 0.05);
}

/* ── Tech Chips Marquee ── */
.tech-chips-outer {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  margin-top: 8px;
}

.tech-chips {
  display: flex;
  gap: 10px;
  width: max-content;
  animation: chips-marquee 32s linear infinite;
  animation-delay: 0.9s;
}

.tech-chips:hover {
  animation-play-state: paused;
}

@keyframes chips-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.tech-chip {
  padding: 7px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: default;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.tech-chip:hover {
  background: rgba(var(--accent-rgb), 0.08);
  border-color: rgba(var(--accent-rgb), 0.3);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.12);
}

.tech-chip.chip-pop {
  animation: chip-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: calc(var(--chip-i, 0) * 35ms);
}

@keyframes chip-pop {
  from {
    opacity: 0;
    transform: scale(0.5) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}


/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 48px;
}

@media (max-width: 600px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  color: var(--text);
  box-shadow: var(--shadow);
  position: relative;
  cursor: default;
  --glow-active: 0;
  --glow-start: 0;
  transition: box-shadow 0.2s ease, background-color 0.3s ease;
}

/* Glowing gradient border — mouse-tracking conic gradient */
.contact-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  padding: 2px;
  border-radius: calc(16px + 2px);
  background: conic-gradient(
    from calc((var(--glow-start) - 80) * 1deg) at 50% 50%,
    transparent 0deg,
    #dd7bbb 20deg,
    #d79f1e 50deg,
    #5a922c 90deg,
    #4c7894 130deg,
    transparent 160deg,
    transparent 360deg
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: var(--glow-active);
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.contact-card > * {
  position: relative;
  z-index: 1;
}

.contact-btn {
  margin-left: auto;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.contact-btn:hover {
  background: var(--bg-secondary);
  color: var(--text);
  border-color: var(--text-muted);
  transform: translateX(3px);
}

.contact-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-icon svg {
  color: var(--text);
}

.contact-info {
  flex: 1;
  min-width: 0;
}

.contact-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
}

.contact-value {
  font-size: 0.9rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-link {
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.footer-link:hover {
  opacity: 0.75;
}

/* ============================================================
   INLINE LINKS
   ============================================================ */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-default);
}

a:not(.btn):not(.work-link):not(.media-hover-btn):not(.media-touch-visit-btn):hover {
  color: #0071E3;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* タイムライン内のインラインリンク */
.timeline-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(var(--accent-rgb), 0.35);
  text-underline-offset: 3px;
  font-weight: 500;
  transition:
    color var(--duration-fast) var(--ease-default),
    text-decoration-color var(--duration-fast) var(--ease-default);
}

.timeline-link:hover {
  color: #0071E3;
  text-decoration-color: #0071E3;
}

/* ============================================================
   TYPEWRITER CURSOR
   ============================================================ */
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursor-blink 0.8s step-end infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* ============================================================
   REDUCED MOTION (アクセシビリティ)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-logo-text {
    display: none;
  }

  .about-flex {
    flex-direction: column;
    gap: 32px;
  }

  .about-card {
    width: 100%;
    order: -1;
  }

  .about-timeline-wrap {
    gap: 12px;
    padding: 0 4px;
  }

  .timeline-career-label {
    display: flex;
    width: 24px;
    gap: 8px;
  }

  .career-text {
    font-size: 0.5rem;
    letter-spacing: 0.2em;
  }

  .career-range {
    font-size: 0.45rem;
  }

  .timeline-visual-track {
    display: flex;
    width: 24px;
    position: relative;
    left: auto;
    top: auto;
    bottom: auto;
  }

  .about-timeline {
    display: flex;
    flex-direction: column;
    border-left: none;
    padding-left: 0;
  }

  .timeline-item {
    width: auto;
    margin-right: 0;
  }

  .timeline-item:nth-child(even) {
    align-items: flex-end;
    text-align: right;
    margin-left: 0;
  }

  .timeline-item:nth-child(even):hover {
    transform: translateX(-3px);
  }

  .hero {
    min-height: 100svh;
    padding: 80px 0 60px;
    text-align: center;
  }

  .hero-text {
    align-items: center;
    width: 100%;
  }

  .hero-badge {
    align-self: center;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-mission {
    margin: 0 auto 40px;
    max-width: 100%;
    text-align: center;
  }

  /* Works: タブレットで2列 → 自動調整 */
  .works-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
  }

  /* Media カード: パディング縮小 */
  .media-card-body {
    padding: 16px 18px 18px;
  }

  /* Store badges: タップしやすいサイズ */
  .store-badge__img {
    height: 38px;
  }

  .store-badge__img--google {
    height: 52px;
  }

  /* Contact: 2列をやや小さく */
  .contact-card {
    padding: 18px 20px;
  }

  .section {
    padding: 64px 0;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: clamp(2.2rem, 10vw, 3rem);
  }

  /* セクション余白を縮小 */
  .section {
    padding: 52px 0;
  }

  .section-title {
    font-size: clamp(1.6rem, 7vw, 2rem);
  }

  /* Works: 極小画面でminを下げてはみ出し防止 */
  .works-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .work-card {
    padding: 22px 20px;
  }

  /* Media カードのpadding・gapを縮小 */
  .media-card-body {
    padding: 14px 16px 16px;
    gap: 8px;
  }

  /* Services */
  .service-card__inner {
    padding: 22px 18px;
  }

  /* Skills badges */
  .skill-badge {
    font-size: 0.72rem;
    padding: 4px 10px;
  }

  /* Contact */
  .contact-card {
    padding: 16px 18px;
    gap: 12px;
  }

  .contact-value {
    font-size: 0.78rem;
  }

  .kpi-strip {
    gap: 12px;
  }
}

/* iPhone SE / 極小画面 (375px以下) */
@media (max-width: 375px) {
  .container {
    padding: 0 16px;
  }

  .hero-badge {
    font-size: 0.72rem;
  }

  .btn {
    padding: 12px 20px;
    font-size: 0.85rem;
  }

  .contact-value {
    font-size: 0.72rem;
  }

  .media-card-title {
    font-size: 1rem;
  }
}
