:root {
  --paper: #fdfdfb;
  --ink-900: #1a1a1a;
  --ink-700: #4a4a46;
  --ink-500: #7d7d76;
  --ink-300: #b3b0a6;
  --ink-100: #e8e5dd;
  --header-h: 118px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-900);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic Medium", "Yu Gothic", "Meiryo", sans-serif;
  font-weight: 400;
  line-height: 2;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
}

main {
  display: block;
  position: relative;
  overflow: hidden;
  max-width: 100vw;
  padding: 0 32px;
}

a {
  color: inherit;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--ink-100);
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 12px 24px -18px rgba(26, 26, 26, 0.18);
  border-color: var(--ink-300);
}

.header-top {
  max-width: 1040px;
  margin: 0 auto;
  padding: 26px 32px 18px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.site-title {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--ink-900);
  white-space: nowrap;
}

.site-title .title-sub {
  font-weight: 300;
  color: var(--ink-500);
  margin-left: 0.5em;
}

.site-mail {
  font-size: 0.82rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink-500);
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.site-mail:hover {
  color: var(--ink-900);
  border-color: var(--ink-300);
}

.site-nav {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 32px 22px;
  display: flex;
  gap: 32px;
  overflow-x: auto;
}

.site-nav a {
  flex: none;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-decoration: none;
  color: var(--ink-700);
  padding-bottom: 6px;
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--ink-900);
  transition: right 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  right: 0;
}

.site-nav a:focus-visible {
  outline: 2px solid var(--ink-300);
  outline-offset: 4px;
}

/* ---------- Content ---------- */

.content {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
}

.wash {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.wash-1 {
  width: 520px;
  height: 520px;
  top: -160px;
  right: -220px;
  background: radial-gradient(circle, rgba(26, 26, 26, 0.05), rgba(26, 26, 26, 0) 70%);
}

.wash-2 {
  width: 420px;
  height: 420px;
  bottom: 40px;
  left: -200px;
  background: radial-gradient(circle, rgba(26, 26, 26, 0.035), rgba(26, 26, 26, 0) 70%);
}

.about {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 108px 0 140px;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: var(--ink-500);
  text-transform: uppercase;
}

.about h1 {
  margin: 0 0 52px;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.about p {
  margin: 0 0 32px;
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink-700);
  letter-spacing: 0.02em;
}

.about a:link,
.about a:visited {
  color: var(--ink-700);
  text-decoration: none;
  border-bottom: 1px solid var(--ink-300);
  transition: border-color 0.25s ease, color 0.25s ease;
}

.about a:hover,
.about a:focus-visible {
  color: var(--ink-900);
  border-color: var(--ink-900);
}

.signature {
  margin-top: 64px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--ink-900) !important;
}

/* ---------- Breadcrumb ---------- */

.breadcrumb {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 0 0;
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--ink-500);
}

.breadcrumb a {
  color: var(--ink-500);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.breadcrumb a:hover {
  color: var(--ink-900);
  border-color: var(--ink-300);
}

.breadcrumb .sep {
  margin: 0 8px;
  color: var(--ink-300);
}

/* ---------- Post list (blog index) ---------- */

.page-heading {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 0 8px;
}

.page-heading h1 {
  margin: 0 0 14px;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.page-heading p {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--ink-500);
}

.post-list {
  position: relative;
  z-index: 1;
  list-style: none;
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 0 140px;
}

.post-item {
  padding: 40px 0;
  border-bottom: 1px solid var(--ink-300);
}

.post-item:first-child {
  padding-top: 8px;
}

.post-item:last-child {
  border-bottom: none;
}

.post-item-date {
  display: block;
  font-size: 0.76rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--ink-500);
  margin-bottom: 10px;
}

.post-item-title {
  margin: 0 0 28px;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--ink-900);
}

.post-item-excerpt {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--ink-700);
  letter-spacing: 0.02em;
}

/* ---------- Single post ---------- */

.post {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 0 140px;
}

.post-title {
  margin: 0 0 16px;
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.6;
}

.post-meta {
  margin: 0 0 52px;
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--ink-500);
}

.post-body p {
  margin: 0 0 32px;
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink-700);
  letter-spacing: 0.02em;
}

.post-body figure {
  margin: 8px 0 40px;
}

.post-body img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--ink-100);
  padding: 10px;
  background: var(--paper);
  box-sizing: border-box;
}

.post-body figcaption {
  margin-top: 12px;
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--ink-500);
  font-style: italic;
}

.post-back {
  margin-top: 72px;
  padding-top: 32px;
  border-top: 1px solid var(--ink-100);
}

.post-back a {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--ink-700);
  text-decoration: none;
  border-bottom: 1px solid var(--ink-300);
}

.post-back a:hover {
  color: var(--ink-900);
  border-color: var(--ink-900);
}

/* ---------- Profile ---------- */

.profile {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 0 140px;
}

.profile-lead {
  margin: 0 0 72px;
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink-700);
  letter-spacing: 0.02em;
}

.profile-section-title {
  margin: 0 0 32px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink-900);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink-100);
}

.profile-timeline {
  list-style: none;
  margin: 0 0 88px;
  padding: 0;
}

.profile-timeline li {
  display: flex;
  gap: 28px;
  padding: 18px 0;
  border-bottom: 1px dashed var(--ink-100);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--ink-700);
}

.profile-timeline li:first-child {
  padding-top: 0;
}

.profile-timeline .year {
  flex: none;
  width: 5.5em;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--ink-500);
}

.profile-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.profile-links li:first-child {
  border-top: 1px solid var(--ink-100);
}

.profile-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 2px;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink-700);
  text-decoration: none;
}

.profile-links a:hover {
  color: var(--ink-900);
}

.profile-links a::after {
  content: "\2192";
  font-weight: 300;
  color: var(--ink-300);
  transition: transform 0.25s ease;
}

.profile-links a:hover::after {
  transform: translateX(4px);
}

.profile-facts {
  margin: 0;
  padding-top: 4px;
}

.profile-facts dl {
  display: grid;
  grid-template-columns: 6em 1fr;
  row-gap: 20px;
  margin: 0;
}

.profile-facts dt {
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--ink-500);
}

.profile-facts dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--ink-700);
  letter-spacing: 0.02em;
}

/* ---------- Back to top ---------- */

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--ink-300);
  background: var(--paper);
  color: var(--ink-700);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.25s ease, color 0.25s ease;
  box-shadow: 0 8px 20px -10px rgba(26, 26, 26, 0.25);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  color: var(--ink-900);
  border-color: var(--ink-900);
}

.back-to-top:focus-visible {
  outline: 2px solid var(--ink-300);
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--ink-100);
  padding: 32px;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--ink-500);
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .header-top {
    padding: 22px 20px 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .site-nav {
    padding: 0 20px 18px;
    gap: 16px;
  }

  .site-nav a {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
  }

  .site-mail {
    font-size: 0.78rem;
  }

  main {
    padding: 0 20px;
  }

  .about {
    padding: 72px 0 96px;
  }

  .about h1 {
    font-size: 1.3rem;
    margin-bottom: 40px;
  }

  .wash-1, .wash-2 {
    width: 320px;
    height: 320px;
  }

  .post-title {
    font-size: 1.2rem;
  }

  .profile-timeline li {
    gap: 16px;
    font-size: 0.88rem;
  }

  .profile-timeline .year {
    width: 4.2em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .site-header,
  .site-nav a::after,
  .site-mail {
    transition: none;
  }
}
