*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  background: #6fa3d4;
  font-family: Inter, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: normal;
  color: #111;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  text-size-adjust: none;
  -webkit-text-size-adjust: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: 100%;
  font-weight: 400;
}

.wind-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

#wind {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.page {
  position: relative;
  z-index: 1;
}

.homepage {
  width: min(500px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 5rem 0 2.5rem;
}

body:not(.project) .homepage {
  padding-top: 65px;
}

@media (max-width: 768px) {
  .homepage {
    padding: 2rem 0 2.5rem;
  }

  body:not(.project) .homepage {
    padding-top: 17px;
  }
}

.article,
.writing {
  width: 100%;
}

.article > header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 0 0.5rem;
}

header h1 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  letter-spacing: -0.00563rem;
}

header time {
  display: block;
  font-size: 0.875rem;
  font-weight: 460;
  line-height: 1.25rem;
  letter-spacing: -0.00563rem;
  color: rgba(0, 0, 0, 0.4);
}

.article p {
  margin: 0;
  padding-top: 1rem;
  font-size: 0.875rem;
  font-weight: 460;
  line-height: 1.25rem;
  letter-spacing: -0.00563rem;
}

#week-line:not(.is-ready) {
  visibility: hidden;
}

.flip {
  display: inline-block;
  vertical-align: bottom;
  perspective: 1100px;
  perspective-origin: 50% 50%;
}

.flip-card {
  display: grid;
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
  animation: upright 7.5s infinite;
}

.flip-card.is-driven {
  animation: none;
}

.flip-week .flip-card {
  position: relative;
  display: inline-grid;
}

.flip-week {
  max-width: 100%;
}

.flip-week .flip-face {
  overflow-wrap: break-word;
}

.flip-week .flip-back {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
}

.flip-face {
  grid-area: 1 / 1;
  white-space: nowrap;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flip-front {
  transform: translateZ(0.6px);
}

.flip-back {
  transform: rotateX(180deg) translateZ(0.6px);
}

@keyframes upright {
  0% {
    transform: rotateX(0deg);
    animation-timing-function: cubic-bezier(0.45, 0.02, 0.18, 1);
  }
  16% {
    transform: rotateX(-180deg);
    animation-timing-function: linear;
  }
  50% {
    transform: rotateX(-180deg);
    animation-timing-function: cubic-bezier(0.45, 0.02, 0.18, 1);
  }
  66% {
    transform: rotateX(-360deg);
    animation-timing-function: linear;
  }
  100% {
    transform: rotateX(-360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .flip-card {
    animation: none;
  }

  .flip-back {
    display: none;
  }
}

.article em,
.article em strong,
.article strong em {
  color: #000;
  font-family: Newsreader, Georgia, serif;
  font-size: 0.9375rem;
  font-style: italic;
  font-weight: 430;
  letter-spacing: 0.01rem;
  font-variation-settings: "opsz" 10;
}

.basic-link {
  position: relative;
  color: inherit;
  text-decoration: none;
}

.basic-link::before {
  pointer-events: none;
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  border-radius: 2px;
  background: rgba(17, 17, 17, 0.22);
}

.basic-link:hover::before {
  background: rgba(17, 17, 17, 0.55);
}

.writing {
  padding-top: 3rem;
}

.writing h3 {
  margin: 0;
  padding-bottom: 8px;
  font-size: 0.875rem;
  font-weight: 460;
  line-height: normal;
  letter-spacing: -0.00563rem;
  color: rgba(0, 0, 0, 0.4);
}

.years,
.years ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  font-weight: 460;
  letter-spacing: -0.00563rem;
}

.years > li {
  position: relative;
  border-top: 1px solid rgba(17, 17, 17, 0.1);
}

.year {
  position: absolute;
  left: 0;
  top: 0.735rem;
  width: 6.75rem;
  color: rgba(0, 0, 0, 0.4);
  font-size: 0.875rem;
  font-weight: 460;
  letter-spacing: -0.00563rem;
}

.years a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.735rem 0 0.735rem 6.75rem;
  color: inherit;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 460;
  letter-spacing: -0.00563rem;
}

.years a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 6.75rem;
  border-bottom: 1px solid rgba(17, 17, 17, 0.1);
}

