:root {
  --bg: #05080d;
  --panel: rgba(8, 18, 28, 0.78);
  --line: rgba(87, 239, 255, 0.18);
  --text: #eef8ff;
  --muted: #a5b4c7;
  --accent: #34f5ff;
  --accent-2: #c9ff45;
  --danger: #ff4fd8;
  --max: 1180px;
  --wide: 1320px;
  --admin-max: 1560px;
  --gutter: clamp(18px, 4vw, 56px);
  --safe-width: min(var(--max), calc(100% - (var(--gutter) * 2)));
  --wide-width: min(var(--wide), calc(100% - (var(--gutter) * 2)));
  --admin-width: min(var(--admin-max), calc(100% - (var(--gutter) * 2)));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 8%, rgba(52, 245, 255, 0.16), transparent 28rem),
    radial-gradient(circle at 88% 42%, rgba(201, 255, 69, 0.1), transparent 24rem),
    linear-gradient(180deg, #05080d 0%, #07111a 48%, #05080d 100%);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

[hidden] {
  display: none !important;
}

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

img {
  max-width: 100%;
}

.scanline {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.035) 0,
    rgba(255, 255, 255, 0.035) 1px,
    transparent 1px,
    transparent 7px
  );
  mix-blend-mode: overlay;
  opacity: 0.42;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  height: 76px;
  background: rgba(5, 8, 13, 0.7);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  position: relative;
  width: var(--wide-width);
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 19px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(52, 245, 255, 0.45);
  border-radius: 12px;
  object-fit: cover;
  background: #05080d;
  box-shadow: 0 0 24px rgba(52, 245, 255, 0.24);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(52, 245, 255, 0.45);
  color: var(--accent);
  background: rgba(52, 245, 255, 0.08);
  box-shadow: 0 0 24px rgba(52, 245, 255, 0.28);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  padding: 10px 14px;
  color: var(--muted);
  transition: color 160ms ease, background 160ms ease;
}

.site-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px !important;
  border: 1px solid var(--line);
  background: rgba(52, 245, 255, 0.06);
  color: var(--text) !important;
}

.site-user-chip .mini-avatar img,
.site-user-chip .mini-avatar > span {
  width: 26px;
  height: 26px;
  font-size: 11px;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  background: rgba(52, 245, 255, 0.08);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: rgba(5, 8, 13, 0.8);
  color: var(--text);
  font-size: 20px;
}

.hero {
  --drift: 0px;
  position: relative;
  min-height: clamp(500px, calc(100svh - 170px), 660px);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 86px max(var(--gutter), calc((100% - var(--max)) / 2)) 52px;
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: calc(100% + 48px);
  object-fit: cover;
  object-position: 64% 50%;
  transform: translateY(calc(var(--drift) * -0.4));
  transition: transform 80ms linear;
  opacity: 0.74;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 13, 0.98) 0%, rgba(5, 8, 13, 0.74) 43%, rgba(5, 8, 13, 0.2) 100%),
    linear-gradient(0deg, rgba(5, 8, 13, 0.82) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(650px, 100%);
  padding-top: 0;
}

.eyebrow,
.section-kicker {
  margin: 0 0 16px;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(28px, 3.8vw, 46px);
  line-height: 1.08;
  font-weight: 900;
  text-shadow: 0 0 34px rgba(52, 245, 255, 0.34);
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.12;
}

h3 {
  font-size: 18px;
  line-height: 1.2;
}

.hero-copy,
.subhero p,
.lead {
  max-width: 620px;
  color: #d5e5f4;
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.hero-actions.compact {
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--accent);
  color: #041014;
  border-color: var(--accent);
  box-shadow: 0 0 28px rgba(52, 245, 255, 0.35);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.05);
}

.orbit-panel {
  display: none !important;
  position: absolute;
  right: max(var(--gutter), calc((100vw - var(--wide)) / 2));
  bottom: clamp(28px, 7svh, 64px);
  z-index: 2;
  width: clamp(220px, 20vw, 260px);
  padding: clamp(18px, 2vw, 22px);
  border: 1px solid rgba(52, 245, 255, 0.34);
  background: rgba(5, 12, 18, 0.62);
  backdrop-filter: blur(14px);
}

.orbit-panel span,
.orbit-panel small {
  display: block;
  color: var(--muted);
}

