.journal-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 8%, rgba(25, 189, 242, .07), transparent 28%),
    #060a0d;
}

.journal-page [hidden] { display: none !important; }

.journal-header {
  background: rgba(6, 10, 13, .92);
  border-bottom-color: var(--line);
  backdrop-filter: blur(14px);
}

.journal-header-actions {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  font-family: var(--display);
  font-size: .7rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.journal-header-actions .language-switch { font-size: .68rem; }
.journal-back { color: var(--muted); }
.journal-manage { color: var(--accent); }
.journal-header-actions a { transition: color .25s ease; }
.journal-header-actions a:hover { color: var(--text); }

.journal-shell {
  width: min(1600px, 100%);
  min-height: calc(100vh - var(--header-height));
  margin: 0 auto;
  padding: calc(var(--header-height) + clamp(2rem, 4vw, 4rem)) var(--gutter) clamp(5rem, 8vw, 8rem);
  display: grid;
  grid-template-columns: minmax(220px, 310px) minmax(0, 1fr);
  gap: clamp(3rem, 7vw, 8rem);
}

.journal-sidebar {
  align-self: start;
  position: sticky;
  top: calc(var(--header-height) + 2rem);
}

.journal-kicker,
.tag-index-title {
  color: var(--accent);
  font-family: var(--display);
  font-size: .72rem;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.journal-sidebar-intro h1 {
  margin: 1rem 0 1.25rem;
  font-family: var(--display);
  font-size: clamp(2.7rem, 4vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: .9;
  text-transform: uppercase;
}

.journal-sidebar-intro p {
  max-width: 280px;
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
}

html[lang="zh-CN"] .journal-sidebar-intro h1 {
  font-size: clamp(2.35rem, 2.8vw, 3rem);
  line-height: 1.08;
}

html[lang="zh-CN"] .journal-sidebar-intro p {
  margin-top: .35rem;
  line-height: 1.9;
}

.tag-index {
  margin-top: clamp(3rem, 6vw, 6rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.tag-index-title { display: block; margin-bottom: 1rem; }
.sidebar-new-article {
  display: inline-flex;
  margin-top: 1.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  color: var(--accent);
  font-family: var(--display);
  font-size: .72rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  transition: color .2s ease;
}

.sidebar-new-article:hover { color: var(--text); }
.tag-filter {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .72rem 0;
  border: 0;
  color: #8d9aa3;
  background: none;
  font-family: var(--display);
  font-size: .84rem;
  letter-spacing: .08em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .2s ease, padding .2s ease;
}

.tag-filter b {
  color: #53616a;
  font-size: .65rem;
  font-weight: 500;
}

.tag-filter:hover,
.tag-filter.active {
  padding-left: .55rem;
  color: var(--accent);
}

.tag-filter.active { border-left: 1px solid var(--accent); }
.tag-filter.active b { color: var(--accent); }

.journal-content { min-width: 0; }
.journal-toolbar {
  min-height: 3rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.journal-toolbar p { margin: 0; color: var(--muted); }

.article-card {
  display: grid;
  grid-template-columns: minmax(180px, .78fr) minmax(0, 1.22fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(2rem, 4vw, 4rem) 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.article-card-image {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  background: linear-gradient(135deg, #111a20, #071016);
}

.article-card-image img {
  height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1), filter .4s ease;
}

.article-card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,.1);
  pointer-events: none;
}

.article-card:hover .article-card-image img { transform: scale(1.035); filter: saturate(1.08); }
.article-card-content { align-self: center; }
.article-card-meta,
.reader-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  color: var(--accent);
  font-family: var(--display);
  font-size: .68rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.article-card h2 {
  margin: 1rem 0 .9rem;
  font-family: var(--display);
  font-size: clamp(1.5rem, 2vw, 2.35rem);
  font-weight: 500;
  line-height: 1.05;
  text-transform: uppercase;
}

.article-card p {
  max-width: 660px;
  margin: 0;
  color: #99a6ae;
  font-size: .85rem;
}

.article-card-read {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--text);
  font-family: var(--display);
  font-size: .7rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.article-card:hover .article-card-read { color: var(--accent); }
.article-reader { max-width: 980px; padding: clamp(2.5rem, 5vw, 5rem) 0; }
.reader-back {
  margin-bottom: 4rem;
  padding: 0;
  border: 0;
  color: var(--accent);
  background: none;
  font-family: var(--display);
  font-size: .72rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  cursor: pointer;
}

.article-reader header {
  padding-bottom: clamp(2.5rem, 5vw, 5rem);
  border-bottom: 1px solid var(--line);
}

.article-reader h2 {
  max-width: 13ch;
  margin: 1.2rem 0 1.5rem;
  font-family: var(--display);
  font-size: clamp(2.2rem, 3.5vw, 4rem);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1;
  text-transform: uppercase;
}

html[lang="zh-CN"] .article-reader h2 {
  max-width: 16ch;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: clamp(1.55rem, 2.25vw, 2.65rem);
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1.38;
}

.article-reader #reader-summary {
  max-width: 720px;
  margin: 0;
  color: #aab5bc;
  font-size: 1rem;
}

.reader-body {
  padding: clamp(3rem, 6vw, 6rem) 0;
  color: #c6cfd4;
  font-size: clamp(.95rem, 1.3vw, 1.08rem);
  line-height: 1.9;
}

html[lang="zh-CN"] .article-reader #reader-summary,
html[lang="zh-CN"] .reader-body {
  line-height: 2;
}

.reader-body h2,
.reader-body h3 {
  margin: 2.8rem 0 1rem;
  color: var(--text);
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.1;
}

.reader-body h2 { font-size: 2.4rem; }
.reader-body h3 { font-size: 1.7rem; }
.reader-body p { margin: 0 0 1.6rem; }
.reader-body ul,
.reader-body ol { padding-left: 1.4rem; }
.reader-body a { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
.reader-body blockquote {
  margin: 2rem 0;
  padding: .2rem 0 .2rem 1.5rem;
  border-left: 2px solid var(--accent);
  color: #9eabb3;
}

.reader-body img {
  width: 100%;
  max-height: 80vh;
  margin: clamp(2rem, 5vw, 4rem) 0;
  object-fit: contain;
  background: var(--panel);
}

.reader-image-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.reader-body code {
  padding: .12rem .35rem;
  color: #bcecff;
  background: #101a20;
  font-size: .88em;
}

.reader-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.reader-footer > div { display: flex; flex-wrap: wrap; gap: .5rem; }
.reader-footer span {
  padding: .35rem .6rem;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--display);
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.reader-footer a {
  color: var(--accent);
  font-family: var(--display);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.journal-empty {
  min-height: 60vh;
  display: grid;
  place-content: center;
  justify-items: start;
  max-width: 680px;
}

.journal-empty span { color: var(--accent); font-family: var(--display); letter-spacing: .15em; }
.journal-empty h2 { margin: 1rem 0; font-family: var(--display); font-size: clamp(3rem, 6vw, 6rem); font-weight: 500; line-height: .9; text-transform: uppercase; }
.journal-empty p { color: var(--muted); }
.journal-empty .button { margin-top: 1rem; }

.journal-loading {
  min-height: 45vh;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-family: var(--display);
  font-size: .75rem;
  letter-spacing: .15em;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .journal-shell { grid-template-columns: 190px minmax(0, 1fr); gap: 2.5rem; }
  .journal-sidebar-intro h1 { font-size: 3rem; }
  .article-card { grid-template-columns: 1fr; }
  .article-card-image { min-height: 300px; }
}

@media (max-width: 720px) {
  .journal-header-actions { gap: .8rem; }
  .journal-back { display: none; }
  .journal-shell { display: block; padding-top: calc(var(--header-height) + 2.5rem); }
  .journal-sidebar { position: static; }
  .journal-sidebar-intro h1 { font-size: 3.2rem; }
  .tag-index { margin-top: 2.5rem; }
  #tag-list { display: flex; flex-wrap: wrap; gap: .45rem; }
  .tag-index > .tag-filter,
  #tag-list .tag-filter { width: auto; padding: .5rem .65rem; border: 1px solid var(--line); }
  .tag-filter.active { border-color: var(--accent); }
  .journal-content { margin-top: 3rem; }
  .article-card-image { min-height: 250px; }
  .article-reader h2 { font-size: 2.25rem; line-height: 1.08; }
  html[lang="zh-CN"] .article-reader h2 { font-size: 1.85rem; line-height: 1.42; }
  html[lang="zh-CN"] .journal-sidebar-intro h1 { font-size: 2.65rem; line-height: 1.12; }
  .reader-footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 420px) {
  .journal-manage { display: none; }
  .article-card-image { min-height: 210px; }
}