.years > li ul > li:last-child a::after {
  display: none;
}

@media (hover: hover) {
  .years:hover a h2,
  .years:hover a time {
    opacity: 0.3;
  }

  .years a:hover h2,
  .years a:hover time {
    opacity: 1;
  }
}

.years h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  font-weight: 460;
  line-height: normal;
  letter-spacing: -0.00563rem;
}

.years time {
  flex-shrink: 0;
  color: rgba(0, 0, 0, 0.4);
  font-size: 0.875rem;
  font-weight: 460;
  line-height: normal;
  letter-spacing: -0.00563rem;
  font-variant-numeric: tabular-nums;
}

footer {
  margin-top: 0;
  padding-top: 2.5rem;
}

@media (max-width: 520px) {
  .year {
    width: 3rem;
  }

  .years a {
    padding-left: 3rem;
  }

  .years a::after {
    left: 3rem;
  }
}

#local-time {
  margin: 0;
  color: rgba(0, 0, 0, 0.4);
  font-size: 0.8125rem;
  font-weight: 460;
  letter-spacing: -0.0025rem;
  line-height: normal;
  font-variant-numeric: tabular-nums;
}

@keyframes staggerIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .homepage > .article > *,
  .homepage > .writing,
  .homepage > footer {
    animation: staggerIn 0.5s ease both;
  }

  .homepage > .article > :nth-child(1) {
    animation-delay: 0s;
  }

  .homepage > .article > :nth-child(2) {
    animation-delay: 0.035s;
  }

  .homepage > .article > :nth-child(3) {
    animation-delay: 0.07s;
  }

  .homepage > .article > :nth-child(4) {
    animation-delay: 0.105s;
  }

  .homepage > .article > :nth-child(5) {
    animation-delay: 0.14s;
  }

  .homepage > .article > :nth-child(6) {
    animation-delay: 0.175s;
  }

  .homepage > .article > :nth-child(7) {
    animation-delay: 0.21s;
  }

  .homepage > .article > :nth-child(8) {
    animation-delay: 0.245s;
  }

  .homepage > .article > :nth-child(n + 9) {
    animation-delay: 0.28s;
  }

  .homepage > .writing {
    animation-delay: 0.45s;
  }

  .homepage > footer {
    animation-delay: 0.52s;
  }
}

html:has(body.project),
body.project {
  height: 100%;
  overflow: hidden;
}

.project .page {
  height: 100%;
  overflow: auto;
  scroll-padding-top: 80px;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 56px,
    #000 calc(100% - 72px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 56px,
    #000 calc(100% - 72px),
    transparent 100%
  );
}

.project .homepage {
  padding-top: 80px;
  padding-bottom: 5rem;
}

.project-nav {
  display: none;
}

.project-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 24px;
  color: rgba(0, 0, 0, 0.4);
  font-size: 0.875rem;
  font-weight: 460;
  line-height: 1.25rem;
  letter-spacing: -0.00563rem;
  text-decoration: none;
}

.project-back:hover {
  color: #111;
}

