/* 色は変数で持っておいて、後で差し替えやすく */
:root {
  --color-text: #111;
  --color-text-muted: #555;
  --color-text-faint: #999;
  --color-bg: #fff;
  --color-border: #ececec;
  --color-accent: #1B3B6F;       /* 藍色 */
  --color-accent-hover: #142a52; /* hover 時は少し濃く */
}

/* リセット（最低限） */
*, *::before, *::after {
  box-sizing: border-box;
}
html, body, h1, h2, h3, h4, p, ul, ol, figure {
  margin: 0;
  padding: 0;
}

/* ベース */
html {
  font-size: 16px;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue",
               "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo",
               system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;

  /* sticky footer: コンテンツが短くてもフッターを画面下に張り付かせる */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main {
  flex: 1 0 auto;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--color-accent-hover);
}

/* フォーカスは藍色で目立たせる（アクセシビリティ） */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* レイアウト */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ヘッダー（藍色） */
.site-header {
  padding: 22px 0;
  background: var(--color-accent);
  color: #fff;
}
.site-header .container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.site-name {
  font-family: "Iowan Old Style", "Hoefler Text", Georgia, serif;
  font-size: 18px;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.site-name:hover {
  color: #fff;
  opacity: 0.85;
}
.site-nav a {
  margin-left: 24px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}
.site-nav a:hover {
  color: #fff;
}

/* ヒーロー */
.hero {
  padding: 96px 0 64px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 56px;
  align-items: start;
}
.hero-photo {
  width: 320px;
  /* 写真ありのときは画像の高さに合わせる、無いときは min-height でプレースホルダ表示 */
  min-height: 420px;
  background-color: rgba(27, 59, 111, 0.04);
  border: 1px solid rgba(27, 59, 111, 0.12);
  overflow: hidden;
}
.hero-photo-img {
  width: 100%;
  height: auto;
  display: block;
}
.hero h1 {
  font-family: "Iowan Old Style", "Hoefler Text", Georgia, serif;
  font-size: 56px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--color-text);
}
.hero h1 .accent-dot {
  /* 名前の最後に藍色のドット。サイトのアクセントとして1点 */
  color: var(--color-accent);
}
.hero .lead {
  margin-top: 14px;
  font-size: 17px;
  color: var(--color-text-muted);
}
.hero .lead::before {
  /* lead の前に短い藍色の線を入れる */
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--color-accent);
  vertical-align: middle;
  margin-right: 12px;
  transform: translateY(-2px);
}
.hero .intro {
  margin-top: 32px;
  font-size: 16px;
  color: #333;
  max-width: 56ch;
}

/* 下層ページの見出し */
.page-title {
  font-family: "Iowan Old Style", "Hoefler Text", Georgia, serif;
  font-size: 40px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin-bottom: 32px;
}

/* Works ページ */
.works {
  padding: 72px 0 96px;
}

/* About ページ */
.about {
  padding: 72px 0 96px;
}
.about-bio p {
  margin-bottom: 1.4em;
  color: #333;
  font-size: 16px;
  max-width: 60ch;
}
.about-bio p:last-child {
  margin-bottom: 0;
}
.section-title {
  font-family: "Iowan Old Style", "Hoefler Text", Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  margin-top: 64px;
  margin-bottom: 24px;
  letter-spacing: 0.01em;
}
.proficiency-group {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--color-border);
  align-items: start;
}
.proficiency-group:last-child {
  border-bottom: 1px solid var(--color-border);
}
.proficiency-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dots {
  color: var(--color-accent);
  font-size: 11px;
  letter-spacing: 0.2em;
  line-height: 1;
}
.proficiency-label {
  font-family: "Iowan Old Style", "Hoefler Text", Georgia, serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
}
.skill-list {
  color: var(--color-text-muted);
  font-size: 15px;
  line-height: 1.8;
}

