:root {
  --bg: #212121;
  --surface: #292929;
  --line: #383838;
  --text: #f2f2f2;
  --text-2: #b3b3b3;
  --text-3: #949494;
  --blue: #2188ff;
  --orange: #ff8821;
  --font-sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html { -webkit-text-size-adjust: 100%; color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  line-break: strict;
  word-break: auto-phrase;
  overflow-wrap: break-word;
}

ul { margin: 0; padding: 0; list-style: none; }
p, h1 { margin: 0; }

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

.page {
  max-width: 600px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(48px, 12vh, 112px) 24px calc(32px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
}

/* 名前と紹介 */
h1 {
  font-size: clamp(40px, 11vw, 56px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.02em;
}
h1 .n { color: var(--orange); }

.tagline {
  margin-top: 16px;
  font-size: 18px;
  line-height: 1.6;
}

.intro {
  margin-top: 24px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-2);
}
.intro span { display: block; }

/* リンク一覧 */
nav {
  margin-top: 40px;
  border-top: 2px solid;
  border-image: linear-gradient(90deg, var(--orange), var(--blue)) 1;
}

.links li { border-bottom: 1px solid var(--line); }

.links a {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  margin-inline: -12px;
  padding-inline: 12px;
  border-radius: 4px;
  transition: background-color 0.15s var(--ease);
}

.label { flex: 1; min-width: 0; font-size: 17px; }

.host {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}

.arrow {
  width: 16px;
  text-align: center;
  font-size: 14px;
  color: var(--text-3);
  transition: color 0.15s var(--ease);
}

@media (hover: hover) {
  .links a:hover { background: var(--surface); }
  .links a:hover .arrow { color: var(--blue); }
}
.links a:focus-visible { outline-offset: -2px; }
.links a:focus-visible .arrow { color: var(--blue); }

/* SNS */
footer { margin-top: auto; padding-top: 48px; }

.sns { display: flex; flex-wrap: wrap; gap: 0 24px; }

.sns a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  color: var(--text-2);
  transition: color 0.15s var(--ease);
}
@media (hover: hover) {
  .sns a:hover { color: var(--blue); }
}
.sns a:focus-visible { color: var(--blue); }

/* 読み込み時の動き（1回だけ） */
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
header, main, footer { animation: rise 0.4s var(--ease) both; }
main { animation-delay: 60ms; }
footer { animation-delay: 120ms; }

@media (prefers-reduced-motion: reduce) {
  header, main, footer { animation: none; }
  .links a, .arrow, .sns a { transition: none; }
}

/* 狭い画面: ドメインをラベルの下に置く */
@media (max-width: 440px) {
  .page { padding-inline: 20px; }
  .links a {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "label arrow" "host arrow";
    column-gap: 12px;
    align-content: center;
    min-height: 72px;
    padding-block: 12px;
  }
  .label { grid-area: label; line-height: 1.5; }
  .host { grid-area: host; line-height: 1.5; }
  .arrow { grid-area: arrow; align-self: center; }
}