.orbit-panel strong {
  display: block;
  margin: 8px 0;
  font-size: clamp(42px, 4vw, 56px);
  color: var(--accent-2);
}

.section {
  width: var(--safe-width);
  margin: 0 auto;
  padding: clamp(72px, 9vw, 124px) 0;
}

.hero + .section {
  padding-top: clamp(42px, 5vw, 72px);
}

.intro-grid,
.focus-project {
  display: grid;
  grid-template-columns: 0.95fr 1fr;
  gap: 34px;
  align-items: start;
  border-bottom: 1px solid var(--line);
}

.intro-grid p,
.focus-project p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 18px;
}

.signal-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.signal-list span,
.filters a,
.feature-matrix span {
  border: 1px solid var(--line);
  padding: 12px 14px;
  color: #dcefff;
  background: rgba(52, 245, 255, 0.045);
}

.feature-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.capability-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding-top: 0;
}

.capability-band div {
  min-height: 116px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(8, 18, 28, 0.52);
}

.capability-band strong {
  font-size: 18px;
  color: var(--text);
}

.capability-band span {
  color: var(--muted);
  line-height: 1.55;
}

.split {
  display: grid;
  grid-template-columns: 0.35fr 1fr;
  gap: clamp(32px, 6vw, 76px);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  min-height: 310px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(52, 245, 255, 0.12), transparent 42%),
    rgba(8, 18, 28, 0.62);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 245, 255, 0.56);
  background:
    linear-gradient(145deg, rgba(52, 245, 255, 0.18), rgba(201, 255, 69, 0.06) 70%),
    rgba(8, 18, 28, 0.72);
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.project-card p,
.post-row p,
.contact-copy p,
.article p,
.detail-layout p {
  color: var(--muted);
  line-height: 1.75;
}

.project-stack {
  color: #d9faff;
  font-size: 14px;
}

.project-card a,
.back-link {
  color: var(--accent-2);
  font-weight: 800;
}

.timeline {
  display: grid;
  grid-template-columns: 0.35fr 1fr;
  gap: clamp(32px, 6vw, 76px);
  border-top: 1px solid var(--line);
}

.post-list {
  display: grid;
  gap: 18px;
}

.post-list.wide {
  max-width: 920px;
}

.post-row {
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.post-row time,
.post-row span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.post-row h3 {
  margin: 8px 0 8px;
}

.cta-band {
  margin: 0;
  padding: clamp(76px, 10vw, 130px) 0;
  background:
    linear-gradient(90deg, rgba(52, 245, 255, 0.16), rgba(201, 255, 69, 0.08)),
    #071018;
  border-top: 1px solid var(--line);
}

.cta-inner {
  width: var(--safe-width);
  margin: 0 auto;
}

.cta-band h2,
.cta-band p {
  max-width: 820px;
}

.cta-band p {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.7;
}

.subhero,
.detail-hero {
  width: var(--safe-width);
  margin: 0 auto;
  padding: 150px 0 58px;
}

.subhero h1,
.detail-hero h1 {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.12;
}

.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
}

.search-bar.large {
  max-width: 820px;
}

input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  background: rgba(5, 8, 13, 0.8);
  color: var(--text);
  padding: 13px 14px;
  font: inherit;
  outline: none;
}

textarea {
  min-height: 160px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(52, 245, 255, 0.12);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.filters a.active {
  color: #041014;
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.detail-layout,
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: clamp(32px, 6vw, 76px);
  align-items: start;
}

.detail-layout article,
.article {
  font-size: 18px;
}

.inspector {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 12px;
  padding: 24px;
  border-left: 2px solid var(--accent);
  background: rgba(8, 18, 28, 0.62);
}

.inspector span {
  color: var(--muted);
  font-size: 13px;
}

.inspector strong {
  margin-bottom: 10px;
  color: var(--text);
}

.article {
  width: min(960px, calc(100% - (var(--gutter) * 2)));
  margin: 0 auto;
  padding: 150px 0 110px;
}

.article h1 {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.18;
}

.article-expanded {
  width: min(1120px, calc(100% - (var(--gutter) * 2)));
}

.article-body {
  display: grid;
  gap: 18px;
}

.article-body > *,
.article-wide,
.article-columns,
.article-columns > div,
.article-body figure {
  min-width: 0;
  max-width: 100%;
}

.article-body h2 {
  margin-top: 18px;
}

.article-body h3 {
  margin: 10px 0 0;
}

.article-body p,
.article-body li {
  color: var(--muted);
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.article-body a {
  color: var(--accent-2);
  border-bottom: 1px solid rgba(201, 255, 69, 0.34);
}

.article-body blockquote {
  margin: 0;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  color: #d5e5f4;
  background: rgba(52, 245, 255, 0.06);
}

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

.article-body img,
.article-body video,
.editor-surface img,
.editor-preview img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(87, 239, 255, 0.16);
}

.article-body video {
  display: block;
  background: #02060a;
}

.article-body figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  overflow-wrap: anywhere;
}