@media (max-width: 600px) {
  .proficiency-group {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .proficiency-header {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
}

/* Timeline (略歴) */
.timeline-list {
  list-style: none;
  position: relative;
  margin-top: 8px;
}
.timeline-list::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 14px;
  bottom: 14px;
  width: 1px;
  background: var(--color-border);
}
.timeline-item {
  position: relative;
  padding: 4px 0 24px 28px;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-marker {
  position: absolute;
  left: 0;
  top: 10px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 2px solid var(--color-accent);
}
.timeline-date {
  display: block;
  font-size: 12px;
  color: var(--color-text-faint);
  letter-spacing: 0.05em;
}
.timeline-title {
  font-family: "Iowan Old Style", "Hoefler Text", Georgia, serif;
  font-size: 17px;
  font-weight: 500;
  color: var(--color-text);
  margin-top: 2px;
  letter-spacing: 0.005em;
}
.timeline-description {
  margin-top: 6px;
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.6;
}
.timeline-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.timeline-tag {
  display: inline-block;
  font-size: 11px;
  padding: 3px 9px;
  background: rgba(27, 59, 111, 0.06);
  color: var(--color-accent);
  letter-spacing: 0.02em;
  border-radius: 2px;
}
.works-list {
  list-style: none;
}
.works-item {
  padding: 24px 0;
  border-top: 1px solid var(--color-border);
}
.works-item:last-child {
  border-bottom: 1px solid var(--color-border);
}
.works-link {
  font-family: "Iowan Old Style", "Hoefler Text", Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--color-text);
}
.works-link:hover {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.works-link::after {
  content: " ↗";
  font-size: 14px;
  color: var(--color-text-faint);
  vertical-align: 2px;
}
/* URL を持たない作品はリンクにせず、矢印も出さない */
.works-link-plain {
  cursor: default;
}
.works-link-plain:hover {
  text-decoration: none;
}
.works-link-plain::after {
  content: none;
}
.works-tags {
  margin-top: 6px;
  font-size: 13px;
  color: var(--color-text-faint);
}
.works-summary {
  margin-top: 10px;
  color: var(--color-text);
  font-size: 15px;
}
.works-description {
  margin-top: 10px;
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.85;
  white-space: pre-line;  /* 説明文の改行を活かす */
  max-width: 64ch;
}

/* フッター（藍色） */
.site-footer {
  padding: 28px 0;
  background: var(--color-accent);
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
}

/* 管理画面（共通フォーム部品） */
.admin-page {
  background: #fafafa;
}
.admin-login-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.login-card {
  max-width: 400px;
  width: 100%;
  background: #fff;
  padding: 40px;
  border: 1px solid var(--color-border);
}
.login-title {
  font-family: "Iowan Old Style", "Hoefler Text", Georgia, serif;
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 24px;
  color: var(--color-text);
}
.login-form {
  display: flex;
  flex-direction: column;
}
.form-row {
  margin-bottom: 20px;
}
.form-row label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="password"],
.form-row input[type="number"],
.form-row input[type="url"],
.form-row textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid var(--color-border);
  background: #fafafa;
  color: var(--color-text);
}
.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--color-accent);
  background: #fff;
  outline: none;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border: none;
  padding: 11px 24px;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.02em;
}
.btn-primary:hover {
  background: var(--color-accent-hover);
}
.btn-link {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  padding: 0;
  margin-left: 24px;
}
.btn-link:hover {
  color: #fff;
}
.logout-form {
  display: inline;
}
.alert {
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 14px;
}
.alert-error {
  background: #fdf2f2;
  color: #9f1b1b;
  border-left: 3px solid #c84141;
}
.alert-info {
  background: #f1f6fc;
  color: #1a4978;
  border-left: 3px solid var(--color-accent);
}
.form-error {
  color: #c84141;
  font-size: 13px;
  margin-top: 6px;
}

/* Contact ページ */
.contact {
  padding: 72px 0 96px;
}
.contact .hint {
  margin-bottom: 32px;
}

/* ダッシュボード */
.admin-dashboard {
  padding: 72px 0 96px;
}
.welcome {
  color: var(--color-text-muted);
  font-size: 15px;
  margin-bottom: 32px;
}
.admin-menu {
  list-style: none;
  margin-top: 16px;
}
.admin-menu li {
  padding: 20px 0;
  border-top: 1px solid var(--color-border);
  font-size: 16px;
  color: var(--color-text);
}
.admin-menu li:last-child {
  border-bottom: 1px solid var(--color-border);
}
.admin-menu em {
  color: var(--color-text-faint);
  font-style: normal;
  font-size: 12px;
  margin-left: 8px;
}

/* 写真アップロード */
.photo-current {
  margin-bottom: 40px;
  padding: 20px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.photo-preview {
  margin-top: 12px;
}
.photo-preview img {
  width: 180px;
  height: 240px;
  object-fit: cover;
  border: 1px solid var(--color-border);
  display: block;
  margin-bottom: 8px;
}
input[type="file"] {
  font-family: inherit;
  font-size: 14px;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  background: #f5f5f5;
  padding: 2px 6px;
}

/* 管理画面の一覧 (works/skills) */
.admin-list-actions {
  margin-bottom: 24px;
}
.admin-list {
  list-style: none;
}
.admin-list-item {
  padding: 20px 0;
  border-top: 1px solid var(--color-border);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}
.admin-list-item:last-child {
  border-bottom: 1px solid var(--color-border);
}
.admin-list-item .item-title {
  font-family: "Iowan Old Style", "Hoefler Text", Georgia, serif;
  font-size: 18px;
  color: var(--color-text);
}
.admin-list-item .item-meta {
  margin-top: 4px;
  font-size: 13px;
  color: var(--color-text-faint);
}
.admin-list-item .item-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.admin-list-item .item-actions a,
.admin-list-item .item-actions button {
  font-size: 13px;
}
.admin-list-item .item-delete {
  background: none;
  border: none;
  color: #c84141;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.admin-list-item .item-delete:hover {
  text-decoration: underline;
}
.badge-draft {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  font-size: 11px;
  background: #f0f0f0;
  color: #666;
}

/* レスポンシブ */
@media (max-width: 700px) {
  .hero { padding: 56px 0 40px; }
  .hero h1 { font-size: 40px; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-photo {
    width: 240px;
    min-height: 320px;
  }
  .site-nav a { margin-left: 16px; font-size: 13px; }
}
