:root {
  --bg: #faf9f6;
  --text: #1a1a1a;
  --muted: #7B7B7A;
  --rule: #d4d2cb;
  --accent: #ff3ea5;
  --accent-yellow: #3C4CFF;
  --code-bg: #f0ede5;
  --max-width: 640px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #111110;
  --text: #e8e6df;
  --muted: #8F8F8C;
  --rule: #3a3936;
  --code-bg: #1c1b18;
  --accent-yellow: #E1FF00;
  color-scheme: dark;
}

.theme-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  line-height: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.theme-toggle .theme-icon--dark {
  display: none;
}

[data-theme="dark"] .theme-toggle .theme-icon--light {
  display: none;
}

[data-theme="dark"] .theme-toggle .theme-icon--dark {
  display: block;
}

.theme-icon {
  transition: transform 0.4s cubic-bezier(0.45, 0, 0.45, 1.5);
}

.theme-toggle:hover .theme-icon {
  transform: rotate(20deg);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Google Sans", ui-sans-serif, system-ui, -apple-system, "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
}

a:hover {
  color: var(--accent-yellow);
  border-bottom-color: var(--accent-yellow);
}

::selection {
  background-color: #E1FF00;
  color: #1a1a1a;
}

[data-theme="dark"] ::selection {
  background-color: #5765FF;
  color: #fff;
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 100px 24px 120px;
  position: relative;
}

.name-photo {
  position: absolute;
  width: 121px;
  height: auto;
  top: 110px;
  left: -127px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  border-radius: 12px;
}

.name:hover ~ .name-photo {
  opacity: 1;
  animation: name-photo-figure8 9s ease-in-out infinite;
}

@keyframes name-photo-figure8 {
  0%   { transform: translate(0, 0); }
  12.5%{ transform: translate(7px, -5px); }
  25%  { transform: translate(10px, 0); }
  37.5%{ transform: translate(7px, 5px); }
  50%  { transform: translate(0, 0); }
  62.5%{ transform: translate(-7px, -5px); }
  75%  { transform: translate(-10px, 0); }
  87.5%{ transform: translate(-7px, 5px); }
  100% { transform: translate(0, 0); }
}

@media (max-width: 600px) {
  .name-photo {
    display: none;
  }
}

.name {
  font-weight: 500;
  margin: 0 0 2px;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  width: fit-content;
}

