/* ============================================================
 * そういちろう ぽーたる — Variant B (Casual / いってつ tone)
 * Mobile-first. BEM-ish naming under the b-casual flavor.
 * ============================================================ */

:root {
  --bg: #fff6e8;
  --bg-card: #fffdf7;
  --bg-soft: #faecd5;
  --text: #2d2a26;
  --text-soft: #5b524a;
  --meta: #bfa68c;
  --accent-warm: #e76f51;
  --accent-warm-deep: #c0573b;
  --accent-cool: #2a9d8f;
  --accent-cool-deep: #1f7a70;
  --border: #ead7be;
  --shadow-sm: 0 2px 6px rgba(168, 124, 78, 0.10);
  --shadow-md: 0 6px 18px rgba(168, 124, 78, 0.14);
  --shadow-lg: 0 14px 32px rgba(168, 124, 78, 0.18);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --font-body: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Yu Gothic UI", system-ui, sans-serif;
  --container: 840px;
  --gap-section: clamp(48px, 8vw, 88px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1f1c18;
    --bg-card: #2a2622;
    --bg-soft: #3a322b;
    --text: #f0e8da;
    --text-soft: #cfc4b3;
    --meta: #9b8a72;
    --border: #4a3f33;
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 14px 32px rgba(0, 0, 0, 0.55);
  }
}

/* --- reset & base --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1em; }
a {
  color: var(--accent-warm);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .2s ease;
}
a:hover { color: var(--accent-warm-deep); }
a:focus-visible {
  outline: 3px solid var(--accent-warm);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- utilities --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--accent-warm);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-weight: 700;
  text-decoration: none;
  z-index: 999;
}
.skip-link:focus { top: 16px; }

/* --- header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.site-header__brand {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
}
.site-header__brand a {
  color: var(--text);
  text-decoration: none;
}
.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: .92rem;
}
.site-nav__list a {
  color: var(--text-soft);
  text-decoration: none;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
}
.site-nav__list a:hover { color: var(--accent-warm); background: var(--bg-soft); }

/* --- hero --- */
.hero { padding: clamp(40px, 7vw, 72px) 0 clamp(28px, 4vw, 40px); }
.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}
.hero__avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 4px solid var(--bg-card);
  box-shadow: var(--shadow-md);
}
.hero__hello {
  margin: 0 0 .2em;
  font-size: 1rem;
  color: var(--accent-warm);
  font-weight: 700;
  letter-spacing: .02em;
}
.hero__name {
  margin: 0 0 .5em;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: .02em;
}
.hero__tagline {
  margin: 0;
  color: var(--text-soft);
  font-size: 1.02rem;
  max-width: 32em;
}
@media (min-width: 720px) {
  .hero__inner { flex-direction: row; text-align: left; gap: 36px; }
}

/* --- section common --- */
section { padding: var(--gap-section) 0; }
.section-heading {
  margin: 0 0 .6em;
  font-size: clamp(1.4rem, 3vw, 1.7rem);
  font-weight: 700;
  position: relative;
  padding-left: 18px;
}
.section-heading::before {
  content: "";
  position: absolute;
  left: 0; top: .35em;
  width: 8px; height: 1em;
  background: var(--accent-warm);
  border-radius: var(--radius-pill);
}

/* --- about --- */
.about__bio p {
  color: var(--text-soft);
  margin-bottom: 1.2em;
}
.about__bio p:last-child { margin-bottom: 0; }

/* --- recent --- */
.recent__list {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .recent__list { grid-template-columns: 1fr 1fr; }
}
.recent__item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.recent__label {
  margin: 0 0 .3em;
  font-size: .82rem;
  font-weight: 700;
  color: var(--accent-cool);
  letter-spacing: .04em;
}
.recent__text {
  margin: 0;
  color: var(--text);
  line-height: 1.75;
}

