:root {
  color-scheme: light;
  --bg: #fbfaf8;
  --text: #19171b;
  --muted: #6f6873;
  --soft: #8f8793;
  --line: #e7e1db;
  --panel: #f3f0ed;
  --panel-strong: #ece7e2;
  --accent: #e44a93;
  --accent-strong: #c92f78;
  --accent-alt: #35a8c8;
  --accent-third: #8857d5;
  --green: #15805b;
  --shadow: 0 24px 80px rgba(25, 23, 27, 0.08);
  --max-width: 920px;
}

:root.dark {
  color-scheme: dark;
  --bg: #101013;
  --text: #f6f1f4;
  --muted: #b5abb4;
  --soft: #847985;
  --line: #29252d;
  --panel: #17161a;
  --panel-strong: #1f1d24;
  --accent: #ff6db2;
  --accent-strong: #ff91c6;
  --accent-alt: #5fd4f2;
  --accent-third: #b184ff;
  --green: #57d49b;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(228, 74, 147, 0.08), transparent 28rem),
    linear-gradient(180deg, var(--bg), var(--bg));
  color: var(--text);
  font-family:
    "Noto Sans SC",
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: rgba(228, 74, 147, 0.24);
}

.theme-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--line);
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  outline: none;
  transform: translateY(-1px);
}

.theme-toggle__icon {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  border: 2px solid currentColor;
  box-shadow:
    0 -0.58rem 0 -0.44rem currentColor,
    0 0.58rem 0 -0.44rem currentColor,
    0.58rem 0 0 -0.44rem currentColor,
    -0.58rem 0 0 -0.44rem currentColor,
    0.42rem 0.42rem 0 -0.45rem currentColor,
    -0.42rem 0.42rem 0 -0.45rem currentColor,
    0.42rem -0.42rem 0 -0.45rem currentColor,
    -0.42rem -0.42rem 0 -0.45rem currentColor;
}

:root.dark .theme-toggle__icon {
  border-color: currentColor;
  background: currentColor;
  box-shadow: inset -0.42rem -0.08rem 0 0 var(--bg);
}

.site-main {
  width: min(var(--max-width), calc(100% - 3rem));
  margin: 0 auto;
  padding: 5rem 0 1rem;
}

.hero {
  display: flex;
  min-height: 70vh;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0 3rem;
}

.identity {
  display: grid;
  grid-template-columns: 6.25rem 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2.75rem;
}

.avatar {
  width: 6.25rem;
  height: 6.25rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  background: var(--panel);
  box-shadow: var(--shadow);
  object-fit: cover;
}

:root.dark .avatar {
  box-shadow:
    0 0 44px rgba(255, 109, 178, 0.26),
    0 0 88px rgba(95, 212, 242, 0.12);
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--accent-alt);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-bottom: 0.35rem;
  color: var(--accent);
  font-size: clamp(2.5rem, 6vw, 4.6rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0;
  text-shadow:
    0 0 36px rgba(228, 74, 147, 0.24),
    0 0 90px rgba(136, 87, 213, 0.13);
}

.subtitle {
  max-width: 38rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  line-height: 1.65;
}

.intro-copy {
  display: grid;
  gap: 1rem;
  max-width: 48rem;
  margin-bottom: 2.6rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.9;
}

.intro-copy strong,
.intro-copy a {
  color: var(--accent-strong);
}

.social-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 1.65rem;
  color: var(--soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
}

.social-links a,
.footer-links a,
.section__header a {
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.social-links a:hover,
.footer-links a:hover,
.section__header a:hover {
  color: var(--accent);
}

.feature-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 0 0 4.5rem;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--green) 18%, var(--line));
  border-radius: 8px;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      color-mix(in srgb, var(--green) 7%, transparent) 2px,
      color-mix(in srgb, var(--green) 7%, transparent) 4px
    ),
    var(--panel);
  padding: 1.35rem 1.5rem;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease;
}

.feature-link:hover {
  border-color: color-mix(in srgb, var(--green) 58%, var(--line));
  transform: translateY(-2px);
}

.feature-link__content {
  display: grid;
  gap: 0.35rem;
}

