:root {
  /* クリーンで温かみのあるオーガニックホワイト */
  --bg: #f7f7f5;
  --card-bg: #ffffff;
  --card-hover: #fafaf9;
  --text-main: #191919;
  --text-sub: #57595d;
  --text-light: #8e9096;
  --border: #e7e6e1;
  --border-hover: #d2d0c8;
  --accent-color: #0038ff;
  /* 0.5%の差し色：シグナルブルー */
  --tag-bg: #f0efe9;
  --radius-sm: 8px;
  --radius-md: 12px;
  --font-base: "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont,
    sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] {
  --bg: #131416;
  --card-bg: #1c1d20;
  --card-hover: #232428;
  --text-main: #f3f3f4;
  --text-sub: #a1a3a9;
  --text-light: #6a6d75;
  --border: #2c2e33;
  --border-hover: #40434a;
  --tag-bg: #27292e;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-base);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 48px 20px 80px;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.container {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-sub);
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: var(--accent-color);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px var(--accent-color);
  animation: pulse-dot 2.6s infinite ease-in-out;
  transition: background-color 0.2s ease;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 0.95;
    transform: scale(1);
  }

  50% {
    opacity: 0.35;
    transform: scale(0.85);
  }
}

.top-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-sub);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-toggle:hover {
  color: var(--text-main);
  border-color: var(--border-hover);
}

.color-picker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card-bg);
}

.color-swatch {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease;
}

.color-swatch:hover {
  transform: scale(1.3);
}

.color-swatch.active {
  transform: scale(1.2);
  outline: 1.5px solid var(--text-main);
  outline-offset: 1.5px;
}

header.profile {
  margin-bottom: 24px;
}

.profile-wrap {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.avatar-wrap {
  width: 58px;
  height: 58px;
  min-width: 58px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

[data-theme="dark"] .avatar-wrap {
  background-color: #202226;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-placeholder-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cfcdc6;
  pointer-events: none;
}

[data-theme="dark"] .avatar-placeholder-icon {
  color: #4a4d55;
}

.profile-info {
  flex: 1;
}

h1.author-name {
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin-bottom: 8px;
}

p.author-tagline {
  font-size: 0.68rem;
  color: var(--text-sub);
  line-height: 1.9;
}

.goal-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px 16px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.goal-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
}

.goal-badge {
  font-size: 0.68rem;
  font-weight: 500;
  font-family: var(--font-mono);
  color: var(--accent-color);
  background-color: var(--tag-bg);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.goal-title {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-sub);
}

.goal-content {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.5;
}

.goal-sub {
  font-size: 0.8rem;
  color: var(--text-sub);
  margin-top: 4px;
}

.section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  padding-left: 2px;
}

.links-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 36px;
}

.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: all 0.15s ease;
}

.link-card:hover {
  background-color: var(--card-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

/* 差し色インジケーター */
.link-card::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 24%;
  bottom: 24%;
  width: 2.5px;
  border-radius: 2px;
  background-color: var(--accent-color);
  opacity: 0;
  transition: opacity 0.15s ease, background-color 0.2s ease;
}

.link-card:hover::before {
  opacity: 1;
}

.link-left {
  display: flex;
  align-items: center;
  gap: 13px;
}

.link-icon {
  width: 19px;
  height: 19px;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.link-card:hover .link-icon {
  color: var(--text-main);
}

.link-text-title {
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.3;
}

.link-text-desc {
  font-size: 0.74rem;
  color: var(--text-light);
  margin-top: 1px;
}

.link-arrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-light);
  transition: color 0.15s ease, transform 0.15s ease;
}

.link-card:hover .link-arrow {
  color: var(--accent-color);
  transform: translate(2px, -1px);
}

/* その他リンク（アイコンのみで並べるトレイ） */
.other-links-wrap {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.other-links-heading {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.other-icons-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.icon-bubble {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: var(--radius-sm);
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.icon-bubble:hover {
  color: var(--text-main);
  background-color: var(--card-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.works-section {
  margin-bottom: 40px;
}

.project-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.project-thumb-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #eeebe3;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .project-thumb-wrap {
  background-color: #24262b;
}

.project-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.project-card:hover .project-thumb {
  transform: scale(1.02);
}

.project-body {
  padding: 16px;
}

.project-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.project-tag {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-sub);
  background-color: var(--tag-bg);
  padding: 2px 8px;
  border-radius: 4px;
}

.project-url-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-color);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.project-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.35;
  word-break: break-word;
}

.project-desc {
  font-size: 0.82rem;
  color: var(--text-sub);
  line-height: 1.55;
  word-break: break-word;
}

footer {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  color: var(--text-light);
}

.footer-copy {
  font-weight: 400;
}

.footer-city {
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

@media (max-width: 480px) {
  body {
    padding: 28px 16px 56px;
  }

  h1.author-name {
    font-size: 1.45rem;
  }

  .link-card {
    padding: 12px 14px;
  }
}

/* Activity Signal — final design */
.activity-signal {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.signal-card {
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.signal-heading {
  min-height: 42px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.signal-service {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.signal-service h2 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.signal-service-mark {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  background: var(--text-main);
  color: var(--card-bg);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
}

.signal-updated,
.signal-footnote {
  color: var(--text-light);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.signal-updated {
  color: var(--accent-color);
}

.running-stats {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  padding: 18px 14px 16px;
}

.running-stat {
  min-width: 0;
  padding-left: 13px;
  border-left: 1px solid var(--border);
}

.running-stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.running-stat-label {
  display: block;
  margin-bottom: 7px;
  color: var(--text-light);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.running-stat-value {
  line-height: 1;
  white-space: nowrap;
}

.running-stat-value strong {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.065em;
}

.running-stat-primary .running-stat-value strong {
  font-size: 2.35rem;
}

.running-stat-value small {
  margin-left: 4px;
  color: var(--text-light);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.running-progress {
  width: 100%;
  height: 2px;
  margin-top: 12px;
  overflow: hidden;
  background: var(--border);
}

.running-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent-color);
  transition: width 0.35s ease;
}

.signal-footnote {
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
}

.activity-signal + .goal-card {
  margin-top: 0;
}

@media (max-width: 420px) {
  .running-stats {
    grid-template-columns: 1.3fr 1fr 1fr;
  }

  .running-stat {
    padding-left: 10px;
  }

  .running-stat-primary .running-stat-value strong {
    font-size: 2rem;
  }

  .running-stat-value strong {
    font-size: 1.08rem;
  }

  .signal-updated {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .running-progress i {
    transition: none;
  }
}
