:root {
  --bg: #0e1116;
  --bg-soft: #131821;
  --bg-paper: rgba(255, 248, 240, 0.03);
  --card: rgba(255, 248, 240, 0.04);
  --text: #ece7df;
  --text-dim: #a9a39a;
  --text-soft: #c8c1b7;
  --line: rgba(255, 248, 240, 0.08);
  --line-strong: rgba(255, 248, 240, 0.16);
  --accent: #d6c2a2;
  --accent-soft: #e3d4bc;
  --max-width: 1180px;
  --narrow-width: 760px;
  --radius: 24px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  --desktop-header-height: 74px;
  --mobile-header-height: 64px;
  --mobile-nav-width: min(84vw, 380px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.03), transparent 28%),
    linear-gradient(to bottom, #0e1116, #10141b 40%, #0e1116 100%);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.75;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

.narrow {
  max-width: var(--narrow-width);
}

.center {
  text-align: center;
}

.site-header {
  position: relative;
  top: 0;
  z-index: 50;
  background: rgba(14, 17, 22, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 248, 240, 0.05);
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  height: 32px;
  line-height: 1;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

.lang-switcher {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 2px;
  backdrop-filter: blur(6px);
}

.lang-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* hover */
.lang-btn:hover {
  color: rgba(255, 255, 255, 0.85);
}

/* active状态（关键） */
.lang-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.hero {
  padding: 110px 0 80px;
}

.hero-inner {
  max-width: 980px;
}

.eyebrow,
.section-note {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  color: var(--accent);
  margin: 0 0 18px;
}

@media (min-width: 769px) {
  html {
    scroll-padding-top: var(--desktop-header-height);
  }

  body {
    padding-top: var(--desktop-header-height);
  }

  .site-header {
    position: fixed;
    inset: 0 0 auto 0;
    width: 100%;
    z-index: 120;
  }
}

.hero h1 {
  margin: 0;
  font-size: clamp(52px, 8vw, 96px);
  line-height: 0.96;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--text);
  max-width: 900px;
}

.hero-text {
  margin: 30px 0 0;
  max-width: 720px;
  font-size: 22px;
  line-height: 1.75;
  color: var(--text-soft);
}

.button-row {
  display: flex;
  gap: 14px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.01);
  transition: all 0.22s ease;
}

.button:hover {
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}

.button.primary {
  background: var(--accent);
  color: #171717;
  border-color: var(--accent);
}

.button.primary:hover {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
}

.section {
  padding: 84px 0;
}

.intro-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.01);
}

.lead-paragraph {
  margin: 0;
  font-size: 28px;
  line-height: 1.7;
  color: var(--text);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
  margin-bottom: 34px;
}

.section-head h2,
.editorial-left h2,
.closing-title {
  margin: 0;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.section-side-text {
  max-width: 360px;
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.8;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.feature-card {
  display: block;
  background: linear-gradient(
    to bottom,
    rgba(255, 248, 240, 0.04),
    rgba(255, 248, 240, 0.02)
  );
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 28px 30px;
  box-shadow: var(--shadow);
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(214, 194, 162, 0.35);
  background: linear-gradient(
    to bottom,
    rgba(255, 248, 240, 0.06),
    rgba(255, 248, 240, 0.03)
  );
}

.card-index {
  display: inline-block;
  margin-bottom: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.16em;
}

.feature-card h3 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 600;
}

.feature-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 17px;
  line-height: 1.8;
}

.editorial-section {
  border-top: 1px solid var(--line);
}

.editorial-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: start;
}

.editorial-right p {
  margin: 0 0 18px;
  color: var(--text-soft);
  font-size: 19px;
}

.closing-section {
  border-top: 1px solid var(--line);
}

.closing-title {
  margin-bottom: 18px;
}

.closing-text {
  margin: 0;
  color: var(--text-dim);
  font-size: 18px;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
}

.footer-inner {
  padding: 26px 28px 42px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--text-dim);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

@media (max-width: 980px) {
  .section-head,
  .editorial-grid,
  .footer-inner {
    grid-template-columns: 1fr;
    display: grid;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 88px 0 64px;
  }

  .hero-text {
    font-size: 19px;
  }

  .lead-paragraph {
    font-size: 23px;
  }
}

@media (max-width: 720px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 12px 16px;
  }

  .hero h1 {
    line-height: 1.02;
  }

  .feature-card h3 {
    font-size: 24px;
  }

  .container {
    padding: 0 20px;
  }
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.works-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.work-card {
  display: block;
}

.work-cover-wrapper {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: var(--bg-soft);
}

.work-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.work-card:hover .work-cover {
  transform: scale(1.04);
}

.work-body {
  padding-top: 8px;
}