.feature-link__label {
  color: var(--green);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.feature-link__text {
  color: var(--muted);
  line-height: 1.65;
}

.feature-link__arrow {
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.35rem;
  white-space: nowrap;
  transition: transform 180ms ease;
}

.feature-link:hover .feature-link__arrow {
  transform: translateX(0.25rem);
}

.feature-link--photos {
  margin-top: -2.8rem;
  border-color: color-mix(in srgb, var(--accent-alt) 20%, var(--line));
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 4px,
      color-mix(in srgb, var(--accent-alt) 6%, transparent) 4px,
      color-mix(in srgb, var(--accent-alt) 6%, transparent) 8px
    ),
    var(--panel);
}

.feature-link--photos:hover {
  border-color: color-mix(in srgb, var(--accent-alt) 58%, var(--line));
}

.feature-link--photos .feature-link__label {
  color: var(--accent-alt);
}

.section {
  border-top: 1px solid var(--line);
  padding: 3rem 0 3.7rem;
}

.section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

h2 {
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section:nth-of-type(3) h2 {
  color: var(--accent-third);
}

.section__header a {
  color: var(--soft);
  font-size: 0.95rem;
}

.list,
.projects {
  display: grid;
  gap: 1.2rem;
}

.list-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: 0.1rem 0;
}

.list-item strong,
.project strong {
  display: block;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.5;
  transition: color 160ms ease;
}

