/* Base Theme */
:root {
  --bg: #0a1224;           /* 深い紺 */
  --bg-elev: #0e1933;      /* 一段明るい紺 */
  --text: #e6edf6;         /* 明るい文字色 */
  --muted: #96a2b8;        /* 補助文字 */
  --primary: #5b8aff;      /* アクセントの蒼 */
  --accent: #22d3ee;       /* 差し色の青緑 */
  --line: #203055;         /* 罫線 */
  --shadow: 0 6px 24px rgba(0,0,0,0.35), 0 2px 8px rgba(13, 25, 53, 0.45);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Hiragino Sans, "Noto Sans JP", "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1200px 800px at 20% -10%, #0f1b3a 0%, transparent 60%),
              linear-gradient(180deg, var(--bg) 0%, #0a1020 100%);
  line-height: 1.7;
}

.container {
  max-width: 960px;
  padding: 0 20px;
  margin: 0 auto;
}

.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(10, 18, 36, 0.7);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 14px 0; }
.logo {
  display: inline-block;
  width: 36px; height: 36px; border-radius: 10px;
  object-fit: cover; overflow: hidden;
  box-shadow: var(--shadow);
}
.site-name {
  color: var(--text); text-decoration: none; font-size: 1.05rem; font-weight: 700;
}
.site-name:hover { color: var(--accent); }

/* Main */
.site-main { padding: 28px 0 56px; }

/* Profile */
.profile-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: center;
  background: linear-gradient(180deg, rgba(28,46,88,.6), rgba(12,22,44,.6));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.avatar {
  width: 160px; height: 160px; margin: 8px auto 2px;
  border-radius: 50%;
  background-color: #132245;
  background-image: var(--avatar, url('../img/profile.png'));
  background-size: cover; background-position: center;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,0.06), 0 8px 30px rgba(0,0,0,.35);
}
.profile-text { text-align: center; }
.author { margin: 6px 0 2px; font-size: 1.6rem; letter-spacing: .02em; }
.role { margin: 0 0 14px; color: var(--muted); }
.bullets { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.bullets li { color: #c7d2e4; }

.social { display: flex; justify-content: center; gap: 12px; margin-top: 14px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px;
  border-radius: 10px; background: #13254a; border: 1px solid var(--line);
  color: var(--text); text-decoration: none; transition: transform .12s ease, background .2s ease, border-color .2s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.icon-btn:hover { background: #163062; border-color: #2a3f6f; }
.icon-btn img { width: 22px; height: 22px; display: block; filter: drop-shadow(0 0 0 rgba(0,0,0,0)); }

/* Works */
.works { margin-top: 36px; }
.works h2 { margin: 0 0 14px; font-size: 1.3rem; letter-spacing: .02em; }
.work-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }

.work-card {
  display: grid; grid-template-columns: 1fr; gap: 12px; align-items: start;
  background: linear-gradient(180deg, rgba(22,34,66,.6), rgba(12,20,40,.6));
  border: 1px solid var(--line);
  border-radius: 14px; padding: 12px; color: inherit; text-decoration: none;
  transition: transform .12s ease, border-color .2s ease, background .2s ease;
}
.work-card:hover {  border-color: #35508e; }

.thumb {
  width: 100%;
  max-width: 320px; /* サムネイルを小さめに */
  aspect-ratio: 16/9; /* 常に16:9の枠 */
  margin: 0 auto; /* 中央寄せ */
  border-radius: 10px;
  display: block;
  object-fit: cover; /* 余白をなくす（必要最小限のトリミング） */
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.04);
}

@media (min-width: 680px) {
  /* 作品カードは横並び（1カラム内の横配置） */
  .work-card { grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 14px; }
  .thumb { max-width: none; width: 220px; }
}

.work-meta { display: grid; gap: 6px; }
.work-title { margin: 2px 0 0; font-size: 1.05rem; }
.work-desc { margin: 0; color: var(--muted); }
.work-link { color: var(--accent); font-weight: 600; }

/* Work links (複数リンク対応) */
.link-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.link-btn {
  display: inline-block; padding: 8px 10px; border-radius: 8px;
  background: #122447; border: 1px solid var(--line);
  color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem;
  transition: transform .12s ease, background .2s ease, border-color .2s ease;
}
.link-btn:hover { background: #173060; border-color: #2c4373; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 18px 0; background: rgba(10, 18, 36, 0.6); }
.site-footer small { color: #a9b7cc; }

/* Responsive (1カラム前提、サイズ調整のみ) */
@media (min-width: 680px) {
  .profile-card { grid-template-columns: 180px 1fr; text-align: left; }
  .avatar { margin: 0; }
  .profile-text { text-align: left; }
}

/* Focus styles for accessibility */
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