.work-title {
  margin: 4px 0 4px;
  font-size: 14px;
  line-height: 1.35;
}

.work-desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-dim);
}

.essay-hero .essay-title {
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.essay-subtitle {
  margin-top: 22px;
  font-size: 20px;
  line-height: 1.8;
  color: var(--text-soft);
}

.essay-meta-section {
  padding-top: 0;
  padding-bottom: 0;
}

.essay-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  color: var(--text-dim);
}

.essay-meta span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

.essay-abstract {
  font-size: 24px;
  line-height: 1.75;
}

.essay-body h2 {
  margin: 52px 0 18px;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 600;
}

.essay-body p {
  margin: 0 0 18px;
  font-size: 19px;
  line-height: 1.95;
  color: var(--text-soft);
}

.essay-figure {
  margin: 34px 0;
}

.essay-figure img {
  width: 100%;
  display: block;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.essay-caption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.7;
}

.essay-note-block {
  margin: 34px 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.essay-note-title {
  margin: 0 0 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--accent);
}

.case-title {
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.case-subtitle {
  margin-top: 20px;
  font-size: 20px;
  color: var(--text-soft);
}

.case-cover {
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--line);
}

.case-info {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.case-info span {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
}

.case-info strong {
  display: block;
  font-size: 16px;
  margin-top: 4px;
}

.case-image {
  width: 100%;
  margin-top: 20px;
  border-radius: 16px;
}

.log-title {
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0;
}

.log-subtitle {
  margin-top: 20px;
  font-size: 20px;
  line-height: 1.8;
  color: var(--text-soft);
}

.log-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.log-meta span,
.log-index a,
.log-status {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.02);
}

.log-index-section {
  padding-top: 0;
  padding-bottom: 0;
}

.log-index {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.log-section-title {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 600;
}

.log-section-intro {
  margin: 0 0 28px;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.8;
}

.log-entry {
  margin: 0 0 24px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.log-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.log-entry-head h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.log-entry-meta {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-dim);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.log-entry-text {
  margin: 0;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.85;
}

.log-image {
  width: 100%;
  display: block;
  margin-top: 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.system-title {
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.system-subtitle {
  margin-top: 20px;
  font-size: 20px;
  line-height: 1.8;
  color: var(--text-soft);
}

.system-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.system-meta span {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.02);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature-card {
  display: block;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  text-decoration: none;
  color: inherit;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.nav-links {
  position: relative;
}

.nav-item.has-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-item.has-dropdown > a {
  display: inline-flex;
  align-items: center;
  height: 32px;
}

.nav-links {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-item.has-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-item.has-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);

  min-width: 180px;
  padding: 8px;

  border-radius: 14px;
  border: 1px solid rgba(255, 248, 240, 0.08);
  background: rgba(16, 20, 27, 0.96);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);

  display: flex;
  flex-direction: column;
  gap: 2px;

  opacity: 0;
  visibility: hidden;

  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease;

  z-index: 999;
}

/* Mobile Navigation */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 200;
  color: var(--text);
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background-color: currentColor;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

/* Hamburger Animation State */
.hamburger.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Navigation Backdrop */
.nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  z-index: 98;
}

.nav-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Utility Classes */
.mobile-only {
  display: none !important;
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: var(--mobile-header-height);
  }

  body {
    padding-top: var(--mobile-header-height);
  }

  .site-header {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--mobile-header-height);
    z-index: 120;
  }

  .nav {
    width: 100%;
    height: 100%;
    padding: 0 20px;
  }

  .mobile-only {
    display: block !important;
  }

  .hamburger {
    display: block;
    margin-left: 16px;
  }

  .nav-links {
    position: fixed;
    top: var(--mobile-header-height);
    right: 0;
    bottom: 0;
    left: auto;
    height: calc(100dvh - var(--mobile-header-height));
    width: var(--mobile-nav-width);
    background: var(--bg-soft);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 22px 20px 20px 20px;
    transform: translate3d(100%, 0, 0);
    transition:
      transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.28s ease;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: none !important;
    z-index: 115;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    overflow-y: auto;
    will-change: transform;
    gap: 6px;
    overscroll-behavior: contain;
    border-left: 1px solid rgba(255, 248, 240, 0.06);
  }

  /* Create overlay to prevent body scroll and avoid shift */

  .nav-links.active {
    display: flex !important;
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* Adjust existing styles override */
  .nav {
    flex-direction: row !important;
    align-items: center !important;
  }

  .nav-links > .nav-item.has-dropdown {
    width: 100%;
    display: block;
  }

  .nav-links > a[href="/about.html"],
  .nav-links > a[href="about.html"] {
    order: 3;
  }

  .nav-links > .nav-archive,
  .nav-links > a[href="/archive.html"],
  .nav-links > a[href="archive.html"] {
    order: 4;
  }

  .nav-links > .nav-projects,
  .nav-links > a[href="/projects.html"],
  .nav-links > a[href="projects.html"] {
    order: 2;
  }

  .nav-links > .nav-writing {
    order: 1;
  }

  .nav-links > .nav-works {
    order: 0;
  }

  /* Make nav items larger on mobile */
  .nav-links a {
    font-size: 15px;
    height: auto;
    padding: 9px 0;
    width: 100%;
    border-bottom: 1px solid var(--line);
    display: block;
  }

  /* Reset dropdown position for mobile */
  .nav-dropdown {
    position: static;
    transform: none;
    transition: none;
    opacity: 1;
    visibility: visible;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: auto;
    margin: 4px 0 4px 36px;
    border-left: 2px solid var(--line);
    padding-left: 28px;
    width: calc(100% - 36px);
  }

  .nav-dropdown a {
    font-size: 13px;
    padding: 7px 0 !important;
    border-bottom: none !important;
    color: var(--text-soft);
    white-space: normal;
    line-height: 1.45;
  }

  .nav-item.has-dropdown:hover .nav-dropdown,
  .nav-item.has-dropdown.active .nav-dropdown {
    display: flex;
  }

  .nav-links .nav-item.has-dropdown:focus-within .nav-dropdown,
  .nav-links .nav-item.has-dropdown:hover .nav-dropdown,
  .nav-links .nav-item.has-dropdown.active .nav-dropdown {
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: none;
  }

  .nav-backdrop {
    top: var(--mobile-header-height);
    z-index: 110;
  }
}

.nav-dropdown a {
  display: block;
  padding: 10px 12px;
  border-radius: 9px;

  text-decoration: none;
  color: rgba(236, 231, 223, 0.92);
  font-size: 14px;
  line-height: 1.35;
  white-space: nowrap;
  text-align: left;
}

.nav-dropdown a:hover {
  background: rgba(255, 248, 240, 0.05);
  color: #ffffff;
  transform: translateX(1px);
}

.nav-item.has-dropdown:hover .nav-dropdown,
.nav-item.has-dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.lang-switcher {
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  overflow: hidden;
}

.lang-btn {
  width: 48px;
  height: 32px;
  border: none;
  background: transparent;
}

.lang-btn.active {
  background: rgba(255, 255, 255, 0.15);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 18, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
}

.modal-content {
  position: relative;
  width: min(920px, 92vw);
  max-height: 90vh;
  overflow: auto;
  background: #0f1724;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  padding: 20px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.modal-image {
  width: 100%;
  display: block;
  border-radius: 12px;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #f3ddc8;
}

.modal-desc {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
}

.list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}