.list-item small,
.project span {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.list-item time {
  color: var(--soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
  white-space: nowrap;
}

.list-item:hover strong {
  color: var(--accent);
}

.project {
  display: block;
  padding: 0.15rem 0;
}

.project:hover strong {
  color: var(--accent-alt);
}

.stack-section {
  padding-bottom: 2.5rem;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.stack span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.84rem;
  padding: 0.58rem 0.85rem;
}

.site-footer {
  width: min(var(--max-width), calc(100% - 3rem));
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.footer-mark {
  width: fit-content;
  margin: 0 auto 2rem;
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(3rem, 11vw, 7.5rem);
  font-weight: 700;
  line-height: 0.9;
  text-shadow:
    0.045em 0.045em 0 var(--accent),
    -0.04em -0.035em 0 var(--accent-alt);
}

.footer-links {
  justify-content: center;
}

.content-page {
  padding-top: 4.5rem;
}

.page-back {
  margin-bottom: 3rem;
}

.page-back a {
  color: var(--soft);
  font-size: 0.95rem;
  transition: color 160ms ease;
}

.page-back a:hover {
  color: var(--accent);
}

.content-header {
  margin-bottom: 3rem;
}

.content-header h1 {
  margin-bottom: 0.8rem;
}

.posts-page__header h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.25rem, 4.7vw, 3rem);
  font-weight: 700;
  line-height: 1.08;
  text-shadow:
    0 0 30px rgba(228, 74, 147, 0.5),
    0 0 60px rgba(228, 74, 147, 0.3);
}

.content-header p {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.post-tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.35rem;
}

.post-tag-filter__item {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  padding: 0.36rem 0.72rem;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background-color 160ms ease;
}

.post-tag-filter__item:hover,
.post-tag-filter__item.is-active {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
}

.post-list {
  display: grid;
  gap: 1.35rem;
}

.post-list-item a {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: baseline;
}

.post-list-item strong {
  display: block;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.45;
  transition: color 160ms ease;
}

.post-list-item small.post-list-item__tag {
  display: inline-block;
  margin-bottom: 0.22rem;
  color: var(--accent-alt);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
}

.post-list-item small {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

.post-list-item time {
  color: var(--soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
  white-space: nowrap;
}

.post-list-item a:hover strong {
  color: var(--accent);
}

.post-header {
  margin-bottom: 2.5rem;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.8rem;
  align-items: center;
  margin-bottom: 0.9rem;
  color: var(--soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
}

.post-meta span {
  color: var(--accent-alt);
}

.post-header h1 {
  max-width: 48rem;
  font-size: clamp(2.25rem, 4.7vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  text-shadow:
    0 0 30px rgba(228, 74, 147, 0.42),
    0 0 60px rgba(228, 74, 147, 0.24);
}

.post-header p {
  max-width: 42rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.post-body {
  max-width: 46rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.9;
}

.post-body p + p {
  margin-top: 1.2rem;
}

.post-body h2,
.rich-text-editor h2 {
  margin: 2rem 0 0.75rem;
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.35;
}

.post-body h3,
.rich-text-editor h3 {
  margin: 1.55rem 0 0.65rem;
  color: var(--text);
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.4;
}

.post-body ul,
.post-body ol,
.rich-text-editor ul,
.rich-text-editor ol {
  margin: 1rem 0 1rem 1.35rem;
  padding: 0;
}

.post-body li + li,
.rich-text-editor li + li {
  margin-top: 0.45rem;
}

.post-body blockquote,
.rich-text-editor blockquote {
  margin: 1.3rem 0;
  border-left: 3px solid var(--accent);
  color: color-mix(in srgb, var(--muted) 82%, var(--text));
  padding: 0.2rem 0 0.2rem 1rem;
}

.post-body a,
.rich-text-editor a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.post-body code,
.rich-text-editor code {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--accent-third);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92em;
  padding: 0.08rem 0.32rem;
}

.post-body pre,
.rich-text-editor pre {
  overflow-x: auto;
  margin: 1.35rem 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.7;
  padding: 1rem;
  white-space: pre-wrap;
}

.post-body figure,
.rich-text-editor figure {
  margin: 1.6rem 0;
}

.post-body figure.post-image--small,
.rich-text-editor figure.post-image--small {
  max-width: 22rem;
}

.post-body figure.post-image--medium,
.rich-text-editor figure.post-image--medium {
  max-width: 34rem;
}

.post-body figure.post-image--full,
.rich-text-editor figure.post-image--full {
  max-width: none;
}

.post-body figure.post-image--small,
.post-body figure.post-image--medium,
.rich-text-editor figure.post-image--small,
.rich-text-editor figure.post-image--medium {
  margin-left: auto;
  margin-right: auto;
}

.rich-text-editor figure.is-selected {
  outline: 2px solid color-mix(in srgb, var(--accent) 64%, transparent);
  outline-offset: 4px;
}

.post-body img,
.rich-text-editor img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  object-fit: cover;
}

.post-body figcaption,
.rich-text-editor figcaption {
  margin-top: 0.65rem;
  color: var(--soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.6;
}

.photos-page__header h1,
.photo-detail h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.25rem, 4.7vw, 3rem);
  font-weight: 700;
  line-height: 1.08;
  text-shadow:
    0 0 30px rgba(228, 74, 147, 0.5),
    0 0 60px rgba(228, 74, 147, 0.3);
}

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

.photo-card {
  min-width: 0;
}

.photo-card__button {
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  cursor: zoom-in;
  padding: 0;
}

.photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition:
    filter 180ms ease,
    transform 180ms ease;
}

.photo-card__button:hover img,
.photo-card__button:focus-visible img {
  filter: saturate(1.08) contrast(1.03);
  transform: scale(1.025);
}

.photo-card__body {
  display: grid;
  gap: 0.2rem;
  padding-top: 0.7rem;
}

.photo-card__body a {
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.45;
  transition: color 160ms ease;
}

.photo-card__body a:hover {
  color: var(--accent);
}

.photo-card__body span,
.photo-detail time {
  color: var(--soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.84rem;
}

.photo-detail figure {
  margin: 0;
}

.photo-detail img {
  display: block;
  width: 100%;
  max-height: min(70vh, 46rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  object-fit: cover;
}

.photo-detail figcaption {
  display: grid;
  gap: 0.7rem;
  max-width: 44rem;
  padding-top: 1.4rem;
}

.photo-detail p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  background: rgba(8, 8, 10, 0.84);
  padding: 2rem;
}

.gallery-lightbox.is-open {
  display: grid;
}

.gallery-lightbox figure {
  display: grid;
  gap: 1rem;
  margin: 0;
  min-width: 0;
}

.gallery-lightbox img {
  display: block;
  width: 100%;
  max-height: 78vh;
  border-radius: 8px;
  object-fit: contain;
}

.gallery-lightbox figcaption {
  display: grid;
  gap: 0.25rem;
  color: #fff;
  text-align: center;
}

.gallery-lightbox figcaption strong {
  font-weight: 500;
}

.gallery-lightbox figcaption span {
  color: rgba(255, 255, 255, 0.68);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.84rem;
}

.gallery-lightbox__close,
.gallery-lightbox__nav {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font: inherit;
  transition:
    background-color 160ms ease,
    border-color 160ms ease;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__nav:hover {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.16);
}

.gallery-lightbox__close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.5rem;
}

.gallery-lightbox__nav {
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.25rem;
}

.admin-photo-row {
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  padding: 1rem;
}

.admin-photo-row > img {
  width: 5.25rem;
  height: 5.25rem;
  border-radius: 8px;
  object-fit: cover;
}

.photo-form__preview img {
  display: block;
  width: min(100%, 24rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}

.form-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.form-checks label {
  display: inline-flex;
  grid-template-columns: none;
  gap: 0.45rem;
  align-items: center;
}

.form-checks input {
  width: auto;
}

.empty-state,
.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  padding: 1rem;
}

.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.admin-list {
  display: grid;
  gap: 0.9rem;
}

.admin-post-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  padding: 1rem;
}

.admin-post-row__title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.admin-post-row strong {
  color: var(--text);
  font-weight: 500;
}

.admin-post-row small {
  display: block;
  margin-top: 0.25rem;
  color: var(--soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
}

.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  padding: 0.22rem 0.5rem;
  text-transform: uppercase;
}

.status-pill--published {
  border-color: color-mix(in srgb, var(--green) 42%, var(--line));
  color: var(--green);
}

.status-pill--draft {
  border-color: color-mix(in srgb, var(--accent-third) 40%, var(--line));
  color: var(--accent-third);
}

.status-pill--tag {
  border-color: color-mix(in srgb, var(--accent-alt) 38%, var(--line));
  color: var(--accent-alt);
}

.admin-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.admin-actions form,
.form-actions form {
  margin: 0;
}

.admin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  min-height: 2.35rem;
  padding: 0.52rem 0.8rem;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background-color 160ms ease;
}