.article-body pre,
.editor-surface pre,
.editor-preview pre {
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  background: #02060a;
  color: #d9faff;
}

.article-body hr,
.editor-surface hr,
.editor-preview hr {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
}

.article-callout {
  padding: 18px;
  border: 1px solid rgba(201, 255, 69, 0.28);
  background: rgba(201, 255, 69, 0.07);
}

.article-callout strong {
  color: var(--accent-2);
}

.article-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.article-wide {
  width: 100%;
}

.article-columns > div {
  padding: 10px;
  border: 1px solid rgba(87, 239, 255, 0.14);
  background: rgba(8, 18, 28, 0.3);
}

.article-columns figure {
  margin: 0;
}

.article-columns img {
  height: clamp(260px, 27vw, 390px);
  object-fit: contain;
  background: rgba(5, 8, 13, 0.42);
}

.article-expanded .article-body {
  gap: 20px;
}

.article-expanded .article-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.article-expanded .article-columns > div {
  padding: 4px;
  border-color: rgba(87, 239, 255, 0.18);
}

.article-expanded .article-columns img {
  height: auto;
  max-height: none;
}

.article:not(.article-expanded) .article-columns img {
  height: clamp(320px, 32vw, 470px);
}

@media (max-width: 980px) {
  .article-expanded .article-columns {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .article-expanded .article-columns > div {
    padding: 4px;
  }

  .article-expanded .article-columns img {
    height: auto;
    max-height: none;
    object-fit: contain;
  }
}

.contact-form {
  display: grid;
  gap: 18px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.notice {
  padding: 14px 16px;
  color: #071018;
  background: var(--accent-2);
  font-weight: 800;
}

.notice.danger {
  color: #fff;
  background: var(--danger);
}

.empty {
  color: var(--muted);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.archive-list {
  display: grid;
  gap: 34px;
}

.archive-year {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 28px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.archive-year h2 {
  color: var(--accent);
  font-size: 26px;
}

.archive-year ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.archive-year li {
  display: grid;
  grid-template-columns: 120px 1fr 100px;
  gap: 18px;
  align-items: center;
  color: var(--muted);
}

.archive-year a {
  color: var(--text);
  font-weight: 800;
}

.search-results {
  display: grid;
  gap: 16px;
  max-width: 920px;
}

.search-result {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.search-result span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.search-result h3 {
  margin: 8px 0;
}

.comments-section {
  border-top: 1px solid var(--line);
  padding-top: clamp(48px, 6vw, 78px);
}

.comment-board {
  display: grid;
  gap: 14px;
  width: min(1040px, 100%);
  margin: 0 auto;
}

.comment-board-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.comment-board-head h2 {
  margin: 0 0 4px;
  font-size: clamp(22px, 3vw, 30px);
}

.comment-board-head p {
  margin: 0;
  color: var(--muted);
}

.comment-identity {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(220px, 1fr);
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(8, 18, 28, 0.52);
}

.comment-identity.needs-attention {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(201, 255, 69, 0.12);
}

.comment-identity label {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.comment-identity.signed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.comment-identity.signed strong,
.comment-identity.signed a {
  color: var(--text);
}

.comment-disabled {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 214, 102, 0.34);
  background: rgba(255, 214, 102, 0.08);
  color: var(--muted);
  font-size: 13px;
}

.comment-disabled strong {
  color: var(--text);
}

.comment-composer,
.reply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  padding: 10px;
  border: 1px solid var(--line);
  background: rgba(5, 8, 13, 0.66);
}

.comment-composer textarea,
.reply-form textarea {
  min-height: 54px;
  resize: vertical;
}

.comment-input {
  position: relative;
  display: grid;
}

.emoji-picker {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 6;
}

.emoji-trigger {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(5, 8, 13, 0.88);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.emoji-trigger:hover {
  border-color: var(--accent);
  background: rgba(52, 245, 255, 0.08);
}

.emoji-panel {
  position: absolute;
  right: 0;
  bottom: 38px;
  width: 236px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--line);
  background: rgba(5, 8, 13, 0.98);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.emoji-panel button {
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.emoji-panel button:hover {
  border-color: var(--accent);
  background: rgba(52, 245, 255, 0.1);
}

.composer-actions {
  display: grid;
  align-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  min-width: 138px;
}

.composer-actions small,
.inline-reply > small {
  color: var(--muted);
  font-size: 12px;
}

.composer-actions small.warning,
.inline-reply > small.warning {
  color: var(--accent-2);
}

.comment-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.comment-list.loading {
  opacity: 0.55;
  pointer-events: none;
}

.comment-status {
  padding: 8px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(52, 245, 255, 0.05);
}

.comment-status.error {
  border-color: rgba(255, 79, 216, 0.45);
  color: var(--danger);
}

.admin-item {
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(8, 18, 28, 0.52);
}

.comment-floor {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.comment-avatar,
.reply-avatar,
.mini-avatar {
  display: grid;
  justify-items: center;
}

.comment-avatar img,
.comment-avatar > span,
.reply-avatar img,
.reply-avatar > span,
.mini-avatar img,
.mini-avatar > span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #041014;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  object-fit: cover;
}

.comment-main {
  min-width: 0;
}

.comment-meta,
.comment-reply-line header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.comment-meta strong,
.comment-reply-line strong {
  color: var(--text);
}

.comment-meta em {
  margin-left: auto;
  font-style: normal;
  color: var(--muted);
}

.comment-text,
.comment-reply-line p {
  margin: 8px 0;
  line-height: 1.65;
}

.reply-target {
  margin-right: 6px;
  color: var(--accent);
  font-weight: 700;
}

.comment-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.comment-actions form {
  display: inline;
}

.comment-actions button,
.reply-count,
.comment-admin-actions button,
.comment-action-static {
  min-height: 28px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 2px 0;
  font: inherit;
  font-size: 13px;
}

.comment-actions button,
.comment-admin-actions button {
  cursor: pointer;
}

.comment-action-static {
  cursor: default;
}

.comment-actions button:hover {
  color: var(--accent);
}

.comment-actions form:nth-child(2) button {
  color: #ff6b7a;
}

.inline-reply {
  margin-top: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  border-left: 2px solid var(--accent);
}

.comment-replies {
  display: grid;
  gap: 0;
  margin-top: 10px;
  border-left: 1px solid var(--line);
}

.comment-reply-line {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0 10px 14px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.reply-line-form {
  margin-top: 8px;
  padding: 8px;
  background: rgba(8, 18, 28, 0.46);
}

.reply-avatar img,
.reply-avatar > span {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

.comment-item time,
.admin-item span,
.admin-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.comment-tools,
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
  justify-content: flex-end;
}

.comment-tools a,
.pagination a {
  border: 1px solid var(--line);
  padding: 8px 12px;
  color: var(--muted);
}

.comment-tools a.active,
.pagination a.active {
  color: #041014;
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.admin-wrap {
  width: var(--admin-width);
  margin: 0 auto;
  padding: 120px 0 80px;
  display: grid;
  grid-template-columns: clamp(150px, 12vw, 176px) minmax(0, 1fr);
  gap: clamp(22px, 2.5vw, 36px);
}

.admin-nav {
  position: sticky;
  top: 96px;
  align-self: start;
  display: grid;
  gap: 8px;
}

.admin-nav a,
.admin-item button,
.table-actions button,
.table-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--line);
  background: rgba(52, 245, 255, 0.045);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.admin-item button.danger,
.table-actions button.danger,
.comment-admin-actions button.danger {
  border-color: rgba(255, 79, 216, 0.42);
  color: #ffd9f7;
  background: rgba(255, 79, 216, 0.08);
}

.admin-panel {
  min-width: 0;
  overflow-x: auto;
}

.admin-head,
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0;
}

.admin-stats a {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(8, 18, 28, 0.6);
}

.admin-stats strong {
  color: var(--accent-2);
  font-size: 28px;
}

.admin-stats span {
  color: var(--muted);
}

.admin-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.admin-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 0 6px 6px 0;
  padding: 4px 9px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(52, 245, 255, 0.06);
  font-size: 13px;
  white-space: nowrap;
}

.admin-chip.status-muted {
  border-color: rgba(201, 255, 69, 0.36);
  color: var(--accent-2);
}

.admin-chip.status-banned {
  border-color: rgba(255, 79, 216, 0.42);
  color: #ffd9f7;
}

.user-cell {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
}

.user-cell strong,
.user-cell small {
  grid-column: 2;
}

.user-cell .mini-avatar {
  grid-row: 1 / span 2;
}

.mini-avatar img,
.mini-avatar > span {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.user-table td {
  vertical-align: middle;
}

.user-table {
  min-width: 1000px;
}

.user-table th:nth-child(1),
.user-table td:nth-child(1) {
  width: 22%;
}

.user-table th:nth-child(2),
.user-table td:nth-child(2) {
  width: 23%;
}

.user-table th:nth-child(3),
.user-table td:nth-child(3) {
  width: 16%;
}

.user-table th:nth-child(4),
.user-table td:nth-child(4) {
  width: 18%;
}

.user-table th:nth-child(5),
.user-table td:nth-child(5) {
  width: 21%;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.table-actions form,
.admin-item form {
  display: grid;
  grid-template-columns: repeat(2, minmax(64px, max-content));
  gap: 8px;
  margin: 10px 0 0;
  align-items: start;
}

.table-actions form {
  margin: 0;
}

.table-actions-note {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.table-actions .muted-action {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.confirm-dialog[hidden] {
  display: none;
}

.confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
}

.confirm-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 10, 0.72);
  backdrop-filter: blur(10px);
}

.confirm-dialog-panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(5, 12, 18, 0.96);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  transform: translateY(8px);
  opacity: 0;
  transition: transform 160ms ease, opacity 160ms ease;
}

.confirm-dialog-panel.visible {
  transform: translateY(0);
  opacity: 1;
}

.confirm-dialog-panel h2 {
  margin-bottom: 10px;
  font-size: 22px;
}

.confirm-dialog-panel p {
  color: var(--muted);
  line-height: 1.7;
}

.confirm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.button.danger {
  color: #fff;
  border-color: rgba(255, 79, 216, 0.62);
  background: rgba(255, 79, 216, 0.22);
}

.admin-filter {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 1.4fr auto auto;
  gap: 10px;
  margin-bottom: 20px;
}

.flagged {
  color: #ffd9f7 !important;
}

.admin-form,
.admin-login,
.auth-form {
  max-width: 880px;
}

.admin-form {
  display: grid;
  gap: 18px;
}

.admin-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

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

.settings-box {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
}

.settings-box legend {
  color: var(--accent);
  font-weight: 800;
  padding: 0 8px;
}

.setting-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.setting-meta p {
  margin: 0;
}

.setting-meta strong {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 13px;
}

.compact-terms {
  min-height: 96px;
  resize: vertical;
  line-height: 1.8;
}

.auth-layout {
  padding-top: 24px;
}

.auth-actions,
.captcha-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.captcha-line strong {
  min-width: 96px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  color: var(--accent-2);
  background: rgba(201, 255, 69, 0.08);
  text-align: center;
}

.avatar-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
  gap: 10px;
}

.avatar-option {
  position: relative;
  display: grid !important;
  place-items: center;
  min-height: 58px;
  border: 1px solid var(--line);
  background: rgba(52, 245, 255, 0.045);
  cursor: pointer;
}

.avatar-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.avatar-option img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-option:has(input:checked) {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(201, 255, 69, 0.12);
}

.radio-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(8, 18, 28, 0.42);
}

.radio-row input {
  min-height: auto;
  margin-top: 4px;
}

.radio-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.55;
}

.rich-editor {
  border: 1px solid var(--line);
  background: rgba(5, 8, 13, 0.62);
}

.editor-toolbar {
  position: sticky;
  top: 76px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 8, 13, 0.94);
}

.editor-toolbar button {
  min-height: 34px;
  border: 1px solid var(--line);
  background: rgba(52, 245, 255, 0.05);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 6px 10px;
}

.editor-toolbar button:hover,
.editor-toolbar button.active {
  color: #041014;
  background: var(--accent);
}

.editor-surface,
.editor-preview {
  min-height: 560px;
  padding: 24px;
  outline: none;
}

.editor-surface:focus {
  box-shadow: inset 0 0 0 2px rgba(52, 245, 255, 0.18);
}

.editor-surface h2,
.editor-preview h2 {
  font-size: 28px;
}

.editor-surface h3,
.editor-preview h3 {
  font-size: 20px;
}

.editor-surface p,
.editor-preview p,
.editor-surface li,
.editor-preview li {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #05080d;
}

.site-footer-inner {
  width: var(--wide-width);
  margin: 0 auto;
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-footer-inner div {
  display: grid;
  gap: 4px;
}

.site-footer strong {
  color: var(--text);
}

.site-footer a {
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 560ms ease, transform 560ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 940px) {
  .site-header {
    height: 68px;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    top: 68px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    background: rgba(5, 8, 13, 0.96);
  }

  .site-nav.open {
    display: flex;
  }

  .hero {
    min-height: clamp(480px, 72svh, 620px);
    align-items: flex-start;
    padding-top: clamp(78px, 11svh, 108px);
    padding-bottom: clamp(30px, 5svh, 48px);
  }

  .hero-content {
    padding-top: 0;
  }

  .hero-media {
    object-position: 62% 50%;
    opacity: 0.68;
  }

  .hero-shade {
    background:
      linear-gradient(0deg, rgba(5, 8, 13, 0.96) 0%, rgba(5, 8, 13, 0.6) 62%, rgba(5, 8, 13, 0.1) 100%);
  }

  .orbit-panel {
    display: none;
  }

  .intro-grid,
  .focus-project,
  .split,
  .timeline,
  .detail-layout,
  .contact-layout,
  .comments-section,
  .admin-wrap {
    grid-template-columns: 1fr;
  }

  .comment-list {
    grid-column: auto;
  }

  .comment-composer,
  .reply-form,
  .comment-board-head {
    grid-template-columns: 1fr;
  }

  .comment-board-head {
    display: grid;
    align-items: start;
  }

  .comment-tools {
    justify-content: flex-start;
  }

  .admin-nav {
    position: static;
    width: min(100%, 540px);
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .form-grid,
  .admin-filter {
    grid-template-columns: 1fr 1fr;
  }

  .admin-stats {
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  }

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

  .capability-band {
    grid-template-columns: 1fr 1fr;
  }

  .inspector {
    position: static;
  }
}

@media (max-width: 640px) {
  .project-grid,
  .signal-list,
  .feature-matrix,
  .capability-band {
    grid-template-columns: 1fr;
  }

  .post-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .search-bar {
    flex-direction: column;
  }

  h1 {
    font-size: clamp(28px, 9vw, 40px);
  }

  .archive-year,
  .archive-year li {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .site-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-grid,
  .article-columns,
  .admin-filter {
    grid-template-columns: 1fr;
  }

  .article-expanded .article-columns {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .article-columns > div,
  .article-expanded .article-columns > div {
    padding: 6px;
  }

  .article-columns img,
  .article-expanded .article-columns img {
    height: auto;
    max-height: none;
  }

  .article-expanded .article-columns img {
    height: auto;
    max-height: none;
    object-fit: contain;
  }

  .article:not(.article-expanded) .article-columns img {
    height: clamp(360px, 104vw, 420px);
    object-fit: contain;
  }

  .admin-stats {
    grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
    gap: 8px;
    margin: 18px 0;
  }

  .admin-stats a {
    min-height: 88px;
    padding: 14px 12px;
  }

  .admin-stats strong {
    font-size: 26px;
    line-height: 1.05;
  }

  .admin-stats span {
    font-size: 14px;
  }

  .admin-wrap {
    width: min(100% - 32px, var(--admin-max));
    padding: 92px 0 56px;
    gap: 22px;
  }

  .admin-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .admin-nav a {
    min-width: 0;
    min-height: 42px;
    padding: 8px 6px;
    font-size: 14px;
  }

  .admin-panel h1 {
    margin-bottom: 14px;
    font-size: clamp(28px, 8vw, 38px);
  }

  .comment-identity,
  .composer-actions {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .comment-floor {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .comment-avatar img,
  .comment-avatar > span {
    width: 34px;
    height: 34px;
  }

  .comment-actions {
    justify-content: flex-start;
  }

  .comment-identity label {
    grid-template-columns: 1fr;
  }
}
