/*
Theme Name: Rina Park
Author: Rina Park
Description: Rina Parkのブログ・ポートフォリオ
Version: 0.1.0
*/
.single-post .post-layout > article {
  min-width: 0;
  overflow-wrap: anywhere;
}
.single-post .post-layout > article .article-header {
  display: grid;
  gap: 0.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}
.single-post .post-layout > article .article-header h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.6;
}
.single-post .post-layout > article .article-meta {
  margin: 0;
  color: var(--color-link);
  font-variant-numeric: tabular-nums;
}
.single-post .post-layout > article .article-header .post-taxonomies {
  display: grid;
  gap: 0.375rem;
  color: var(--color-link);
  font-size: 0.875rem;
}
.single-post .post-layout > article .article-header .post-taxonomies:empty {
  display: none;
}
.single-post .post-layout > article .taxonomy-group,
.single-post .post-layout > article .taxonomy-list {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
}
.single-post .post-layout > article .taxonomy-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.single-post .post-layout > article .entry-content {
  margin-top: 2rem;
}
.single-post .post-layout > article .entry-content h2::after {
  content: "";
  display: block;
  margin-block-start: 0.4em;
  height: 3px;
  border-radius: 999px;
  background-color: var(--color-link);
}
.single-post .post-layout > article .entry-content p {
  line-height: 2;
}
.single-post .post-layout > article .entry-content img {
  max-width: 34rem;
  margin: 1.25rem auto;
  display: block;
  border-radius: 1rem;
}
@media (max-width: 40rem) {
  .single-post .post-layout > article .article-meta,
  .single-post .post-layout > article .post-taxonomies {
    font-size: 0.8571428571rem;
  }
  .single-post .post-layout > article > .entry-content {
    font-size: 1rem;
  }
  .single-post .post-layout > article > .entry-content h2 {
    font-size: 1.4285714286rem;
  }
}

.article-meta,
.card-meta,
.post-taxonomies {
  font-family: Menlo, Consolas, "BIZ UDGothic", "Osaka-Mono", "MS Gothic", monospace;
}

.article-meta, .card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  font-size: 0.875rem;
}

.card-meta > span {
  margin-inline-start: auto;
}

.single-post .site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 -3px;
  height: 3px;
  pointer-events: none;
  background: var(--color-highlight);
  transform: scaleX(var(--reading-progress, 0));
  transform-origin: left;
}

.article-points {
  padding: 1rem 1.25rem;
  border-inline-start: 0.25rem solid var(--color-highlight);
  border-radius: 0.75rem;
  background: var(--color-surface);
  margin-bottom: 2rem;
}
.article-points > :last-child {
  margin-bottom: 0;
}

.related-posts {
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.blog-pagination, .pagination {
  margin-top: 2rem;
}
.blog-pagination ul.page-numbers, .blog-pagination .nav-links, .pagination ul.page-numbers, .pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}
.blog-pagination a, .blog-pagination .current, .pagination a, .pagination .current {
  display: inline-block;
  padding: 0.375rem 0.75rem;
}
.blog-pagination .current, .pagination .current {
  font-weight: 700;
  border-bottom: 2px solid var(--color-highlight);
}

.single-post .post-toc {
  margin-block: 1.5rem 0;
  padding: 1rem;
  background: var(--color-surface);
  color: color-mix(in srgb, var(--color-link) 85%, transparent);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}
.single-post .post-toc summary {
  cursor: pointer;
  font-weight: 700;
}
.single-post .post-toc ul {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}
.single-post .post-toc li ul {
  margin: 0.125rem 0 0.375rem;
  padding-inline-start: 0.875rem;
  border-inline-start: 1px solid var(--color-border);
}
.single-post .post-toc a {
  display: block;
  padding-block: 0.2rem;
  text-decoration: none;
}
.single-post .post-toc a:hover, .single-post .post-toc a:focus-visible {
  color: var(--color-link);
  text-decoration: underline;
}

@media (min-width: 64rem) {
  .single-post .post-layout.has-post-toc {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(12rem, 16rem);
    align-items: start;
    gap: clamp(2rem, 4vw, 4rem);
  }
  .single-post .post-layout.has-post-toc > .post-toc {
    position: sticky;
    top: calc(var(--toolbar-offset) + var(--header-height) + 1rem);
    max-height: calc(100vh - var(--toolbar-offset) - var(--header-height) - 2rem);
    overflow: auto;
    margin: 0;
  }
}
.single-post .post-toc a[aria-current=location] {
  color: var(--color-highlight);
  font-weight: 700;
}