.list-item {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.list-item:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.list-item h3 {
  margin: 0 0 10px;
}

.list-item p {
  margin: 0;
  color: var(--text-soft);
}

/* Accessibility & nav helper */

/* Visible focus for keyboard users */
.user-is-tabbing .nav-links a:focus,
.user-is-tabbing .nav-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

.nav-links a.active {
  color: var(--accent);
  font-weight: 700;
}

.nav-item.has-dropdown > a[aria-expanded="true"] {
  color: var(--accent);
}

/* end accessibility additions */
.skip-link {
  position: absolute;
  left: 12px;
  top: 8px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 6px;
  transform: translateY(-120%);
  transition: transform 0.18s ease;
  z-index: 1200;
  text-decoration: none;
}
.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
body.no-scroll {
  overflow: hidden;
}

p {
  white-space: pre-line;
}

.capability-section {
  margin-bottom: 48px;
}

.capability-section h2 {
  margin-bottom: 18px;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.capability-card {
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: 16px;
  padding: 18px;
  transition: all 0.2s ease;
}

.capability-card:hover {
  transform: translateY(-4px);
  border-color: #2f81f7;
}

.cap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.cap-level {
  font-size: 0.75rem;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.cap-use {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 6px;
}

.cap-note {
  font-size: 0.85rem;
  color: var(--text-soft);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .capability-grid {
    grid-template-columns: 1fr;
  }
}

.capability-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 28px;
}

.capability-head .section-side-text {
  max-width: 420px;
}

.capability-group {
  margin-bottom: 42px;
}

.capability-group h3 {
  margin: 0 0 16px;
  font-size: 1.2rem;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.capability-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg-soft);
  padding: 20px;
}

.cap-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.cap-card-top h4 {
  margin: 0;
  font-size: 1.05rem;
}

.cap-level {
  font-size: 0.74rem;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cap-use {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 0.94rem;
}

.cap-desc {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.72;
}

@media (max-width: 860px) {
  .capability-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .capability-grid {
    grid-template-columns: 1fr;
  }
}