.project-toc-title {
  margin: 28px 0 8px;
  min-height: 1.25rem;
  opacity: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  letter-spacing: -0.00563rem;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.project-toc-title.is-visible {
  opacity: 1;
}

.project-toc {
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-toc a {
  display: block;
  padding: 2px 0;
  color: rgba(18, 18, 18, 0.4);
  font-size: 0.8125rem;
  font-weight: 460;
  line-height: 1.2;
  letter-spacing: -0.0025rem;
  text-decoration: none;
}

.project-toc a:hover,
.project-toc a.is-active {
  color: #111;
}

.has-note {
  position: relative;
}

.margin-note {
  display: none;
}

@media (min-width: 1080px) {
  html:has(body.project) {
    scroll-padding-top: 80px;
  }

  .project-back-inline {
    display: none;
  }

  .project-nav {
    display: block;
    position: fixed;
    top: 82px;
    left: 82px;
    width: 168px;
    z-index: 3;
  }

  .project-nav .project-back {
    margin: 0;
  }

  .margin-note {
    display: block;
    position: absolute;
    left: calc(100% + 28px);
    top: 16px;
    width: 180px;
    color: #4a4a4a;
    font-family: Newsreader, Georgia, serif;
    font-size: 0.9375rem;
    font-style: italic;
    font-weight: 430;
    letter-spacing: 0.01rem;
    font-variation-settings: "opsz" 10;
  }
}

.project .article h2 {
  margin: 48px 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  letter-spacing: -0.00813rem;
}

.project .article figure {
  margin: 40px 0 0;
}

.project .article figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.project figcaption {
  margin: 8px 0 0;
  color: rgba(0, 0, 0, 0.4);
  font-size: 0.8125rem;
  font-weight: 460;
  line-height: 1.25rem;
  letter-spacing: -0.0025rem;
}

.project .article figure.diagram {
  margin: 32px 0 0;
}

.project .article figure.diagram svg {
  display: block;
  width: 100%;
  height: auto;
}

.d-node,
.d-line {
  fill: none;
  stroke: rgba(17, 17, 17, 0.22);
  stroke-width: 1;
}

.d-lane {
  fill: none;
  stroke: rgba(17, 17, 17, 0.12);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}

.d-head {
  fill: rgba(17, 17, 17, 0.3);
  stroke: none;
}

.d-name {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.00563rem;
  fill: #111;
}

.d-sub {
  font-size: 11px;
  font-weight: 460;
  letter-spacing: -0.00563rem;
  fill: rgba(0, 0, 0, 0.4);
}

.project .files {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.project .files li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid rgba(17, 17, 17, 0.1);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  letter-spacing: -0.00563rem;
}

.project .files li:last-child {
  border-bottom: 1px solid rgba(17, 17, 17, 0.1);
}

.project .files span {
  flex: 0 1 auto;
  text-align: right;
  font-weight: 460;
  color: rgba(0, 0, 0, 0.4);
}

.d-sealed {
  fill: none;
  stroke: rgba(17, 17, 17, 0.22);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.d-strong {
  fill: none;
  stroke: rgba(17, 17, 17, 0.4);
  stroke-width: 1;
}

.project-light {
  color: #1d4e9c;
}

.project-light header time,
.project-light figcaption,
.project-light .files span,
.project-light .d-sub {
  color: rgba(29, 78, 156, 0.5);
}

.project-light .d-sub {
  fill: rgba(29, 78, 156, 0.5);
}

.project-light .article em,
.project-light .article em strong,
.project-light .article strong em,
.project-light .margin-note {
  color: rgba(29, 78, 156, 0.82);
}

.project-light .basic-link {
  text-decoration-color: rgba(29, 78, 156, 0.35);
}

.project-light .basic-link:hover {
  text-decoration-color: #1d4e9c;
}

.project-light .project-back,
.project-light .project-toc a {
  color: rgba(29, 78, 156, 0.45);
}

.project-light .project-back:hover,
.project-light .project-toc a:hover,
.project-light .project-toc a.is-active {
  color: #1d4e9c;
}

.project-light .files li,
.project-light .files li:last-child {
  border-color: rgba(29, 78, 156, 0.18);
}

.project-light .d-node,
.project-light .d-line,
.project-light .d-sealed {
  stroke: rgba(29, 78, 156, 0.35);
}

.project-light .d-lane {
  stroke: rgba(29, 78, 156, 0.2);
}

.project-light .d-head {
  fill: rgba(29, 78, 156, 0.45);
}

.project-light .d-name {
  fill: #1d4e9c;
}

.project-light .d-strong {
  stroke: rgba(29, 78, 156, 0.55);
}