@media (max-width: 63.999rem) {
  .single-post .post-toc {
    position: sticky;
    top: calc(var(--toolbar-offset) + var(--post-header-height, var(--header-height)));
    z-index: 2;
    max-height: 40vh;
    overflow: auto;
  }
}
@media (max-width: 63.999rem) {
  .single-post .entry-content :is(h2, h3) {
    scroll-margin-top: 3.25rem;
  }
}
.home-topics, .post-card .taxonomy-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-topics a, .post-card .taxonomy-category {
  display: inline-block;
  padding: 0.5em 0.9em;
  border: 3px solid var(--color-border);
  border-radius: 2rem;
  text-decoration: none;
}
.home-topics a:hover, .home-topics a:focus-visible, .post-card .taxonomy-category:hover, .post-card .taxonomy-category:focus-visible {
  background-color: var(--color-link);
  color: var(--color-surface);
}

.blog-home .home-intro {
  --illustration-max: 27rem;
  --copy-width: min(34rem, 100% * 1.3 / 2.3);
  --grid-center-x: calc(var(--copy-width) + min(100% - var(--copy-width), var(--illustration-max)) / 2);
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: var(--copy-width) minmax(0, 1fr);
  align-items: center;
  padding-block-start: clamp(0.5rem, 1vw, 1rem);
  padding-block-end: clamp(2.5rem, 5vw, 4.5rem);
}
.blog-home .home-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  --grid-step: clamp(1.5rem, 3vw, 2.5rem);
  opacity: 0.17;
  background: linear-gradient(to bottom, var(--color-bg), transparent 50%, var(--color-bg)), linear-gradient(to right, var(--color-bg), color-mix(in srgb, var(--color-bg) 40%, transparent) 12%, transparent var(--grid-center-x), var(--color-bg)), linear-gradient(110deg, var(--color-link) 40%, var(--color-button-bg) 90%);
  mask-image: linear-gradient(to right, black 1px, transparent 1px), linear-gradient(to bottom, black 1px, transparent 1px);
  mask-size: var(--grid-step) var(--grid-step);
}
.blog-home .home-copy h1 {
  margin: 1rem 0 0;
  font-size: clamp(1.75rem, 1.25rem + 2.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.025em;
}
.blog-home .home-description {
  max-width: 34rem;
  margin: 1.5rem 0 0;
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  font-weight: 400;
  line-height: 2;
  letter-spacing: 0.02em;
}
@media (max-width: 64rem) {
  .blog-home .home-description br {
    display: none;
  }
}
.blog-home .home-topics {
  margin-top: 1.25rem;
  font-size: 0.875rem;
}
.blog-home .home-illustration {
  width: 100%;
  max-width: var(--illustration-max);
  height: auto;
  justify-self: start;
}
@media (max-width: 44rem) {
  .blog-home .home-intro {
    --grid-center-x: 50%;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    text-align: center;
  }
  .blog-home .home-description {
    margin: 1.25rem auto 0;
  }
  .blog-home .home-topics {
    justify-content: center;
  }
  .blog-home .home-illustration {
    max-width: 16rem;
    justify-self: center;
  }
}

.home-eyebrow {
  margin: 0 0 0.75rem;
  font-family: Menlo, Consolas, "BIZ UDGothic", "Osaka-Mono", "MS Gothic", monospace;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.12em;
  color: var(--color-highlight);
}
.home-eyebrow::before {
  content: ">"/"";
  margin-inline-end: 0.5ch;
}

.blog-home .section-heading {
  margin-bottom: 1.5rem;
}
.blog-home .section-heading > h2 {
  margin: 0;
  font-size: var(--section-heading-size);
  line-height: 1.4;
}

.site-about-contact .home-section-copy > h2 {
  margin: 0;
  font-size: var(--section-heading-size);
  line-height: 1.4;
}
.site-about-contact .home-about + .home-contact {
  margin-top: clamp(3rem, 6vw, 5rem);
}
.site-about-contact .home-section-copy > p:not(.home-eyebrow) {
  margin: 1rem 0 0;
  line-height: 1.85;
}
.site-about-contact .home-section-link {
  display: inline-block;
  margin-top: 1.25rem;
  color: var(--color-link);
  text-underline-offset: 0.2em;
}

.post-listing,
.home-posts {
  --post-list-text: color-mix(in srgb, var(--color-link) 85%, transparent);
  color: var(--post-list-text);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.post-card {
  min-width: 0;
  overflow-wrap: anywhere;
  background: var(--color-surface);
  border: 3px solid var(--color-border);
  border-radius: 0.75rem;
}
@media (hover: hover) {
  .post-card:hover {
    background-color: color-mix(in srgb, var(--color-surface) 78%, var(--color-link));
    border-color: var(--color-link);
  }
}

.home-card-image {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 0.7rem 0.7rem 0 0;
  background: var(--color-bg);
}
.home-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-card-image .home-card-fallback {
  object-fit: contain;
}

.home-card-copy {
  padding: 1.25rem;
}

.home-card-copy time {
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.post-card-title {
  margin: 0.5rem 0 1rem;
  font-size: 1.25rem;
  line-height: 1.75;
}
.post-card-title a {
  text-decoration: none;
}

.post-card .post-taxonomies {
  display: grid;
  gap: 0.5rem;
  font-size: 0.8125rem;
}

.post-card .taxonomy-group {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}

.post-card .taxonomy-tag {
  color: var(--post-list-text, var(--color-link));
}

@media (max-width: 58rem) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 44rem) {
  .post-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.site-main > .page-content {
  max-width: var(--reading-width);
  margin-inline: auto;
}

.entry-content {
  overflow-wrap: anywhere;
  line-height: 2;
}
.entry-content img {
  max-width: 100%;
  height: auto;
}
.entry-content > :first-child {
  margin-top: 0;
}
.entry-content h2 {
  margin: 3rem 0 1.5rem;
  line-height: 1.6;
}
.entry-content h3, .entry-content h4 {
  margin: 1.5rem 0 1rem;
  line-height: 1.6;
}
.entry-content h2 {
  font-size: clamp(1.375rem, 3vw, 1.5rem);
}
.entry-content h3 {
  position: relative;
  padding-inline-start: 0.9em;
  font-size: clamp(1.125rem, 2vw, 1.25rem);
}
.entry-content h3::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: calc(0.5lh - 0.25em);
  inline-size: 0.5em;
  block-size: 0.5em;
  border-radius: 50%;
  background-color: var(--color-highlight);
}
.entry-content h4 {
  font-size: 1rem;
}
.entry-content p, .entry-content ul, .entry-content ol {
  margin: 0 0 1rem;
}
.entry-content ul, .entry-content ol {
  padding-inline-start: 1em;
}
.entry-content li + li {
  margin-top: 0.3em;
}
.entry-content li > :is(ul, ol) {
  margin-block: 0.3em 0;
}
.entry-content a {
  color: var(--color-link);
  text-decoration: underline;
}
.entry-content code {
  padding: 0.12em 0.3em;
  border-radius: 0.25rem;
  background: var(--color-surface);
  color: var(--color-heading);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.93em;
}
.entry-content pre {
  margin: 1rem 0;
  padding: 1rem;
  overflow-x: auto;
  background: var(--color-surface);
  border-radius: 0.375rem;
  line-height: 1.6;
}
.entry-content pre code {
  padding: 0;
  white-space: pre;
}
.entry-content blockquote {
  margin: 1rem 0;
  padding-inline-start: 1rem;
  border-inline-start: 3px solid var(--color-border);
}
.entry-content figure {
  margin: 1.5rem 0;
}
.entry-content figcaption {
  font-size: 0.875rem;
}
.entry-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  margin: 1rem 0;
  border-collapse: collapse;
}
.entry-content th, .entry-content td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  text-align: start;
  vertical-align: top;
  overflow-wrap: normal;
}
.entry-content th {
  background: var(--color-surface);
  color: var(--color-heading);
}

