/* =========================================================
   Base
   ========================================================= */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--text-base);
  line-height: var(--leading-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
}

h1,
h2,
h3 {
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

/* mono な技術メタ（スキル・種別など）／セクションラベル */
.meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  color: var(--ink-muted);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--space-4);
}

/* =========================================================
   Layout
   ========================================================= */
.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: var(--space-7) 1.25rem var(--space-8);
}

.section {
  padding: var(--space-7) 0;
  border-top: 1px solid var(--line);
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  padding-bottom: var(--space-6);
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: var(--space-4);
}

.site-name {
  font-size: var(--text-display);
}

.site-tagline {
  margin-top: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5em;
}

/* =========================================================
   About
   ========================================================= */
.prose p {
  margin: var(--space-4) 0;
}

.prose p:first-child {
  margin-top: 0;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* =========================================================
   Works — 罫線で仕切る縦一列のインデックス
   静止時グレースケール → hover でフルカラーに開く
   ========================================================= */
.work-index {
  list-style: none;
  margin: 0;
  padding: 0;
}

.work {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--line);
}

.work:first-child {
  border-top: none;
  padding-top: 0;
}

.work__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.work__name {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: 500;
}

.work__kind {
  white-space: nowrap;
}

/* リンクの作品はホバーで名前だけ下線 */
a.work__head {
  text-decoration: none;
}

a.work__head:hover {
  text-decoration: none;
}

a.work__head:hover .work__name {
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.2em;
}

.work__img {
  width: 100%;
  margin-top: var(--space-4);
  border-radius: var(--radius);
  filter: grayscale(1);
  transition: filter var(--dur) var(--ease);
}

.work:hover .work__img,
.work:focus-within .work__img {
  filter: grayscale(0);
}

.work__noimg {
  margin-top: var(--space-4);
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  background: var(--paper-alt);
  border-radius: var(--radius);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
}

/* =========================================================
   Elsewhere — 外部リンク
   ========================================================= */
.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}

.link-list a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  font-size: var(--text-lg);
  transition: opacity var(--dur) var(--ease);
}

.link-list a .arrow {
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.link-list a:hover {
  opacity: 0.55;
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.2em;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  padding-top: var(--space-7);
  border-top: 1px solid var(--line);
}

/* =========================================================
   Load animation（控えめに 1 回だけ）
   ========================================================= */
@keyframes reveal-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.reveal {
  opacity: 0;
  animation: reveal-in 0.7s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 90ms);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    animation: none;
  }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 600px) {
  .page {
    padding-top: var(--space-6);
  }

  .work__head {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
  }

  .link-list {
    gap: var(--space-2) var(--space-4);
  }
}