/* --- skills --- */
.skills__lead { color: var(--text-soft); margin-bottom: 1.6em; }
.skill-group { margin-bottom: 22px; }
.skill-group:last-child { margin-bottom: 0; }
.skill-group__title {
  margin: 0 0 .6em;
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-soft);
}
.skill-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}
.skill-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: .9rem;
  font-weight: 700;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  line-height: 1.4;
}
.skill-pill--work { background: #fff1d6; color: #8a5a0e; border-color: #f1d9a4; }
.skill-pill--web  { background: #d8f1ee; color: var(--accent-cool-deep); border-color: #b5e0d9; }
.skill-pill--tcg  { background: #fce0d9; color: var(--accent-warm-deep); border-color: #f5c2b5; }
.skill-pill--trpg { background: #ecdff7; color: #6e3aa0; border-color: #d6c2ec; }
.skill-pill--life { background: #f3ebda; color: #7a6243; border-color: #e1d3b6; }
@media (prefers-color-scheme: dark) {
  .skill-pill { background: var(--bg-soft); color: var(--text); border-color: var(--border); }
  .skill-pill--work, .skill-pill--web, .skill-pill--tcg, .skill-pill--trpg, .skill-pill--life {
    background: var(--bg-soft); border-color: var(--border);
  }
  .skill-pill--work { color: #f3c97b; }
  .skill-pill--web  { color: #7ed3c9; }
  .skill-pill--tcg  { color: #f3a892; }
  .skill-pill--trpg { color: #c8a8eb; }
  .skill-pill--life { color: #e0cea4; }
}

/* --- works --- */
.works__lead { color: var(--text-soft); margin-bottom: 1.4em; }
.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px) {
  .work-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}
.work-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.work-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.work-card__link:focus-visible {
  outline: 3px solid var(--accent-warm);
  outline-offset: 4px;
  border-radius: var(--radius-lg);
}
.work-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.work-card__body { padding: 16px 18px 18px; }
.work-card__title {
  margin: 0 0 .4em;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.work-card__desc {
  margin: 0 0 .6em;
  color: var(--text-soft);
  font-size: .95rem;
  line-height: 1.7;
}
.work-card__tech {
  margin: 0;
  font-size: .78rem;
  color: var(--meta);
  letter-spacing: .04em;
}

/* --- links --- */
.links__lead { color: var(--text-soft); margin-bottom: 1.2em; }
.links__list {
  display: grid;
  gap: 10px;
  margin-bottom: 1.4em;
}
.links__item {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: baseline;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}
.links__service {
  font-weight: 700;
  color: var(--text);
  font-size: .95rem;
}
.links__url {
  color: var(--accent-warm);
  font-size: .95rem;
  word-break: break-all;
}
.links__outro {
  margin: 0;
  color: var(--accent-warm);
  font-weight: 700;
  text-align: center;
}

/* --- footer --- */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 28px 0 36px;
  margin-top: var(--gap-section);
}
.site-footer__inner { text-align: center; }
.site-footer__copy {
  margin: 0 0 .8em;
  font-weight: 700;
  font-size: .95rem;
}
.site-footer__privacy,
.site-footer__tm {
  margin: 0 0 .8em;
  color: var(--text-soft);
  font-size: .82rem;
  line-height: 1.7;
}
.site-footer__tm { margin-bottom: 0; }
.site-footer a { color: var(--accent-warm); }

/* --- intersection-observer fade-in helper --- */
.is-fade-target {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s ease, transform .5s ease;
  will-change: opacity, transform;
}
.is-fade-target.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .is-fade-target { opacity: 1; transform: none; transition: none; }
}

/* --- 404 / privacy specific --- */
.page-narrow { max-width: 680px; margin: 0 auto; padding: 0 20px; }
.page-narrow h2 { font-size: 1.2rem; margin-top: 1.6em; }
.page-narrow ul.disc { list-style: disc; padding-left: 1.2em; color: var(--text-soft); }
.page-narrow ul.disc li { margin-bottom: .4em; }
.page-back { display: inline-block; margin-top: 1.6em; font-weight: 700; }