.admin-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.admin-button--primary {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  color: var(--accent);
}

.admin-button--danger {
  border-color: color-mix(in srgb, #d44 55%, var(--line));
  color: #d44;
}

.post-form {
  display: grid;
  gap: 1rem;
}

.post-form label,
.post-form .form-field {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.post-form label span,
.post-form .field-label {
  font-family: "IBM Plex Mono", monospace;
}

.post-form input,
.post-form textarea,
.post-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  padding: 0.8rem;
}

.post-form textarea {
  resize: vertical;
}

.rich-text-field {
  min-width: 0;
}

.rich-text-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  background: color-mix(in srgb, var(--panel-strong) 78%, transparent);
  padding: 0.55rem;
}

.rich-text-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  min-height: 2.1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  padding: 0.35rem 0.52rem;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background-color 160ms ease;
}

.rich-text-toolbar button:hover,
.rich-text-toolbar button:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--panel));
  color: var(--accent);
  outline: none;
}

.rich-text-file-input {
  display: none;
}

.rich-text-editor {
  min-height: 22rem;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.8;
  outline: none;
  padding: 1rem;
}

.rich-text-editor:focus {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--line));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}

.rich-text-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--soft);
  pointer-events: none;
}

.rich-text-editor p {
  margin: 0;
}

.rich-text-editor p + p {
  margin-top: 1rem;
}

.rich-text-status {
  min-height: 1.2rem;
  color: var(--soft);
  font-size: 0.82rem;
}

.rich-text-status.is-error {
  color: #d44;
}

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

.form-errors {
  border: 1px solid color-mix(in srgb, #d44 55%, var(--line));
  border-radius: 8px;
  color: #d44;
  padding: 1rem;
}

.preview-banner,
.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  margin-bottom: 2rem;
  padding: 1rem;
}