.entry-content .internal-article-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  background: var(--color-surface);
  text-decoration: none;
}
.entry-content .internal-article-card:hover, .entry-content .internal-article-card:focus-visible {
  border-color: var(--color-link);
}
.entry-content .internal-article-card img {
  width: min(25%, 6rem);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}
.entry-content .internal-article-card strong {
  color: var(--color-heading);
}
.entry-content .internal-article-card .card-description {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875em;
}

:root {
  --reading-width: 42rem;
  --section-heading-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  color-scheme: dark;
  --header-height: 3.75rem;
  --toolbar-offset: var(--wp-admin--admin-bar--height, 0px);
  scroll-padding-top: calc(var(--header-height) + var(--toolbar-offset) + 0.5rem);
  --color-bg: #232946;
  --color-surface: #121629;
  --color-heading: #fffffe;
  --color-text: #d3d5e4;
  --color-link: #b8c1ec;
  --color-button-bg: #eebbc3;
  --color-button-text: #232946;
  --color-border: #596382;
  --color-highlight: #d4939d;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Noto Sans JP", system-ui, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 1rem;
  line-height: 1.8;
}

main,
.site-about-contact {
  max-width: 70rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) clamp(1.25rem, 3vw, 2rem);
}

.site-about-contact {
  padding-block-start: 0;
}

