:root {
  --text: #ffffff;
  --text-muted: rgba(255,255,255,0.65);
  --border: rgba(255,255,255,0.15);
  --link-bg: rgba(255,255,255,0.08);
  --link-hover: rgba(255,255,255,0.15);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans JP', sans-serif;
  min-height: 100vh;
  color: var(--text);
  position: relative;
  overflow-x: hidden;
}

.bg-image {
  position: fixed;
  inset: 0;
  background: url('/resources/background.png') center center / cover no-repeat;
  z-index: -2;
  filter: grayscale(0.3);
}

.bg-gradient {
  position: fixed;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.05) 60%, transparent 100%);
  z-index: -1;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  min-height: 100vh;
}

.profile {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.avatar {
  width: 75px;
  height: 75px;
  border-radius: 12px;
  object-fit: cover;
  margin-bottom: 0.5rem;
  border: 2px solid var(--border);
}

.name {
  font-size: 2rem;
  font-weight: 700;
  font-variant: small-caps;
  letter-spacing: 0.05em;
}

.name-ja {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.bio {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.bio-en-link {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.bio-en-link a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--link-bg);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  margin-top: 0.5rem;
  transition: background 0.2s;
}
.mail-btn:hover { background: var(--link-hover); }

.mail-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  font-variant: small-caps;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
  margin-bottom: 0.25rem;
}

.section-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.about-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* リンクリスト：全体を中央揃え */
.links-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 0.5rem;
}

/* リンクボタン */
.link-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: var(--link-bg);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  width: 100%;
}
.link-item:hover {
  background: var(--link-hover);
  transform: scale(1.01);
}

/* リンクテキスト部分 */
.link-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 0.2rem;
}

.link-title {
  font-size: 0.95rem;
  font-weight: 500;
  font-variant: small-caps;
  letter-spacing: 0.05em;
}

.link-description {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-variant: normal;
  letter-spacing: 0;
  line-height: 1.4;
}

.link-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  opacity: 0.85;
  flex-shrink: 0;
}

.link-icon-placeholder {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ウィジェット：ボタンと同じ幅に揃える */
.widget-item {
  width: 100%;
  display: flex;
  justify-content: center;
}

.widget-item iframe {
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
}

/* フッター */
.site-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.lang-switch {
  margin-left: 1rem;
}

.lang-switch a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.lang-switch a:hover { color: var(--text); }

/* デスクトップ */
@media (min-width: 768px) {
  .container { max-width: 500px; padding: 4rem 2rem 2rem; }
  .name { font-size: 2rem; }
  .bio, .about-text, .mail-note { font-size: 0.8rem; }
  .section-title { font-size: 1.1rem; }
  .link-title { font-size: 0.9rem; }
  .link-item { padding: 0.7rem 0.9rem; }
  .link-icon { width: 28px; height: 28px; }
  .avatar { width: 100px; height: 100px; }
  .link-description { font-size: 0.7rem; }
}

/* スマホ */
@media (max-width: 767px) {
  .container { max-width: 600px; padding: 1rem 1rem 1rem; }
  .name { font-size: 2rem; }
  .bio, .about-text, .mail-note { font-size: 0.8rem; }
  .section-title { font-size: 1.1rem; }
  .link-title { font-size: 0.9rem; }
  .link-item { padding: 0.7rem 0.9rem; }
  .link-icon { width: 28px; height: 28px; }
  .avatar { width: 100px; height: 100px; }
  .link-description { font-size: 0.7rem; }
}