.danger-zone {
  align-items: flex-start;
  margin-top: 2rem;
}

.danger-zone h2 {
  color: #d44;
  margin-bottom: 0.35rem;
}

.danger-zone p {
  color: var(--muted);
  line-height: 1.6;
}

@keyframes terminal-flicker {
  0%,
  100% {
    opacity: 1;
  }

  92% {
    opacity: 1;
  }

  93% {
    opacity: 0.82;
  }

  94% {
    opacity: 1;
  }

  96% {
    opacity: 0.9;
  }
}

@keyframes cursor-blink {
  0%,
  46% {
    opacity: 1;
  }

  47%,
  100% {
    opacity: 0;
  }
}

.terminal-page {
  min-height: 100vh;
  padding: 4rem 1.5rem 3rem;
  background:
    radial-gradient(circle at 50% -10%, rgba(46, 232, 148, 0.13), transparent 28rem),
    #080b0a;
  color: #66f2a3;
  font-family: "IBM Plex Mono", monospace;
  position: relative;
}

body:has(.terminal-page) .theme-toggle {
  color: #66f2a3;
}

body:has(.terminal-page) .theme-toggle:hover,
body:has(.terminal-page) .theme-toggle:focus-visible {
  border-color: rgba(102, 242, 163, 0.32);
  background: rgba(102, 242, 163, 0.08);
}

.scanlines::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(102, 242, 163, 0.035) 2px,
    rgba(102, 242, 163, 0.035) 4px
  );
  mix-blend-mode: screen;
}

.terminal-hero,
.arcade-shell,
.terminal-back {
  position: relative;
  z-index: 2;
}

.terminal-hero {
  width: min(760px, 100%);
  margin: 0 auto 2rem;
}

.terminal-window {
  border: 1px solid rgba(102, 242, 163, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(13, 23, 18, 0.94), rgba(7, 11, 10, 0.97)),
    #0b100e;
  box-shadow:
    0 0 0 1px rgba(102, 242, 163, 0.05),
    0 26px 90px rgba(0, 0, 0, 0.36);
  overflow: hidden;
}