.updated {
  color: var(--muted);
  margin: 0 0 40px;
  font-size: 15px;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.updated-icon {
  flex: none;
}

.bio {
  display: grid;
  grid-template-columns: 100px 1fr;
  column-gap: 32px;
  row-gap: 34px;
  align-items: baseline;
  margin-left: -132px;
}

.bio-row {
  display: contents;
}

.bio-row--break > * {
  margin-top: 24px;
}

.bio-label {
  color: var(--muted);
  text-align: right;
  font-size: 15px;
  line-height: 1.55;
}

.bio p {
  margin: 0;
}

.bio-text p + p {
  margin-top: 16px;
}

.expand-toggle,
.collapse-toggle {
  background: none;
  border: none;
  padding: 0;
  margin: 0 0 0 2px;
  cursor: pointer;
  color: var(--muted);
  font: inherit;
  font-size: inherit;
  line-height: 1;
  display: inline-block;
  vertical-align: baseline;
  transition: color 0.2s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.expand-toggle,
.expand-toggle:focus,
.expand-toggle:focus-visible,
.collapse-toggle,
.collapse-toggle:focus,
.collapse-toggle:focus-visible {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.expand-toggle:hover,
.collapse-toggle:hover {
  color: var(--accent-yellow);
}

.expand-toggle:hover .expand-icon {
  transform: translateX(-100%) scaleX(-1.2);
}

.collapse-toggle:hover {
  transform: translateX(-4px);
}

.expand-toggle[hidden] {
  display: none;
}

.expand-toggle {
  color: var(--accent-yellow);
}

.expand-icon {
  vertical-align: -3px;
  transform: translateX(-100%) scaleX(-1);
  transform-origin: 100% 50%;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.collapse-toggle {
  color: var(--accent-yellow);
  margin-left: 6px;
}

.collapse-icon {
  vertical-align: -3px;
}

.expand-detail code {
  font-size: 0.95em;
}

.num {
  color: var(--accent-yellow);
}

.expand-detail .num {
  display: inline-block;
  margin-top: 6px;
}

.to-icon {
  display: inline-block;
  vertical-align: -1px;
  margin: 0 2px;
  color: var(--text);
}

.expand-detail em::before {
  content: "";
  display: inline-block;
  width: 100%;
  height: 8px;
}

.post-bio {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.post-bio p {
  margin: 0;
  color: var(--muted);
}


.section-label {
  color: var(--muted);
  margin: 80px 0 24px;
  font-size: 15px;
}

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

.writing-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
  gap: 16px;
}

.writing-year {
  color: var(--muted);
}

.writing-year.empty {
  visibility: hidden;
}

.writing-date {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.writing-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.writing-title a,
.writing-title a:hover {
  border-bottom: none;
}

.arrow-icon {
  margin-left: 6px;
  vertical-align: -3px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.writing-title a:hover .arrow-icon {
  opacity: 1;
  transform: translateX(0);
}

.new-badge {
  color: var(--accent);
  font-size: 15px;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  padding: 2px 10px;
  transform: rotate(-4deg);
  font-style: italic;
  line-height: 1;
  display: inline-block;
}

.article {
  display: grid;
  grid-template-columns: 220px minmax(0, var(--max-width));
  gap: 80px;
  max-width: 960px;
  margin: 0 auto;
  padding: 160px 24px 120px;
}

.article--simple {
  grid-template-columns: minmax(0, var(--max-width));
  max-width: var(--max-width);
  padding-top: 110px;
  padding-left: 24px;
  padding-right: 24px;
}

.article--simple .back {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--muted);
  border-bottom: none;
}

.article--simple .back:hover {
  color: var(--text);
}

.back-icon {
  vertical-align: -5px;
  margin-right: 4px;
}

.sidebar {
  position: sticky;
  top: 160px;
  align-self: start;
  font-size: 15px;
  color: var(--muted);
}

.sidebar a {
  border-bottom: none;
}

.sidebar .back {
  margin-bottom: 120px;
  color: var(--muted);
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-body h1.title {
  font-weight: 600;
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 4px;
}

.article-body .date {
  color: var(--muted);
  margin: 0 0 40px;
  font-size: 15px;
}

.article-body .dek {
  color: var(--text);
  margin: 0 0 12px;
}

.article-body .cover {
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  margin: 16px 0;
  overflow: hidden;
}

.article-body .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-body .specs {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.article-body .specs li {
  margin: 0 0 6px;
}

.article-body .label {
  color: var(--muted);
}

.article-body .snapshot {
  margin: 0 0 24px;
}

.article-body .snapshot dt {
  font-weight: 600;
  margin-top: 24px;
}

.article-body .snapshot dt::before {
  content: "/ ";
}

.article-body .snapshot dt:first-child {
  margin-top: 0;
}

.article-body .snapshot dd {
  margin: 4px 0 0;
}

.article-body .snapshot dd p {
  margin: 0;
}

.article-body .snapshot dd p:last-child {
  margin-bottom: 0;
}

.article-body .snapshot dd .label {
  display: block;
}

.article-body .snapshot dd > .label {
  margin-bottom: 4px;
}

.article-body .snapshot dd ul {
  list-style: disc;
  padding-left: 20px;
  margin: 0;
}

.article-body .snapshot dd ul li {
  margin: 0 0 6px;
}

.article-body .snapshot dd ul li:last-child {
  margin-bottom: 0;
}

.article-body .tags {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.article-body .tags + h2 {
  margin-top: 0;
}

.article-body .tag {
  display: inline-block;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
  background: transparent;
  border: 1px solid #b0aea7;
  padding: 5px 12px;
  border-radius: 999px;
}

[data-theme="dark"] .article-body .tag {
  background: #151515;
  border-color: var(--rule);
}

.article-body .tag.tag--link {
  margin-left: auto;
  padding: 0;
}

.article-body .tag--link a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  color: inherit;
  border-bottom: none;
}

.article-body .tag--link .tag-arrow {
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.article-body .tag--link:hover {
  border-color: var(--text);
}

.article-body .tag--link:hover .tag-arrow {
  transform: translateX(2px);
}

@media (max-width: 600px) {
  .article-body .tag--hide-mobile {
    display: none;
  }
}

.article-body p {
  margin: 0 0 24px;
}

.article-body h2 {
  font-weight: 600;
  font-size: 15px;
  margin: 24px 0 4px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.article-body hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 24px 0;
}

.article-body hr + h2 {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.article-body h2 + h2 {
  border-top: 0;
  padding-top: 0;
  margin-top: 24px;
}

.article-body h2.accent-orange {
  color: #E23008;
}

.article-body h2.accent-yellow {
  color: #E39502;
}

.article-body h2.accent-violet {
  color: #943DE3;
}

.article-body h2.accent-green {
  color: #12B467;
}

.article-body h2.accent-teal {
  color: #0B928B;
}

.article-body h2.accent-blue {
  color: #0A74D6;
}

[data-theme="dark"] .article-body h2.accent-orange {
  color: #F56410;
}

[data-theme="dark"] .article-body h2.accent-yellow {
  color: #F5CA10;
}

[data-theme="dark"] .article-body h2.accent-violet {
  color: #B768FF;
}

[data-theme="dark"] .article-body h2.accent-green {
  color: #2CF093;
}

[data-theme="dark"] .article-body h2.accent-teal {
  color: #14D1C8;
}

[data-theme="dark"] .article-body h2.accent-blue {
  color: #128DFF;
}

.article-body .features {
  list-style: disc;
  padding-left: 20px;
  margin: 0 0 24px;
}

.article-body .features li {
  margin: 0 0 6px;
}

.article-body .features li:last-child {
  margin-bottom: 0;
}

.article-body h3 {
  font-weight: 600;
  font-size: 15px;
  margin: 32px 0 12px;
}

.article-body h2 + h3 {
  margin-top: 16px;
}

.article-body h4 {
  font-weight: 400;
  font-size: 15px;
  color: var(--muted);
  margin: 20px 0 4px;
}

.article-body h3 + h4 {
  margin-top: 12px;
}

.article-body .build-points {
  list-style: disc;
  padding-left: 20px;
  margin: 0 0 24px;
}

.article-body .build-points li {
  margin: 0 0 12px;
}

.article-body .build-points li:last-child {
  margin-bottom: 0;
}

code {
  background: var(--code-bg);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
}

figure {
  margin: 32px 0 48px;
}

figure img {
  width: 100%;
  display: block;
  border-radius: 4px;
}

@media (min-width: 601px) {
  .article-body > figure {
    width: 140%;
    margin-left: -20%;
  }
}

figcaption {
  color: var(--muted);
  text-align: center;
  font-size: 15px;
  margin-top: 16px;
}

.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 24px 0 32px;
}

.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

.cta-card:hover {
  border-color: var(--muted);
  color: var(--text);
}

.cta-card:hover .cta-label {
  color: var(--text);
}

.cta-card .cta-label {
  font-weight: 600;
  font-size: 15px;
  color: inherit;
}

.cta-card .cta-arrow {
  flex-shrink: 0;
  color: var(--muted);
  transition: color 0.15s ease, transform 0.15s ease;
}

.cta-card:hover .cta-arrow {
  color: inherit;
  transform: translateX(2px);
}

@media (max-width: 600px) {
  .cta-grid {
    grid-template-columns: 1fr;
  }
}

.slideshow {
  width: 100%;
}

.slideshow-main {
  position: relative;
  width: 100%;
  aspect-ratio: 2253 / 1704;
  overflow: hidden;
  border-radius: 4px;
}

.slideshow-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 600ms ease-in-out;
}

.slideshow-slide.is-active {
  opacity: 1;
}

.slideshow-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
}

.slideshow-thumb {
  background: none;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0;
  width: 80px;
  aspect-ratio: 2253 / 1704;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 200ms ease, border-color 200ms ease;
}

.slideshow-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.slideshow-thumb:hover {
  opacity: 1;
}

.slideshow-thumb.is-active {
  opacity: 1;
  border-color: var(--text);
}

.placeholder-chart {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg);
  border: 1px dashed var(--rule);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 15px;
}

@media (max-width: 800px) {
  .article {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 80px;
  }
  .sidebar {
    position: static;
  }
  .sidebar .back {
    margin-bottom: 24px;
  }
  .page {
    padding-top: 80px;
  }
  .writing-row {
    padding: 12px 0;
  }
  .bio {
    display: block;
    margin-left: 0;
  }
  .bio-row {
    display: block;
    margin-bottom: 20px;
  }
  .bio-row:last-child {
    margin-bottom: 0;
  }
  .bio-row--break {
    margin-top: 32px;
  }
  .bio-row--break > * {
    margin-top: 0;
  }
  .bio-label {
    display: block;
    text-align: left;
    margin-bottom: 0;
  }
  .bio-label:empty {
    display: none;
  }
  .bio .writing-list {
    margin-top: 4px;
  }
}

.is-modal-open {
  overflow: hidden;
}

.omacast-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.omacast-modal[hidden] {
  display: none;
}

.omacast-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

[data-theme="dark"] .omacast-modal__backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.omacast-modal__panel {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.omacast-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 48px;
  height: 48px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.omacast-modal__close:hover {
  color: var(--text);
  background: var(--code-bg);
}

.omacast-modal__title {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.omacast-modal__choices {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 601px) {
  .omacast-modal__panel {
    max-width: 640px;
  }
  .omacast-modal__choices {
    flex-direction: row;
  }
  .omacast-modal__choices > .omacast-choice {
    flex: 1 1 0;
  }
}

.omacast-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 4px;
  padding: 20px;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.omacast-choice:hover,
.omacast-choice:focus-visible {
  border-color: var(--text);
  background: var(--code-bg);
  outline: none;
}

.omacast-choice__thumb {
  display: block;
  width: 100%;
  aspect-ratio: 32 / 9;
  background: #FFF0F0;
  border-radius: 6px;
  margin-bottom: 12px;
}

@media (min-width: 601px) {
  .omacast-choice__thumb {
    aspect-ratio: 16 / 9;
  }
}

.omacast-choice__label {
  font-size: 15px;
  font-weight: 600;
}

.omacast-choice__hint {
  font-size: 13px;
  color: var(--muted);
}