.site-main:has(> .page-content, > h1, > header.home-copy) {
  --page-title-top-space: clamp(1rem, 3vw, 2.5rem);
  padding-block-start: var(--page-title-top-space);
}
.site-main:has(> .page-content, > h1, > header.home-copy) > h1:first-child,
.site-main:has(> .page-content, > h1, > header.home-copy) > header.home-copy > h1:first-child,
.site-main:has(> .page-content, > h1, > header.home-copy) > .page-content > h1:first-child {
  margin-block-start: 0;
  font-size: var(--section-heading-size);
}
.site-main:has(> .page-content, > h1, > header.home-copy) > h1:has(+ .post-grid),
.site-main:has(> .page-content, > h1, > header.home-copy) > header.home-copy .archive-description > :last-child {
  margin-block-end: 0;
}
.site-main:has(> .page-content, > h1, > header.home-copy) > .post-grid {
  margin-block-start: var(--page-title-top-space);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-heading);
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.4;
}

/* 共通 */
* {
  box-sizing: border-box;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

a:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 4px;
}

/* キーボード操作用リンク */
.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 8px 16px;
  background: var(--color-button-bg);
  color: var(--color-button-text);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ヘッダー */
.site-header {
  position: sticky;
  top: var(--toolbar-offset);
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 3px solid var(--color-border);
}

.header-inner {
  color: var(--color-link);
  max-width: 70rem;
  margin: 0 auto;
  padding: 1rem clamp(1.25rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.site-logo {
  white-space: nowrap;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--color-heading);
}

.header-inner > .site-nav {
  margin-inline-start: auto;
}

.header-icon-link {
  display: inline-grid;
  place-items: center;
  padding: 0.5rem;
  flex: none;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.header-icon-link > svg {
  width: 1.125rem;
  height: 1.125rem;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: inline-block;
  padding: 6px 0;
  text-decoration: none;
}

@media (max-width: 600px) {
  :root {
    --toolbar-offset: 0px;
  }
}
@media (max-width: 40rem) {
  :root {
    font-size: 87.5%;
  }
  .header-rss {
    display: none;
  }
  .header-inner {
    padding-block: 0.4375rem;
    row-gap: 0.5rem;
  }
  .nav-toggle:not([hidden]) {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: 0.375rem;
    cursor: pointer;
  }
  .nav-toggle:not([hidden]):focus-visible {
    outline: 2px solid var(--color-link);
    outline-offset: 2px;
  }
  .nav-toggle:not([hidden]) span, .nav-toggle:not([hidden]) span::before, .nav-toggle:not([hidden]) span::after {
    display: block;
    width: 1.5rem;
    height: 2px;
    background: currentColor;
  }
  .nav-toggle:not([hidden]) span {
    position: relative;
  }
  .nav-toggle:not([hidden]) span::before, .nav-toggle:not([hidden]) span::after {
    content: "";
    position: absolute;
    left: 0;
  }
  .nav-toggle:not([hidden]) span::before {
    transform: translateY(-7px);
  }
  .nav-toggle:not([hidden]) span::after {
    transform: translateY(7px);
  }
  .nav-toggle:not([hidden])[aria-expanded=true] span {
    background: transparent;
  }
  .nav-toggle:not([hidden])[aria-expanded=true] span::before {
    transform: rotate(45deg);
  }
  .nav-toggle:not([hidden])[aria-expanded=true] span::after {
    transform: rotate(-45deg);
  }
  .site-nav {
    flex-basis: 100%;
    max-height: calc(100dvh - var(--header-height) - var(--toolbar-offset) - 1rem);
    overflow-y: auto;
    padding: 0.375rem;
  }
  .site-nav .nav-list {
    flex-direction: column;
    gap: 0;
  }
  .site-nav a {
    display: block;
    padding: 0.625rem 0;
  }
}
.footer-inner {
  color: var(--color-link);
  max-width: 70rem;
  margin-inline: auto;
  padding: 1.5rem clamp(1.25rem, 3vw, 2rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: baseline;
  gap: 0.25rem 1rem;
  font-size: 0.8125rem;
  text-align: start;
}
.footer-inner small {
  font-size: inherit;
}

.contact-form {
  display: grid;
  gap: 1.5rem;
  max-width: var(--reading-width);
}
.contact-form label {
  display: grid;
  gap: 0.375rem;
}
.contact-form input:not([type=hidden]), .contact-form textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--color-link);
  border-radius: 0.375rem;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
}
.contact-form textarea {
  resize: vertical;
}
.contact-form button {
  justify-self: start;
  padding: 0.625rem 1.75rem;
  border: 0;
  border-radius: 0.375rem;
  background: var(--color-button-bg);
  color: var(--color-button-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.contact-form :focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 3px;
}