.terminal-window__bar {
  display: flex;
  gap: 0.42rem;
  align-items: center;
  height: 2.15rem;
  padding: 0 0.85rem;
  border-bottom: 1px solid rgba(102, 242, 163, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.terminal-window__bar span {
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 999px;
  background: rgba(102, 242, 163, 0.42);
}

.terminal-window__bar span:nth-child(2) {
  background: rgba(251, 203, 91, 0.58);
}

.terminal-window__bar span:nth-child(3) {
  background: rgba(255, 91, 141, 0.58);
}

.terminal-window--intro {
  padding: 0 0 1.6rem;
}

.terminal-window--intro > :not(.terminal-window__bar) {
  margin-left: 1.4rem;
  margin-right: 1.4rem;
}

.terminal-kicker {
  margin-top: 1.4rem;
  color: rgba(102, 242, 163, 0.56);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.terminal-title {
  margin: 0.35rem 0 0.7rem;
  color: #66f2a3;
  font-size: clamp(2rem, 7vw, 4.4rem);
  animation: terminal-flicker 4s ease-in-out infinite;
  text-shadow:
    0 0 24px rgba(102, 242, 163, 0.32),
    0 0 70px rgba(53, 168, 200, 0.18);
}

.terminal-subtitle {
  max-width: 39rem;
  color: rgba(219, 255, 232, 0.66);
  font-size: 1rem;
  line-height: 1.8;
}

.terminal-command {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-top: 1.35rem;
  color: rgba(219, 255, 232, 0.82);
  white-space: nowrap;
}

.prompt {
  color: #f2cb62;
}

.cursor {
  display: inline-block;
  width: 0.7rem;
  height: 1.05rem;
  background: #66f2a3;
  animation: cursor-blink 1s steps(1) infinite;
}

.arcade-shell {
  display: grid;
  grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr) minmax(13rem, 17rem);
  gap: 1rem;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.arcade-menu {
  display: grid;
  align-content: start;
  gap: 0.65rem;
}

.arcade-tab,
.terminal-actions button,
.log-actions button {
  border: 1px solid rgba(102, 242, 163, 0.28);
  border-radius: 8px;
  background: rgba(102, 242, 163, 0.05);
  color: rgba(219, 255, 232, 0.78);
  cursor: pointer;
  font: inherit;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.arcade-tab {
  display: grid;
  gap: 0.35rem;
  padding: 0.95rem;
  text-align: left;
}

.arcade-tab span {
  color: rgba(102, 242, 163, 0.44);
  font-size: 0.75rem;
}

.arcade-tab:hover,
.arcade-tab.is-active,
.terminal-actions button:hover,
.log-actions button:hover {
  border-color: rgba(102, 242, 163, 0.72);
  background: rgba(102, 242, 163, 0.12);
  color: #66f2a3;
  transform: translateY(-1px);
}

.terminal-game {
  min-height: 31rem;
}

.terminal-game__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.2rem 1rem;
}

.terminal-game__header h2 {
  margin-top: 0.25rem;
  color: #66f2a3;
  font-size: 1.35rem;
}

.terminal-score {
  display: grid;
  gap: 0.2rem;
  justify-items: end;
  margin-top: 1.25rem;
  color: rgba(219, 255, 232, 0.5);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.terminal-score strong {
  color: #f2cb62;
  font-size: 1.65rem;
}

.terminal-output {
  min-height: 18rem;
  margin: 0 1.2rem;
  border: 1px solid rgba(102, 242, 163, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  color: rgba(219, 255, 232, 0.8);
  outline: none;
  padding: 1rem;
}

.terminal-log {
  color: rgba(102, 242, 163, 0.58);
  font-size: 0.86rem;
  line-height: 1.5;
}

.terminal-grid {
  display: grid;
  gap: 0.25rem;
  width: fit-content;
  margin: 1rem auto;
}

.terminal-grid__row {
  display: flex;
  gap: 0.28rem;
}

.terminal-cell {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 5px;
  background: rgba(102, 242, 163, 0.05);
  color: rgba(219, 255, 232, 0.42);
}

.terminal-cell--player {
  background: rgba(53, 168, 200, 0.2);
  color: #5fd4f2;
}

.terminal-cell--file {
  background: rgba(102, 242, 163, 0.12);
  color: #66f2a3;
}

.terminal-cell--trap {
  background: rgba(255, 91, 141, 0.12);
  color: #ff6db2;
}

.terminal-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  color: rgba(219, 255, 232, 0.48);
  font-size: 0.8rem;
}

.terminal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.2rem 1.2rem;
}

.terminal-actions button,
.log-actions button {
  padding: 0.62rem 0.9rem;
}

.scan-sequence {
  margin: 1rem 0;
  color: #f2cb62;
}

.port-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.port-node {
  display: grid;
  gap: 0.35rem;
  min-height: 5.5rem;
  place-items: center;
  border: 1px solid rgba(102, 242, 163, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(219, 255, 232, 0.58);
  font: inherit;
}

.port-node span {
  color: rgba(102, 242, 163, 0.72);
  font-size: 1.35rem;
  font-weight: 700;
}

.port-node.is-open {
  border-color: rgba(242, 203, 98, 0.76);
  box-shadow: inset 0 0 24px rgba(242, 203, 98, 0.08);
}

.port-node.is-submitted {
  background: rgba(102, 242, 163, 0.13);
}

.log-line {
  margin: 1rem 0;
  border-left: 3px solid rgba(102, 242, 163, 0.5);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(219, 255, 232, 0.86);
  line-height: 1.7;
  padding: 1rem;
}

.log-line--error {
  border-left-color: #ff6db2;
}

.log-line--warn {
  border-left-color: #f2cb62;
}

.log-line--info {
  border-left-color: #5fd4f2;
}

.log-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.rubordle-board {
  display: grid;
  gap: 0.45rem;
  justify-content: center;
  margin: 0.9rem auto 1rem;
}

.rubordle-row {
  display: grid;
  grid-template-columns: repeat(5, 2.7rem);
  gap: 0.45rem;
}

.rubordle-tile {
  display: grid;
  height: 2.7rem;
  place-items: center;
  border: 2px solid rgba(102, 242, 163, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(219, 255, 232, 0.86);
  font-size: 1.35rem;
  font-weight: 700;
}

.rubordle-tile--correct {
  border-color: rgba(102, 242, 163, 0.92);
  background: rgba(16, 122, 72, 0.72);
  color: #e7fff0;
}

.rubordle-tile--present {
  border-color: rgba(242, 203, 98, 0.92);
  background: rgba(148, 113, 28, 0.72);
  color: #fff8db;
}

.rubordle-tile--absent {
  border-color: rgba(120, 126, 122, 0.45);
  background: rgba(90, 96, 93, 0.38);
  color: rgba(219, 255, 232, 0.42);
}

.rubordle-keyboard {
  display: grid;
  gap: 0.4rem;
  justify-items: center;
  margin-bottom: 0.9rem;
}

.rubordle-key-row {
  display: flex;
  justify-content: center;
  gap: 0.32rem;
  width: 100%;
}

.rubordle-key {
  min-width: 2rem;
  height: 2.25rem;
  border: 1px solid rgba(102, 242, 163, 0.2);
  border-radius: 6px;
  background: rgba(102, 242, 163, 0.06);
  color: rgba(219, 255, 232, 0.74);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
}

.rubordle-key--wide {
  min-width: 5rem;
}

.rubordle-key--correct {
  border-color: rgba(102, 242, 163, 0.8);
  background: rgba(16, 122, 72, 0.72);
  color: #e7fff0;
}

.rubordle-key--present {
  border-color: rgba(242, 203, 98, 0.8);
  background: rgba(148, 113, 28, 0.72);
  color: #fff8db;
}

.rubordle-key--absent {
  border-color: rgba(120, 126, 122, 0.4);
  background: rgba(90, 96, 93, 0.34);
  color: rgba(219, 255, 232, 0.36);
}

.rubordle-key:hover {
  border-color: rgba(102, 242, 163, 0.7);
  color: #66f2a3;
}

.sudoku-board {
  display: grid;
  grid-template-columns: repeat(9, 2.15rem);
  justify-content: center;
  margin: 0.95rem auto 1rem;
  width: fit-content;
  border: 2px solid rgba(102, 242, 163, 0.34);
  border-radius: 8px;
  overflow: hidden;
}

.sudoku-cell {
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  border: 0;
  border-right: 1px solid rgba(102, 242, 163, 0.12);
  border-bottom: 1px solid rgba(102, 242, 163, 0.12);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(219, 255, 232, 0.82);
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
}

.sudoku-cell--box-end-col {
  border-right-color: rgba(102, 242, 163, 0.46);
  border-right-width: 2px;
}

.sudoku-cell--box-end-row {
  border-bottom-color: rgba(102, 242, 163, 0.46);
  border-bottom-width: 2px;
}

.sudoku-cell--given {
  background: rgba(102, 242, 163, 0.11);
  color: #66f2a3;
}

.sudoku-cell.is-related {
  background: rgba(95, 212, 242, 0.1);
}

.sudoku-cell.is-selected {
  background: rgba(242, 203, 98, 0.18);
  color: #f2cb62;
  outline: 2px solid rgba(242, 203, 98, 0.65);
  outline-offset: -2px;
}

.sudoku-cell.is-error {
  background: rgba(255, 109, 178, 0.14);
  color: #ff91c6;
}

.sudoku-keypad {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.42rem;
  margin-bottom: 0.85rem;
}

.sudoku-keypad button {
  min-width: 2.35rem;
  min-height: 2.2rem;
  border: 1px solid rgba(102, 242, 163, 0.2);
  border-radius: 6px;
  background: rgba(102, 242, 163, 0.06);
  color: rgba(219, 255, 232, 0.78);
  cursor: pointer;
  font: inherit;
}

.sudoku-keypad button:hover {
  border-color: rgba(102, 242, 163, 0.7);
  color: #66f2a3;
}

.terminal-help {
  padding-bottom: 1.2rem;
}

.terminal-help > :not(.terminal-window__bar) {
  margin-left: 1rem;
  margin-right: 1rem;
}

.terminal-help h3 {
  margin: 0.6rem 0 0.7rem;
  color: #f2cb62;
  font-size: 1rem;
}

.terminal-help p {
  color: rgba(219, 255, 232, 0.66);
  font-size: 0.9rem;
  line-height: 1.75;
}

.terminal-help dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.45rem 0.85rem;
  color: rgba(219, 255, 232, 0.66);
  font-size: 0.84rem;
}

.terminal-help dt {
  color: rgba(102, 242, 163, 0.9);
}

.terminal-help dd {
  margin: 0;
}

.terminal-help code {
  color: #f2cb62;
}

.terminal-back {
  width: min(1120px, 100%);
  margin: 2rem auto 0;
}

.terminal-back a {
  color: rgba(219, 255, 232, 0.42);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
}

.terminal-back a:hover {
  color: #66f2a3;
}

@media (max-width: 680px) {
  .theme-toggle {
    top: 1rem;
    right: 1rem;
  }

  .site-main,
  .site-footer {
    width: min(100% - 2rem, var(--max-width));
  }

  .site-main {
    padding-top: 4.5rem;
  }

  .hero {
    min-height: auto;
    justify-content: flex-start;
    padding-top: 1.6rem;
  }

  .identity {
    grid-template-columns: 4.75rem 1fr;
    gap: 1rem;
    margin-bottom: 2.1rem;
  }

  .avatar {
    width: 4.75rem;
    height: 4.75rem;
  }

  .eyebrow {
    font-size: 0.72rem;
  }

  .intro-copy {
    font-size: 1rem;
    line-height: 1.82;
  }

  .feature-link {
    align-items: flex-start;
    margin-bottom: 3.2rem;
    padding: 1.15rem;
  }

  .section {
    padding: 2.55rem 0 3rem;
  }

  .section__header {
    align-items: flex-start;
  }

  .list-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .list-item time {
    font-size: 0.86rem;
  }

  .post-list-item a,
  .photo-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .post-body figure.post-image--small,
  .post-body figure.post-image--medium,
  .rich-text-editor figure.post-image--small,
  .rich-text-editor figure.post-image--medium {
    max-width: none;
  }

  .admin-header,
  .admin-post-row,
  .admin-photo-row,
  .preview-banner,
  .danger-zone {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-actions,
  .form-actions {
    width: 100%;
  }

  .admin-button {
    width: 100%;
  }

  .admin-photo-row {
    grid-template-columns: 1fr;
  }

  .admin-photo-row > img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 920px) {
  .arcade-shell {
    grid-template-columns: 1fr;
  }

  .arcade-menu {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .terminal-help {
    order: 3;
  }
}

@media (max-width: 680px) {
  .terminal-page {
    padding: 3.2rem 1rem 2.4rem;
  }

  .terminal-window--intro > :not(.terminal-window__bar) {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  .terminal-command {
    white-space: normal;
  }

  .arcade-menu {
    grid-template-columns: 1fr;
  }

  .terminal-game__header {
    align-items: flex-start;
  }

  .terminal-output {
    min-height: 17rem;
    margin-left: 0.85rem;
    margin-right: 0.85rem;
    padding: 0.85rem;
  }

  .terminal-cell {
    width: 1.65rem;
    height: 1.65rem;
  }

  .port-grid {
    grid-template-columns: 1fr;
  }

  .rubordle-row {
    grid-template-columns: repeat(5, 2.25rem);
    gap: 0.34rem;
  }

  .rubordle-tile {
    height: 2.25rem;
    font-size: 1.08rem;
  }

  .rubordle-key {
    min-width: 1.63rem;
    height: 2.1rem;
    font-size: 0.72rem;
  }

  .rubordle-key--wide {
    min-width: 4.5rem;
  }

  .sudoku-board {
    grid-template-columns: repeat(9, 1.72rem);
  }

  .sudoku-cell {
    width: 1.72rem;
    height: 1.72rem;
    font-size: 0.9rem;
  }

  .gallery-lightbox {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .gallery-lightbox__nav {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
